| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectchemaxon.struc.CGraph
chemaxon.struc.MoleculeGraph
A graph consisting of MolAtom vertices and MolBond edges.
MolAtom, 
MolBond, 
Serialized Form| Field Summary | |
protected static int | 
DIM_MASK
Dimension bits in flags.  | 
protected  int | 
flags
Stores the dimension (0, 2 or 3) and the chiral flag.  | 
protected  boolean | 
isMultiChiral
true if there are at least two chiral centres  | 
protected  double | 
orix
Origin x.  | 
protected  double | 
oriy
Origin y.  | 
protected  double | 
oriz
Origin z.  | 
protected static int | 
RMCLEANUP_STEREO
When removing a H atom, keep stereo information unchanged.  | 
| Fields inherited from class chemaxon.struc.CGraph | 
btab, ctab, edgeCount, edges, fragIds, grinv, grinvCC, INITIAL_CAPACITY, nFrags, nGrinv, nodeCount, nodes, parentGraph, RMCLEANUP_ALL, RMCLEANUP_EDGES, RMCLEANUP_NONE, sssr, superGraph | 
| Fields inherited from interface chemaxon.struc.StereoConstants | 
ATOMSTEREO_EITHER, ATOMSTEREO_MASK, ATOMSTEREO_NONE, ATOMSTEREO_SPECIFIC, CHIRALITY_MASK, CHIRALITY_R, CHIRALITY_S, CHIRALITYSUPPORT_ALL, CHIRALITYSUPPORT_NONE, CHIRALITYSUPPORT_SELECTED, CIS, CTUMASK, CTUNKNOWN, CTUNSPEC, DBS_ALL, DBS_MARKED, DBS_NONE, PARITY_EITHER, PARITY_EVEN, PARITY_MASK, PARITY_ODD, PARITY_UNSPEC, STGRP_ABS, STGRP_AND, STGRP_NONE, STGRP_OR, TRANS | 
| Constructor Summary | |
MoleculeGraph()
Construct a molecule.  | 
|
MoleculeGraph(MoleculeGraph p)
Construct a molecule or fragment.  | 
|
MoleculeGraph(MoleculeGraph p,
              int na,
              int nb)
Construct a molecule or fragment with the specified number of atoms and bonds.  | 
|
| Method Summary | |
 void | 
adjustMultiChiralFlag()
Checks wether the molecule has multiple chiral centres  | 
 void | 
aromatize(boolean a)
Aromatize or dearomatize molecule.  | 
 double | 
bondlength()
Calculates the regular bond length.  | 
 DPoint3 | 
calcCenter()
Calculates the geometrical center.  | 
 void | 
calcCenter(DPoint3 p)
Calculates the geometrical center.  | 
 int | 
calcDehydrogenizedGrinv(int[] gi)
Calculates the graph invariants with the assumption that hydrogens are removed.  | 
 double | 
calcHeight()
Calculates the molecule height.  | 
 void | 
calcOutRectCenter(DPoint3 p)
 | 
 double | 
calcWidth()
Calculates the molecule width.  | 
 boolean | 
canBeCT(int i2,
        int i3)
Determines whether the bond between the specified atoms can be a CIS/TRANS or not.  | 
 boolean | 
clean(int dim,
      java.lang.String opts)
Calculates atom coordinates.  | 
 void | 
clear()
Clears the molecule.  | 
 void | 
clearForImport(java.lang.String format)
Clears the edges vector, the properties, the flags, and sets the origin coordinates to 0.  | 
 java.lang.Object | 
clone()
Make an identical copy of the molecule.  | 
 void | 
clonecopy(CGraph g)
Make another molecule identical to this one.  | 
 void | 
clonelesscopy(CGraph g)
Copy to selection.  | 
 boolean | 
contains(CGraph graph)
Does the graph contain the specified fragment?  | 
 int[][] | 
createBHtab()
Creates the bond table extended with implicit hydrogen atoms.  | 
 int[][] | 
createCHtab()
Creates the connection table extended with implicit hydrogen atoms.  | 
protected  MoleculeGraph | 
createDehydrogenizedReadOnlyGraph()
Creates a dehydrogenized version of the molecule.  | 
 int[][] | 
getAromrings()
Get aromatic ring atom indexes.  | 
 int[][] | 
getAromrings(int size)
Get aromatic ring atom indexes.  | 
 MolAtom | 
