public class AtomSignature
extends signature.AbstractVertexSignature
The signature (Faulon, J. L., Visco, D. P., and Pophale, R. S.. Journal of Chemical Information and Computer Sciences. 2003. 43, Faulon, J. L., Collins, M. J., and Carr, R. D.. Journal of Chemical Information and Computer Sciences. 2004. 44) 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.. Journal of Chemical Information and Computer Sciences. 2004. 44).
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 fromprotected int getIntLabel(int vertexIndex)
getIntLabel
in class signature.AbstractVertexSignature
protected int[] getConnected(int vertexIndex)
getConnected
in class signature.AbstractVertexSignature
protected String getEdgeLabel(int vertexIndex, int otherVertexIndex)
getEdgeLabel
in class signature.AbstractVertexSignature
protected String getVertexSymbol(int vertexIndex)
getVertexSymbol
in class signature.AbstractVertexSignature
protected int convertEdgeLabelToColor(String edgeLabel)
convertEdgeLabelToColor
in class signature.AbstractVertexSignature
Copyright © 2021. All rights reserved.