Class StructureCheckerHelper

java.lang.Object
chemaxon.checkers.StructureCheckerHelper

@PublicAPI public class StructureCheckerHelper extends Object
This helper class contains utility functions used by StructureChecker instances providing constants and utility functions.
Since:
Marvin 5.4
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final double
    This constant represents the the upper bound of bond length for Chemaxon built-in StructureChecker implementations
    static final double
    This constant represents the minimal allowed atom distance (distance here means euclidean distance) between two atoms for Chemaxon built-in StructureChecker implementations
    static 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    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)
    This method returns a List of MolBond which contains all bonds which are in isNeighbour relation with the MolBond instance represented by parameter bond
    static double
    distance(MolAtom atom1, MolAtom atom2)
    Calculates the distance of two atoms.
    static chemaxon.util.abbrevgroup.AbbrevGroupStorage
    Imports default and user abbreviations and returns them in a AbbrevGroupStorage.
    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 not
    static boolean
    Determines if the molecule contains an atom with R or S stereo configuration.
    static boolean
    Returns true if daylight format with options supported, false otherwise
    static boolean
    This method returns true if the MolBond represented by molBond parameter is terminal in a Molecule structure, false otherwise
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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:
    • 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:
    • 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:
  • Constructor Details

    • StructureCheckerHelper

      public StructureCheckerHelper()
  • Method Details

    • distance

      public static double distance(MolAtom atom1, MolAtom atom2)
      Calculates the distance of two atoms. (Distance here is the euclidean distance)
      Parameters:
      atom1 - is a MolAtom instance
      atom2 - is a MolAtom instance
      Returns:
      the distance of the two atoms
    • createNeighbourBonds

      public static List<MolBond> createNeighbourBonds(Molecule molecule, MolBond bond, boolean ignoreRingBonds)
      This method returns a List of MolBond which contains all bonds which are in isNeighbour relation with the MolBond instance represented by parameter bond
      Parameters:
      molecule - is a Molecule instance which contains the bonds
      bond - is a MolBond 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 of MolBond which contains all bonds which are in isNeighbour relation with the MolBond instance represented by parameter bond
    • getDefaultAbbrevgroups

      public static chemaxon.util.abbrevgroup.AbbrevGroupStorage getDefaultAbbrevgroups()
      Imports default and user abbreviations and returns them in a AbbrevGroupStorage.
      Returns:
      default and user abbreviations in a AbbrevGroupStorage
    • isTerminal

      public static boolean isTerminal(MolBond molBond)
      This method returns true if the MolBond represented by molBond parameter is terminal in a Molecule structure, false otherwise
      Parameters:
      molBond - a MolBond instance
      Returns:
      true if the MolBond represented by molBond parameter is terminal in a Molecule structure, false otherwise
    • 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 returns true.
      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 the Molecule 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 molecule
      mol - a Molecule 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.
      Parameters:
      is - an index array containing the indices of the ring in the molecule
      mol - is a Molecule instance which contains the ring and the atom
      atom - is a MolAtom instance
      Returns:
      true if the atom is the only neighbour of the ring false otherwise
    • 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 bond
      bond2 - 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