getAtom(int n)
Gets the nth atom.  | 
 MolAtom[] | 
getAtomArray()
Create an array of atoms.  | 
 int | 
getAtomCount()
Gets the number of atoms.  | 
 MolBond | 
getBond(int n)
Gets the nth bond.  | 
 int | 
getBondCount()
Gets the number of bonds.  | 
 int | 
getChirality(int i)
Computes the chirality of an atom of the Molecule instance based on both the coordinates of the neighbouring atoms and the stereo information of the bonds to those.  | 
 double | 
getDesiredLength(int atno1,
                 int atno2,
                 int type)
Gets the ideal bond length in Angstroms.  | 
 double | 
getDesiredLength(MolBond b)
Gets the ideal bond length in Angstroms.  | 
 int | 
getDim()
Gets the dimension.  | 
 MDocument | 
getDocument()
Gets the parent document object.  | 
 java.lang.String | 
getFormula()
Gets the molecular formula.  | 
 MoleculeGraph | 
getGraphUnion()
Gets a graph containing all the atoms and bonds.  | 
 int | 
getGrinv(int[] gi)
Gets the graph invariants.  | 
 int | 
getGrinv(int[] gi,
         boolean uniqueFlag)
Gets the graph invariants (canonical labels).  | 
 int | 
getImplicitHcount()
Gets the total number of implicit hydrogens attached to the molecule.  | 
 DPoint3 | 
getLocation()
Gets the origin of the molecule.  | 
 double | 
getMass()
Calculates the molecular weight of the molecule.  | 
 int[][] | 
getNonAromrings()
Get alpihatic ring atom indexes.  | 
 int[][] | 
getNonAromrings(int size)
Get alpihatic ring atom indexes.  | 
 int | 
getParity(int i)
Computes the parity of an atom of the Molecule instance based on both the coordinates of the neighbouring atoms and the stereo information of the bonds to those.  | 
 DPoint3[] | 
getPoints()
Gets an array containing the atom coordinates.  | 
 int[] | 
getSSSRBondSet()
Get SSSR bond bitsets in integer array.  | 
 int | 
getStereo2(CNode a1,
           int i2,
           int i3,
           CNode a4)
Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration.  | 
 int | 
getStereo2(int i1,
           int i2,
           int i3,
           int i4)
Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration.  | 
 int | 
getStereo2(MolBond b)
Gets cis/trans (Z/E) stereo information for the given bond.  | 
 int | 
getStereo2(MolBond b,
           CNode a1,
           CNode a4)
Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration.  | 
 int | 
getStereo2(MolBond b,
           CNode a1,
           CNode a4,
           boolean grcheck)
Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration.  | 
protected  int | 
getStereo2(MolBond b,
           CNode a1,
           int i2,
           int i3,
           CNode a4)
Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration.  | 
protected  int | 
getStereo2(MolBond b,
           CNode a1,
           int i2,
           int i3,
           CNode a4,
           boolean grcheck)
Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration.  | 
 boolean | 
hasImplicitH()
Indicates, whether the molecule has implicit hydrogen atoms.  | 
 boolean | 
hydrogenize(boolean add)
Implicit/explicit Hydrogen conversion.  | 
 void | 
implicitizeHydrogens(int f)
Removes explicit bound Hydrogens from the graph and converts them to implicit.  | 
 boolean | 
isAbsStereo()
Gets the absolute stereoconfiguration flag.  | 
 boolean | 
isAtom()
Determines whether the structure represents only one atom and an arbitrary number of bonds.  | 
 boolean | 
isBond()
Determines whether the structure represents only one bond and zero or two atoms.  | 
 boolean | 
isMultiChiral()
Returns the multiple chirality flag.  | 
 boolean | 
isRingBond(int idx)
Is this bond in ring?  | 
protected  void | 
makeItSimilar(CGraph g)
Copies some properties of this molecule to the other one specified as argument.  | 
 void | 
moveTo(DPoint3 o)
Move the molecule.  | 
 CGraph | 
newInstance()
Creates a new MoleculeGraph object.  | 
 void | 
qpropCheck(java.util.Vector v)
Check for query property errors.  | 
protected  void | 
removeNode(CNode node,
           int cleanupFlags)
Removes a node and its edges.  | 
protected  void | 
removeNode(int i,
           int cleanupFlags)
