Class EquivalentClassPartitioner
- java.lang.Object
-
- org.openscience.cdk.graph.invariant.EquivalentClassPartitioner
-
public class EquivalentClassPartitioner extends Object
An algorithm for topological symmetry. This algorithm derived from the algorithm [Hu, C.Y. and Xu, L.. Analytical Chimica Acta. 1994. 295].- Author:
- Junfeng Hao, Luis F. de Figueiredo
- Dictionary pointer(s):
- perceiveGraphSymmetry in the Blue Obelisk Chemoinformatics Dictionary [blue-obelisk:perceiveGraphSymmetry]
- Source code:
- main
- Belongs to CDK module:
- extra
- Created on:
- 2003-09-24
-
-
Constructor Summary
Constructors Constructor Description EquivalentClassPartitioner()
Constructor for the TopologicalEquivalentClass object.EquivalentClassPartitioner(IAtomContainer atomContainer)
Constructor for the TopologicalEquivalentClass object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[][]
buildBondMatrix()
Build bond matrix.double[][]
buildNodeMatrix(double[] nodeSequence)
Build node Matrix.double[][]
buildTrialNodeMatrix(double[] weight)
Build trial node Matrix.double[]
buildWeightMatrix(double[][] nodeMatrix, double[][] bondMatrix)
Build weight array for the given node matrix and bond matrix.int
checkDiffNumber(double[] weight)
Get different number of the given number.int[]
findTopoEquivClass(double[] weight)
Find the topological equivalent class for the given weight.int[]
getEquivalentClass(double[] weight)
Get the final equivalent class.int[]
getTopoEquivClassbyHuXu(IAtomContainer atomContainer)
Get the topological equivalent class of the molecule.double[]
prepareNode(IAtomContainer atomContainer)
Prepare the node identifier.
-
-
-
Constructor Detail
-
EquivalentClassPartitioner
public EquivalentClassPartitioner()
Constructor for the TopologicalEquivalentClass object.
-
EquivalentClassPartitioner
public EquivalentClassPartitioner(IAtomContainer atomContainer)
Constructor for the TopologicalEquivalentClass object.
-
-
Method Detail
-
getTopoEquivClassbyHuXu
public int[] getTopoEquivClassbyHuXu(IAtomContainer atomContainer) throws NoSuchAtomException
Get the topological equivalent class of the molecule.- Parameters:
atomContainer
- atoms and bonds of the molecule- Returns:
- an array contains the automorphism partition of the molecule
- Throws:
NoSuchAtomException
-
prepareNode
public double[] prepareNode(IAtomContainer atomContainer)
Prepare the node identifier. The purpose of this is to increase the differentiation of the nodes. Detailed information please see the corresponding literature.- Parameters:
atomContainer
- atoms and bonds of the molecule- Returns:
- an array of node identifier
-
buildNodeMatrix
public double[][] buildNodeMatrix(double[] nodeSequence)
Build node Matrix.- Parameters:
nodeSequence
- an array contains node number for each atom- Returns:
- node Matrix
-
buildTrialNodeMatrix
public double[][] buildTrialNodeMatrix(double[] weight)
Build trial node Matrix.- Parameters:
weight
- an array contains the weight of atom- Returns:
- trial node matrix.
-
buildBondMatrix
public double[][] buildBondMatrix()
Build bond matrix.- Returns:
- bond matrix.
-
buildWeightMatrix
public double[] buildWeightMatrix(double[][] nodeMatrix, double[][] bondMatrix)
Build weight array for the given node matrix and bond matrix.- Parameters:
nodeMatrix
- array contains node informationbondMatrix
- array contains bond information- Returns:
- weight array for the node
-
checkDiffNumber
public int checkDiffNumber(double[] weight)
Get different number of the given number.- Parameters:
weight
- array contains weight of the nodes- Returns:
- number of different weight
-
getEquivalentClass
public int[] getEquivalentClass(double[] weight)
Get the final equivalent class.- Parameters:
weight
- array contains weight of the nodes- Returns:
- an array contains the automorphism partition
-
findTopoEquivClass
public int[] findTopoEquivClass(double[] weight)
Find the topological equivalent class for the given weight.- Parameters:
weight
- array contains weight of the nodes- Returns:
- an array contains the automorphism partition
-
-