public class MoleculeSignature
extends signature.AbstractGraphSignature
A molecule signature is a way to produce AtomSignature
s 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.
Constructor and Description |
---|
MoleculeSignature(IAtomContainer molecule)
Creates a signature that represents this molecule.
|
MoleculeSignature(IAtomContainer molecule,
int height)
Creates a signature with a maximum height of
height
for molecule molecule . |
Modifier and Type | Method and Description |
---|---|
List<Orbit> |
calculateOrbits()
Calculates the orbits of the atoms of the molecule.
|
static IAtomContainer |
fromSignatureString(String signatureString,
IChemObjectBuilder coBuilder)
Builder for molecules (rather, for atom containers) from signature
strings.
|
protected int |
getVertexCount() |
signature.AbstractVertexSignature |
signatureForVertex(int vertexIndex) |
String |
signatureStringForVertex(int vertexIndex) |
String |
signatureStringForVertex(int vertexIndex,
int height) |
String |
toCanonicalSignatureString(int height)
Make a canonical signature string of a given height.
|
getCanonicalLabels, getGraphSignature, getHeight, getMaximalSignature, getMinimalSignature, getSortedSignatures, getSymmetryClasses, getSymmetryClasses, getVertexSignatures, getVertexSignatureStrings, isCanonicallyLabelled, reconstructCanonicalEdgeString, reconstructCanonicalGraph, toCanonicalString, toFullString
public MoleculeSignature(IAtomContainer molecule)
molecule
- the molecule to convert to a signaturepublic MoleculeSignature(IAtomContainer molecule, int height)
height
for molecule molecule
.molecule
- the molecule to convert to a signatureheight
- the maximum height of the signatureprotected int getVertexCount()
getVertexCount
in class signature.AbstractGraphSignature
public String signatureStringForVertex(int vertexIndex)
signatureStringForVertex
in class signature.AbstractGraphSignature
public String signatureStringForVertex(int vertexIndex, int height)
signatureStringForVertex
in class signature.AbstractGraphSignature
public signature.AbstractVertexSignature signatureForVertex(int vertexIndex)
signatureForVertex
in class signature.AbstractGraphSignature
public List<Orbit> calculateOrbits()
public static IAtomContainer fromSignatureString(String signatureString, IChemObjectBuilder coBuilder)
signatureString
- the signature string to usecoBuilder
- IChemObjectBuilder
to build the returned atom container frompublic String toCanonicalSignatureString(int height)
height
- the maximum height to make signaturesCopyright © 2021. All rights reserved.