Package chemaxon.checkers
Class StructureCheckerHelper
- java.lang.Object
-
- chemaxon.checkers.StructureCheckerHelper
-
@PublicAPI public class StructureCheckerHelper extends Object
This helper class contains utility functions used byStructureChecker
instances providing constants and utility functions.- Since:
- Marvin 5.4
-
-
Field Summary
Fields Modifier and Type Field Description static double
MAXIMAL_DISTANCE_LIMIT
This constant represents the the upper bound of bond length for Chemaxon built-in StructureChecker implementationsstatic double
MINIMAL_ATOM_DISTANCE_LIMIT
This constant represents the minimal allowed atom distance (distance here means euclidean distance) between two atoms for Chemaxon built-in StructureChecker implementationsstatic double
MINIMAL_DISTANCE_LIMIT
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 Constructor Description StructureCheckerHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
calculateCosAFromScalarMul(MolBond bond1, MolBond bond2)
Calculate the cosines value of the angle between the bonds from the scalar multiplication of the bonds.static List<MolBond>
createNeighbourBonds(Molecule molecule, MolBond bond, boolean ignoreRingBonds)
static double
distance(MolAtom atom1, MolAtom atom2)
Calculates the distance of two atoms.static chemaxon.util.abbrevgroup.AbbrevGroupStorage
getDefaultAbbrevgroups()
Imports default and user abbreviations and returns them in aAbbrevGroupStorage
.static boolean
isAbsoluteStereoRelevant(Molecule mol)
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
isChiral(Molecule mol)
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 Detail
-
MINIMAL_ATOM_DISTANCE_LIMIT
public static final double MINIMAL_ATOM_DISTANCE_LIMIT
This constant represents the minimal allowed atom distance (distance here means euclidean distance) between two atoms for Chemaxon built-in StructureChecker implementations- See Also:
- Constant Field Values
-
MINIMAL_DISTANCE_LIMIT
public static final double MINIMAL_DISTANCE_LIMIT
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- See Also:
- Constant Field Values
-
MAXIMAL_DISTANCE_LIMIT
public static final double MAXIMAL_DISTANCE_LIMIT
This constant represents the the upper bound of bond length for Chemaxon built-in StructureChecker implementations- See Also:
- Constant Field Values
-
-
Method Detail
-
distance
public static double distance(MolAtom atom1, MolAtom atom2)
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
public static boolean isTerminal(MolBond molBond)
-
isAbsoluteStereoRelevant
public static boolean isAbsoluteStereoRelevant(Molecule mol)
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
public static boolean isChiral(Molecule mol)
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
public static boolean isAromatic(int[] is, Molecule mol)
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
public 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.
-
calculateCosAFromScalarMul
public static double calculateCosAFromScalarMul(MolBond bond1, MolBond bond2)
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
public static boolean isDaylightFormatWithoutOptions(String format)
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
-
-