@TestClass(value="org.openscience.cdk.signature.AtomSignatureTest") public class AtomSignature extends signature.AbstractVertexSignature
The signature [Faulon, J. L., Visco, D. P., and Pophale, R. S., The signature molecular descriptor. 1. Using extended valence sequences in QSAR and QSPR studies., Journal of Chemical Information and Computer Sciences, 2003, 43:707-720, Faulon, J. L., Collins, M. J., and Carr, R. D., The Signature Molecular Descriptor. 4. Canonizing Molecules Using Extended Valence Sequences, Journal of Chemical Information and Computer Sciences, 2004, 44:427-436] for a molecule rooted at a particular atom.
A signature is a description of the connectivity of a molecule, in the form of a tree-like structure called a directed acyclic graph (DAG). This DAG can be written out as a string, for example ethane:
[C]([C]([H][H][H])[H][H][H])
where each atom is represented by an atom symbol in square brackets. The branching of the tree is indicated by round brackets. When the molecule has a cycle, the signature string will have numbers after the atom symbol, like:
[C]([C]([C,0])[C]([C,0]))
these are known as 'colors' and indicate ring closures, in a roughly similar way to SMILES notation. Note that the colors start from 0 in this implementation, in contrast to the examples in [Faulon, J. L., Collins, M. J., and Carr, R. D., The Signature Molecular Descriptor. 4. Canonizing Molecules Using Extended Valence Sequences, Journal of Chemical Information and Computer Sciences, 2004, 44:427-436].
Multiple bonds are represented by symbols in front of the opening square bracket of an atom. Double bonds are '=', triple are '#'. Since there is a defined direction for the signature tree, only the child node will have the bond symbol, and the relevant bond is to the parent.
Constructor and Description |
---|
AtomSignature(IAtom atom,
IAtomContainer molecule)
Create an atom signature for the atom
atom . |
AtomSignature(IAtom atom,
int height,
signature.AbstractVertexSignature.InvariantType invariantType,
IAtomContainer molecule)
Create an atom signature for the atom
atom , with maximum
height of height , and using a particular invariant type. |
AtomSignature(IAtom atom,
int height,
IAtomContainer molecule)
Create an atom signature for the atom
atom and with a
maximum height of height . |
AtomSignature(int atomIndex,
IAtomContainer molecule)
Create an atom signature starting at
atomIndex . |
AtomSignature(int atomIndex,
int height,
signature.AbstractVertexSignature.InvariantType invariantType,
IAtomContainer molecule)
Create an atom signature starting at
atomIndex , with maximum
height of height , and using a particular invariant type. |
AtomSignature(int atomIndex,
int height,
IAtomContainer molecule)
Create an atom signature starting at
atomIndex and with a
maximum height of height . |
Modifier and Type | Method and Description |
---|---|
protected int |
convertEdgeLabelToColor(String edgeLabel) |
protected int[] |
getConnected(int vertexIndex) |
protected String |
getEdgeLabel(int vertexIndex,
int otherVertexIndex) |
protected int |
getIntLabel(int vertexIndex) |
protected String |
getVertexSymbol(int vertexIndex) |
public AtomSignature(int atomIndex, IAtomContainer molecule)
atomIndex
.atomIndex
- the index of the atom that roots this signaturemolecule
- the molecule to create the signature frompublic AtomSignature(IAtom atom, IAtomContainer molecule)
atom
.atom
- the atom to make the signature formolecule
- the molecule to create the signature frompublic AtomSignature(int atomIndex, int height, IAtomContainer molecule)
atomIndex
and with a
maximum height of height
.atomIndex
- the index of the atom that roots this signatureheight
- the maximum height of the signaturemolecule
- the molecule to create the signature frompublic AtomSignature(IAtom atom, int height, IAtomContainer molecule)
atom
and with a
maximum height of height
.atom
- the index of the atom that roots this signatureheight
- the maximum height of the signaturemolecule
- the molecule to create the signature frompublic AtomSignature(int atomIndex, int height, signature.AbstractVertexSignature.InvariantType invariantType, IAtomContainer molecule)
atomIndex
, with maximum
height of height
, and using a particular invariant type.atomIndex
- the index of the atom that roots this signatureheight
- the maximum height of the signatureinvariantType
- the type of invariant (int, string, ...)molecule
- the molecule to create the signature frompublic AtomSignature(IAtom atom, int height, signature.AbstractVertexSignature.InvariantType invariantType, IAtomContainer molecule)
atom
, with maximum
height of height
, and using a particular invariant type.atom
- the index of the atom that roots this signatureheight
- the maximum height of the signatureinvariantType
- the type of invariant (int, string, ...)molecule
- the molecule to create the signature from@TestMethod(value="getIntLabelTest") protected int getIntLabel(int vertexIndex)
getIntLabel
in class signature.AbstractVertexSignature
@TestMethod(value="getConnectedTest") protected int[] getConnected(int vertexIndex)
getConnected
in class signature.AbstractVertexSignature
@TestMethod(value="getEdgeLabelTest,getAromaticEdgeLabelTest") protected String getEdgeLabel(int vertexIndex, int otherVertexIndex)
getEdgeLabel
in class signature.AbstractVertexSignature
@TestMethod(value="getVertexSymbolTest") protected String getVertexSymbol(int vertexIndex)
getVertexSymbol
in class signature.AbstractVertexSignature
@TestMethod(value="convertEdgeLabelToColorTest") protected int convertEdgeLabelToColor(String edgeLabel)
convertEdgeLabelToColor
in class signature.AbstractVertexSignature
Copyright © 2014. All Rights Reserved.