Class TopologyAnalyzer

java.lang.Object
chemaxon.core.calculations.TopologyAnalyzer
All Implemented Interfaces:
Licensable

@PublicApi public class TopologyAnalyzer extends Object implements Licensable
Provides functions for analyzing the topology of a molecule.
Since:
Marvin 3.5
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Calculates the number of atoms in the molecule including implicit hydrogens.
    double
    Calculates the Balaban distance connectivity of the molecule, which is the average distance sum connectivity.
    int
    Calculates the number of bonds in the molecule including bonds of implicit hydrogens.
    int
    bondType(int b)
    Determines the type of a bond (aromatic bonds are automatically recognized)
    int
    Calculates the smallest number of graph edges which must be removed such that no circuit remains.
    int
    distanceCount(int a, int d)
    Counts the given value in a row of the distance matrix.
    int
    Calculates the distance degree of an atom, which is the sum of the corresponding row values in the distance matrix.
    int
    eccentricity(int a)
    Calculates the eccentricity of an atom, which is the greatest value in the corresponding row of the distance matrix.
    int
    Calculates the number of fragments (disconnected parts) of the molecule.
    double
    Calculates the Fsp3 value of the molecule.
    Retrieves the input molecule
    int[]
     
    double
    Calculates the Harary index which is the half-sum of the off-diagonal elements of the reciprocal molecular distance matrix of the molecule.
    int
    Calculates the hyper Wiener index of the molecule.
    boolean
    isBarredAtom(int a)
    Determines if an atom is is part of a certain functional group with high rotational barrier (amides, thioamides, sulphonamides).
    boolean
    Determines if the molecule is a connected graph or not.
    boolean
    isConnected(int atom1, int atom2)
    Determines if two atoms are members of a connected graph or not.
    boolean
    Determines if a bond bridges two aryl systems having more than two ortho substituents.
    boolean
    Checks if the required license is available for using this class or product.
    boolean
    Determines if a bond is a rotatable or not
    int
    Calculates the Platt index of the molecule which is equal to the total sum of the edge degrees of a molecular graph.
    double
    Calculates the Randic index or molecular connectivity index as the harmonic sum of the geometric means of the node degrees for each edge.
    int
    Calculates the number of rotatable bonds in the molecule.
    void
    Sets the current license environment identifier.
    void
    Specifies a molecule to calculate with.
    void
    setMolecule(MoleculeGraph mol, int aromatizationMode)
    Specifies a molecule to calculate with.
    int
    shortestPath(int atom1, int atom2)
    Calculates the shortest topological path (number of bonds) between two atoms.
    double
    Calculates topological steric effect index (TSEI) of an atom from covalent radii values and topological distances.
    int
    Calculates the Szeged index of the molecule.
    int
    Calculates the Wiener index of the molecule, which is the average topological atom distance (half of the sumof all atom distances) in the molecule.
    int
    Calculates the Wiener polarity number of the molecule, which is the number of 3 bond length distances in the molecule.

    Methods inherited from class java.lang.Object

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

    • TopologyAnalyzer

      public TopologyAnalyzer()
  • Method Details

    • getMolecule

      public MoleculeGraph getMolecule()
      Retrieves the input molecule
      Returns:
      the molecule to calculate with
    • setMolecule

      public void setMolecule(MoleculeGraph mol)
      Specifies a molecule to calculate with.
      Parameters:
      mol - the molecule to calculate with
    • setMolecule

      public void setMolecule(MoleculeGraph mol, int aromatizationMode)
      Specifies a molecule to calculate with.
      Parameters:
      mol - the molecule to calculate with
      aromatizationMode - specifies the algorithm for aromatization. Possible values:
      • AROM_BASIC - Basic aromatization
      • AROM_GENERAL - General (Daylight compatible) aromatization
      • AROM_LOOSE - Loose aromatization
    • atomCount

      public int atomCount()
      Calculates the number of atoms in the molecule including implicit hydrogens.
      Returns:
      number of atoms in the molecule
    • balabanIndex

      public double balabanIndex()
      Calculates the Balaban distance connectivity of the molecule, which is the average distance sum connectivity.
      Returns:
      the Balaban index (Integer.MAX_VALUE for disconnected graphs)
    • bondCount

      public int bondCount()
      Calculates the number of bonds in the molecule including bonds of implicit hydrogens.
      Returns:
      number of bonds in the molecule
    • bondType

      public int bondType(int b)
      Determines the type of a bond (aromatic bonds are automatically recognized)
      Parameters:
      b - index of the bond
      Returns:
      type of the bond Possible values: 1 (single), 2 (double), 3 (triple), coordinate, conjugated and query bond types.
    • cyclomaticNumber

      public int cyclomaticNumber()
      Calculates the smallest number of graph edges which must be removed such that no circuit remains. Also known as circuit rank.
      Returns:
      cyclomatic number of the molecule
    • distanceCount

      public int distanceCount(int a, int d)
      Counts the given value in a row of the distance matrix.
      Parameters:
      a - atom index
      d - the distance value to count
      Returns:
      the distance count of a value for the atom
    • distanceDegree

      public int distanceDegree(int a)
      Calculates the distance degree of an atom, which is the sum of the corresponding row values in the distance matrix.
      Parameters:
      a - atom index
      Returns:
      the distance degree of the atom (Integer.MAX_VALUE for disconnected graphs)
    • eccentricity

      public int eccentricity(int a)
      Calculates the eccentricity of an atom, which is the greatest value in the corresponding row of the distance matrix.
      Parameters:
      a - atom index
      Returns:
      the eccentricity value of the atom (Integer.MAX_VALUE for disconnected graphs)
    • fragmentCount

      public int fragmentCount()
      Calculates the number of fragments (disconnected parts) of the molecule.
      Returns:
      number of fragments in the molecule
    • getFsp3

      public double getFsp3()
      Calculates the Fsp3 value of the molecule. Fsp3 = (number of sp3 carbons) / (number of carbons).
      Returns:
      the fsp3 value of the molecule or NaN if there is no carbon in the structure.
    • graphInvariant

      public int[] graphInvariant()
    • hararyIndex

      public double hararyIndex()
      Calculates the Harary index which is the half-sum of the off-diagonal elements of the reciprocal molecular distance matrix of the molecule.
      Returns:
      the Harary index (Integer.MAX_VALUE for disconnected graphs)
    • hyperWienerIndex

      public int hyperWienerIndex()
      Calculates the hyper Wiener index of the molecule.
      Returns:
      the hyper Wiener index (Integer.MAX_VALUE for disconnected graphs)
    • isBarredAtom

      public boolean isBarredAtom(int a)
      Determines if an atom is is part of a certain functional group with high rotational barrier (amides, thioamides, sulphonamides).
      Parameters:
      a - index of the atom
      Returns:
      true if the atom is a barred atom.
    • isConnected

      public boolean isConnected()
      Determines if the molecule is a connected graph or not. There is a path from any node to any other node in the graph.
      Returns:
      true if the graph is connected, false if the graph is disconnected.
    • isConnected

      public boolean isConnected(int atom1, int atom2)
      Determines if two atoms are members of a connected graph or not.
      Parameters:
      atom1 - index of the first atom
      atom2 - index of the second atom
      Returns:
      True if the two atoms are located on a connected graphs, false if the atoms are disconnected.
    • isHinderedBiarylBridgeBond

      public boolean isHinderedBiarylBridgeBond(int b)
      Determines if a bond bridges two aryl systems having more than two ortho substituents.
      Parameters:
      b - index of the bond
      Returns:
      true if the bond is a hindered biaryl bridge bond, false if not
    • isRotatableBond

      public boolean isRotatableBond(int b)
      Determines if a bond is a rotatable or not
      Parameters:
      b - index of the bond
      Returns:
      true if the bond is a rotatable bond, false otherwise
    • plattIndex

      public int plattIndex()
      Calculates the Platt index of the molecule which is equal to the total sum of the edge degrees of a molecular graph.
      Returns:
      the Platt index
    • randicIndex

      public double randicIndex()
      Calculates the Randic index or molecular connectivity index as the harmonic sum of the geometric means of the node degrees for each edge.
      Returns:
      the Randic index
    • rotatableBondCount

      public int rotatableBondCount()
      Calculates the number of rotatable bonds in the molecule.
      Returns:
      number of rotatable bonds in the molecule
    • shortestPath

      public int shortestPath(int atom1, int atom2)
      Calculates the shortest topological path (number of bonds) between two atoms. It returns Integer.MAX_VALUE for atoms of disconnected structures.
      Parameters:
      atom1 - Index of the first atom.
      atom2 - Index of the second atom.
      Returns:
      The shortest path between two atoms.
    • stericEffectIndex

      public double stericEffectIndex(int a)
      Calculates topological steric effect index (TSEI) of an atom from covalent radii values and topological distances. The stericEffectIndex is related to the steric hindrance of the given atom.
      Parameters:
      a - index of the atom
      Returns:
      the topological steric effect index of the atom
    • szegedIndex

      public int szegedIndex()
      Calculates the Szeged index of the molecule. The Szeged index is based on the Wiener number, which is calculated by simply counting the number of nodes on both sides of each edge (and sum these counts). The Szeged index extends the Wiener number for cyclic graphs by counting those nodes only which are nearer to the given side of the edge than to the other. Unreachable nodes (disconnected graphs) or those at equidistance position to both sides of the given edge are not taken into account.
      Returns:
      the Szeged index
    • setLicenseEnvironment

      public void setLicenseEnvironment(String env)
      Description copied from interface: Licensable
      Sets the current license environment identifier. For internal use only!
      Specified by:
      setLicenseEnvironment in interface Licensable
      Parameters:
      env - license environment. It is string identifier of a certain integration environment.
    • isLicensed

      public boolean isLicensed()
      Description copied from interface: Licensable
      Checks if the required license is available for using this class or product.
      Specified by:
      isLicensed in interface Licensable
      Returns:
      true if this software component is correctly licensed
    • wienerIndex

      public int wienerIndex()
      Calculates the Wiener index of the molecule, which is the average topological atom distance (half of the sumof all atom distances) in the molecule.
      Returns:
      the Wiener index (Integer.MAX_VALUE for disconnected graphs)
    • wienerPolarity

      public int wienerPolarity()
      Calculates the Wiener polarity number of the molecule, which is the number of 3 bond length distances in the molecule.
      Returns:
      the Wiener polarity number