public class MoleculeGraph extends Object implements chemaxon.core.structure.MoleculeForBuilder, Incomplecule, MTransformable, StereoConstants, Serializable, chemaxon.core.calculations.valencecheck.MoleculeWithValence<MolAtom>
MolAtom
,
MolBond
,
Serialized FormType | Property and Description |
---|---|
boolean |
hasSelfReferring
Tests whether the property list contains the molecule.
|
Modifier and Type | Class and Description |
---|---|
static class |
MoleculeGraph.ValenceCheckState
Deprecated.
As of Marvin 6.0, replaced by
setValenceCheckOptions(ValenceCheckOptions) and
ValenceCheckOptions . |
Modifier and Type | Field and Description |
---|---|
static int |
AROM_AMBIGUOUS
Aromatization type for ambiguous 5-membered rings.
|
static int |
AROM_BASIC
Basic aromatization.
|
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
Deprecated.
As of Marvin 5.12, no replacement.
SSSR module is not cached any more. |
static int |
CACHE_REMOVE_TABS
Cache remove option to clear ctab and btab.
|
protected List<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.
|
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 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
Deprecated.
As of Marvin 6.0, replaced by
ValenceCheckOptions . |
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
void |
add(MolAtom atom)
Adds an atom to the molecule.
|
void |
add(MolBond bond)
Adds a bond to the molecule.
|
void |
add(MolBond bond,
boolean checkParallel)
Add 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) .Usage: Hydrogenize.convertImplicitHToExplicit(molecule, null, f); |
boolean |
addExplicitHydrogens(int f,
MolAtom[] atoms)
Deprecated.
As of Marvin 5.7, replaced by
Hydrogenize.convertImplicitHToExplicit(MoleculeGraph, MolAtom[], int) .Usage: Hydrogenize.convertImplicitHToExplicit(molecule, atoms, f); |
void |
addExplicitLonePairs()
Deprecated.
As of Marvin 5.7, replaced by
Hydrogenize.convertImplicitLonePairsToExplicit(MoleculeGraph, MolAtom[]) .Usage: Hydrogenize.convertImplicitLonePairsToExplicit(molecule, null); |
protected int |
addSimpleAtomWithoutChangingIt(MolAtom atom)
Adds a non-SgroupAtom atom without setting its parentGraph and index fields.
|
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) .Usage: CleanUtil.arrangeComponents(molecule, true, true); |
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)
Calculates the center of the outer rectangle.
|
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.
As of Marvin 5.7, no replacement.
Not intended for public use, it was intended only for internal debugging. |
boolean |
clean(int dim,
String opts)
Deprecated.
As of Marvin 5.7, replaced by
Cleaner.clean(MoleculeGraph, int, String) . |
boolean |
clean(int dim,
String opts,
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(String format)
Clears the bonds vector, the properties, the flags, and sets the
origin coordinates to 0.
|
MoleculeGraph |
clone()
Make an identical copy of the molecule.
|
protected int |
cloneAtoms(int[] cnodes,
MoleculeGraph graph)
Copies the specified atoms.
|
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)
Deprecated.
as of Marvin 6.3.
Not supported feature. |
protected void |
connectOriginalBondsToNewAtom(MolAtom newAtom,
MolAtom orig,
MolBond[] bonds)
Sets the original connections to the new atom.
|
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, or a bond which
is equals with the given bond.
|
boolean |
contains(MoleculeGraph graph)
Does the molecule graph contain the specified fragment?
|
int[][] |
createBHtab()
Deprecated.
As of Marvin 6.2, no replacement.
No replacement. |
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.
|
<C extends MoleculeGraph> |
findBasicFrags(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()
Deprecated.
As of Marvin 6.0, replaced by
getFragIds(int) and
FRAG_BASIC .Usage: mol.getFragIds(MoleculeGraph.FRAG_BASIC); |
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.
As of Marvin 5.6, replaced by
findFrag(int, int, MoleculeGraph) and
FRAG_KEEPING_MULTICENTERS .Usage: 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.
|
<C extends MoleculeGraph> |
findFrags(Class<C> cl)
Deprecated.
As of Marvin 5.6, replaced by
findFrags(Class, int) and
FRAG_KEEPING_MULTICENTERS .Usage: mol.findFrags(cl, MoleculeGraph.FRAG_KEEPING_MULTICENTERS); |
<C extends MoleculeGraph> |
findFrags(Class<C> cl,
int fragmentationType)
Determines the disconnected fragments and puts them into an array.
|
protected static int |
findInArray(Object[] array,
int[] indices,
int n,
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)
Returns the aromatic and or aliphatic ring atom indexes.
Note: This method does not aromatize the already aromatized rings. |
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) |
IteratorFactory.AtomIterator |
getAtomIterator()
Returns an iterator over the atoms in this molecule in proper sequence.
|
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.
|
IteratorFactory.BondIterator |
getBondIterator()
Returns an iterator over the bonds in this molecule in proper sequence.
|
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, replaced by
getBondTable()
and BondTable.getMatrixArray() .Usage: molecule.getBondTable().getMatrixArray(); |
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.
As of Marvin 5.11, replaced by
MolBond.desiredLength(int, int, int, int) and
getDim() .Usage: MolBond.desiredLength(atno1, atno2, type, getDim()); |
double |
getDesiredLength(MolBond b)
Deprecated.
As of Marvin 5.11, replaced by
MolBond.desiredLength(int, int, int, int) ,
MolBond.getType() and
getDim() .Usage: MolBond.desiredLength(atno1, atno2, b.getType, getDim()); |
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.
|
DPoint3[] |
getEnclosingCube()
Gets the cube that encloses the atoms of molecule graph.
|
double |
getExactMass()
Calculates the molecular weight of the molecule using the mass of the most
frequent natural isotope of the atoms.
|
int |
getExplicitHcount()
Gets the total number of explicit hydrogens attached to the molecule.
|
int |
getExplicitLonePairCount(int i)
Gets the explicit lone pair count of the submitted atom.
|
chemaxon.struc.stereo.EZConfiguration |
getEZStereo(MolBond bond)
Gets E/Z stereo information for the given double bond.
|
int |
getFlags()
Gets the dimension and chiral flags.
|
MoleculeGraph |
getForefather()
Gets the first parent.
|
int |
getFormalCharge()
Gets the (total) formal charge of the molecule.
|
String |
getFormula()
Gets the molecular formula.
|
int |
getFragCount()
Deprecated.
As of Marvin 5.6, replaced by
getFragCount(int)
and FRAG_KEEPING_MULTICENTERS .Usage: mol.getFragCount(MoleculeGraph.FRAG_KEEPING_MULTICENTERS); |
int |
getFragCount(int fragmentationType)
Returns the number of fragments for the given fragmentation type.
|
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 (canonical labels).
|
int |
getGrinv(int[] gi,
boolean uniqueFlag)
Deprecated.
As of Marvin 4.0, replaced by
getGrinv(int[], int) .Usage: getGrinv(gi, uniqueFlag ? GRINV_OLDSTEREO : 0); |
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.
|
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.
|
String |
getName()
Gets the molecule name.
|
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)
Deprecated.
As of Marvin 6.0, replaced by
SuperatomSgroup.getAttachmentPointOrders(MolAtom) and
MolAtom.getAttachParentSgroup() .Usage: SuperatomSgroup group = (SuperatomSgroup)molAtom.getAttachParentSgroup()); List<Integer> orders = group.getAttachmentPointOrders(molAtom); |
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.
|
BitSet[] |
getSSSRBondsAsBitSet()
Gets the Smallest Set of Smallest Ring edges as an array of BitSets, one BitSet for each ring.
|
BitSet |
getSSSRBondSet()
Get SSSR bond index bitset.
|
long[] |
getSSSRBondSetInLong()
Deprecated.
as of 15.09.2014, use
getSSSRBondSet() instead |
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)
Deprecated.
as of Marvin 6.3 replaced by
getEZStereo(MolBond) . |
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.
|
ValenceCheckOptions |
getValenceCheckOptions()
Returns the options for valence checking.
|
MoleculeGraph.ValenceCheckState |
getValenceCheckState()
Deprecated.
As of Marvin 6.0, replaced by
getValenceCheckOptions() and
isValenceCheckEnabled() .Usage: // Same as getValenceCheckState() == ValenceCheckState.OFF: isValenceCheckEnabled() == true; // Same as getValenceCheckState() == ValenceCheckState.AMBIGUOUS_AROMATIC_ATOMS_IGNORED: getValenceCheckOptions.isLocalAromatic() == true; // Same as getValenceCheckState() == ValenceCheckState.FULL: getValenceCheckOptions.isLocalAromatic() == false; |
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
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int) .Usage: Hydrogenize.convertExplicitHToImplicit(molecule, f); |
void |
implicitizeHydrogens(int f,
MolAtom[] atoms)
Deprecated.
As of Marvin 5.7, replaced by
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int) .Usage: 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) .Usage: 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) .Usage: Hydrogenize.convertExplicitHToImplicit(mol, atoms, f, check); |
protected void |
incGrinvCC()
Increases the graph invariant change count and sets
grinv to null.
|
protected void |
incGrinvCC(boolean isSSSRReset) |
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)
Deprecated.
as of Marvin 6.2, may constructs inconsistent
MoleculeGraph . Similar functionality is performed by
add(MolAtom) . |
void |
insertBond(int i,
MolBond bond)
Deprecated.
as of Marvin 6.2, may constructs inconsistent
MoleculeGraph . Similar functionality is performed by
add(MolBond) . |
void |
insertBondInOrder(MolBond e,
MolBond[] order)
Insert a bond in the order specified as the second argument.
|
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()
Deprecated.
As of Marvin 14.7.7, no replacement.
Not supported feature. |
boolean |
isAtomInRing(MolAtom atom) |
boolean |
isBond()
Deprecated.
As of Marvin 14.7.7, no replacement.
Not supported feature. |
protected boolean |
isBondParallelWith(MolBond b)
Checks if there is a bond parallel (having same endpoints) with the given bond in this
MoleculeGraph.
|
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()
Deprecated.
as of Marvin 14.7.7, no replacement.
Usage:
use |
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()
Deprecated.
As of Marvin 14.7.7, no replacement.
Not supported feature. |
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()
Determines whether valence check is enabled on this molecule graph.
|
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 replacementAtom,
MolAtom origAtom)
Deprecated.
As of Marvin 6.2, use
MergeUtil.mergeAtoms(MolAtom, MolAtom, boolean) instead. |
int |
mergeFrags(int id1,
int id2,
int fragmentationType)
Merges two connected components of the given fragmentation type.
|
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,
String opts)
Deprecated.
As of Marvin 5.7, replaced by
Cleaner.partialClean(MoleculeGraph, int, int[], String) . |
boolean |
partialClean(Molecule[] template,
String opts)
Deprecated.
As of Marvin 5.7, replaced by
Cleaner.partialClean(Molecule, Molecule[], String) . |
boolean |
partialClean(MoleculeGraph template,
int[] map,
String opts)
Deprecated.
As of Marvin 5.7, replaced by
Cleaner.partialClean(MoleculeGraph, MoleculeGraph, int[], String) . |
MPropertyContainer |
properties()
Gets the property container.
|
void |
qpropCheck(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.
|
protected void |
regenGearch()
Recreate graph search results object.
|
void |
removeAll()
Removes all the atoms and bonds.
|
void |
removeAllBonds()
Removes all bonds.
|
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 |
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 |
replaceAtom(int i,
MolAtom newAtom)
Replaces the atom on the given index with the parameter atom and removes
the parameter atom from its original parent molecule if needed.
|
void |
replaceBond(MolBond oldb,
MolBond newb)
Deprecated.
as of Marvin 6.2, may constructs inconsistent
MoleculeGraph . Use removeBond(MolBond) for
removal and add(MolBond) for adding a new bond to
the molecule. |
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 Object[] |
restoreCache(int n)
Restores caches like connection table, bond table, etc.
|
void |
revalidateCoordDependentProps()
Revalidate coordinate dependent properties.
|
protected 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)
Deprecated.
as of Marvin 6.2, may constructs inconsistent
MoleculeGraph . Use removeAtom(int) for atom
removal and add(MolAtom) for adding new
MolAtom s. |
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)
Deprecated.
as of Marvin 6.2, may constructs inconsistent
MoleculeGraph . Use removeBond(MolBond) for
bond removal and add(MolBond) for adding a new bond
to the molecule. |
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.
|
boolean |
setChirality(Map<Integer,Integer> chiralities)
Sets the chiralities of atoms.
|
void |
setDim(int d)
Sets the dimension.
|
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.
|
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.
|
protected void |
setSupergraph(MoleculeGraph molecule)
Sets the given molecule as the supergraph of this graph.
|
void |
setValenceCheckEnabled(boolean b)
Enables or disables valence check on this molecule graph,
depending on the value of the parameter b.
|
void |
setValenceCheckOptions(ValenceCheckOptions options)
Sets the options for valence checking.
|
void |
setValenceCheckState(MoleculeGraph.ValenceCheckState state)
Deprecated.
As of Marvin 6.0, replaced by
setValenceCheckOptions(ValenceCheckOptions) and
setValenceCheckEnabled(boolean) .Usage: // Same as setValenceCheckState(ValenceCheckState.OFF): setValenceCheckEnabled(false); // Same as setValenceCheckState(ValenceCheckState.AMBIGUOUS_AROMATIC_ATOMS_IGNORED): setValenceCheckOptions(ValenceCheckOptions.DEFAULT); // Same as setValenceCheckState(ValenceCheckState.FULL): setValenceCheckOptions(new ValenceCheckOptions(false, true)); |
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.
|
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.
|
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(List<MolAtom> v)
Check valence and query property errors.
|
true
if the property list contains the molecule,
false
otherwiseprotected static final int INITIAL_CAPACITY
public static final int AROM_BASIC
aromatize(int)
,
Constant Field Valuespublic static final int AROM_GENERAL
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 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
@Deprecated protected static final int VALENCE_CHECK_AMBIGUOUS
ValenceCheckOptions
.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 Values@Deprecated public 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
public 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 int[][] ctab
protected transient chemaxon.core.util.BondTable btab
public transient chemaxon.struc.gearch.MoleculeGraphGearch gearch
protected transient MPropertyContainer propertyContainer
protected transient boolean useOnlyFirstAtomInStereoCalculation
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()
public final MoleculeGraph getParent()
public final MoleculeGraph getForefather()
public final Object getLock()
public void add(MolAtom atom)
atom
- the atom objectpublic void add(MolBond bond)
bond
- the bond objectpublic void add(MolBond bond, boolean checkParallel)
bond
- the bond objectcheckParallel
- protected void addAtom0(MolAtom atom)
atom
- the atom referenceprotected int addAtomWithoutChangingIt(MolAtom atom)
atom
- the atom referenceprotected int addSimpleAtomWithoutChangingIt(MolAtom atom)
atom
- the atom referenceprotected void addAtomToFragment(MolAtom atom)
atom
- the atom referenceprotected void addBond0(MolBond bond)
bond
- the bond referenceprotected final int addBondWithoutChangingIt(MolBond bond)
bond
- the bond referencepublic 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(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 reference@Deprecated public void setBond(int i, MolBond b)
MoleculeGraph
. Use removeBond(MolBond)
for
bond removal and add(MolBond)
for adding a new bond
to the molecule.i
- bond indexb
- the bond reference@Deprecated public void replaceBond(MolBond oldb, MolBond newb)
MoleculeGraph
. Use removeBond(MolBond)
for
removal and add(MolBond)
for adding a new bond to
the molecule.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 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 atomsSecurityException
- the GraphInvariants module cannot be
loaded because of security reasons (firewall)@Deprecated public int getGrinv(int[] gi, boolean uniqueFlag)
getGrinv(int[], int)
.getGrinv(gi, uniqueFlag ? GRINV_OLDSTEREO : 0);
gi
- output array, its length must be equal to the number of atomsuniqueFlag
- boolean flagSecurityException
- 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 optionsSecurityException
- 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 atomsSecurityException
- 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[])
protected final void incGrinvCC(boolean isSSSRReset)
public final void incGrinvCCOnly()
incGrinvCC()
,
grinvCC
,
getGrinvCC()
,
getGrinv(int[])
protected void resetCtab()
protected final void resetGrinvInParents()
protected void regenCtabs()
@Deprecated public boolean addExplicitHydrogens(int f)
Hydrogenize.convertImplicitHToExplicit(MoleculeGraph, MolAtom[], int)
.Hydrogenize.convertImplicitHToExplicit(molecule, null, f);
f
- flags specifying special features, otherwise
if f is 0, then the result equals with hydrogenize(true).SecurityException
- cannot load module because
of a security problem (firewall)OMIT_POSTCLEAN
@Deprecated public boolean addExplicitHydrogens(int f, MolAtom[] atoms)
Hydrogenize.convertImplicitHToExplicit(MoleculeGraph, MolAtom[], int)
.Hydrogenize.convertImplicitHToExplicit(molecule, atoms, f);
f
- flags specifying special features, otherwise
if f is 0, then the result equals with hydrogenize(true).atoms
- add hydrogens to these atoms onlySecurityException
- cannot load module because
of a security problem (firewall)OMIT_POSTCLEAN
@Deprecated public boolean hydrogenize(boolean add)
Hydrogenize.convertImplicitHToExplicit(MoleculeGraph)
and
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph)
.add
- add explicit H atoms if true, remove if falseSecurityException
- cannot load module because
of a security problem (firewall)@Deprecated public void addExplicitLonePairs()
Hydrogenize.convertImplicitLonePairsToExplicit(MoleculeGraph, MolAtom[])
.Hydrogenize.convertImplicitLonePairsToExplicit(molecule, null);
SecurityException
- cannot load module because
of a security problem (firewall)@Deprecated public void removeExplicitLonePairs()
Hydrogenize.convertExplicitLonePairsToImplicit(MoleculeGraph)
.SecurityException
- cannot load module because
of a security problem (firewall)@Deprecated public final void implicitizeHydrogens(int f)
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, int)
.Hydrogenize.convertExplicitHToImplicit(molecule, f);
f
- flags specifying special H atom types to include@Deprecated public void implicitizeHydrogens(int f, MolAtom[] atoms)
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int)
.Hydrogenize.convertExplicitHToImplicit(mol, atoms, f);
f
- flags specifying special H atom types to includeatoms
- the subset of H atoms to include or null for all@Deprecated public void implicitizeHydrogens(int f, MolAtom[] atoms, boolean check)
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean)
.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
@Deprecated protected boolean implicitizeHydrogens0(int f, MolAtom[] atoms, boolean check)
Hydrogenize.convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean)
.Hydrogenize.convertExplicitHToImplicit(mol, atoms, f, check);
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 skipped@Deprecated public void checkConsistency()
RuntimeException
- if inconsistency foundprotected void checkBondConsistency()
protected final void updateDim(MoleculeGraph m)
m
- the other molecule@Deprecated public void mergeAtoms(MolAtom replacementAtom, MolAtom origAtom)
MergeUtil.mergeAtoms(MolAtom, MolAtom, boolean)
instead.replacementAtom
- the atom which will take place in the molecule after the mergeorigAtom
- the original atom which's bonds will be added to the new atompublic boolean hasValenceError()
true
if there is an atom with valence error,
false
if there is no valence errorvalenceCheck()
,
MolAtom.hasValenceError()
public void valenceCheck()
setValenceCheckOptions(ValenceCheckOptions)
; which atoms are checked.public void valenceCheck(List<MolAtom> v)
v
- contains the atoms to checkMolAtom.valenceCheck()
,
valenceCheck()
public void qpropCheck(List<MolAtom> v)
v
- contains the atoms to checkMolAtom.qpropCheck()
public boolean isSimilarTo(MoleculeGraph g)
g
- the molecule graphtrue
if the graphs are similar, false
otherwiseMolAtom.haveEqualProperties(MolAtom)
,
MolAtom.haveSimilarBonds(MolAtom)
@Deprecated public boolean isAtom()
@Deprecated public boolean isBond()
MolAtom.EMPTY
atoms.true
if the structure is the representation of a
bond@Deprecated public boolean isRing()
true
if the graph is a ring, false otherwisepublic boolean isSymmetric()
public 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 chemaxon.core.structure.StructureForBuilder
getAtomCount
in interface Incomplecule
public int getAtomCount(int atomicNumber)
atomicNumber
- atomic number of atoms looked forpublic 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 indexpublic MolBond getBond(int n)
n
- the bond index@Deprecated public void setAtom(int i, MolAtom atom)
MoleculeGraph
. Use removeAtom(int)
for atom
removal and add(MolAtom)
for adding new
MolAtom
s.i
- atom indexatom
- new atom reference@Deprecated public final void insertAtom(int i, MolAtom atom)
MoleculeGraph
. Similar functionality is performed by
add(MolAtom)
.i
- atom indexatom
- new atom referenceprotected void insertNullAtoms(int i, int count)
i
- starting indexcount
- number of new entries@Deprecated public final void insertBond(int i, MolBond bond)
MoleculeGraph
. Similar functionality is performed by
add(MolBond)
.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)
p
- reference to the object that will hold the resultpublic DPoint3 calcCenter()
public double calcWidth()
public double calcHeight()
@Deprecated public double getDesiredLength(int atno1, int atno2, int type)
MolBond.desiredLength(int, int, int, int)
and
getDim()
.MolBond.desiredLength(atno1, atno2, type, getDim());
atno1
- atomic number of first moleculeatno2
- atomic number of second moleculetype
- bond type@Deprecated public double getDesiredLength(MolBond b)
MolBond.desiredLength(int, int, int, int)
,
MolBond.getType()
and
getDim()
.MolBond.desiredLength(atno1, atno2, b.getType, getDim());
b
- the bondpublic 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 graphfalse
if the atoms array contains all bond end
points, true
if there is at least one external
bondprotected int cloneAtoms(int[] cnodes, MoleculeGraph graph)
cnodes
- array of atom indices to copy or null
graph
- the target molecule graphprotected MolBond[] getBonds(MolAtom atom)
atom
- the atomprotected static final int findInArray(Object[] array, int[] indices, int n, Object o)
array
- the arrayindices
- array indices or null
n
- the number of elements@Deprecated 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 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.public MoleculeGraph clone()
public int getParityType(int idx)
idx
- the index of the atom whose parity type is to be determinedStereoConstants.PARITY_ALLENE
,
StereoConstants.PARITY_TETRAHEDRAL
public int getParity(int i)
i
- the index of the atom whose parity is to be determinedSecurityException
- 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 determinedSecurityException
- the Parity module cannot be
loaded because of security reasons (firewall)StereoConstants.PARITY_ODD
,
StereoConstants.PARITY_EVEN
,
StereoConstants.PARITY_EITHER
,
StereoConstants.PARITY_UNSPEC
,
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)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 moleculeStereoConstants.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 againStereoConstants.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 againStereoConstants.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 againStereoConstants.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 determinedSecurityException
- 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(Map<Integer,Integer> chiralities)
StereoConstants.CHIRALITY_R
, StereoConstants.CHIRALITY_S
,
StereoConstants.CHIRALITY_r
, and StereoConstants.CHIRALITY_s
to define chirality.
If chirality settings on at least on atom was not successful, chirality values on all atoms are reverted
back to their original state.chiralities
- Map of integers, where the key is the atom index, value is the chirality value.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. 0 or (CHIRALITY_R|CHIRALITY_S) to remove chirality)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)
MIN_RING_SIZE_FOR_TRANS_DB
(so chemically the double bond with its ring ligand can be cis only),
but due to the perspective depiction in two dimension the double bond
ligand arrangement looks trans.
In this case the chemically incorrect trans returned.i1
- index of atom A1i2
- index of atom A2i3
- index of atom A3i4
- index of atom A4StereoConstants.CTUMASK
,
MolBond.calcStereo2()
,
for detailed examples.
public int getStereo2(MolAtom a1, int i2, int i3, MolAtom a4)
MIN_RING_SIZE_FOR_TRANS_DB
(so chemically the double bond with its ring ligand can be cis only),
but due to the perspective depiction in two dimension the double bond
ligand arrangement looks trans.
In this case the chemically incorrect trans returned.a1
- atom A1i2
- index of atom A2i3
- index of atom A3a4
- atom A4Returned 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)
MIN_RING_SIZE_FOR_TRANS_DB
(so chemically the double bond with its ring ligand can be cis only),
but due to the perspective depiction in two dimension the double bond
ligand arrangement looks trans.
In this case the chemically incorrect trans returned.b
- the bonda1
- atom A1a4
- atom A4StereoConstants.CTUMASK
,
MolBond.calcStereo2()
,
for detailed examples.
public int getStereo2(MolBond b, MolAtom a1, MolAtom a4, boolean grcheck)
MIN_RING_SIZE_FOR_TRANS_DB
(so chemically the double bond with its ring ligand can be cis only),
but due to the perspective depiction in two dimension the double bond
ligand arrangement looks trans.
In this case the chemically incorrect trans returned.b
- the bonda1
- atom A1a4
- atom A4grcheck
- true if check atom equivalences using graph invariantsStereoConstants.CTUMASK
,
MolBond.calcStereo2()
,
for detailed examples.
public chemaxon.struc.stereo.EZConfiguration getEZStereo(MolBond bond)
EZConfiguration.NONE
is
returnedEZConfiguration.Z
EZConfiguration.E
EZConfiguration.E_OR_Z
EZConfiguration.Z_OR_UNSPEC
EZConfiguration.E_OR_UNSPEC
EZConfiguration.NONE
bond
- the bond for which the E/Z stereo will be calculated@Deprecated public int getStereo2(MolBond b)
getEZStereo(MolBond)
.b
- the bondStereoConstants.CTUMASK
,
StereoConstants.CIS
,
StereoConstants.TRANS
,
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 A4StereoConstants.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 invariantsStereoConstants.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 atompublic 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 invariantspublic boolean canBeCT(MolBond bond)
bond
- the bond to checkpublic int getLonePairCount(int i)
i
- atom indexpublic int getExplicitLonePairCount(int i)
i
- atom indexpublic void aromatize(boolean a) throws SecurityException
a
- aromatize (true) or dearomatize (false)SecurityException
- cannot load module because
of a security problem (firewall)AROM_GENERAL
,
Document about aromatizationpublic final void aromatize()
SecurityException
- cannot load module because
of a security problem (firewall)AROM_GENERAL
,
Document about aromatizationpublic boolean dearomatize()
SecurityException
- cannot load module because
of a security problem (firewall)public boolean dearomatize(int method)
method
- Specifies the algorithm for dearomatization. Possible
values:
SecurityException
- cannot load module because
of a security problem (firewall)RuntimeException
- the molecule cannot be dearomatized
with method DEAROM_HUCKELCHECK_EXpublic void aromatize(int method)
method
- Specifies the algorithm for aromatization. Possible
values:
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.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 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 atompublic int indexOf(MolBond bond)
bond
- the bondObject.equals(Object)
protected final int findAtom(MolAtom atom)
protected final int findBond(MolBond bond)
public boolean contains(MolAtom atom)
atom
- the atom objectpublic boolean contains(MolBond bond)
bond
- the bond objectObject.equals(Object)
public boolean contains(MoleculeGraph graph)
graph
- the fragmentpublic 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()
@Deprecated public boolean clean(int dim, String opts)
Cleaner.clean(MoleculeGraph, int, String)
.dim
- dimensionsopts
- cleaning optionsSecurityException
- cannot load module because
of a security problem (firewall)@Deprecated public boolean partialClean(Molecule[] template, String opts)
Cleaner.partialClean(Molecule, Molecule[], String)
.template
- template molecule array (substructure of the target)opts
- cleaning optionsSecurityException
- cannot load module because
of a security problem (firewall)@Deprecated public boolean partialClean(MoleculeGraph template, int[] map, 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 optionsSecurityException
- cannot load module because
of a security problem (firewall)@Deprecated public boolean partialClean(int dim, int[] fixed, String opts)
Cleaner.partialClean(MoleculeGraph, int, int[], String)
.dim
- dimensionsfixed
- atom indexes to be fixedopts
- cleaning optionsSecurityException
- cannot load module because
of a security problem (firewall)@Deprecated public boolean clean(int dim, String opts, MProgressMonitor pmon)
Cleaner.clean(MoleculeGraph, int, String, MProgressMonitor)
.dim
- dimensionsopts
- cleaning optionspmon
- progress monitor or null
SecurityException
- cannot load module because
of a security problem (firewall)clean(int, java.lang.String)
public boolean stereoClean()
protected boolean isGrinvCCValid()
true
public int[][][] getAromaticAndAliphaticRings(int aromatizationType, boolean onlyAromrings, boolean aromatize, int maxRingSize, int ringsLimit)
dearomatize()
or dearomatize(int)
methods to
convert the molecule to Kekule form.aromatizationType
- use aromatization:
onlyAromrings
- get only the aromatic rings (Aromatic ring detection is faster
than calculating Aliphatic and Aromatic rings in case of 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()
MolBond.ANY
, MolBond.COORDINATE
, MolBond.HYDROGEN
.
If the SSSR array is not calculated for the molecule, then create it.
sssr[i][j] is the j-th atom index at the i-th SSSR ring in the molecule.
This array is cached, so clone it if you plan to modify it.grinvCC
public final int[][] getCSSR()
grinvCC
public final int[][] getSSSRBonds()
getSSSRBondsAsBitSet()
may be more efficient and requires
less memory usage.grinvCC
public int[][] getSSSRIdxesForAtoms()
grinvCC
public BitSet getSSSRBondSet()
public final BitSet[] getSSSRBondsAsBitSet()
@Deprecated public long[] getSSSRBondSetInLong()
getSSSRBondSet()
insteadn
' 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 indexpublic int[][] createCHtab()
@Deprecated public int[][] createBHtab()
public int getImplicitHcount()
public int getExplicitHcount()
public MolAtom findAtomClone(MolAtom a)
a
- the original atompublic 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.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 Object[] saveCache(int n)
protected Object[] restoreCache(int n)
public boolean isMultiChiral()
public void adjustMultiChiralFlag()
@Deprecated public boolean isMolecule()
use myObject instanceof Molecule
instead
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
@Deprecated public boolean arrangeComponents()
CleanUtil.arrangeComponents(MoleculeGraph, boolean, boolean)
.CleanUtil.arrangeComponents(molecule, true, true);
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()
@Deprecated public int[][] getBtab()
getBondTable()
and BondTable.getMatrixArray()
.molecule.getBondTable().getMatrixArray();
public chemaxon.core.util.BondTable getBondTable()
@Deprecated public <C extends MoleculeGraph> C[] findFrags(Class<C> cl)
findFrags(Class, int)
and
FRAG_KEEPING_MULTICENTERS
.mol.findFrags(cl, MoleculeGraph.FRAG_KEEPING_MULTICENTERS);
C
- the class of the fragmentscl
- create fragment objects of this classfindFrags(Class, int)
public <C extends MoleculeGraph> C[] findFrags(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 fragmentationFRAG_BASIC
,
FRAG_KEEPING_MULTICENTERS
,
FRAG_KEEPING_SGROUPS
@Deprecated public final int[] findComponentIds()
getFragIds(int)
and
FRAG_BASIC
.mol.getFragIds(MoleculeGraph.FRAG_BASIC);
i
)public final int[] findComponentIds(int[] inds)
inds
- atom index array, null
means all atomsinds[i]
or atom i
if the atom index array is null
)@Deprecated public final int getFragCount()
getFragCount(int)
and FRAG_KEEPING_MULTICENTERS
.mol.getFragCount(MoleculeGraph.FRAG_KEEPING_MULTICENTERS);
getFragCount(int)
public final int getFragCount(int fragmentationType)
fragmentationType
- type of fragmentationFRAG_BASIC
,
FRAG_KEEPING_MULTICENTERS
,
FRAG_KEEPING_SGROUPS
public final int[] getFragIds(int fragmentationType)
fragmentationType
- type of fragmentationFRAG_BASIC
,
FRAG_KEEPING_MULTICENTERS
,
FRAG_KEEPING_SGROUPS
protected final void regenGearch()
@Deprecated public final void findFrag(int i, MoleculeGraph frag)
findFrag(int, int, MoleculeGraph)
and
FRAG_KEEPING_MULTICENTERS
.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
public final void findFragById(int fragId, int fragmentationType, MoleculeGraph frag)
fragId
- fragment IDfragmentationType
- type of fragmentationfrag
- add the atoms and bonds to this MoleculeGraphgetFragIds(int)
,
FRAG_BASIC
,
FRAG_KEEPING_MULTICENTERS
,
FRAG_KEEPING_SGROUPS
public final <C extends MoleculeGraph> C[] findBasicFrags(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 classprotected chemaxon.struc.gearch.MoleculeGraphGearch createGearch()
public int getMaxRgroupAttachmentPointOrder()
MolAtom.RGROUP_ATTACHMENT
,
MolAtom.getRgroupAttachmentPointOrder()
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 fragmentationFRAG_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)
setValenceCheckOptions(ValenceCheckOptions)
b
- - If true, the valence check is enabled on this molecule graph;
otherwise valence check is disabledisValenceCheckEnabled()
public boolean isValenceCheckEnabled()
setValenceCheckEnabled
method.
To configure the options of the valence check see setValenceCheckOptions(ValenceCheckOptions)
setValenceCheckEnabled(boolean b)
@Deprecated public void setValenceCheckState(MoleculeGraph.ValenceCheckState state)
setValenceCheckOptions(ValenceCheckOptions)
and
setValenceCheckEnabled(boolean)
.// Same as setValenceCheckState(ValenceCheckState.OFF): setValenceCheckEnabled(false); // Same as setValenceCheckState(ValenceCheckState.AMBIGUOUS_AROMATIC_ATOMS_IGNORED): setValenceCheckOptions(ValenceCheckOptions.DEFAULT); // Same as setValenceCheckState(ValenceCheckState.FULL): setValenceCheckOptions(new ValenceCheckOptions(false, true));
state
- determines which atoms will be checked in the following calls
of valenceCheck()
getValenceCheckState()
,
valenceCheck()
@Deprecated public MoleculeGraph.ValenceCheckState getValenceCheckState()
getValenceCheckOptions()
and
isValenceCheckEnabled()
.// Same as getValenceCheckState() == ValenceCheckState.OFF: isValenceCheckEnabled() == true; // Same as getValenceCheckState() == ValenceCheckState.AMBIGUOUS_AROMATIC_ATOMS_IGNORED: getValenceCheckOptions.isLocalAromatic() == true; // Same as getValenceCheckState() == ValenceCheckState.FULL: getValenceCheckOptions.isLocalAromatic() == false;
public void setValenceCheckOptions(ValenceCheckOptions options)
setValenceCheckEnabled(boolean)
.
Calling this function with a not null parameter automatically enables the valence check.options
- the new valence check optionsValenceCheckOptions
public ValenceCheckOptions getValenceCheckOptions()
isValenceCheckEnabled()
ValenceCheckOptions
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>
@Deprecated protected int getPossibleAttachmentPoints(MolAtom molAtom)
SuperatomSgroup.getAttachmentPointOrders(MolAtom)
and
MolAtom.getAttachParentSgroup()
.SuperatomSgroup group = (SuperatomSgroup)molAtom.getAttachParentSgroup()); List<Integer> orders = group.getAttachmentPointOrders(molAtom);
molAtom
- the atom to calculate the possible attachment point value forMolAtom.getAttach()
public 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>
protected boolean isBondParallelWith(MolBond b)
b
- bondpublic void replaceAtom(int i, MolAtom newAtom)
i
- the index of the original atomnewAtom
- the atom which will replace the originalprotected void connectOriginalBondsToNewAtom(MolAtom newAtom, MolAtom orig, MolBond[] bonds)
newAtom
- the atom which replace the originalorig
- the original atombonds
- the original atoms bonds (before any modification)public IteratorFactory.AtomIterator getAtomIterator()
public IteratorFactory.BondIterator getBondIterator()
protected void setSupergraph(MoleculeGraph molecule)
molecule
- the molecule