Removes a node and its edges.  | 
 void | 
setAbsStereo(boolean c)
Sets the absolute stereoconfiguration flag.  | 
 boolean | 
setChirality(int i,
             int c)
Set chirality of an atom of the Molecule instance based on both the coordinates of the neighbouring atoms and the stereo information of the bonds to those.  | 
 void | 
setDim(int d)
Sets the dimension.  | 
 void | 
setLocation(DPoint3 o)
Set the origin of the molecule.  | 
 boolean | 
setParity(int[] p)
Change the bonds flag (UP/DOWN) connected to the whole molecule to achieve the specified parity array.  | 
 boolean | 
setParity(int i,
          int p)
Change the bonds flag (UP/DOWN) connected to the given atom to achieve the specified parity.  | 
 void | 
setSetSeqs(int id)
Sets the set sequence number of all atoms.  | 
 boolean | 
stereoClean()
Reset the wedges of the molecule, based on the actual parity information.  | 
 void | 
transform(CTransform3D t)
Apply a transformation matrix to the atomic coordinates.  | 
protected  void | 
transform(CTransform3D t,
          boolean incg)
Apply a transformation matrix to the atomic coordinates.  | 
 void | 
valenceCheck()
Check valence and query property errors.  | 
 void | 
valenceCheck(java.util.Vector v)
Check valence and query property errors.  | 
| Methods inherited from class chemaxon.struc.CGraph | 
add, add, addEdge0, addEdgeWithoutChangingIt, addNode0, addNodeWithoutChangingIt, contains, findFrag, findFrags, fuse, fuse0, getBtab, getCtab, getEdge, getEdgeCount, getEdgeVector, getForefather, getFragCount, getFragIds, getGrinv, getGrinvCC, getLock, getNode, getNodeCount, getNodeVector, getParent, getSSSR, indexOf, indexOf, isEmpty, isRealNodeParent, mergeNodes, pack, regenEdges, removeAll, removeAllEdges, removeEdge, removeEdge, removeEdge, removeEdge, removeNode, removeNode, resetCtab, resetGrinvInParents, setEdge, setNode, setNode0, toString | 
| Methods inherited from class java.lang.Object | 
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
protected static final int DIM_MASK
flags, 
Constant Field Valuesprotected static final int RMCLEANUP_STEREO
removeNode(CNode, int), 
removeNode(int, int), 
CGraph.RMCLEANUP_NONE, 
CGraph.RMCLEANUP_ALL, 
CGraph.RMCLEANUP_EDGES, 
Constant Field Valuesprotected transient double orix
protected transient double oriy
protected transient double oriz
protected transient int flags
getDim(), 
isAbsStereo()protected transient boolean isMultiChiral
| Constructor Detail | 
public MoleculeGraph(MoleculeGraph p,
                     int na,
                     int nb)
p - the molecule that contains the created fragmentna - no reallocation needed until the number of atoms is less than
            this valuenb - no reallocation needed until the number of bonds is less than
            this valuepublic MoleculeGraph(MoleculeGraph p)
p - the parent structurepublic MoleculeGraph()
| Method Detail | 
public MDocument getDocument()
public void setDim(int d)
d - 0, 2, or 3flagspublic int getDim()
flagspublic boolean isAbsStereo()
flagspublic void setAbsStereo(boolean c)
c - the absolute stereoconfiguration flagflagspublic void clear()
clearForImport(java.lang.String), 
CGraph.nodespublic void clearForImport(java.lang.String format)
format - input file format, neglectedCGraph.edges, 
orix, 
oriy, 
oriz, 
flags
protected void removeNode(CNode node,
                          int cleanupFlags)
removeNode in class CGraphnode - the nodecleanupFlags - extra clean-up methodsCGraph.RMCLEANUP_NONE, 
CGraph.RMCLEANUP_ALL, 
CGraph.RMCLEANUP_EDGES, 
RMCLEANUP_STEREO
protected void removeNode(int i,
                          int cleanupFlags)
removeNode in class CGraphi - the node indexcleanupFlags - extra clean-up methodsCGraph.RMCLEANUP_NONE, 
CGraph.RMCLEANUP_ALL, 
CGraph.RMCLEANUP_EDGES, 
RMCLEANUP_STEREOpublic void setSetSeqs(int id)
id - the set sequence numberpublic boolean hydrogenize(boolean add)
add - add explicit H atoms if true, remove if false
java.lang.SecurityException - cannot load module because
		  of a security problem (firewall)public void implicitizeHydrogens(int f)
MolAtom.isImplicitizableH(int) returns true.
f - flags specifying special H atom types to includeMolAtom.LONELY_H, 
MolAtom.ISOTOPE_H, 
MolAtom.CHARGED_H, 
MolAtom.RADICAL_H, 
MolAtom.MAPPED_Hpublic int getGrinv(int[] gi)
 Notes:
 1. For normal molecules and R-groups, graph invariants are
 recalculated only if an atom or bond changed, removed or added.
 2. For selections, graph invariants are recalculated
 each time this function is called, because atoms and bonds cannot
 notify selections about their changes.
getGrinv in class CGraphgi - output array, its length must be equal to the number of atoms
java.lang.SecurityException - the GraphInvariants module cannot be
            loaded because of security reasons (firewall)
public int getGrinv(int[] gi,
                    boolean uniqueFlag)
gi - output array, its length must be equal to the number of atomsuniqueFlag - boolean flag
java.lang.SecurityException - the GraphInvariants module cannot be
            loaded because of security reasons (firewall)public int calcDehydrogenizedGrinv(int[] gi)
gi - output array, its length must be equal to the number of atoms
java.lang.SecurityException - the GraphInvariants module cannot be
            loaded because of security reasons (firewall)getGrinv(int[])protected MoleculeGraph createDehydrogenizedReadOnlyGraph()
public void valenceCheck()
MolAtom.valenceCheck()public void valenceCheck(java.util.Vector v)
v - contains the atoms to checkMolAtom.valenceCheck()public void qpropCheck(java.util.Vector v)
v - contains the atoms to checkMolAtom.qpropCheck()public final boolean contains(CGraph graph)
contains in class CGraphgraph - the fragment
public boolean isAtom()
public boolean isBond()
public final int getAtomCount()
public MolAtom getAtom(int n)
n - the atom index
public final int getBondCount()
public MolBond getBond(int n)
n - the bond index
public MolAtom[] getAtomArray()
public void calcCenter(DPoint3 p)
p - reference to the object that will hold the resultpublic void calcOutRectCenter(DPoint3 p)
public DPoint3 calcCenter()
public double calcWidth()
public double calcHeight()
public double getDesiredLength(int atno1,
                               int atno2,
                               int type)
atno1 - atomic number of first moleculeatno2 - atomic number of second moleculetype - bond type
public double getDesiredLength(MolBond b)
b - the bond
public double bondlength()
public DPoint3 getLocation()
orixpublic void setLocation(DPoint3 o)
o - the originorixpublic void moveTo(DPoint3 o)
o - the new originorixpublic void transform(CTransform3D t)
t - the transformation matrix
protected void transform(CTransform3D t,
                         boolean incg)
t - the transformation matrixincg - change graph invariants (true) or not (false)public DPoint3[] getPoints()
public void clonecopy(CGraph g)
clonecopy in class CGraphg - the target moleculepublic void clonelesscopy(CGraph g)
clonelesscopy in class CGraphg - the target molecule object (the selection)public java.lang.Object clone()
clone in class CGraphpublic final int getParity(int i)
i - the index of the atom whose parity is to be determined
java.lang.SecurityException - the Parity module cannot be
            loaded because of security reasons (firewall)StereoConstants.PARITY_ODD, 
StereoConstants.PARITY_EVEN, 
isAbsStereo(), 
setAbsStereo(boolean)
public boolean setParity(int i,
                         int p)
setParity(int[] p) is more efficient.
i - the index of the atom whose parity is to be setp - parity to be set (PARITY_ODD,PARITY_EVEN)
java.lang.SecurityException - the Parity module cannot be
            loaded because of security reasons (firewall)StereoConstants.PARITY_ODD, 
StereoConstants.PARITY_EVEN, 
MolBond.UP, 
MolBond.DOWN, 
setParity(int[] p)public boolean setParity(int[] p)
p - the parity for each atom in the molecule
StereoConstants.PARITY_ODD, 
StereoConstants.PARITY_EVEN, 
isAbsStereo(), 
setAbsStereo(boolean), 
MolBond.UP, 
MolBond.DOWNpublic final int getChirality(int i)
i - the index of the atom whose chirality is to be determined
java.lang.SecurityException - the Parity module cannot be
            loaded because of security reasons (firewall)StereoConstants.CHIRALITY_R, 
