Package chemaxon.core.calculations
Class TopologyAnalyzer
java.lang.Object
chemaxon.core.calculations.TopologyAnalyzer
- All Implemented Interfaces:
Licensable
Provides functions for analyzing the topology of a molecule.
- Since:
- Marvin 3.5
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCalculates the number of atoms in the molecule including implicit hydrogens.doubleCalculates the Balaban distance connectivity of the molecule, which is the average distance sum connectivity.intCalculates the number of bonds in the molecule including bonds of implicit hydrogens.intbondType(int b) Determines the type of a bond (aromatic bonds are automatically recognized)intCalculates the smallest number of graph edges which must be removed such that no circuit remains.intdistanceCount(int a, int d) Counts the given value in a row of the distance matrix.intdistanceDegree(int a) Calculates the distance degree of an atom, which is the sum of the corresponding row values in the distance matrix.inteccentricity(int a) Calculates the eccentricity of an atom, which is the greatest value in the corresponding row of the distance matrix.intCalculates the number of fragments (disconnected parts) of the molecule.doublegetFsp3()Calculates the Fsp3 value of the molecule.Retrieves the input moleculeint[]doubleCalculates the Harary index which is the half-sum of the off-diagonal elements of the reciprocal molecular distance matrix of the molecule.intCalculates the hyper Wiener index of the molecule.booleanisBarredAtom(int a) Determines if an atom is is part of a certain functional group with high rotational barrier (amides, thioamides, sulphonamides).booleanDetermines if the molecule is a connected graph or not.booleanisConnected(int atom1, int atom2) Determines if two atoms are members of a connected graph or not.booleanisHinderedBiarylBridgeBond(int b) Determines if a bond bridges two aryl systems having more than two ortho substituents.booleanChecks if the required license is available for using this class or product.booleanisRotatableBond(int b) Determines if a bond is a rotatable or notintCalculates the Platt index of the molecule which is equal to the total sum of the edge degrees of a molecular graph.doubleCalculates the Randic index or molecular connectivity index as the harmonic sum of the geometric means of the node degrees for each edge.intCalculates the number of rotatable bonds in the molecule.voidSets the current license environment identifier.voidsetMolecule(MoleculeGraph mol) Specifies a molecule to calculate with.voidsetMolecule(MoleculeGraph mol, int aromatizationMode) Specifies a molecule to calculate with.intshortestPath(int atom1, int atom2) Calculates the shortest topological path (number of bonds) between two atoms.doublestericEffectIndex(int a) Calculates topological steric effect index (TSEI) of an atom from covalent radii values and topological distances.intCalculates the Szeged index of the molecule.intCalculates the Wiener index of the molecule, which is the average topological atom distance (half of the sumof all atom distances) in the molecule.intCalculates the Wiener polarity number of the molecule, which is the number of 3 bond length distances in the molecule.
-
Constructor Details
-
TopologyAnalyzer
public TopologyAnalyzer()
-
-
Method Details
-
getMolecule
Retrieves the input molecule- Returns:
- the molecule to calculate with
-
setMolecule
Specifies a molecule to calculate with.- Parameters:
mol- the molecule to calculate with
-
setMolecule
Specifies a molecule to calculate with.- Parameters:
mol- the molecule to calculate witharomatizationMode- 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 indexd- 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
NaNif 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 atomatom2- 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
Description copied from interface:LicensableSets the current license environment identifier. For internal use only!- Specified by:
setLicenseEnvironmentin interfaceLicensable- Parameters:
env- license environment. It is string identifier of a certain integration environment.
-
isLicensed
public boolean isLicensed()Description copied from interface:LicensableChecks if the required license is available for using this class or product.- Specified by:
isLicensedin interfaceLicensable- 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
-