Static
CANONIZER_Static
CANONIZER_Static
CANONIZER_Static
CANONIZER_Static
CANONIZER_Static
CANONIZER_Static
CANONIZER_Static
CANONIZER_Static
CANONIZER_Static
CANONIZER_Static
CANONIZER_Static
CANONIZER_Static
CANONIZER_Static
FISCHER_Static
FISCHER_Static
STEREO_Static
VALIDATION_Static
VALIDATION_Static
VALIDATION_Static
VALIDATION_Static
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cESRGroupStatic
cESRMaxStatic
cESRTypeStatic
cESRTypeStatic
cESRTypeStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cStatic
cThis adds a fragment from sourceMol to this molecule by first copying rootAtom and then all connected atoms and bonds by traversing the graph breadth first.
molecule from which the fragment is copied to this
null or int[] not smaller than sourceMol.mAllAtoms; receives atom indices of this molecule
Copies all atoms and bonds of mol to the end of this Molecule's atom and bond tables. If mol is a fragment then this Molecule's fragment flag is set to true and all query features of mol are also copied.
Atom mapping from original mol to this molecule after incorporation of mol.
Adds and connects the substituent molecule to the connectionAtom of this molecule. Substituent atoms with atomicNo=0 are not copied and considered to represent the connectionAtom. Bonds leading to them, however, are copied and connected to the connectionAtom. High level function for constructing a molecule.
atom mapping from substituent to this molecule after addition of substituent
Calculates a signed torsion as an exterior spherical angle from a valid 4-atom strand. Looking along the central bond, the torsion angle is 0.0, if the projection of front and rear bonds point in the same direction. If the front bond is rotated in the clockwise direction, the angle increases, i.e. has a positive value. http://en.wikipedia.org/wiki/Dihedral_angle
4 valid atom indices defining a connected atom sequence
torsion in the range: -pi <= torsion <= pi
Normalizes charge distribution in single- and multifragment molecules. In a first step polar bonds (both atoms have opposite charge) are neutralized by removing both atom charges and increasing the bond order, provided that atom valences allow the change. Neutralizes positive and an equal amount of negative charges on electronegative atoms, provided these are not on 1,2-dipolar structures, in order to ideally achieve a neutral molecule. This method does not change the overall charge of the molecule. It does not change the number of explicit atoms or bonds or their connectivity except bond orders. This method does not deprotonate acidic groups to compensate for quarternary charged nitrogen.
throws an exception after polar bond neutralization, if overall charge is not zero
remaining overall molecule charge
Creates a new atom in destMol and copies all source atom properties including atom list, custom label, flags, and mapNo to it.
1 to create new ESR group or destMol ESR group count from esrGroupCountAND()
1 to create new ESR group or destMol ESR group count from esrGroupCountOR()
Index of new atom in destMol.
1 to create new ESR group or destMol ESR group count from esrGroupCountAND()
1 to create new ESR group or destMol ESR group count from esrGroupCountOR()
Copies this molecule including parity settings, if valid. The original content of destMol is replaced. Helper arrays are not copied and need to be recalculated if needed.
Clears destmol and then copies a part of this Molecule into destMol, being defined by a mask of atoms to be included. If not all atoms are copied, then destMol is set to be a substructure fragment.
receives the part of this Molecule
defines atoms to be copied; its size may be this.getAtoms() or this.getAllAtoms()
defines whether disconnected delocalized bonds will keep their single/double bond status or whether the query feature 'delocalized bond' will be set
null or int[] not smaller than includeAtom.length; receives atom indices of dest molecule
Clears destmol and then copies a part of this Molecule into destMol, being defined by a mask of bonds to be included. Bonds, whose atoms carry opposite charges are treated in the following manner: If only one of the two bond atoms is kept, then its absolute charge will be reduced by 1.
receives the part of this Molecule
defines bonds to be copied
defines whether disconnected delocalized bonds will keep their single/double bond status or whether the query feature 'delocalized bond' will be set
null or int[] not smaller than this.getAllAtoms()
atom map from this to destMol with not copied atom's index being -1
Copies name,isFragment,chirality and validity of parity & CIP flags. When copying molecules parts only or when changing the atom order during copy, then atom parities or CIP parities may not be valid anymore and invalidateHelperArrays([affected bits]) should be called in these cases.
Deletes all atoms and bonds
from the molecule, which were marked before for deletion by calling
markAtomForDeletion() or markBondForDeletion(). Bonds connecting atoms of
which at least one is marked for deletion, are deleted automatically and
don't require to be explicitly marked.
When multiple atoms and/or bonds need to be deleted, marking them and calling
this method is more efficient than deleting them individually with
deleteAtom() and deleteBond(). Bonds, whose atoms carry opposite charges are
treated in the following manner: If only one of the two bond atoms is kept,
then its absolute charge will be reduced by 1. After the deletion the
original order of atom and bond indexes is retained.
mapping from old to new atom indices; null if no atoms nor bonds were deleted.
While the Molecule class covers all primary molecule information, its derived
class ExtendedMolecule handles secondary, i.e. calculated molecule
information, which is cached in helper arrays and stays valid as long as the
molecule's primary information is not changed. Most methods of
ExtendedMolecule require some of the helper array's information. High level
methods, e.g. getPath(), take care of updating an outdated cache themselves.
Low level methods, e.g. isAromaticAtom(), which typically are called very
often, do not check for validity nor update the helper arrays themselves. If
you use low level methods, then you need to make sure that the needed helper
array information is valid by this method.
For performance reasons there are distinct levels of helper
information. (A higher level always includes all properties of the
previous level):
cHelperNeighbours: explicit hydrogen atoms are moved to the end of the
atom table and bonds leading to them are moved to the end of the bond table.
This way algorithms can skip hydrogen atoms easily. For every atom directly
connected atoms and bonds (with and without hydrogens) are determined. The
number of pi electrons is counted.
cHelperRings: Aromatic and non-aromatic rings are detected. Atom and
bond ring properties are set and a ring collection provides a total set of
small rings (7 or less atoms). Atoms being in allylic/benzylic or stabilized
(neighbor of a carbonyl or similar group) position are flagged as such.
cHelperParities: Atom (tetrahedral or axial) and bond (E/Z or atrop)
parities are calculated from the stereo configurations.
cHelperCIP: Cahn-Ingold-Prelog stereo information for atoms and
bonds.
cHelperParities and cHelperCIP require a StereoMolecule!!!
one of cHelperNeighbours,cHelperRings,cHelperParities,cHelperCIP
true if the molecule was changed
Crawls along a chain of sp-hybridized atoms starting from atom2 (which may not be sp-hybridized) away from its sp-hybridized neighbour atom1. Returns the first atom that is either not sp-hybridized anymore or the last atom of the chain if that is still sp-hybridized. Returns -1 in case of an sp-hybridized cycle.
sp-hybridized atom
neighbour atom of atom1
first non-sp-hybridized atom when crawling from atom2 away from atom1
Checks whether atom is one of the two atoms of an axial chirality bond of BINAP type. Condition: non-aromatic single bond connecting two aromatic rings with 6 or more members that together bear at least three ortho substituents. A stereo bond indicating the chirality is not(!!!) a condition.
to check, whether it is part of a bond, which has BINAP type of axial chirality
axial chirality bond or -1 if axial chirality conditions are not met
Starting from startAtom this method locates a system of annelated or bridged ring systems with all members bonds being a ring bond. Detected member atoms and bonds are flagged accordingly.
if set then only aromatic atoms and bonds are considered
This returns the absolute(!) atom parity from the canonization procedure. While the molecule's (relative) atom parity returned by getAtomParity() is based on atom indices and therefore depends on the order of atoms, the absolute atom parity is based on atom ranks and therefore independent of the molecule's atom order. Usually relative parities are used, because the atom's stereo situation can be interpreted without the need for atom rank calculation. This requires valid helper arrays level cHelperParities or higher.
one of the Molecule.cAtomParityXXX constants
This returns the absolute(!) bond parity from the canonization procedure. While the molecule's (relative) bond parity returned by getBondParity() is based on atom indices and therefore depends on the order of atoms, the absolute bond parity is based on atom ranks and therefore independent of the molecule's atom order. Usually relative parities are used, because the bond's stereo situation can be interpreted without the need for atom rank calculation. This requires valid helper arrays level cHelperParities or higher.
one of the Molecule.cBondParityXXX constants
The neighbours (connected atoms) of any atom are sorted by their
relevance:
count of category 1 & 2 neighbour atoms (excludes neighbours connected with zero bond order)
The neighbours (connected atoms) of any atom are sorted by their
relevance:
count of category 1 & 2 & 3 neighbour atoms
The atom Cahn-Ingold-Prelog parity is a calculated property available above/equal helper level cHelperCIP. It encodes the stereo configuration of an atom with its neighbors using up/down-bonds or 3D-atom-coordinates, whatever is available. It depends on the atom indices of the neighbor atoms and their orientation is space. This method is called by the Canonizer and usually should not be called otherwise.
one of cAtomCIPParityNone,cAtomCIPParityRorM,cAtomCIPParitySorP,cAtomCIPParityProblem
This is MDL's enhanced stereo representation (ESR). Stereo atoms and bonds with the same ESR type (AND or OR) and the same ESR group number are in the same group, i.e. within this group they have the defined (relative) stereo configuration.
group index starting with 0
This is MDL's enhanced stereo representation (ESR). Stereo atoms and bonds with the same ESR type (AND or OR) and the same ESR group number are in the same group, i.e. within this group they have the defined (relative) stereo configuration.
one of cESRTypeAbs,cESRTypeAnd,cESRTypeOr
The atom parity is a calculated property available above/equal helper level
cHelperParities. It describes the stereo configuration of a chiral atom and
is calculated either from 2D-atom-coordinates and up/down-bonds or from
3D-atom-coordinates, whatever is available. It depends on the atom indexes of
the neighbor atoms and their orientation in space.
The parity is defined as follows: Look at the chiral atom such that its
neighbor atom with the highest atom index (or the hydrogen atom if it is
implicit) is oriented to the back. If the remaining three neighbors are in
clockwise order (considering ascending atom indexes) than the parity is 1. If
they are in anti-clockwise order, then the parity is 2.
For linear chirality (allenes): Look along the straight line of double bonds
such that the rear neighbor with the lower atom index points to the top. If
the front neighbor with the lower atom index points to the right than the
parity is 1.
one of cAtomParity1,cAtomParity2,cAtomParityNone,cAtomParityUnknown
Locates that single bond which is the preferred one to be converted into up/down bond in order to define the atom chirality.
parity carrying atom, i.e. a tetrahedral stereocenter or central allene atom
preferred bond or -1, if no single bond existing
Get the atomic query features as an object
Calculates the number of independent rings of which 'atom' is a member. Any combination of two connected atoms to 'atom' is used for: - finding the shortest path connecting these two neighbors avoiding 'atom' - if such a path exists and at least one bonds of that path is not a member of a path found earlier then count this path as an independent ring closure.
number of independent rings
In addition to the natural atomic numbers, we support additional pseudo atomic numbers. Most of these are for compatibility with the MDL atom table, e.g. for amino acids and R-groups. D and T are accepted for setting, but are on-the-fly translated to H with the proper atom mass.
A validated molecule (after helper array creation) contains a sorted list of
all atoms with the plain (neglegible) hydrogen atoms at the end of the list.
Neglegible hydrogen atoms a those that can be considered implicit, because
they have no attached relevant information. Hydrogen atoms that cannot be
neglected are special isotops (mass != 0), if they carry a custom label, if
they are connected to another atom with bond order different from 1, or if
they are connected to another neglegible hydrogen.
Only valid after calling ensureHelperArrays(cHelperNeighbours or higher);
the number relevant atoms not including neglegible hydrogen atoms
Calculates and returns the mean bond length of all bonds including or not including hydrogen bonds. If there are no bonds, then the average distance between unconnected atoms is returned. If we have less than 2 atoms, cDefaultAverageBondLength is returned.
The bond Cahn-Ingold-Prelog parity is a calculated property available above/equal helper level cHelperCIP. It encodes the stereo configuration of a bond with its neighbors using 2D-coordinates and up/down-bonds or 3D-atom-coordinates, whatever is available. It depends on the atom indices of the neighbor atoms and their orientation is space. This method is called by the Canonizer and usually should not be called otherwise. Considered are E/Z-double bonds and M/P-BINAP type single bonds.
one of cBondCIPParityNone,cBondCIPParityEorP,cBondCIPParityZorM,cBondCIPParityProblem
This is MDL's enhanced stereo representation (ESR). Stereo atoms and bonds with the same ESR type (AND or OR) and the same ESR group number are in the same group, i.e. within this group they have the defined (relative) stereo configuration.
group index starting with 0
This is MDL's enhanced stereo representation (ESR). Stereo atoms and bonds with the same ESR type (AND or OR) and the same ESR group number are in the same group, i.e. within this group they have the defined (relative) stereo configuration.
one of cESRTypeAbs,cESRTypeAnd,cESRTypeOr
Returns the formal bond order. Delocalized rings have alternating single and double bonds, which are returned as such. Bonds that are explicitly marked as being delocalized are returned as 1. Dative bonds are returned as 0.
formal bond order 0 (dative bonds), 1, 2, or 3
Returns the pre-calculated bond parity, e.g. cBondParityEor1. To distinguish double bond parities (E/Z) from parities of axial chirality, e.g. BINAP type (1/2) simply check with getBondOrder(bond): If the order is 2, then the parity describes E/Z, otherwise an axial parity.
one of cBondParity???
Get the bond query features as an object
The bond list is preprocessed such that all bonds leading to a plain hydrogen atom (natural abundance, no custom labels) are at the end of the list. Only valid after calling ensureHelperArrays(cHelperNeighbours or higher);
count of bonds not including those connecting plain-H atoms
Gets the overall chirality of the molecule, which is a calculated information considering: Recognition of stereo centers and stereo bonds, defined ESR features, meso detection. The chirality combines the knowledge about how many stereo isomers are represented, whether all of these are meso, whether we have one defined stereo isomer, a mixture of racemates, epimers, or other diastereomers. The information is used during depiction.
The neighbours (connected atoms) of any atom are sorted by their
relevance:
index into sorted neighbour list
the i-th neighbor atom of atom
The neighbours (connected atoms) of any atom are sorted by their
relevance:
count of category 1 neighbour atoms (excludes plain H and bond zero orders)
The neighbours (connected atoms) of any atom are sorted by their
relevance:
index into sorted neighbour list
index of bond connecting atom with its i-th neighbor
The neighbours (connected atoms) of any atom are sorted by their
relevance:
index into sorted neighbour list
order of bond connecting atom with its i-th neighbor
This is the maximum valence correction caused by atom charge or radical
status, e.g. N+ -> 1; N- -> -1; Al+ -> -1; C+,C- -> -1. In some cases, where
the atomicNo can have multiple valences, the influence of a charge depends on
the atom's actual valence, e.g. valence corrections for R3P(+) and R5P(+) are
1 and -1, respectively. Criteria are:
-in the given valence state is there a lone pair that can be protonated
-can we introduce a negative substituent as in BH3 or PF5 vs. SF6
If the atom is a stereo center in fisher projection, then its tetrahedral parity is returned. If the horizontal bonds are plain single bonds, then they are interpreted as up-bonds.
the stereo center
map of neighbours sorted by atom index
bond angles sorted by neighbour atom index
null or int[] large enough to receive bond directions
cAtomParity1,cAtomParity2 or cAtomParityUnknown
Returns an array of all atoms for which a path of bonds leads to rootAtom. Metal ligand bonds may or may not be considered a connection.
atoms being in the same fragment as rootAtom
Locates all unconnected fragments in the Molecule and assigns fragment indexes for every atom starting with 0. Optionally the fragment detection may be restricted to those atoms that have been previously marked with setAtomMarker(). In that case non-marked atoms receive the fragment number -1 and are not considered a connection between marked atoms potentially causing two marked atoms to end up in different fragments, despite sharing the same fragment. Metal ligand bonds may or may not be considered a connection.
array at least mAllAtoms big to receive atom fragment indexes
if true, then only atoms marked with setAtomMarker() are considered
number of disconnected fragments
Separates all disconnected fragments of this Molecule into individual
Molecule objects. If fragment separation is only needed, if there are
multiple fragments, it may be more efficient to run this functionality in two
steps, e.g.:
int[] fragmentNo = new int[mol.getAllAtoms()];
int fragmentCount = getFragmentNumbers(fragmentNo, boolean, boolean);
if (fragmentCount > 1) {
StereoMolecule[] fragment = getUniqueFragmentsEstimated(int[] fragmentNo,
fragmentCount);
...
}
The free valence is the number of potential additional single bonded neighbours to reach the atom's maximum valence. Atomic numbers that have multiple possible valences, the highest value is taken. Atom charges are considered. Implicit hydrogens are not considered. Thus, the oxygen in a R-O(-) has a free valence of 0, the nitrogen in R3N(+) has a free valence of
If ensureHelperArrays() (and with it handleHydrogens()) was not called yet on a fresh molecule and if the molecule contains simple hydrogen atoms within non-hydrogens atoms, then this function returns a map from current atom indexes to those new atom indexes that would result from a call to handleHydrogens.
This function returns an array of HOSE(Hierarchical Organisation of Spherical Environments) codes represented as diastereotopic actelion IDs.
Optional
options: IHoseCodesOptionsThis is a convenience method that creates the molecule's idcode without
explicitly creating a Canonizer object for this purpose. The idcode is a
compact String that uniquely encodes the molecule with all stereo and query
features.
WARNING: If the molecule has no atom coordinates but valid parities, e.g.
after new IDCodeParser(false).parse(idcode, null), this method returns null;
This is a convenience method that creates the molecule's id-coordinates
matching the idcode available with getIDCode(). It does not explicitly create
a Canonizer object for this purpose.
WARNING: If the molecule has no atom coordinates but valid parities, e.g.
after new IDCodeParser(false).parse(idcode, null), this method returns null;
If the explicitly attached neighbors cause an atom valence to exceed the
lowest allowed valence for this atomic no, then this method returns the next
higher allowed valence, e.g. O=P(-H)-OMe :
standard P valence is 3, used valence is 4, implicit abnormal valence is 5.
The molecule is interpreted as O=PH2-OMe. Requires cHelperNeighbours!
abnormal valence or -1 if valence doesn't exceed standard valence
Calculates and return the number of implicit hydrogens at atom. If atom is itself a hydrogen atom, a metal except Al, or a noble gase, then 0 is returned. For all other atom kinds the number of implicit hydrogens is basically the lowest typical valence that is compatible with the occupied valence, minus the occupied valence corrected by atom charge and radical state.
The lowest free valence is the number of potential additional single bonded neighbours to reach the atom's lowest valence above or equal its current occupied valence. Atom charges are considered. Implicit hydrogens are not considered. Thus, the phosphor atoms in PF2 and PF4 both have a lowest free valence of 1. The oxygen in R-O(-) has a lowest free valence of 0, the nitrogen in R3N(+) has a free valence of 1. If you need the maximum possible free valence, use getFreeValence(), which would give 6 for Cl(-) and HCl.
cMoleculeColorDefault: atom coloring depends on atomic number. Carbon and
hydrogen are drawn in neutral color
cMoleculeColorNeutral: all atoms and bonds and CIP letters are drawn in
neutral color
cMoleculeColorNeutral or cMoleculeColorDefault. In future may also return ARGB values.
This method returns the non-hydrogen neighbour count of atom. It excludes any hydrogen atoms in contrast to getConnAtoms(), which only excludes plain hydrogen (not deuterium, tritium, custom labelled hydrogen, etc.). Don't use this method's return value for loops with getConnAtom(), getConnBond(), or getConnBondOrder().
the number of non-hydrogen neighbor atoms
The sum of bond orders of explicitly connected neighbour atoms including explicit hydrogen. In case of a fragment the occupied valence does not include bonds to atoms of which the cAtomQFExcludeGroup flag is set. Atom charge and radical states are not considered.
explicitly used valence
Locates and returns the shortest path between atoms atom1 and atom2
array large enough to hold all path atoms, i.e. maxLength+1
first atom of path; ends up in pathAtom[0]
last atom of path; ends up in pathAtom[pathLength]
paths larger than maxLength won't be detected
null or bitmask of forbidden bonds
number of bonds of path; -1 if there is no path
Finds bonds of a path that is defined by an atom sequence.
pathAtom[0]...[pathLength] -> list of atoms on path
int array not smaller than pathLength
no of path bonds == no of path atoms - 1
The stereo problem flag is set by the stereo recognition (available equal/above helper level cHelperParities) if an atom has over- or under-specified stereo bonds attached, i.e. a stereo center with less or more than one up/down-bond, an non-stereo-center atom carrying (a) stereo bond(s), or a stereo center with neighbors coordinates such that the stereo configuration cannot be deduced. This flag is used by the depiction and causes affected atoms to be drawn in margenta.
Determines all atoms of the substituent attached to coreAtom and starting with firstAtom. If isMemberAtom!=null, then all substituent member atoms will have the the respective index being flagged upon return. This includes firstAtom and excludes coreAtom. If substituent!=null, then it will contain the substituent as Molecule. At the position of the coreAtom substituent will contain a wildcard atom. If substituent!=null and atomMap!=null then atomMap receives atom index mapping from this to substituent with non-member atoms being -1. Returns -1 and an empty substituent if coreAtom and firstAtom share a ring
the atom to which the substituent is connected
the substituent's atom that is connected to coreAtom
may be null, otherwise set to contain atom membership mask
may be null, otherwise set to contain the substituent
null or int[] not smaller than this.getAllAtoms()
substituent atom count not counting coreAtom; -1 if coreAtom and firstAtom share a ring
Counts the number of atoms of the substituent connected to coreAtom defined by firstAtom and not including the coreAtom.
atom count of substituent or -1 if coreAtom and firstAtom are in the same ring
This returns atom symmetry numbers from within the molecule canonicalization procedure. Atoms with same symmetry numbers can be considered topologically equivalent. Symmetry ranks are only available after calling ensureHelperArrays(cHelperSymmetry...). In mode cHelperSymmetrySimple stereoheterotopic atoms are considered equivalent. In mode cHelperSymmetryDiastereotopic only diastereotopic atoms are distinguished. In mode cHelperSymmetryEnantiotopic all stereoheterotopic atoms, i.e. enantiotopic and diastereotopic atoms, are distinguished.
Provided that the bond parity of a double bond is available, this method determines, whether connAtom has a counterpart with Z- (cis) configuration at the other end of the double bond. If there is no Z-counterpart, then -1 is returned. Requires cHelperParities.
directly connected to one of the double bond atoms
double bond with available bond parity
-1 or counterpart to connAtom in Z-configuration
Pseudo paries are parities that indicate a relative configuration. It always needs at least 2 pseudo parities (atom or bond) within a part of a molecule to be meaningful. This information is calculated by ensureHelperArrays(Molecule.cHelperCIP). Molecules extracted from IDCode don't know about pseudo parities.
whether this atom's parity is a relative configuration
Atoms with pseudo parities are not considered stereo centers. While parities are canonized and always refer to the full set of molecules (in case ESR groups are defined), this method returns true if this atom is a stereo center in any(!) of the individual molecules described by the ESR settings.
true if atom is stereo center in at least one molecule after ESR resolution
Checks whether bond is an axial chirality bond of the BINAP type. Condition: non-aromatic, non-small-ring (<= 7 members) single bond connecting two aromatic rings with 6 or more members each that together bear at least three ortho substituents. A stereo bond indicating the chirality is not(!!!) a condition.
true if axial chirality conditions are met
This hint/flag is set by CoordinateInventor for double bonds without given EZ-parity, because the new coordinates may imply a not intended EZ-parity. If parities are calculated later by the Canonizer is can correctly assign cBondParityUnknown if the bond is a stereo bond. The setBondParity() method clears this flag. This method usually should not be called for other purposes.
whether the bond parity was unknown when 2D- atom coordinates were created
A bond is considered delocalized, if it has different bond orders in different, but energetically equivalent mesomeric structures. Bonds in aromatic 6-membered rings typically are delocalized, while those in uncharged 5-membered aromatic rings are not. Indole has 6 delocalized bonds.
Checks whether this nitrogen atom is flat, because it has a double bond, is member of an aromatic ring or is part of amide, an enamine or in resonance with an aromatic ring. It is also checked that ortho substituents don't force the amine into a non-resonance torsion. State of helper arrays must be at least cHelperRings.
Molecule objects may represent complete molecules or sub-structure fragments, depending on, whether they are flagges as being a fragment or not. Both representations have much in common, but in certain aspects behave differently. Thus, complete molecules are considered to carry implicit hydrogens to fill unoccupied atom valences. Sub-structure fragments on the other hand may carry atom or bond query features. Depiction, sub-structure search, and other algorithms treat fragments and complete molecules differerently.
In a consecutive sequence of sp-hybridized atoms multiple single bonds cause redundant torsions. Only that single bond with the smallest bond index is considered really rotatable; all other single bonds are pseudo rotatable. If one/both end(s) of the sp-atom sequence doesn't carry atoms outside of the straight line then no bond is considered rotatable. A simple terminal single bond
true, if this bond is not considered rotatable because of a redundancy
Uncharged hydrogen atoms with no isotop information nor with an attached
custom label are considered simple and can usually be suppressed, effectively
converting them from an explicit to an implicit hydrogen atom.
Note: This method returns true for uncharged, natural abundance
hydrogens without custom labels even if they have a non-standard bonding
situation (everything being different from having one single bonded
non-simple-hydrogen neighbour, e.g. unbonded hydrogen, H2, a metal ligand
bond to another atom, two single bonds, etc.) If unusual bonding needs to be
considered, check for that independently from this method.
Removes all plain explicit hydrogens atoms from the molecule, converting them effectively to implicit ones. If the molecules has 2D-coordinates (is3D==false), then this method perceives stereo configurations from up/down-bonds to explicit hydrogens before deleting them and turns another bond into a stereo bond to indicate the proper configuration. If the removal of a hydrogen atom would change an atom's implicit valence, the atom's abnormal valence is set accordingly.
pass true, if atom coordinates are three dimensional
For the given ESR type (AND or OR) renumbers all group indexes starting from 0. Use this, if stereo center deletion or other operations caused an inconsisten ESR number state. Molecule and derived methods do this automatically.
cESRTypeAnd or cESRTypeOr
number of ESR groups
This is a policy setting for this StereoMolecule as molecule container. If set to true then this StereoMolecule will treat tetrahedral nitrogen atoms with three or four distinguishable substituents as stereo centers and will assign parities. deleteMolecule() does not change this behavior.
Set an atom's maximum valance to be different from the default one. If a carbon atom's valence is set to -1,0 or 4 its radical state is removed. If a carbon atom's valence is set to 2, a singulet carbene state is assumed.
0-14: new maximum valence; -1: use default
The atom Cahn-Ingold-Prelog parity is a calculated property available above/equal helper level cHelperCIP. It encodes the stereo configuration of an atom with its neighbors using up/down-bonds or 3D-atom-coordinates, whatever is available. It depends on the atom indices of the neighbor atoms and their orientation is space. This method is called by the Canonizer and usually should not be called otherwise.
one of cAtomCIPParityRorM,cAtomCIPParitySorP,cAtomCIPParityProblem
This is a user applied information, rather than a calculated value. The stereo center configuration is declared to be unknown. If the atom is recognized a stereo center, then its parity will be cAtomParityUnknown.
If a custom atom label is set, a molecule depiction displays the custom label instead of the original one. Custom labels are not interpreted otherwise. However, they may optionally be encoded into idcodes; see Canonizer.encodeAtomCustomLabels(). If a custom label start with ']' then the label without the ']' symbol is shown at the top left of the original atom label rather than replacing the original atom label. If label is null or equals the normal atom label, then the custom label is removed. This method is less efficient than the byte[] version: setAtomCustomLabel(int, byte[])
null to remove custom label
This is MDL's enhanced stereo representation (ESR). Stereo atoms and bonds with the same ESR type (AND or OR) and the same ESR group number are in the same group, i.e. within this group they have the defined (relative) stereo configuration.
one of cESRTypeAbs,cESRTypeAnd,cESRTypeOr
index starting with 0 (not considered if type is cESRTypeAbs)
The atom parity is a calculated property available above/equal helper level
cHelperParities. It describes the stereo configuration of a chiral atom and
is calculated either from 2D-atom-coordinates and up/down-bonds or from
3D-atom-coordinates, whatever is available. It depends on the atom indices of
the neighbor atoms and their orientation in space.
The parity is defined as follows: Look at the chiral atom such that its
neighbor atom with the highest atom index (or the hydrogen atom if it is
implicit) is oriented to the back. If the remaining three neighbors are in
clockwise order (considering ascending atom indexes) than the parity is 1. If
they are in anti-clockwise order, then the parity is 2.
For linear chirality (allenes): Look along the straight line of double bonds
such that the rear neighbor with the lower atom index points to the top. If
the front neighbor with the lower atom index points to the right than the
parity is 1.
This method is called by the Canonizer and usually should not be called
otherwise.
one of cAtomParity1,cAtomParity2,cAtomParityNone,cAtomParityUnknown
true if the configuration is only meaningful relative to another one
Introduce or remove an atom query feature and make sure, the molecule is
flagged to be a sub-structure fragment (see setFragment()). A query feature
is usually a flag, which if set, poses an additional atom/bond matching
constraint for the sub-structure search and, thus, reduces the number of
matching atoms and therefore also the number of molecules found. Often
multiple query feature flags are related and grouped, e.g. to define the
number of hydrogens atoms. These are the flags related to hydrogen
neighbors:
public static final int cAtomQFHydrogen = 0x00000780;
public static final int cAtomQFNot0Hydrogen = 0x00000080;
public static final int cAtomQFNot1Hydrogen = 0x00000100;
public static final int cAtomQFNot2Hydrogen = 0x00000200;
public static final int cAtomQFNot3Hydrogen = 0x00000400;
An inverse logic needs to be applied to translate a user request to the bits
needed. For example, to only accept atoms that have 1 or 2 hydrogen
neighbors, we need to filter out all others. Thus, we would call
setAtomQueryFeature(atom, cAtomQFNot0Hydrogen | cAtomQFNot3Hydrogen, true);
To match only atoms without hydrogen neighbors, call
setAtomQueryFeature(atom, cAtomQFHydrogen & ~cAtomQFNot3Hydrogen, true);
This mechanism allows a very efficient atom matching and therefore very fast
sub-structure search.
one of cAtomQF... Because of long it could be an internal object
if true, the feature is set, otherwise it is removed
The bond Cahn-Ingold-Prelog parity is a calculated property available above/equal helper level cHelperCIP. It encodes the stereo configuration of a bond with its neighbors using 2D-coordinates and up/down-bonds or 3D-atom-coordinates, whatever is available. It depends on the atom indices of the neighbor atoms and their orientation is space. This method is called by the Canonizer and usually should not be called otherwise. Considered are E/Z-double bonds and M/P-BINAP type single bonds.
one of cBondCIPParityEorP,cBondCIPParityZorM,cBondCIPParityProblem
MDL's enhanced stereo representation for BINAP type of stereo bonds. Stereo atoms and bonds with the same ESR type (AND or OR) and the same ESR group number are in the same group, i.e. within this group they have the defined (relative) stereo configuration.
one of cESRTypeAbs,cESRTypeAnd,cESRTypeOr
index starting with 0
The bond parity is a calculated property available above/equal helper level cHelperParities. It encodes the stereo configuration of a double bond or BINAP type single bond from up/down-bonds and 2D-coordinates or 3D-atom-coordinates, whatever is available. It depends on the atom indices of the neighbor atoms and their orientation is space. This method is called by the Canonizer and usually should not be called otherwise.
one of cBondParityEor1,cBondParityZor2,cBondParityNone,cBondParityUnknown
true if the configuration is only meaningful relative to another one
This hint/flag is set by CoordinateInventor for double bonds without given EZ-parity, because the new coordinates may imply a not intended EZ-parity. If parities are calculated later by the Canonizer is can correctly assign cBondParityUnknown if the bond is a stereo bond. The setBondParity() method clears this flag. This method usually should not be called for other purposes.
Sets the overall chirality of the molecule taking into account: Recognition of stereo centers and stereo bonds, defined ESR features, meso detection. The chirality combines the knowledge about how many stereo isomers are represented, whether all of these are meso, whether we have one defined stereo isomer, a mixture of racemates, epimers, or other diastereomers. The information is used during depiction. This method is called by the Canonizer and usually should not be called otherwise.
Molecule objects may represent complete molecules or sub-structure fragments, depending on, whether they are flagges as being a fragment or not. Both representations have much in common, but in certain aspects behave differently. Thus, complete molecules are considered to carry implicit hydrogens to fill unoccupied atom valences. Sub-structure fragments on the other hand may carry atom or bond query features. Depiction, sub-structure search, and other algorithms treat fragments and complete molecules differently.
if false, then all query features are removed
Use this method with extreme care. If you make a change to the molecule, the validity of the helper arrays is typically set to cHelperNone. If you make a small change to a molecule that doesn't change its topology, you may override the automatic automatically cleared helper validity with this method and avoid a new calculation of the neighbour arrays and ring detection.
cHelperNeighbours or cHelperRings
Fragment's query features are checked for consistency and normalized during helper array creation. As part of this, simple hydrogen atoms are converted into hydrogen-count query features. If hydrogen protection is enabled, explicit hydrogens are not touched.
Currently, this method only allows to switch the default atomic number dependent atom coloring off by passing cMoleculeColorNeutral. In future updates it may also accept ARGB values.
currently supported values: cMoleculeColorDefault, cMoleculeColorNeutral
Atom stereo parities and bond E/Z-parities are properties that are usually
perceived from up/down-bonds and atom coordinates, respectively. This is done
during the helper array calculation triggered by
ensureHelperArrays(cHelperParities).
This method tells the molecule that current atom/bond parities are valid,
even if the stereo perception not has been performed. In addition to the
stereo parities one may declare CIP parities and/or symmetry ranks also to be
valid (helperStereoBits != 0). setParitiesValid(0) should be called if no
coordinates are available but the parities are valid nevertheless, e.g. after
the IDCodeParser has parsed an idcode without coordinates. (Note: After
idcode parsing unknown stereo centers have parities cAtomParityNone instead
of cAtomParityUnknown. Thus, calling isStereoCenter(atom) returns false!!!)
Declaring parities valid prevents the Canonizer to run the stereo recognition
again when ensureHelperArrays(cHelperParities or higher) is called.
May also be called after filling valences with explicit hydrogen atoms, which
have no coordinates, to tell the molecule that the earlier created stereo
flags are still valid.
0 or combinations of cHelperBitCIP,cHelperBitSymmetry...,cHelperBitIncludeNitrogenParities
This converts one single bond per parity into a stereo up/down bond to correctly reflect the given parity. This works for tetrahedral and allene atom parities as well as for BINAP type of bond parities. Should only be called with valid TH and EZ parities and valid coordinates, e.g. after idcode parsing with coordinates or after coordinate generation.
This is for compatibility with old MDL stereo representation that contained a 'chiral' flag to indicate that the molecule is not a racemate. If a molecule is constructed from a source format (e.g. a molfile version 2) that contains a 'chiral' flag then setToRacemate() needs to be called if the chiral flag is not(!) set. This causes after stereo center recognition to turn all absolute stereo centers into racemic ones.
Removes all unconnected fragments except for the largest one. If small fragments were removed, then canonizeCharge() is called to neutralize charges after potential removal of counter ions. Metal ligand bonds may or may not be considered a connection.
atom mapping from old to new index; null if no fragments were removed
Removes defined and implicit stereo information from the molecule.
Whether an atom may be considered to carry implicit hydrogen atoms depends on the atomicNo of that atom. Aluminum and all non/metal atoms except the nobel gases and except hydrogen itself are considered to carry implicit hydrogens to fill up their unoccupied valences. Atoms with an assigned unusual valence always support implicit hydrogens independent of their atomicNo.
true if this atom's unoccupied valences are considered to be implicit hydrogens
Optional
options: ISmilesGeneratorOptionsReturns an SVG string representing the structure in two dimensions.
Optional
id: stringId attribute of the resulting svg element. Defaults to "id" followed by an automatically incremented number.
Optional
options: IMoleculeToSVGOptionsStatic
fromIDCodeParse the provided idcode
and return a Molecule
.
Optional
coordinates: stringParse the provided idcode
and return a Molecule
.
Optional
ensure2DCoordinates: booleanboolean indicating if the 2D coordinates should be computed. Default: true.
Static
fromStatic
fromParse the provided molfile
and return an object with Molecule
and map.
MDL Molfile string in V2000 or V3000.
Static
fromParse the provided smiles
and return a Molecule
.
By default, stereo features are parsed, which triggers itself a coordinate
computation and coordinates are computed again after parsing to guarantee that
they are always the same.
If you do not need stereo features and want the fastest parsing, use this method
with {noCoordinates: true, noStereo: true}
.
Optional
options: IMoleculeFromSmilesOptionsStatic
getStatic
getStatic
getStatic
getStatic
isStatic
isStatic
setWhen the molecule adds a new bond to a new atom or a new ring, then atoms are positioned such that the lengths of the new bonds are equal to the average length of existing bonds. If there are no existing bonds, then this default is used. If the default is not set by this function, then it is 24.
Construct a new molecule.