|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchemaxon.struc.MoleculeGraph
public class MoleculeGraph
A graph consisting of MolAtom nodes and MolBond edges.
MolAtom
,
MolBond
,
Serialized FormNested Class Summary | |
---|---|
static class |
MoleculeGraph.ValenceCheckState
Possible states of valence check: off: no check for all atoms ambiguousAromaticAtomsIgnored: no check for aromatic Nitrogen-like atoms atoms full: all atoms of the molecule are checked |
Field Summary | |
---|---|
static int |
AROM_AMBIGUOUS
Aromatization type for ambiguous 5-membered rings. |
static int |
AROM_BASIC
Basic aromatization. |
static int |
AROM_CHEMAXON
Deprecated. please use AROM_BASIC instead. Chemaxon aromatization. |
static int |
AROM_DAYLIGHT
Deprecated. please use AROM_GENERAL instead. Daylight aromatization (modified Huckel rule). |
static int |
AROM_GENERAL
General (Daylight conform) aromatization. |
static int |
AROM_LOOSE
Loose aromatization. |
static int |
AROM_SUBSTRUCTURE
Substructure aromatization. |
protected int |
atomCount
The number of atoms. |
protected static int |
AUTO_UNGROUP
Automatic ungroup bit in flags. |
protected int |
bondCount
The number of bonds. |
protected chemaxon.core.util.BondTable |
btab
Bond table. |
static int |
CACHE_REMOVE_ALL
Cache removal option for clearing all cached info. |
static int |
CACHE_REMOVE_AROMATAMODULE
Cache removal option for remove module used in aromatization. |
static int |
CACHE_REMOVE_CACHEMEMORY
Cache removal option for cacheMemory. |
static int |
CACHE_REMOVE_GRINVMODULE
Cache removal option for remove module used in graph invariant calculation. |
static int |
CACHE_REMOVE_PARITYMODULE
Cache removal option for remove module used in parity calculation. |
static int |
CACHE_REMOVE_SSSRMODULE
Cache removal option for remove module used in sssr. |
static int |
CACHE_REMOVE_TABS
Cache remove option to clear ctab and btab. |
protected java.util.List<java.lang.Object[]> |
cacheMemory
|
protected int[][] |
ctab
Connection table. |
static int |
DEAROM_GENERAL
General dearomatization. |
static int |
DEAROM_HUCKELCHECK
Dearomatize method which dearomatizes only that molecules which fullfills the Huckel's rule. |
static int |
DEAROM_HUCKELCHECK_EX
Dearomatize method which dearomatizes only that molecules which fullfills the Huckel's rule. |
protected static int |
DIM_MASK
Dimension bits in flags. |
static int |
FRAG_BASIC
Basic fragmentation, only atom - atom connections (bond) are considered. |
static int |
FRAG_KEEPING_MULTICENTERS
Fragmentation without breaking multicenter S-groups. |
static int |
FRAG_KEEPING_SGROUPS
Fragmentation without breaking S-groups. |
static int |
FRAG_TYPE_COUNT
Number of fragmentation types. |
protected chemaxon.struc.gearch.MoleculeGraphGearch |
gearch
|
static int |
GRINV_DONT_STORE
Graph invariant option to instruct that the graph invariant should not be stored in MoleculeGraph. |
static int |
GRINV_NOHYDROGEN
Graph invariant option for ignoring explicit hydrogens. |
static int |
GRINV_OLDSTEREO
Graph invariant option for calculating graph invariants using the old stereo method. |
static int |
GRINV_STEREO
Graph invariant option for calculating graph invariants using stereo information. |
static int |
GRINV_USEMAPS
Graph invariant option for calculating graph invariants considering atom maps also. |
static int |
GRINV_VALUE_OPTIONS
Unified mask of graph invariant options affecting grinv value. |
protected long |
grinvCC
Graph invariant change count. |
protected static int |
INITIAL_CAPACITY
Initial capacity of the atoms and bonds vectors. |
static java.lang.String |
INVALID_LINKNODE_MESSAGE
|
static int |
MIN_RING_SIZE_FOR_TRANS_DB
The minimal size of the ring for the existence of TRANS double bond. |
static int |
OMIT_POSTCLEAN
Omit arranging process after the hydrogen addition. |
protected double |
orix
Origin x. |
protected double |
oriy
Origin y. |
protected double |
oriz
Origin z. |
protected MoleculeGraph |
parentGraph
The structure that contains this molecule graph as a substructure. |
protected MPropertyContainer |
propertyContainer
|
static int |
RMCLEANUP_ALL
Perform all clean-up methods when removing an atom or a bond. |
static int |
RMCLEANUP_EDGES
When removing an atom or a bond, also remove the bond(s) from the atom object(s). |
protected static int |
RMCLEANUP_FIXCOMPONENT
Remove called from RxnMolecule.fixComponent. |
static int |
RMCLEANUP_MOBJECT
Remove graphics objects containing the removed atom. |
static int |
RMCLEANUP_NONE
Do not perform any clean-up methods when removing an atom or a bond. |
static int |
RMCLEANUP_PARENTDOC
Remove atom from parent document. |
static int |
RMCLEANUP_STEREO
When removing a H atom, keep stereo information unchanged. |
protected MoleculeGraph |
superGraph
Parent of all parents. |
protected MolAtom[] |
theAtoms
The atoms (nodes). |
protected MolBond[] |
theBonds
The bonds (edges). |
protected boolean |
useOnlyFirstAtomInStereoCalculation
|
protected static int |
VALENCE_CHECK
Valence check calculation bit in flags. |
protected static int |
VALENCE_CHECK_AMBIGUOUS
Valence check calculation bit in flags for checking ambiguous aromatic atoms requiring . |
Fields inherited from interface chemaxon.struc.StereoConstants |
---|
ANTI, ATOMSTEREO_EITHER, ATOMSTEREO_MASK, ATOMSTEREO_NONE, ATOMSTEREO_SPECIFIC, CHIRALITY_M, CHIRALITY_MASK, CHIRALITY_P, CHIRALITY_r, CHIRALITY_R, CHIRALITY_s, CHIRALITY_S, CHIRALITYSUPPORT_ALL, CHIRALITYSUPPORT_NONE, CHIRALITYSUPPORT_SELECTED, CIS, CTUMASK, CTUNKNOWN, CTUNSPEC, DBS_ALL, DBS_MARKED, DBS_NONE, ENDO, EXO, PARITY_ALLENE, PARITY_EITHER, PARITY_EVEN, PARITY_MASK, PARITY_ODD, PARITY_TETRAHEDRAL, PARITY_UNSPEC, STGRP_ABS, STGRP_AND, STGRP_NONE, STGRP_OR, SYN, TRANS |
Constructor Summary | |
---|---|
MoleculeGraph()
Construct a 2 dimensional molecule. |
|
MoleculeGraph(MoleculeGraph p,
int na,
int nb)
Construct a molecule or fragment with the specified number of atoms and bonds. |
Method Summary | ||
---|---|---|
void |
add(MolAtom atom)
Adds an atom to the molecule. |
|
void |
add(MolBond bond)
Adds a bond to the molecule. |
|
protected void |
addAtom0(MolAtom atom)
Adds an atom. |
|
protected void |
addAtomsAndBondsTo(MoleculeGraph s)
Adds all atoms and bonds to the specified molecule. |
|
protected void |
addAtomToFragment(MolAtom atom)
Adds an atom to a fragment. |
|
protected int |
addAtomWithoutChangingIt(MolAtom atom)
Adds an atom without setting its parentGraph and index fields. |
|
protected void |
addBond0(MolBond bond)
Adds a bond. |
|
protected int |
addBondWithoutChangingIt(MolBond bond)
Adds a bond without setting its parentGraph and index fields. |
|
boolean |
addExplicitHydrogens(int f)
Deprecated. as of Marvin 5.7 replaced by Hydrogenize.convertImplicitHToExplicit(MoleculeGraph, MolAtom[], int) |
|
boolean |
addExplicitHydrogens(int f,
MolAtom[] atoms)
Deprecated. as of Marvin 5.7 replaced by Hydrogenize.convertImplicitHToExplicit(MoleculeGraph, MolAtom[], int) |
|
void |
addExplicitLonePairs()
Deprecated. as of Marvin 5.7 replaced by Hydrogenize.convertImplicitLonePairsToExplicit(MoleculeGraph, MolAtom[]) |
|
void |
adjustMultiChiralFlag()
Checks whether the molecule has multiple chiral centres |
|
void |
aromatize()
Aromatize molecule using the default general aromatization method. |
|
void |
aromatize(boolean a)
Aromatize (using the default general aromatization method) or dearomatize molecule. |
|
void |
aromatize(int method)
Aromatizes molecule. |
|
void |
aromatize(int method,
boolean checkAmbiguity)
Aromatizes molecule. |
|
boolean |
arrangeComponents()
Deprecated. as of Marvin 5.7 replaced by CleanUtil.arrangeComponents(MoleculeGraph, boolean, boolean)
To keep the same functionality use with TRUE boolean parameters. |
|
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 |
calcHybridization()
Calculates and sets hybridazation state for each atom. |
|
DPoint3 |
calcOutRect()
Calculates the outer rectangle. |
|
void |
calcOutRect(DPoint3 p)
Calculates the outer rectangle. |
|
DPoint3 |
calcOutRectCenter()
Calculates the center of the outer rectangle. |
|
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 |
canBeCT(int i2,
int i3,
boolean grcheck)
Determines whether the bond between the specified atoms can be a CIS/TRANS or not. |
|
boolean |
canBeCT(MolBond bond)
Determines whether the given bond can be a CIS/TRANS or not. |
|
protected void |
checkBondConsistency()
|
|
void |
checkConsistency()
Deprecated. |
|
boolean |
clean(int dim,
java.lang.String opts)
Deprecated. as of Marvin 5.7 replaced by Cleaner.clean(MoleculeGraph, int, String) |
|
boolean |
clean(int dim,
java.lang.String opts,
chemaxon.common.util.MProgressMonitor pmon)
Deprecated. as of Marvin 5.7 replaced by Cleaner.clean(MoleculeGraph, int, String, MProgressMonitor) |
|
void |
clear()
Clears the molecule. |
|
void |
clearCachedInfo(int options)
Deletes the cached information depending on the given options. |
|
void |
clearForImport(java.lang.String format)
Clears the bonds 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(int[] iatoms,
MoleculeGraph g)
Copies the specified atoms of this molecule graph to another one. |
|
void |
clonecopy(MoleculeGraph m)
Make another molecule identical to this one. |
|
protected boolean |
clonecopyMoleculeGraphWithoutSgroups(int[] cnodes,
MolBond[] cedges,
int nb,
MoleculeGraph graph)
Copies the specified atoms and bonds of this molecule graph to another one. |
|
void |
clonelesscopy(MoleculeGraph graph)
Copy to selection. |
|
boolean |
contains(MolAtom atom)
Checks if the molecule graph contains the specified atom. |
|
boolean |
contains(MolBond bond)
Checks if the molecule graph contains the specified bond. |
|
boolean |
contains(MoleculeGraph graph)
Does the molecule 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. |
|
protected chemaxon.struc.gearch.MoleculeGraphGearch |
createGearch()
|
|
protected Smolecule |
createSmolecule()
Creates a Smolecule represenation of this molecule. |
|
boolean |
dearomatize()
Dearomatize molecule. |
|
boolean |
dearomatize(int method)
Dearomatize molecule. |
|
protected int |
findAtom(MolAtom atom)
Finds an atom in the atoms array. |
|
MolAtom |
findAtomClone(MolAtom a)
Finds the clone of an atom. |
|
|
findBasicFrags(java.lang.Class<C> cl)
Determines the disconnected fragments and puts them into an array. |
|
protected int |
findBond(MolBond bond)
Finds a bond in the bonds array. |
|
int[] |
findComponentIds()
Assigns a component ID to each connected component. |
|
int[] |
findComponentIds(int[] inds)
Assigns a component ID to each connected component formed by the specified atom indexes. |
|
void |
findFrag(int i,
int fragmentationType,
MoleculeGraph frag)
Determines the subgraph connected to the specified atom. |
|
void |
findFrag(int i,
MoleculeGraph frag)
Deprecated. since 5.6, replaced by findFrag(int, int, MoleculeGraph) ,
to keep the same functionality, use value FRAG_KEEPING_MULTICENTERS
for parameter fragmentationType, e.g.:
mol.findFrag(i, MoleculeGraph.FRAG_KEEPING_MULTICENTERS, frag); |
|
void |
findFragById(int fragId,
int fragmentationType,
MoleculeGraph frag)
Determines the subgraph corresponding to the specific fragment ID. |
|
void |
findFragById(int fragId,
MoleculeGraph frag)
Deprecated. since 5.6, replaced by findFragById(int, int, MoleculeGraph) ,
to keep the same functionality, use value FRAG_KEEPING_MULTICENTERS
for parameter fragmentationType, e.g.:
mol.findFragById(fragId, MoleculeGraph.FRAG_KEEPING_MULTICENTERS, frag); |
|
|
findFrags(java.lang.Class<C> cl)
Deprecated. since 5.6, replaced by findFrags(Class, int) ,
to keep the same functionality, use value FRAG_KEEPING_MULTICENTERS
for parameter fragmentationType, e.g.:
mol.findFrags(cl, MoleculeGraph.FRAG_KEEPING_MULTICENTERS); |
|
|
findFrags(java.lang.Class<C> cl,
int fragmentationType)
Determines the disconnected fragments and puts them into an array. |
|
protected static int |
findInArray(java.lang.Object[] array,
int[] indices,
int n,
java.lang.Object o)
Finds an object in an array. |
|
protected boolean |
fixSelfReferringProperty(MProp prop)
Fix a property containing reference to the molecule. |
|
void |
fuse(MoleculeGraph graph)
Adds those atoms and bonds of another molecule to this one that are not already elements. |
|
void |
fuse(MoleculeGraph graph,
boolean check)
Adds atoms and bonds of another molecule to this one. |
|
protected void |
fuse0(MoleculeGraph g,
boolean check)
Adds the atoms and bonds of another molecule to this one. |
|
int[][][] |
getAromaticAndAliphaticRings(int aromatizationType,
boolean onlyAromrings,
boolean aromatize,
int maxRingSize,
int ringsLimit)
Get aromatic and or aliphatic ring atom indexes. |
|
int[][] |
getAromrings()
Deprecated. please use getAromaticAndAliphaticRings instead. |
|
int[][] |
getAromrings(int size)
Deprecated. please use getAromaticAndAliphaticRings instead. |
|
MolAtom |
getAtom(int n)
Gets the nth atom. |
|
MolAtom[] |
getAtomArray()
Creates an array of atoms. |
|
int |
getAtomCount()
Gets the number of atoms. |
|
int |
getAtomCount(int atomicNumber)
Gets the number of atoms with the given atomic number. |
|
int |
getAtomicNumber(MolAtom atom)
|
|
java.util.List<MolAtom> |
getAtomReferenceList()
|
|
MolBond |
getBond(int n)
Gets the nth bond. |
|
MolBond[] |
getBondArray()
Creates an array of bonds. |
|
int |
getBondCount()
Gets the number of bonds. |
|
protected MolBond[] |
getBonds(MolAtom atom)
Returns the bonds attached to the given atom in this molecule graph. |
|
chemaxon.core.util.BondTable |
getBondTable()
Gets the bond (edge) table. |
|
int[][] |
getBtab()
Deprecated. as of Marvin 5.4, please use getBondTable() instead |
|
int |
getCharge(MolAtom atom)
|
|
int |
getChirality(int i)
Computes the chirality of an atom of the Molecule instance based on both the coordinates of the neighboring atoms and the stereo information of the bonds to those. |
|
int[][] |
getCSSR()
Gets the Complete Set of Smallest Ring atom indexes array. |
|
int[][] |
getCtab()
Gets the connection table. |
|
double |
getDesiredLength(int atno1,
int atno2,
int type)
Deprecated. since Marin 5.11 use MolBond.desiredLength(int, int, int, int) instead. |
|
double |
getDesiredLength(MolBond b)
Deprecated. since Marvin 5.11 use MolBond.desiredLength(int, int, int, int) instead. |
|
int |
getDim()
Gets the dimension. |
|
MDocument |
getDocument()
Gets the document object. |
|
protected MDocument |
getDocumentForChild(MoleculeGraph g)
Gets the parent document for a child molecule graph. |
|
MolBond |
getEdge(int i)
Deprecated. As of Marvin 5.3, replaced by getBond(int) . |
|
MolBond[] |
getEdgeArray()
Deprecated. As of Marvin 5.3, replaced by getBondArray() . |
|
int |
getEdgeCount()
Deprecated. As of Marvin 5.3, replaced by getBondCount() . |
|
java.util.Vector<MolBond> |
getEdgeVector()
Deprecated. As of Marvin 5.3, replaced by Arrays.asList( . |
|
DPoint3[] |
getEnclosingCube()
Gets the cube that encloses the atoms of molecule graph. |
|
double |
getExactMass()
Calculates the molecular exact weight of the molecule. |
|
int |
getExplicitHcount()
Gets the total number of explicit hydrogens attached to the molecule. |
|
int |
getExplicitLonePairCount(int i)
|
|
int |
getFlags()
Gets the dimension and chiral flags. |
|
MoleculeGraph |
getForefather()
Gets the first parent. |
|
int |
getFormalCharge()
Gets the (total) formal charge of the molecule. |
|
java.lang.String |
getFormula()
Gets the molecular formula. |
|
int |
getFragCount()
Deprecated. since 5.6, replaced by getFragCount(int) ,
to keep the same functionality, use value FRAG_KEEPING_MULTICENTERS
for parameter fragmentationType, e.g.:
mol.getFragCount(MoleculeGraph.FRAG_KEEPING_MULTICENTERS); |
|
int |
getFragCount(int fragmentationType)
Returns the number of fragments for the given fragmentation type. |
|
int[] |
getFragIds()
Deprecated. since 5.6, replaced by getFragIds(int) ,
to keep the same functionality, use value FRAG_KEEPING_MULTICENTERS
for parameter fragmentationType, e.g.:
mol.getFragIds(MoleculeGraph.FRAG_KEEPING_MULTICENTERS); |
|
int[] |
getFragIds(int fragmentationType)
Gets an array containing the fragment id for each atom for the given fragmentation type. |
|
int |
getFreeAttachmentPoints(MolAtom atom)
|
|
MoleculeGraph |
getGraphUnion()
Gets a molecule graph containing all the atoms and bonds. |
|
protected int[] |
getGrinv()
Gets the graph invariants array. |
|
int |
getGrinv(int[] gi)
Gets the graph invariants. |
|
int |
getGrinv(int[] gi,
boolean uniqueFlag)
Deprecated. Please use getGrinv(int[], int) instead. |
|
int |
getGrinv(int[] gi,
int options)
Gets the graph invariants (canonical labels). |
|
long |
getGrinvCC()
Gets the graph invariant change count. |
|
int |
getGrinvOptions()
Gets graph invariant calculation options passed to the module. |
|
int |
getImplicitHcount()
Gets the total number of implicit hydrogens attached to the molecule. |
|
int |
getImplicitHCount(MolAtom atom)
|
|
MolAtom |
getLigand(MolAtom atom,
int n)
|
|
int |
getLigandAtno(MolAtom atom,
int n)
|
|
chemaxon.struc.BondType |
getLigandBondType(MolAtom atom,
int i)
|
|
int |
getLigandCount(MolAtom atom)
|
|
int |
getLocalParity(int i)
Computes the local parity of an atom of the Molecule instance based on both the coordinates of the neighboring atoms and the stereo information of the bonds to those. |
|
DPoint3 |
getLocation()
Gets the origin of the molecule. |
|
java.lang.Object |
getLock()
Gets the lock object for synchronization. |
|
int |
getLonePairCount(int i)
Gets the number of lone pairs. |
|
double |
getMass()
Calculates the molecular weight of the molecule. |
|
int |
getMaxRgroupAttachmentPointOrder()
Returns the maximal attachment point order of R-group attachment point atoms in this molecule graph. |
|
java.lang.String |
getName()
Gets the molecule name. |
|
MolAtom |
getNode(int i)
Deprecated. As of Marvin 5.3, replaced by getAtom(int) . |
|
int |
getNodeCount()
Deprecated. As of Marvin 5.3, replaced by getAtomCount() . |
|
java.util.Vector<MolAtom> |
getNodeVector()
Deprecated. As of Marvin 5.3, replaced by Arrays.asList( . |
|
int[][] |
getNonAromrings()
Deprecated. please use getAromaticAndAliphaticRings instead. |
|
int[][] |
getNonAromrings(int size)
Deprecated. please use getAromaticAndAliphaticRings instead. |
|
MoleculeGraph |
getParent()
Gets the parent graph that contains this substructure. |
|
protected MDocument |
getParentDocument()
Gets the document or the document of the parent graph. |
|
int |
getParity(int i)
Computes the parity of an atom of the Molecule instance based on both the coordinates of the neighboring atoms and the stereo information of the bonds to those. |
|
int |
getParityType(int idx)
Gets parity type. |
|
DPoint3[] |
getPoints()
Gets an array containing the atom coordinates. |
|
protected int |
getPossibleAttachmentPoints(MolAtom molAtom)
Calculates the possible attachment point value for an atom based on the attachment point settings of the atom. |
|
int |
getRadicalCount(MolAtom atom)
|
|
int[] |
getSmallestRingSizeForIdx()
Get the smallest ring size in which the atom (specified with it's index) can be located. |
|
int[][] |
getSSSR()
Gets the Smallest Set of Smallest Ring atom indexes array. |
|
int[][] |
getSSSRBonds()
Gets the Smallest Set of Smallest Ring bond indexes array. |
|
java.util.BitSet |
getSSSRBondSet()
Get SSSR bond index bitset. |
|
long[] |
getSSSRBondSetInLong()
Get SSSR bond bitsets in long array. |
|
int[][] |
getSSSRIdxesForAtoms()
Get the sssr ring indexes in which the atom (specified with it's index) can be located. |
|
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(MolAtom a1,
int i2,
int i3,
MolAtom a4)
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. |
|
protected int |
getStereo2(MolBond b,
MolAtom a1,
int i2,
int i3,
MolAtom a4)
Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration. |
|
protected int |
getStereo2(MolBond b,
MolAtom a1,
int i2,
int i3,
MolAtom a4,
boolean grcheck)
Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration. |
|
int |
getStereo2(MolBond b,
MolAtom a1,
MolAtom a4)
Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration. |
|
int |
getStereo2(MolBond b,
MolAtom a1,
MolAtom a4,
boolean grcheck)
Gets cis/trans stereo information for an A1-A2=A3-A4 atom configuration. |
|
protected int |
getSubGraphCount()
Gets the number of all "submolecules". |
|
MoleculeGraph[] |
getSubGraphs()
Gets all "submolecules". |
|
protected void |
getSubGraphs(MoleculeGraph[] m,
int off)
Gets all "submolecules". |
|
int |
getTotalCharge()
Gets the total (formal) charge of the molecule. |
|
MoleculeGraph.ValenceCheckState |
getValenceCheckState()
|
|
int |
getValenceProperty(MolAtom atom)
|
|
double[] |
getVisibleCoords(MolAtom ma)
Returns the coordinates of the given atom (contained in the molecule). |
|
boolean |
hasAtomSet()
Tests whether the molecule graph has atom sets. |
|
boolean |
hasBondSet()
Tests whether the molecule graph has atom sets. |
|
boolean |
hasExplicitLonePairs()
Tests whether the molecule has explicit lone pair atoms. |
|
boolean |
hasExtraLabelSet()
|
|
boolean |
hasImplicitH()
Tests whether the molecule has implicit hydrogen atoms. |
|
boolean |
hasSelfReferringProperty()
Tests whether the property list contains the molecule. |
|
boolean |
hasValenceError()
Determines if this molecule has a valence error on any of its atoms. |
|
boolean |
hydrogenize(boolean add)
Deprecated. as of Marvin 5.7 replaced by Hydrogenize.convertImplicitHToExplicit(MoleculeGraph) and
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph) |
|
void |
implicitizeHydrogens(int f)
Deprecated. as of Marvin 5.7 replaced by chemaxon.calculations.hydrogenize.Hydrogenize#convertExplicitHToImplicit(MoleculeGraph)(MoleculeGraph, int) ,
the following usage will give the same results:
chemaxon.calculations.hydrogenize.Hydrogenize.convertExplicitHToImplicit(mol, f); |
|
void |
implicitizeHydrogens(int f,
MolAtom[] atoms)
Deprecated. as of Marvin 5.7 replaced by Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int) ,
the following usage will give the same results:
chemaxon.calculations.hydrogenize.Hydrogenize.convertExplicitHToImplicit(mol, atoms, f); |
|
void |
implicitizeHydrogens(int f,
MolAtom[] atoms,
boolean check)
Deprecated. as of Marvin 5.7 replaced by Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean)
the following usage will give the same results:
chemaxon.calculations.hydrogenize.Hydrogenize.convertExplicitHToImplicit(mol, atoms, f, check); |
|
protected boolean |
implicitizeHydrogens0(int f,
MolAtom[] atoms,
boolean check)
Deprecated. as of Marvin 5.7 replaced by Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean) |
|
protected void |
incGrinvCC()
Increases the graph invariant change count and sets grinv to null. |
|
void |
incGrinvCCOnly()
Increases the graph invariant change count, but does not change grinv. |
|
int |
indexOf(MolAtom atom)
Gets the index of the specified atom. |
|
int |
indexOf(MolBond bond)
Gets the index of the specified bond. |
|
void |
insertAtom(int i,
MolAtom atom)
Inserts the atom at the specified index. |
|
void |
insertBond(int i,
MolBond bond)
Inserts the bond at the specified index. |
|
void |
insertBondInOrder(MolBond e,
MolBond[] order)
Insert a bond in the order specified as the second argument. |
|
void |
insertEdge(int i,
MolBond edge)
Deprecated. As of Marvin 5.3, replaced by insertBond(int, MolBond) . |
|
void |
insertEdgeInOrder(MolBond e,
MolBond[] order)
Deprecated. As of Marvin 5.3, replaced by insertBondInOrder(MolBond, MolBond[]) . |
|
void |
insertNode(int i,
MolAtom node)
Deprecated. As of Marvin 5.3, replaced by insertAtom(int, MolAtom) . |
|
protected void |
insertNullAtoms(int i,
int count)
Insert nulls into the atom array. |
|
protected void |
insertNullBonds(int i,
int count)
Insert nulls into the bond array. |
|
boolean |
isAbsStereo()
Gets the absolute stereoconfiguration flag. |
|
boolean |
isAcceptedSpecialLigand(MolAtom atom)
|
|
boolean |
isAtom()
Determines whether the structure represents only one atom and an arbitrary number of bonds. |
|
boolean |
isAtomInRing(MolAtom atom)
|
|
boolean |
isBond()
Determines whether the structure represents only one bond and zero or two atoms. |
|
boolean |
isEmpty()
Tests whether the molecule graph is empty. |
|
protected boolean |
isGrinvCCValid()
Tests whether the graph invariant change count is valid. |
|
boolean |
isLargeMolecule()
Returns true if large molecule
(number of atoms exceeds 1000 ). |
|
boolean |
isMolecule()
Checks if the object is an instance of Molecule or not. |
|
boolean |
isMultiChiral()
Returns the multiple chirality flag. |
|
protected void |
isolate(MolAtom node)
Isolates atom: a more efficient way of removing an atom than removeAtom(chemaxon.struc.MolAtom) , especially for large molecule graphs. |
|
protected void |
isolate(MolBond edge)
Isolates bond: a more efficient way of removing a bond than removeBond(chemaxon.struc.MolBond) , especially for large molecule graphs. |
|
boolean |
isOnlyFirstAtomInStereoCalculation()
Get how parity module interpret wedes. |
|
boolean |
isQuery()
Indicates if the molecule has query features: query atoms or query bonds. |
|
protected boolean |
isRealAtomParent()
Can it be a real atom parent? |
|
boolean |
isRing()
Tests whether the molecule graph represents a ring. |
|
boolean |
isRingBond(int idx)
Is this bond in ring? |
|
boolean |
isSelfReference(MProp p)
Tests whether the specified property is a self reference to the molecule. |
|
boolean |
isSimilarTo(MoleculeGraph g)
Tests if the molecule graph is similar to another graph. |
|
boolean |
isSymmetric()
Tests whether the molecule graph is symmetric. |
|
boolean |
isValenceCheckEnabled()
Deprecated. since Marvin 5.9, please use getValenceCheckState() instead |
|
boolean |
isValidLinkNode(int linkAtomIdx,
int outer1,
int outer2)
Checks whether the specified link atom is valid or not. |
|
protected void |
makeItSimilar(MoleculeGraph g)
Copies some properties of this molecule to the other one specified as argument. |
|
void |
mergeAtoms(MolAtom that,
MolAtom a)
Merges the bonds of an atom with another atom, then adds the atom to the molecule. |
|
void |
mergeFrags()
Deprecated. since 5.6, it was an empty method in this class which is not required any more, it's usage can simply be deleted. |
|
int |
mergeFrags(int id1,
int id2)
Deprecated. since 5.6, replaced by mergeFrags(int, int, int) ,
to keep the same functionality, use value FRAG_KEEPING_MULTICENTERS
for parameter fragmentationType, e.g.:
mol.mergeFrags(id1, id2, MoleculeGraph.FRAG_KEEPING_MULTICENTERS); |
|
int |
mergeFrags(int id1,
int id2,
int fragmentationType)
Merges two connected components of the given fragmentation type. |
|
void |
mergeNodes(MolAtom that,
MolAtom a)
Deprecated. As of Marvin 5.3, replaced by mergeAtoms(MolAtom, MolAtom) . |
|
void |
moveTo(DPoint3 o)
Move the molecule. |
|
MoleculeGraph |
newInstance()
Creates a new MoleculeGraph object. |
|
void |
pack()
Reduce memory usage. |
|
boolean |
partialClean(int dim,
int[] fixed,
java.lang.String opts)
Deprecated. as of Marvin 5.7 replaced by Cleaner.partialClean(MoleculeGraph, int, int[], String) |
|
boolean |
partialClean(Molecule[] template,
java.lang.String opts)
Deprecated. as of Marvin 5.7 replaced by Cleaner.partialClean(Molecule, Molecule[], String) |
|
boolean |
partialClean(MoleculeGraph template,
int[] map,
java.lang.String opts)
Deprecated. as of Marvin 5.7 replaced by Cleaner.partialClean(MoleculeGraph, MoleculeGraph, int[], String) |
|
MPropertyContainer |
properties()
Gets the property container. |
|
void |
qpropCheck(java.util.List<MolAtom> v)
Check for query property errors. |
|
void |
regenBonds()
Regenerates the bond vector: remove its elements, then put the bond objects from the atoms into it. |
|
protected void |
regenCtabs()
Regenerates connection table and bond table. |
|
void |
regenEdges()
Deprecated. As of Marvin 5.3, replaced by regenBonds() . |
|
protected void |
regenGearch()
Recreate graph search results object. |
|
void |
removeAll()
Removes all the atoms and bonds. |
|
void |
removeAllBonds()
Removes all bonds. |
|
void |
removeAllEdges()
Deprecated. As of Marvin 5.3, replaced by removeAllBonds() . |
|
void |
removeAtom(int i)
Removes an atom and its bonds by index. |
|
void |
removeAtom(int i,
int cleanupFlags)
Removes an atom and its bonds with extra clean-up options. |
|
void |
removeAtom(MolAtom atom)
Removes an atom and its bonds by reference. |
|
void |
removeAtom(MolAtom atom,
int cleanupFlags)
Removes an atom and its bonds with extra clean-up options. |
|
void |
removeBond(int i)
Removes a bond by index. |
|
protected void |
removeBond(int i,
int cleanupFlags)
Removes a bond by index. |
|
void |
removeBond(MolBond bond)
Removes a bond by reference. |
|
protected void |
removeBond(MolBond bond,
int cleanupFlags)
Removes a bond by reference. |
|
void |
removeEdge(int i)
Deprecated. As of Marvin 5.3, replaced by removeBond(int) . |
|
void |
removeEdge(MolBond edge)
Deprecated. As of Marvin 5.3, replaced by removeBond(MolBond) . |
|
void |
removeExplicitLonePairs()
Deprecated. as of Marvin 5.7 replaced by Hydrogenize.convertExplicitLonePairsToImplicit(MoleculeGraph) |
|
protected void |
removeIsolatedAtoms()
Removes the null atom entries in the atoms array
and sets the index fields appropriately. |
|
protected void |
removeIsolatedBonds()
Removes the null bond entries in the bonds array
and sets the index fields appropriately. |
|
void |
removeNode(int i)
Deprecated. As of Marvin 5.3, replaced by removeAtom(int) . |
|
void |
removeNode(int i,
int cleanupFlags)
Deprecated. As of Marvin 5.3, replaced by removeAtom(int, int) . |
|
void |
removeNode(MolAtom node)
Deprecated. As of Marvin 5.3, replaced by removeAtom(MolAtom) . |
|
void |
removeNode(MolAtom node,
int cleanupFlags)
Deprecated. As of Marvin 5.3, replaced by removeAtom(MolAtom, int) . |
|
void |
replaceBond(MolBond oldb,
MolBond newb)
Replaces an bond by another one. |
|
void |
replaceEdge(MolBond olde,
MolBond newe)
Deprecated. As of Marvin 5.3, replaced by replaceBond(MolBond, MolBond) . |
|
protected void |
resetCtab()
An operation performed that changed the connection table and the graph invariants. |
|
protected void |
resetGrinvInParents()
Graph invariants must be recalculated for this graph and all parent graphs. |
|
protected java.lang.Object[] |
restoreCache(int n)
Restores caches like connection table, bond table, etc. |
|
void |
revalidateCoordDependentProps()
Revalidate coordinate dependent properties. |
|
protected java.lang.Object[] |
saveCache(int n)
Saves caches like connection table, bond table, etc. |
|
void |
setAbsStereo(boolean c)
Sets the absolute stereoconfiguration flag. |
|
void |
setAtom(int i,
MolAtom atom)
Sets the atom at the specified index. |
|
protected void |
setAtom0(int i,
MolAtom atom)
Sets the atom at the specified index. |
|
void |
setAtomSetSeqs(int id)
Sets the set sequence number of all atoms. |
|
void |
setBond(int i,
MolBond b)
Sets the bond at the specified index. |
|
void |
setBondSetSeqs(int id)
Sets the set sequence number of all bonds. |
|
boolean |
setChirality(int i,
int c)
Set chirality of an atom of the Molecule instance based on both the coordinates of the neighboring atoms and the stereo information of the bonds to those. |
|
void |
setDim(int d)
Sets the dimension. |
|
void |
setEdge(int i,
MolBond edge)
Deprecated. As of Marvin 5.3, replaced by setBond(int, MolBond) . |
|
protected void |
setFlags(int f)
Sets the flags of the molecule. |
|
protected void |
setFlags(int f,
int mask)
Sets specified bits in the flags. |
|
protected void |
setGrinvCC(long g)
Sets the graph invariant change count. |
|
void |
setGrinvOptions(int opt)
Sets graph invariant calculation options passed to the module. |
|
void |
setLinkNodeDefaultOuters(MolAtom atom)
Sets link node outer atoms to default values, if they are not set yet; making sure that the resulting link node configuration is valid. |
|
boolean |
setLocalParity(int[] p,
boolean useActualWedges)
In case of 2D molecule change the bonds flag (UP/DOWN), in case of 0D molecule set the atom flags to achieve the specified parity array. |
|
boolean |
setLocalParity(int[] idxes,
int[] p,
boolean useActualWedges)
Set given local parity for the given atomic indexes. |
|
void |
setLocation(DPoint3 o)
Set the origin of the molecule. |
|
void |
setNode(int i,
MolAtom node)
Deprecated. As of Marvin 5.3, replaced by setAtom(int, MolAtom) . |
|
boolean |
setParity(int[] p)
Change the bonds flag (UP/DOWN) connected to the whole molecule to achieve the specified parity array. |
|
boolean |
setParity(int[] p,
boolean useActualWedges)
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)
Deprecated. as of Marvin 4.0, replaced by setAtomSetSeq |
|
void |
setValenceCheckEnabled(boolean b)
Deprecated. since Marvin 5.9, please use setValenceCheckState(ValenceCheckState) instead |
|
void |
setValenceCheckState(MoleculeGraph.ValenceCheckState state)
Enables or disables valence check on atoms of the molecule graph, depending on the value of the parameter state. |
|
Smolecule |
smol()
Gets a Smolecule representation of this molecule. |
|
void |
sortBondsAccordingTo(MolBond[] order)
Sorts bonds in the same order as they appear in another chemical graph. |
|
void |
sortEdgesAccordingTo(MolBond[] order)
Deprecated. As of Marvin 5.3, replaced by sortBondsAccordingTo(MolBond[]) . |
|
boolean |
stereoClean()
Reset the wedges of the molecule, based on the actual parity information in 2D remove wedges in 3D. |
|
protected void |
sumConservedQuantities(MolAtom a,
int[] atoms,
int sign)
For internal use only. |
|
java.lang.String |
toString()
Overrides MoleculeGraph.toString() to ease debugging. |
|
void |
transform(CTransform3D t)
Apply a transformation matrix to the atomic coordinates. |
|
void |
transform(CTransform3D t,
boolean incg)
Apply a transformation matrix to the atomic coordinates. |
|
protected void |
updateDim(MoleculeGraph m)
Updates the dimensions when fusing two structures. |
|
void |
useOnlyFirstAtomInStereoCalculation(boolean f)
Set how parity module should interpret wedes. |
|
void |
valenceCheck()
Check valence and query property errors for atoms. |
|
void |
valenceCheck(java.util.List<MolAtom> v)
Check valence and query property errors. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final int INITIAL_CAPACITY
public static final int AROM_BASIC
aromatize(int)
,
Constant Field Valuespublic static final int AROM_CHEMAXON
aromatize(int)
,
Constant Field Valuespublic static final int AROM_GENERAL
aromatize(int)
,
Constant Field Valuespublic static final int AROM_DAYLIGHT
aromatize(int)
,
Constant Field Valuespublic static final int AROM_LOOSE
aromatize(int)
,
Constant Field Valuespublic static final int AROM_SUBSTRUCTURE
aromatize(int)
,
Constant Field Valuespublic static final int AROM_AMBIGUOUS
aromatize(int)
,
Constant Field Valuespublic static final int DEAROM_GENERAL
dearomatize(int)
,
Constant Field Valuespublic static final int DEAROM_HUCKELCHECK
dearomatize(int)
,
Constant Field Valuespublic static final int DEAROM_HUCKELCHECK_EX
dearomatize(int)
,
Constant Field Valuespublic static final java.lang.String INVALID_LINKNODE_MESSAGE
protected static final int DIM_MASK
getFlags()
,
Constant Field Valuesprotected static final int AUTO_UNGROUP
protected static final int VALENCE_CHECK
protected static final int VALENCE_CHECK_AMBIGUOUS
public static final int RMCLEANUP_NONE
removeAtom(MolAtom, int)
,
removeAtom(int, int)
,
removeBond(MolBond, int)
,
removeBond(int, int)
,
Constant Field Valuesprotected static final int RMCLEANUP_FIXCOMPONENT
RMCLEANUP_ALL
,
Constant Field Valuespublic static final int RMCLEANUP_ALL
removeAtom(MolAtom, int)
,
removeAtom(int, int)
,
removeBond(MolBond, int)
,
removeBond(int, int)
,
Constant Field Valuespublic static final int RMCLEANUP_EDGES
removeAtom(MolAtom, int)
,
removeAtom(int, int)
,
removeBond(MolBond, int)
,
removeBond(int, int)
,
Constant Field Valuespublic static final int CACHE_REMOVE_ALL
clearCachedInfo(int)
,
Constant Field Valuespublic static final int CACHE_REMOVE_CACHEMEMORY
cacheMemory
,
clearCachedInfo(int)
,
Constant Field Valuespublic static final int RMCLEANUP_STEREO
removeAtom(MolAtom, int)
,
removeAtom(int, int)
,
RMCLEANUP_ALL
,
Constant Field Valuespublic static final int RMCLEANUP_MOBJECT
removeAtom(MolAtom, int)
,
removeAtom(int, int)
,
RMCLEANUP_ALL
,
Constant Field Valuespublic static final int RMCLEANUP_PARENTDOC
removeAtom(MolAtom, int)
,
removeAtom(int, int)
,
RMCLEANUP_ALL
,
Constant Field Valuespublic static final int GRINV_NOHYDROGEN
getGrinv(int[], int)
,
Constant Field Valuespublic static final int GRINV_STEREO
getGrinv(int[], int)
,
Constant Field Valuespublic static final int GRINV_OLDSTEREO
getGrinv(int[], int)
,
Constant Field Valuespublic static final int GRINV_USEMAPS
getGrinv(int[], int)
,
Constant Field Valuespublic static final int GRINV_VALUE_OPTIONS
public static final int GRINV_DONT_STORE
getGrinv(int[], int)
,
Constant Field Valuespublic static final int CACHE_REMOVE_GRINVMODULE
clearCachedInfo(int)
,
Constant Field Valuespublic static final int CACHE_REMOVE_PARITYMODULE
clearCachedInfo(int)
,
Constant Field Valuespublic static final int CACHE_REMOVE_AROMATAMODULE
clearCachedInfo(int)
,
Constant Field Valuespublic static final int CACHE_REMOVE_SSSRMODULE
clearCachedInfo(int)
,
Constant Field Valuespublic static final int CACHE_REMOVE_TABS
clearCachedInfo(int)
,
Constant Field Valuespublic static final int MIN_RING_SIZE_FOR_TRANS_DB
public static final int OMIT_POSTCLEAN
addExplicitHydrogens(int)
,
Constant Field Valuespublic static final int FRAG_BASIC
public static final int FRAG_KEEPING_MULTICENTERS
public static final int FRAG_KEEPING_SGROUPS
public static final int FRAG_TYPE_COUNT
protected transient MoleculeGraph superGraph
protected transient MoleculeGraph parentGraph
protected transient MolAtom[] theAtoms
protected transient int atomCount
protected transient MolBond[] theBonds
protected transient int bondCount
protected transient double orix
protected transient double oriy
protected transient double oriz
protected transient long grinvCC
getGrinvCC()
,
incGrinvCC()
,
incGrinvCCOnly()
,
getGrinv(int[])
protected transient java.util.List<java.lang.Object[]> cacheMemory
protected transient int[][] ctab
protected transient chemaxon.core.util.BondTable btab
protected transient chemaxon.struc.gearch.MoleculeGraphGearch gearch
protected transient MPropertyContainer propertyContainer
protected transient boolean useOnlyFirstAtomInStereoCalculation
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()
Method Detail |
---|
public final MoleculeGraph getParent()
public final MoleculeGraph getForefather()
public final java.lang.Object getLock()
public void add(MolAtom atom)
atom
- the atom objectpublic void add(MolBond bond)
bond
- the bond objectprotected void addAtom0(MolAtom atom)
atom
- the atom referenceprotected final int addAtomWithoutChangingIt(MolAtom atom)
atom
- the atom reference
protected void addAtomToFragment(MolAtom atom)
atom
- the atom referenceprotected void addBond0(MolBond bond)
bond
- the bond referenceprotected final int addBondWithoutChangingIt(MolBond bond)
bond
- the bond reference
public void pack()
public void removeAtom(MolAtom atom)
atom
- the atompublic void removeAtom(int i)
i
- the atom indexpublic void removeBond(MolBond bond)
bond
- the bondpublic void removeBond(int i)
i
- the bond indexpublic void removeAllBonds()
public void removeAll()
public MDocument getDocument()
protected MDocument getParentDocument()
protected MDocument getDocumentForChild(MoleculeGraph g)
g
- the child graph or this
public final Smolecule smol()
Smolecule
representation of this molecule.
Smolecule
implementationprotected final Smolecule createSmolecule()
Smolecule
represenation of this molecule.
Smolecule
public void setDim(int d)
d
- 0, 2, or 3setFlags(int)
public int getDim()
getFlags()
public int getFlags()
protected void setFlags(int f)
f
- the flagsflags
public boolean isAbsStereo()
getFlags()
public void setAbsStereo(boolean c)
c
- the absolute stereoconfiguration flagsetFlags(int)
public void clear()
clearForImport(java.lang.String)
,
theAtoms
public void clearForImport(java.lang.String format)
format
- input file format, neglectedtheBonds
,
orix
,
oriy
,
oriz
,
setFlags(int)
public void removeAtom(MolAtom atom, int cleanupFlags)
removeAtom(MolAtom)
instead unless you are sure what you are doing.
atom
- the atomcleanupFlags
- extra clean-up methodsRMCLEANUP_NONE
,
RMCLEANUP_ALL
,
RMCLEANUP_EDGES
public void removeAtom(int i, int cleanupFlags)
removeAtom(int)
instead unless you are sure what you are doing.
i
- the atom indexcleanupFlags
- extra clean-up methodsRMCLEANUP_NONE
,
RMCLEANUP_ALL
,
RMCLEANUP_EDGES
protected void setAtom0(int i, MolAtom atom)
i
- atom indexatom
- new atom referencepublic void setBond(int i, MolBond b)
i
- bond indexb
- the bond referencepublic void replaceBond(MolBond oldb, MolBond newb)
oldb
- the old bondnewb
- the new bondpublic final void setAtomSetSeqs(int id)
id
- the set sequence numberpublic final void setBondSetSeqs(int id)
id
- the set sequence numberpublic final void setSetSeqs(int id)
id
- the set sequence numberpublic 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.
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)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)getGrinv(int[], int)
public int getGrinv(int[] gi, int options)
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.
gi
- output array, its length must be equal to the number
of atomsoptions
- graph invariant generation options
java.lang.SecurityException
- the GraphInvariants module cannot be
loaded because of security reasons (firewall)GRINV_NOHYDROGEN
,
GRINV_STEREO
,
GRINV_DONT_STORE
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()
protected int[] getGrinv()
grinvCC
public final long getGrinvCC()
grinvCC
,
incGrinvCC()
,
incGrinvCCOnly()
,
getGrinv(int[])
protected final void setGrinvCC(long g)
g
- graph invariant change countgrinvCC
,
getGrinvCC()
protected final void incGrinvCC()
incGrinvCCOnly()
,
grinvCC
,
getGrinvCC()
,
getGrinv(int[])
public final void incGrinvCCOnly()
incGrinvCC()
,
grinvCC
,
getGrinvCC()
,
getGrinv(int[])
protected void resetCtab()
protected final void resetGrinvInParents()
protected void regenCtabs()
public boolean addExplicitHydrogens(int f)
Hydrogenize.convertImplicitHToExplicit(MoleculeGraph, MolAtom[], int)
f
- flags specifying special features, otherwise
if f is 0, then the result equals with hydrogenize(true).
java.lang.SecurityException
- cannot load module because
of a security problem (firewall)OMIT_POSTCLEAN
public boolean addExplicitHydrogens(int f, MolAtom[] atoms)
Hydrogenize.convertImplicitHToExplicit(MoleculeGraph, MolAtom[], int)
f
- flags specifying special features, otherwise
if f is 0, then the result equals with hydrogenize(true).atoms
- add hydrogens to these atoms only
java.lang.SecurityException
- cannot load module because
of a security problem (firewall)OMIT_POSTCLEAN
public boolean hydrogenize(boolean add)
Hydrogenize.convertImplicitHToExplicit(MoleculeGraph)
and
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph)
add
- add explicit H atoms if true, remove if false
java.lang.SecurityException
- cannot load module because
of a security problem (firewall)public void addExplicitLonePairs()
Hydrogenize.convertImplicitLonePairsToExplicit(MoleculeGraph, MolAtom[])
java.lang.SecurityException
- cannot load module because
of a security problem (firewall)public void removeExplicitLonePairs()
Hydrogenize.convertExplicitLonePairsToImplicit(MoleculeGraph)
java.lang.SecurityException
- cannot load module because
of a security problem (firewall)@Deprecated public final void implicitizeHydrogens(int f)
chemaxon.calculations.hydrogenize.Hydrogenize#convertExplicitHToImplicit(MoleculeGraph)(MoleculeGraph, int)
,
the following usage will give the same results:
chemaxon.calculations.hydrogenize.Hydrogenize.convertExplicitHToImplicit(mol, f);
f
- flags specifying special H atom types to includepublic void implicitizeHydrogens(int f, MolAtom[] atoms)
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int)
,
the following usage will give the same results:
chemaxon.calculations.hydrogenize.Hydrogenize.convertExplicitHToImplicit(mol, atoms, f);
f
- flags specifying special H atom types to includeatoms
- the subset of H atoms to include or null for allpublic void implicitizeHydrogens(int f, MolAtom[] atoms, boolean check)
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean)
the following usage will give the same results:
chemaxon.calculations.hydrogenize.Hydrogenize.convertExplicitHToImplicit(mol, atoms, f, check);
f
- flags specifying special H atom types to includeatoms
- the subset of H atoms to include or null
for allcheck
- false
if H atoms not belonging to the molecule should be skipped,
true
if such atoms should generate a
RuntimeException
protected boolean implicitizeHydrogens0(int f, MolAtom[] atoms, boolean check)
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean)
f
- atoms
- check
-
public void fuse(MoleculeGraph graph, boolean check)
graph
- the other molecule graphcheck
- true
if a containment check should be performed to ensure that
only those atoms and bonds are added that are not already elements -
false
if the molecule is known to be disjoint from this one and
this check can be safely skippedpublic final void fuse(MoleculeGraph graph)
fuse(chemaxon.struc.MoleculeGraph, boolean)
instead.
graph
- the other molecule graphprotected void fuse0(MoleculeGraph g, boolean check)
g
- the other moleculecheck
- true
if a containment check should be performed to ensure that
only those atoms and bonds are added that are not already elements -
false
if the molecule is known to be disjoint from this one and
this check can be safely skippedpublic void checkConsistency()
java.lang.RuntimeException
- if inconsistency foundprotected void checkBondConsistency()
protected final void updateDim(MoleculeGraph m)
m
- the other moleculepublic void mergeAtoms(MolAtom that, MolAtom a)
that
- the atoma
- the other atompublic boolean hasValenceError()
true
if there is an atom with valence error,
false
if there is no valence errorvalenceCheck()
,
MolAtom.hasValenceError()
public void valenceCheck()
setValenceCheckState(ValenceCheckState)
which atoms are checked.
MolAtom.valenceCheck()
,
MolAtom.getImplicitHcount()
,
hasValenceError()
,
setValenceCheckState(ValenceCheckState)
,
getValenceCheckState()
public void valenceCheck(java.util.List<MolAtom> v)
v
- contains the atoms to checkMolAtom.valenceCheck()
,
valenceCheck()
public void qpropCheck(java.util.List<MolAtom> v)
v
- contains the atoms to checkMolAtom.qpropCheck()
public boolean isSimilarTo(MoleculeGraph g)
true
if the graphs are similar,
false
otherwiseMolAtom.haveEqualProperties(MolAtom)
,
MolAtom.haveSimilarBonds(MolAtom)
public boolean isAtom()
public boolean isBond()
public boolean isRing()
public boolean isSymmetric()
public java.lang.String getName()
Incomplecule
interface
but it returns empty string in this basic implementation.
getName
in interface Incomplecule
public MPropertyContainer properties()
properties
in interface Incomplecule
public void revalidateCoordDependentProps()
public int getAtomCount()
getAtomCount
in interface Incomplecule
public int getAtomCount(int atomicNumber)
atomicNumber
- atomic number of atoms looked for
public int getBondCount()
getBondCount
in interface Incomplecule
public int getFormalCharge()
public int getTotalCharge()
getFormalCharge()
method.
protected boolean isRealAtomParent()
public MolAtom getAtom(int n)
n
- the atom index
public MolBond getBond(int n)
n
- the bond index
public void setAtom(int i, MolAtom atom)
i
- atom indexatom
- new atom referencepublic final void insertAtom(int i, MolAtom atom)
i
- atom indexatom
- new atom referenceprotected void insertNullAtoms(int i, int count)
i
- starting indexcount
- number of new entriespublic final void insertBond(int i, MolBond bond)
i
- bond indexbond
- new bond referencepublic void insertBondInOrder(MolBond e, MolBond[] order)
e
- the bond to insertorder
- array of bonds defining the orderprotected void insertNullBonds(int i, int count)
i
- starting indexcount
- number of new entriespublic void sortBondsAccordingTo(MolBond[] order)
order
- the bonds in the other chemical graphpublic MolAtom[] getAtomArray()
public MolBond[] getBondArray()
public void calcCenter(DPoint3 p)
p
- reference to the object that will hold the resultpublic DPoint3 calcOutRect()
public void calcOutRect(DPoint3 p)
p
- reference to the object that will hold the result
(x, y, and z direction width of the outer rectangle)public DPoint3 calcOutRectCenter()
public void calcOutRectCenter(DPoint3 p)
public DPoint3 calcCenter()
public double calcWidth()
public double calcHeight()
public double getDesiredLength(int atno1, int atno2, int type)
MolBond.desiredLength(int, int, int, int)
instead.
atno1
- atomic number of first moleculeatno2
- atomic number of second moleculetype
- bond type
public double getDesiredLength(MolBond b)
MolBond.desiredLength(int, int, int, int)
instead.
b
- the bond
public double bondlength()
public DPoint3 getLocation()
orix
public void setLocation(DPoint3 o)
o
- the originorix
public void moveTo(DPoint3 o)
o
- the new originorix
public void transform(CTransform3D t)
transform
in interface MTransformable
t
- the transformation matrixpublic void transform(CTransform3D t, boolean incg)
t
- the transformation matrixincg
- graph invariants are changed (true) or not (false)public DPoint3[] getPoints()
public DPoint3[] getEnclosingCube()
public void clonecopy(MoleculeGraph m)
m
- the target moleculepublic void clonecopy(int[] iatoms, MoleculeGraph g)
iatoms
- array of atom indices to copy or null
g
- the target molecule graphprotected boolean clonecopyMoleculeGraphWithoutSgroups(int[] cnodes, MolBond[] cedges, int nb, MoleculeGraph graph)
cnodes
- array of atom indices to copy or null
cedges
- array of bonds to copy
or null
to copy bonds in cnodes onlynb
- number of bondsgraph
- the target molecule graph
false
if the atoms array contains all bond end
points, true
if there is at least one external
bondprotected MolBond[] getBonds(MolAtom atom)
atom
- the atom
protected static final int findInArray(java.lang.Object[] array, int[] indices, int n, java.lang.Object o)
array
- the arrayindices
- array indices or null
n
- the number of elements
public void clonelesscopy(MoleculeGraph graph)
graph
- the target molecule graph (the selection)public final boolean hasSelfReferringProperty()
true
if the property list contains the molecule,
false
otherwisepublic boolean isSelfReference(MProp p)
p
- the propertyprotected boolean fixSelfReferringProperty(MProp prop)
prop
- the propertyclonecopy(MoleculeGraph)
public java.lang.String toString()
@
', and the unsigned
hexadecimal representation of the hash code of the object.
If the graph is not empty and it has more than one atom, then the
string also contains the number of atoms and bonds in "[Na,Mb]" form.
If there is only one atom, then its symbol appears between the
square brackets.
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public int getParityType(int idx)
idx
- the index of the atom whose parity type is to be determined
StereoConstants.PARITY_ALLENE
,
StereoConstants.PARITY_TETRAHEDRAL
public 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 int getLocalParity(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
,
StereoConstants.PARITY_EITHER
,
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)
,
getParity(int i)
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.DOWN
,
getParity(int i)
public boolean setParity(int[] p, boolean useActualWedges)
p
- the parity for each atom in the moleculeuseActualWedges
- if true use actual wedge setup and change
it if neccessary, otherwise remove the wedges and set them again
StereoConstants.PARITY_ODD
,
StereoConstants.PARITY_EVEN
,
isAbsStereo()
,
setAbsStereo(boolean)
,
MolBond.UP
,
MolBond.DOWN
,
getParity(int i)
public boolean setLocalParity(int[] p, boolean useActualWedges)
p
- the parity for each atom in the moleculeuseActualWedges
- if true use actual wedge setup and change
it if neccessary, otherwise remove the wedges and set them again
StereoConstants.PARITY_ODD
,
StereoConstants.PARITY_EVEN
,
isAbsStereo()
,
setAbsStereo(boolean)
,
useOnlyFirstAtomInStereoCalculation
,
MolBond.UP
,
MolBond.DOWN
public boolean setLocalParity(int[] idxes, int[] p, boolean useActualWedges)
idxes
- atom indexes to set the local parity forp
- the corresponding local parity informationuseActualWedges
- if true use actual wedge setup and change
it if neccessary, otherwise remove the wedges and set them again
StereoConstants.PARITY_ODD
,
StereoConstants.PARITY_EVEN
,
isAbsStereo()
,
setAbsStereo(boolean)
,
useOnlyFirstAtomInStereoCalculation
,
MolBond.UP
,
MolBond.DOWN
public 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
,
StereoConstants.CHIRALITY_r
,
StereoConstants.CHIRALITY_s
,
StereoConstants.CHIRALITY_M
,
StereoConstants.CHIRALITY_P
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 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()
,
for detailed examples.
public int getStereo2(MolAtom a1, int i2, int i3, MolAtom a4)
a1
- atom A1i2
- index of atom A2i3
- index of atom A3a4
- atom A4
Returned values for the four Carbons ("O" means set flag):
Dihedral | Returned flags | Remark | ||
CIS | TRANS | CTUNSPEC | ||
SMARTS bonds: | ||||
C/C=C/C | - | O | - | |
C/C=C\C | O | - | - | |
CC=CC | O | O | - | |
C/?C=C/C | - | O | O | |
C/?C=C\C | O | - | O | |
ISIS bonds: | ||||
C-C=C-C | O | O | - | 180 degrees |
C-C X C-C | O | O | - | "Cis" or "Trans" bond |
C/C="C/T?"=C/C | - | O | O | "Not Cis" bond |
C/C="C/T?"=C\C | O | - | O | "Not trans" bond |
C-C="C/T?"=C-C | O | O | O | 180 degrees |
StereoConstants.CTUMASK
,
MolBond.calcStereo2()
public int getStereo2(MolBond b, MolAtom a1, MolAtom a4)
b
- the bonda1
- atom A1a4
- atom A4
StereoConstants.CTUMASK
,
MolBond.calcStereo2()
,
for detailed examples.
public int getStereo2(MolBond b, MolAtom a1, MolAtom a4, boolean grcheck)
b
- the bonda1
- atom A1a4
- atom A4grcheck
- true if check atom equivalences using graph invariants
StereoConstants.CTUMASK
,
MolBond.calcStereo2()
,
for detailed examples.
public int getStereo2(MolBond b)
b
- the bond
StereoConstants.CTUMASK
,
MolBond.calcStereo2()
,
for detailed examples.
protected final int getStereo2(MolBond b, MolAtom a1, int i2, int i3, MolAtom a4)
b
- the bonda1
- atom A1i2
- index of atom A2i3
- index of atom A3a4
- atom A4
StereoConstants.CTUMASK
,
MolBond.calcStereo2()
,
for detailed examples.
protected final int getStereo2(MolBond b, MolAtom a1, int i2, int i3, MolAtom 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()
,
for detailed examples.
protected void removeBond(MolBond bond, int cleanupFlags)
bond
- the bondcleanupFlags
- extra clean-up methodsRMCLEANUP_NONE
,
RMCLEANUP_ALL
,
RMCLEANUP_EDGES
protected void removeBond(int i, int cleanupFlags)
i
- the bond indexcleanupFlags
- extra clean-up methodsRMCLEANUP_NONE
,
RMCLEANUP_ALL
,
RMCLEANUP_EDGES
public void regenBonds()
protected void isolate(MolAtom node)
removeAtom(chemaxon.struc.MolAtom)
, especially for large molecule graphs.
Removes the atom but instead of shifting the atoms array,
simply sets the corresponding entry to null
.
After isolating some atoms, call removeIsolatedAtoms()
to get a valid
molecule graph.
node
- the atomprotected void isolate(MolBond edge)
removeBond(chemaxon.struc.MolBond)
, especially for large molecule graphs.
Removes the bond but instead of shifting the bonds array,
simply sets the corresponding entry to null
.
After isolating some bonds, call removeIsolatedBonds()
to get a valid
molecule graph.
edge
- the bondprotected void removeIsolatedAtoms()
null
atom entries in the atoms array
and sets the index fields appropriately. Clean-up method after
calling isolate(chemaxon.struc.MolAtom)
for some atoms.
protected void removeIsolatedBonds()
null
bond entries in the bonds array
and sets the index fields appropriately. Clean-up method after
calling isolate(chemaxon.struc.MolBond)
for some bonds.
public boolean canBeCT(int i2, int i3)
i2
- index of the first atomi3
- index of the second atom
public boolean canBeCT(int i2, int i3, boolean grcheck)
i2
- index of the first atomi3
- index of the second atomgrcheck
- true if check atom equivalences using graph invariants
public boolean canBeCT(MolBond bond)
bond
- the bond to check
public int getLonePairCount(int i)
i
- atom index
public int getExplicitLonePairCount(int i)
public void aromatize(boolean a) throws java.lang.SecurityException
a
- aromatize (true) or dearomatize (false)
java.lang.SecurityException
- cannot load module because
of a security problem (firewall)AROM_GENERAL
,
Document about aromatizationpublic final void aromatize()
java.lang.SecurityException
- cannot load module because
of a security problem (firewall)AROM_GENERAL
,
Document about aromatizationpublic boolean dearomatize()
java.lang.SecurityException
- cannot load module because
of a security problem (firewall)public boolean dearomatize(int method)
method
- Specifies the algorithm for dearomatization. Possible
values:
java.lang.SecurityException
- cannot load module because
of a security problem (firewall)
java.lang.RuntimeException
- the molecule cannot be dearomatized
with method DEAROM_HUCKELCHECK_EXpublic void aromatize(int method)
method
- Specifies the algorithm for aromatization. Possible
values:
java.lang.SecurityException
- cannot load module because of a security
problem (firewall)AROM_BASIC
,
AROM_GENERAL
,
AROM_LOOSE
,
Document about aromatizationpublic void aromatize(int method, boolean checkAmbiguity)
method
- Specifies the algorithm for aromatization. Possible
values:
checkAmbiguity
- Specifies whether ANY bonds should be considered
during aromatization.
java.lang.SecurityException
- cannot load module because of a security
problem (firewall)AROM_BASIC
,
AROM_GENERAL
,
AROM_LOOSE
,
Document about aromatizationpublic void calcHybridization()
setHybridizationState( int )
can be called to set the appropriate value directly.
This sp-hybridization state reflects the spatial configuration of the C,N and O atoms
rather than the sp-hybridization of the electron bands. It doesn't cover all the
mixed orbitals of Si,S and P atoms.
For hydrogens the "s" MolAtom.HS_S
state, for atoms with query bonds the
unknown state MolAtom.HS_UNKNOWN
is set. If the atom has aromatic bonds
the sp2 state is set. Otherwise the sp-hybridization state is determined based on the number
of double and tripple bonds. If the atom has a tripple bond or two double bonds the sp state is set. If the
atom has one double bond the sp2 state is set. If the atom has more then one tripple bond or more than two
double bonds the unknown state is set. If a heavy atom has only single bonds the sp3 state is set.
LonePairCounter
public java.lang.String getFormula()
public double getMass()
double
value.
public double getExactMass()
double
value.
protected void makeItSimilar(MoleculeGraph g)
g
- the molecule to changepublic MoleculeGraph newInstance()
public MoleculeGraph getGraphUnion()
public int indexOf(MolAtom atom)
atom
- the atom
public int indexOf(MolBond bond)
bond
- the bond
protected final int findAtom(MolAtom atom)
protected final int findBond(MolBond bond)
public boolean contains(MolAtom atom)
atom
- the atom object
public boolean contains(MolBond bond)
bond
- the bond object
public boolean contains(MoleculeGraph graph)
graph
- the fragment
public boolean isEmpty()
true
if the graph does not contain any atoms or
bonds, false
otherwisepublic final MoleculeGraph[] getSubGraphs()
getSubGraphCount()
protected int getSubGraphCount()
RgMolecule
, reactants, products and agents of an
RxnMolecule
etc.
getSubGraphs(MoleculeGraph[], int)
protected void getSubGraphs(MoleculeGraph[] m, int off)
m
- the output arrayoff
- offsetgetSubGraphs()
,
getSubGraphCount()
protected void addAtomsAndBondsTo(MoleculeGraph s)
s
- the selection moleculepublic boolean hasExplicitLonePairs()
public boolean hasImplicitH()
public boolean hasAtomSet()
true
if there are atom sets,
false
otherwisepublic boolean hasBondSet()
true
if there are atom sets,
false
otherwisepublic boolean hasExtraLabelSet()
public boolean clean(int dim, java.lang.String opts)
Cleaner.clean(MoleculeGraph, int, String)
dim
- dimensionsopts
- cleaning options
java.lang.SecurityException
- cannot load module because
of a security problem (firewall)public boolean partialClean(Molecule[] template, java.lang.String opts)
Cleaner.partialClean(Molecule, Molecule[], String)
template
- template molecule array (substructure of the target)opts
- cleaning options
java.lang.SecurityException
- cannot load module because
of a security problem (firewall)public boolean partialClean(MoleculeGraph template, int[] map, java.lang.String opts)
Cleaner.partialClean(MoleculeGraph, MoleculeGraph, int[], String)
template
- template molecule (substructure of the target)map
- hit list which describes the atom mapping
(the size equals to the number of atoms in the template,
contains target atom indexes or -1 to exclude)opts
- cleaning options
java.lang.SecurityException
- cannot load module because
of a security problem (firewall)public boolean partialClean(int dim, int[] fixed, java.lang.String opts)
Cleaner.partialClean(MoleculeGraph, int, int[], String)
dim
- dimensionsfixed
- atom indexes to be fixedopts
- cleaning options
java.lang.SecurityException
- cannot load module because
of a security problem (firewall)public boolean clean(int dim, java.lang.String opts, chemaxon.common.util.MProgressMonitor pmon)
Cleaner.clean(MoleculeGraph, int, String, MProgressMonitor)
dim
- dimensionsopts
- cleaning optionspmon
- progress monitor or null
java.lang.SecurityException
- cannot load module because
of a security problem (firewall)clean(int, java.lang.String)
public boolean stereoClean()
protected boolean isGrinvCCValid()
true
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[][][] getAromaticAndAliphaticRings(int aromatizationType, boolean onlyAromrings, boolean aromatize, int maxRingSize, int ringsLimit)
aromatizationType
- use aromatization:
onlyAromrings
- get only the aromatic rings (Aromatic ring
detection is faster than calculating Aliphatic and Aromatic rings
in case BASIC aromatization, in case of GENERAL aromatization
there is no difference in the speed),aromatize
- whether to set the bonds to aromatic (true),
or keep the original form (false),maxRingSize
- the maximum ring size during ring detection
(0: no limit)ringsLimit
- limit of the number of rings (0: no limit)
AROM_BASIC
,
AROM_GENERAL
public final int[][] getSSSR()
grinvCC
public final int[][] getCSSR()
grinvCC
public final int[][] getSSSRBonds()
grinvCC
public int[][] getSSSRIdxesForAtoms()
grinvCC
public java.util.BitSet getSSSRBondSet()
public long[] getSSSRBondSetInLong()
n
' bond is in the sssr long array
'r
', use the following code:
static boolean get(int n, long[] r) { return (r[n/64] & (((long)1) << (63-(n % 64)))) != 0 ;
}
grinvCC
public int[] getSmallestRingSizeForIdx()
grinvCC
public boolean isRingBond(int idx)
idx
- the bond index
public int[][] createCHtab()
public int[][] createBHtab()
public int getImplicitHcount()
public int getExplicitHcount()
public MolAtom findAtomClone(MolAtom a)
a
- the original atom
public boolean isValidLinkNode(int linkAtomIdx, int outer1, int outer2)
linkAtomIdx
- atom index to be set to link atom.outer1
- outer bond to be set by setLinkNodeOuterAtom(0)outer2
- outer bond to be set by setLinkNodeOuterAtom(1)
public void setLinkNodeDefaultOuters(MolAtom atom)
atom
- Atom to set to link node.
java.lang.IllegalArgumentException
- if it is an invalid link node
configuration.MolAtom.setLinkNodeDefaultOuters()
,
MolAtom.setLinkNodeOuterAtom(int, int)
public double[] getVisibleCoords(MolAtom ma)
ma
- The atom to be queried.
protected java.lang.Object[] saveCache(int n)
protected java.lang.Object[] restoreCache(int n)
public boolean isMultiChiral()
public void adjustMultiChiralFlag()
public boolean isMolecule()
x.isMolecule()
is equivalent to x instanceof Molecule
,
only faster.
public boolean isQuery()
true
if the molecule has query featuresMolAtom.isQuery()
,
MolBond.isQuery()
public void clearCachedInfo(int options)
options
- options for the cache clearingCACHE_REMOVE_GRINVMODULE
,
CACHE_REMOVE_PARITYMODULE
,
CACHE_REMOVE_AROMATAMODULE
,
CACHE_REMOVE_SSSRMODULE
,
CACHE_REMOVE_TABS
,
CACHE_REMOVE_ALL
public boolean arrangeComponents()
CleanUtil.arrangeComponents(MoleculeGraph, boolean, boolean)
To keep the same functionality use with TRUE boolean parameters.
true
if coordinates changed, false
if unchangedpublic void setGrinvOptions(int opt)
opt
- the graph invariant calculation optionGRINV_NOHYDROGEN
,
GRINV_DONT_STORE
,
GRINV_OLDSTEREO
,
GRINV_STEREO
,
GRINV_USEMAPS
,
GRINV_VALUE_OPTIONS
public int getGrinvOptions()
GRINV_NOHYDROGEN
,
GRINV_DONT_STORE
,
GRINV_OLDSTEREO
,
GRINV_STEREO
,
GRINV_USEMAPS
,
GRINV_VALUE_OPTIONS
public void useOnlyFirstAtomInStereoCalculation(boolean f)
f
- wheter to use only the first atom of the
wedge for calculationspublic boolean isOnlyFirstAtomInStereoCalculation()
protected void sumConservedQuantities(MolAtom a, int[] atoms, int sign)
RxnMolecule.isIncompleteReaction()
public int[][] getCtab()
public int[][] getBtab()
getBondTable()
instead
public chemaxon.core.util.BondTable getBondTable()
@Deprecated public <C extends MoleculeGraph> C[] findFrags(java.lang.Class<C> cl)
findFrags(Class, int)
,
to keep the same functionality, use value FRAG_KEEPING_MULTICENTERS
for parameter fragmentationType, e.g.:
mol.findFrags(cl, MoleculeGraph.FRAG_KEEPING_MULTICENTERS);
C
- the class of the fragmentscl
- create fragment objects of this class
findFrags(Class, int)
public <C extends MoleculeGraph> C[] findFrags(java.lang.Class<C> cl, int fragmentationType)
FRAG_KEEPING_MULTICENTERS
)FRAG_KEEPING_SGROUPS
)FRAG_BASIC
)
C
- the class of the fragmentscl
- create fragment objects of this classfragmentationType
- determines the type of fragmentation
FRAG_BASIC
,
FRAG_KEEPING_MULTICENTERS
,
FRAG_KEEPING_SGROUPS
@Deprecated public void mergeFrags()
public final int[] findComponentIds()
i
)public final int[] findComponentIds(int[] inds)
inds
- atom index array, null
means all atoms
inds[i]
or atom i
if the atom index array is null
)@Deprecated public final int getFragCount()
getFragCount(int)
,
to keep the same functionality, use value FRAG_KEEPING_MULTICENTERS
for parameter fragmentationType, e.g.:
mol.getFragCount(MoleculeGraph.FRAG_KEEPING_MULTICENTERS);
getFragCount(int)
public final int getFragCount(int fragmentationType)
fragmentationType
- type of fragmentation
FRAG_BASIC
,
FRAG_KEEPING_MULTICENTERS
,
FRAG_KEEPING_SGROUPS
@Deprecated public final int[] getFragIds()
getFragIds(int)
,
to keep the same functionality, use value FRAG_KEEPING_MULTICENTERS
for parameter fragmentationType, e.g.:
mol.getFragIds(MoleculeGraph.FRAG_KEEPING_MULTICENTERS);
getFragIds(int)
public final int[] getFragIds(int fragmentationType)
fragmentationType
- type of fragmentation
FRAG_BASIC
,
FRAG_KEEPING_MULTICENTERS
,
FRAG_KEEPING_SGROUPS
protected final void regenGearch()
@Deprecated public final void findFrag(int i, MoleculeGraph frag)
findFrag(int, int, MoleculeGraph)
,
to keep the same functionality, use value FRAG_KEEPING_MULTICENTERS
for parameter fragmentationType, e.g.:
mol.findFrag(i, MoleculeGraph.FRAG_KEEPING_MULTICENTERS, frag);
i
- atom indexfrag
- add the atoms and bonds to this MoleculeGraphfindFrag(int, int, MoleculeGraph)
public final void findFrag(int i, int fragmentationType, MoleculeGraph frag)
i
- atom indexfragmentationType
- type of fragmentationfrag
- add the atoms and bonds to this MoleculeGraphFRAG_BASIC
,
FRAG_KEEPING_MULTICENTERS
,
FRAG_KEEPING_SGROUPS
@Deprecated public final void findFragById(int fragId, MoleculeGraph frag)
findFragById(int, int, MoleculeGraph)
,
to keep the same functionality, use value FRAG_KEEPING_MULTICENTERS
for parameter fragmentationType, e.g.:
mol.findFragById(fragId, MoleculeGraph.FRAG_KEEPING_MULTICENTERS, frag);
fragId
- fragment IDfrag
- add the atoms and bonds to this MoleculeGraphfindFragById(int, int, MoleculeGraph)
,
getFragIds()
public final void findFragById(int fragId, int fragmentationType, MoleculeGraph frag)
fragId
- fragment IDfragmentationType
- type of fragmentationfrag
- add the atoms and bonds to this MoleculeGraphgetFragIds()
,
FRAG_BASIC
,
FRAG_KEEPING_MULTICENTERS
,
FRAG_KEEPING_SGROUPS
public final <C extends MoleculeGraph> C[] findBasicFrags(java.lang.Class<C> cl)
getFragCount()
!
The length of the returned array and the returned value of getFragCount()
might be different
in successor classes.
cl
- create fragment objects of this class
public int getNodeCount()
getAtomCount()
.
public MolAtom getNode(int i)
getAtom(int)
.
public void setNode(int i, MolAtom node)
setAtom(int, MolAtom)
.
public final void insertNode(int i, MolAtom node)
insertAtom(int, MolAtom)
.
public void removeNode(MolAtom node)
removeAtom(MolAtom)
.
public void removeNode(int i)
removeAtom(int)
.
public void removeNode(MolAtom node, int cleanupFlags)
removeAtom(MolAtom, int)
.
public void removeNode(int i, int cleanupFlags)
removeAtom(int, int)
.
public java.util.Vector<MolAtom> getNodeVector()
Arrays.asList(getAtomArray()
)
.
public int getEdgeCount()
getBondCount()
.
public MolBond getEdge(int i)
getBond(int)
.
public void setEdge(int i, MolBond edge)
setBond(int, MolBond)
.
public final void insertEdge(int i, MolBond edge)
insertBond(int, MolBond)
.
public void insertEdgeInOrder(MolBond e, MolBond[] order)
insertBondInOrder(MolBond, MolBond[])
.
public void replaceEdge(MolBond olde, MolBond newe)
replaceBond(MolBond, MolBond)
.
public void removeEdge(MolBond edge)
removeBond(MolBond)
.
public void removeEdge(int i)
removeBond(int)
.
public MolBond[] getEdgeArray()
getBondArray()
.
public java.util.Vector<MolBond> getEdgeVector()
Arrays.asList(getAtomArray()
)
.
public void removeAllEdges()
removeAllBonds()
.
public void regenEdges()
regenBonds()
.
public void sortEdgesAccordingTo(MolBond[] order)
sortBondsAccordingTo(MolBond[])
.
public void mergeNodes(MolAtom that, MolAtom a)
mergeAtoms(MolAtom, MolAtom)
.
protected chemaxon.struc.gearch.MoleculeGraphGearch createGearch()
public int getMaxRgroupAttachmentPointOrder()
MolAtom.RGROUP_ATTACHMENT
,
MolAtom.getRgroupAttachmentPointOrder()
@Deprecated public int mergeFrags(int id1, int id2)
mergeFrags(int, int, int)
,
to keep the same functionality, use value FRAG_KEEPING_MULTICENTERS
for parameter fragmentationType, e.g.:
mol.mergeFrags(id1, id2, MoleculeGraph.FRAG_KEEPING_MULTICENTERS);
id1
- index of first atom to be merged into one fragmentid2
- index of second atom to be merged into one fragment
mergeFrags(int, int, int)
public int mergeFrags(int id1, int id2, int fragmentationType)
id1
- index of first atom to be merged into one fragmentid2
- index of second atom to be merged into one fragmentfragmentationType
- determines the type of fragmentation
FRAG_BASIC
,
FRAG_KEEPING_MULTICENTERS
,
FRAG_KEEPING_SGROUPS
protected void setFlags(int f, int mask)
f
- new value of the specified bitsmask
- bits to setpublic void setValenceCheckEnabled(boolean b)
setValenceCheckState(ValenceCheckState)
instead
b
- - If true, the valence check is enabled on this molecule graph;
otherwise valence check is disabledisValenceCheckEnabled()
public boolean isValenceCheckEnabled()
getValenceCheckState()
instead
setValenceCheckEnabled
method.
setValenceCheckEnabled(boolean b)
public void setValenceCheckState(MoleculeGraph.ValenceCheckState state)
state
- determines which atoms will be checked in the following calls
of valenceCheck()
getValenceCheckState()
,
valenceCheck()
public MoleculeGraph.ValenceCheckState getValenceCheckState()
public boolean isLargeMolecule()
true
if large molecule
(number of atoms exceeds 1000
).
true
if large moleculepublic int getFreeAttachmentPoints(MolAtom atom)
getFreeAttachmentPoints
in interface chemaxon.core.calculations.valencecheck.MoleculeWithValence<MolAtom>
protected int getPossibleAttachmentPoints(MolAtom molAtom)
molAtom
- the atom to calculate the possible attachment point value for
MolAtom.getAttach()
public java.util.List<MolAtom> getAtomReferenceList()
getAtomReferenceList
in interface chemaxon.core.calculations.valencecheck.MoleculeWithValence<MolAtom>
public int getLigandCount(MolAtom atom)
getLigandCount
in interface chemaxon.core.calculations.valencecheck.MoleculeWithValence<MolAtom>
public MolAtom getLigand(MolAtom atom, int n)
getLigand
in interface chemaxon.core.calculations.valencecheck.MoleculeWithValence<MolAtom>
public chemaxon.struc.BondType getLigandBondType(MolAtom atom, int i)
getLigandBondType
in interface chemaxon.core.calculations.valencecheck.MoleculeWithValence<MolAtom>
public int getLigandAtno(MolAtom atom, int n)
getLigandAtno
in interface chemaxon.core.calculations.valencecheck.MoleculeWithValence<MolAtom>
public int getCharge(MolAtom atom)
getCharge
in interface chemaxon.core.calculations.valencecheck.MoleculeWithValence<MolAtom>
public int getAtomicNumber(MolAtom atom)
getAtomicNumber
in interface chemaxon.core.calculations.valencecheck.MoleculeWithValence<MolAtom>
public int getRadicalCount(MolAtom atom)
getRadicalCount
in interface chemaxon.core.calculations.valencecheck.MoleculeWithValence<MolAtom>
public int getValenceProperty(MolAtom atom)
getValenceProperty
in interface chemaxon.core.calculations.valencecheck.MoleculeWithValence<MolAtom>
public int getImplicitHCount(MolAtom atom)
getImplicitHCount
in interface chemaxon.core.calculations.valencecheck.MoleculeWithValence<MolAtom>
public boolean isAtomInRing(MolAtom atom)
isAtomInRing
in interface chemaxon.core.calculations.valencecheck.MoleculeWithValence<MolAtom>
public boolean isAcceptedSpecialLigand(MolAtom atom)
isAcceptedSpecialLigand
in interface chemaxon.core.calculations.valencecheck.MoleculeWithValence<MolAtom>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |