Class MoleculeSignature
A molecule signature is a way to produce AtomSignatures and to get
the canonical [Faulon, J. L., Collins, M. J., and Carr, R. D.. Journal of Chemical Information and Computer
Sciences. 2004. 44] signature string for a molecule. There are
several possible uses for a molecule signature.
Firstly, a signature with a height greater than the diameter of a molecule can be used to reconstruct the molecule. In this sense, the signature string is like a SMILES [Weininger, David. Journal of Chemical Information and Computer Sciences. 1988. 28, Weininger, David et. al.. Journal of Chemical Information and Computer Sciences. 1989. 29] string. It is more verbose, but it will work for all molecules.
Secondly, the set of signatures for a molecule partition the atoms into
equivalence classes (or 'orbits' - see the Orbit class). This is
similar to partitioning atoms by Morgan number [Morgan, H.L.. J.Chem.Doc.. 1965. 5] except that
it works for 3-regular graphs like fullerenes.
Thirdly, signatures can be calculated at different heights to give descriptions of the connectivity around atoms. 'Height' is the same as the idea of a 'sphere' in HOSE codes, and signatures are also path descriptors in this sense.
So, for example, to get the canonical signature for a molecule:IAtomContainer diamantane = MoleculeFactory.makeBenzene(); MoleculeSignature moleculeSignature = new MoleculeSignature(diamantane); String canonicalSignature = moleculeSignature.toCanonicalString();to get the orbits of this molecule:
List<Orbit> orbits = moleculeSignature.calculateOrbits();and to get the height-2 signature string of just atom 5:
String hSignatureForAtom5 = moleculeSignature.signatureStringForVertex(5, 2);it is also possible to get AtomSignatures using the signatureForVertex method - which is just a convenience method equivalent to calling the constructor of an AtomSignature class.
- Author:
- maclean
-
Constructor Summary
ConstructorsConstructorDescriptionMoleculeSignature(IAtomContainer molecule) Creates a signature that represents this molecule.MoleculeSignature(IAtomContainer molecule, int height) Creates a signature with a maximum height ofheightfor moleculemolecule. -
Method Summary
Modifier and TypeMethodDescriptionCalculates the orbits of the atoms of the molecule.static IAtomContainerfromSignatureString(String signatureString, IChemObjectBuilder coBuilder) Builder for molecules (rather, for atom containers) from signature strings.protected intsignature.AbstractVertexSignaturesignatureForVertex(int vertexIndex) signatureStringForVertex(int vertexIndex) signatureStringForVertex(int vertexIndex, int height) toCanonicalSignatureString(int height) Make a canonical signature string of a given height.Methods inherited from class signature.AbstractGraphSignature
getCanonicalLabels, getGraphSignature, getHeight, getMaximalSignature, getMinimalSignature, getSortedSignatures, getSymmetryClasses, getSymmetryClasses, getVertexSignatures, getVertexSignatureStrings, isCanonicallyLabelled, reconstructCanonicalEdgeString, reconstructCanonicalGraph, toCanonicalString, toFullString
-
Constructor Details
-
MoleculeSignature
Creates a signature that represents this molecule.- Parameters:
molecule- the molecule to convert to a signature
-
MoleculeSignature
Creates a signature with a maximum height ofheightfor moleculemolecule.- Parameters:
molecule- the molecule to convert to a signatureheight- the maximum height of the signature
-
-
Method Details
-
getVertexCount
protected int getVertexCount()- Specified by:
getVertexCountin classsignature.AbstractGraphSignature
-
signatureStringForVertex
- Specified by:
signatureStringForVertexin classsignature.AbstractGraphSignature
-
signatureStringForVertex
- Specified by:
signatureStringForVertexin classsignature.AbstractGraphSignature
-
signatureForVertex
public signature.AbstractVertexSignature signatureForVertex(int vertexIndex) - Specified by:
signatureForVertexin classsignature.AbstractGraphSignature
-
calculateOrbits
Calculates the orbits of the atoms of the molecule.- Returns:
- a list of orbits
-
fromSignatureString
public static IAtomContainer fromSignatureString(String signatureString, IChemObjectBuilder coBuilder) Builder for molecules (rather, for atom containers) from signature strings.- Parameters:
signatureString- the signature string to usecoBuilder-IChemObjectBuilderto build the returned atom container from- Returns:
- an atom container
-
toCanonicalSignatureString
Make a canonical signature string of a given height.- Parameters:
height- the maximum height to make signatures- Returns:
- the canonical signature string
-