@TestClass(value="org.openscience.cdk.signature.AtomSignatureTest") public class AtomSignature extends signature.AbstractVertexSignature
The signature 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 .
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 . |
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