StereoConstants.CHIRALITY_S
public boolean setChirality(int i,
                            int c)
i - the index of the atom whose chirality is to be setc - chirality to be set (CHIRALITY_R,CHIRALITY_S)
java.lang.SecurityException - the Parity module cannot be
            loaded because of security reasons (firewall)StereoConstants.CHIRALITY_R, 
StereoConstants.CHIRALITY_S
public final int getStereo2(int i1,
                            int i2,
                            int i3,
                            int i4)
i1 - index of atom A1i2 - index of atom A2i3 - index of atom A3i4 - index of atom A4
StereoConstants.CTUMASK, 
MolBond.calcStereo2()
public final int getStereo2(CNode a1,
                            int i2,
                            int i3,
                            CNode a4)
a1 - atom A1i2 - index of atom A2i3 - index of atom A3a4 - atom A4
StereoConstants.CTUMASK, 
MolBond.calcStereo2()
public final int getStereo2(MolBond b,
                            CNode a1,
                            CNode a4)
b - the bonda1 - atom A1a4 - atom A4
StereoConstants.CTUMASK, 
MolBond.calcStereo2()
public final int getStereo2(MolBond b,
                            CNode a1,
                            CNode a4,
                            boolean grcheck)
b - the bonda1 - atom A1a4 - atom A4grcheck - true if check atom equivalences using graph invariants
StereoConstants.CTUMASK, 
MolBond.calcStereo2()public final int getStereo2(MolBond b)
b - the bond
StereoConstants.CTUMASK, 
MolBond.calcStereo2()
protected final int getStereo2(MolBond b,
                               CNode a1,
                               int i2,
                               int i3,
                               CNode a4)
b - the bonda1 - atom A1i2 - index of atom A2i3 - index of atom A3a4 - atom A4
StereoConstants.CTUMASK, 
MolBond.calcStereo2()
protected final int getStereo2(MolBond b,
                               CNode a1,
                               int i2,
                               int i3,
                               CNode a4,
                               boolean grcheck)
b - the bonda1 - atom A1i2 - index of atom A2i3 - index of atom A3a4 - atom A4grcheck - true if check atom equivalences using graph invariants
StereoConstants.CTUMASK, 
MolBond.calcStereo2()
public final boolean canBeCT(int i2,
                             int i3)
i2 - index of the first atomi3 - index of the second atom
public void aromatize(boolean a)
a - aromatize (true) or dearomatize (false)
java.lang.SecurityException - cannot load module because
		  of a security problem (firewall)public java.lang.String getFormula()
public double getMass()
double value.
protected void makeItSimilar(CGraph g)
makeItSimilar in class CGraphg - the molecule to changepublic CGraph newInstance()
newInstance in class CGraphpublic MoleculeGraph getGraphUnion()
public boolean hasImplicitH()
public boolean clean(int dim,
                     java.lang.String opts)
dim - dimensionsopts - cleaning options 
			O0	No optimization 
		O1	Optimize if needed (default) 
	    	O2	Always optimize 
	e	Verbose either flag
	    	
d show debugging info
 tX	set optimization time limit to X ms
	    	
 iX	set iteration limit to X step
	    	
 rX	set ring step limit to X step
	    	
 cX  set branch step limit to X 
	    	
O0 Lightweight optimization (default)
OD Dreiding optimization
null use the default values
java.lang.SecurityException - cannot load module because
		  of a security problem (firewall)public boolean stereoClean()
public int[][] getAromrings()
public int[][] getNonAromrings()
public int[][] getAromrings(int size)
size - the maximum ring size during ring detection
public int[][] getNonAromrings(int size)
size - the maximum ring size during ring detection
public int[] getSSSRBondSet()
n' bond is in the sssr integer array
 'r', use the following code:
 
 static boolean get(int n, int[] r) {
    return (r[n/32] & (((int)1) << (31-(n % 32)))) != 0 ;
 }
 
public boolean isRingBond(int idx)
idx - the bond index
public int[][] createCHtab()
public int[][] createBHtab()
public int getImplicitHcount()
public boolean isMultiChiral()
public void adjustMultiChiralFlag()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||