Package chemaxon.checkers
Class StructureCheckerHelper
java.lang.Object
chemaxon.checkers.StructureCheckerHelper
This helper class contains utility functions used by
StructureChecker
instances providing constants and utility functions.- Since:
- Marvin 5.4
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
This constant represents the the upper bound of bond length for Chemaxon built-in StructureChecker implementationsstatic final double
This constant represents the minimal allowed atom distance (distance here means euclidean distance) between two atoms for Chemaxon built-in StructureChecker implementationsstatic final double
This constant represents the minimal allowed bond distance (distance here means euclidean distance) between two bonds and the lower bound of bond length for Chemaxon built-in StructureChecker implementations -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic double
calculateCosAFromScalarMul
(MolBond bond1, MolBond bond2) Calculate the cosines value of the angle between the bonds from the scalar multiplication of the bonds.createNeighbourBonds
(Molecule molecule, MolBond bond, boolean ignoreRingBonds) static double
Calculates the distance of two atoms.static chemaxon.util.abbrevgroup.AbbrevGroupStorage
Imports default and user abbreviations and returns them in aAbbrevGroupStorage
.static boolean
Determines if molecule contains a stereo center with no enhanced stereo property.static boolean
isAromatic
(int[] is, Molecule mol) Determines if a ring in the molecule is aromatic or notstatic boolean
Determines if the molecule contains an atom with R or S stereo configuration.static boolean
isDaylightFormatWithoutOptions
(String format) Returns true if daylight format with options supported, false otherwisestatic boolean
isTerminal
(MolBond molBond) static boolean
ringHasOnlyOneNeighbour
(int[] is, Molecule mol, MolAtom atom) This function determines if the ring (indexed with idx parameter) has only one neighbour (and this neighbour is the the atom parameter) or not.
-
Field Details
-
MINIMAL_ATOM_DISTANCE_LIMIT
public static final double MINIMAL_ATOM_DISTANCE_LIMITThis constant represents the minimal allowed atom distance (distance here means euclidean distance) between two atoms for Chemaxon built-in StructureChecker implementations- See Also:
-
MINIMAL_DISTANCE_LIMIT
public static final double MINIMAL_DISTANCE_LIMITThis constant represents the minimal allowed bond distance (distance here means euclidean distance) between two bonds and the lower bound of bond length for Chemaxon built-in StructureChecker implementations- See Also:
-
MAXIMAL_DISTANCE_LIMIT
public static final double MAXIMAL_DISTANCE_LIMITThis constant represents the the upper bound of bond length for Chemaxon built-in StructureChecker implementations- See Also:
-
-
Constructor Details
-
StructureCheckerHelper
public StructureCheckerHelper()
-
-
Method Details
-
distance
Calculates the distance of two atoms. (Distance here is the euclidean distance) -
createNeighbourBonds
public static List<MolBond> createNeighbourBonds(Molecule molecule, MolBond bond, boolean ignoreRingBonds) This method returns aList
ofMolBond
which contains all bonds which are in isNeighbour relation with theMolBond
instance represented by parameter bond- Parameters:
molecule
- is aMolecule
instance which contains the bondsbond
- is aMolBond
instance. The method will return the neighbors of this bond.ignoreRingBonds
- is a boolean parameter. If this parameter is true no ring bonds will treated as neighbor- Returns:
- a
List
ofMolBond
which contains all bonds which are in isNeighbour relation with theMolBond
instance represented by parameter bond
-
getDefaultAbbrevgroups
public static chemaxon.util.abbrevgroup.AbbrevGroupStorage getDefaultAbbrevgroups()Imports default and user abbreviations and returns them in aAbbrevGroupStorage
.- Returns:
- default and user abbreviations in a
AbbrevGroupStorage
-
isTerminal
-
isAbsoluteStereoRelevant
Determines if molecule contains a stereo center with no enhanced stereo property. Absolute stereo makes sense only if this method returnstrue
.- Parameters:
mol
- is the molecule- Returns:
true
if molecule contains a stereo center with no enhanced stereo property
-
isChiral
Determines if the molecule contains an atom with R or S stereo configuration.- Parameters:
mol
- is theMolecule
instance- Returns:
- true if the molecule is chiral.
-
isAromatic
Determines if a ring in the molecule is aromatic or not- Parameters:
is
- an index array containing the indices of the ring in the moleculemol
- aMolecule
instance which contains the ring- Returns:
- true if the ring is aromatic false otherwise
-
ringHasOnlyOneNeighbour
This function determines if the ring (indexed with idx parameter) has only one neighbour (and this neighbour is the the atom parameter) or not. -
calculateCosAFromScalarMul
Calculate the cosines value of the angle between the bonds from the scalar multiplication of the bonds.- Parameters:
bond1
- the first bondbond2
- the second bond- Returns:
- the cosines value of the angle between the bonds
-
isDaylightFormatWithoutOptions
Returns true if daylight format with options supported, false otherwise- Parameters:
format
- the molecule format represented as a String object- Returns:
- true if daylight format with options supported, false otherwise
-