java.lang.Object
PMRDocumentImpl
org.xmlcml.cmlimpl.subset.SpanningTreeImpl
org.xmlcml.cmlimpl.topology.TopologyImpl
- All Implemented Interfaces:
- org.w3c.dom.Document, org.w3c.dom.Node, org.xmlcml.cml.subset.SpanningTree, org.xmlcml.cml.topology.Topology
- public class TopologyImpl
- extends org.xmlcml.cmlimpl.subset.SpanningTreeImpl
- implements org.xmlcml.cml.topology.Topology
Topology adapts a SpanningTree to have increased
function for connection table analysis
| Fields inherited from class org.xmlcml.cmlimpl.subset.SpanningTreeImpl |
acyclicBondSet, atomElementTable, bondSet, cyclicBondSet, cyclicBondVector, linkTable, linkVector, molecule, startingAtomSet, stElementVector, usedBondSet |
| Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
| Methods inherited from class org.xmlcml.cmlimpl.subset.SpanningTreeImpl |
addAtom, addLink, createSpanningTreeVector, getAcyclicAtomSet, getAcyclicBondSet, getAtomAncestorVector, getAtomElementTable, getAtomSet, getBondSet, getCyclicAtomSet, getCyclicBondSet, getLinkVector, getMolecule, getNonRingAtomSet, getSTElement, getSTElementVector, makeRootElement, processSpTreeVector, toSMILES |
| Methods inherited from interface org.xmlcml.cml.subset.SpanningTree |
addAtom, addLink, getAcyclicAtomSet, getAcyclicBondSet, getAtomAncestorVector, getAtomElementTable, getAtomSet, getBondSet, getCyclicAtomSet, getCyclicBondSet, getLinkVector, getMolecule, getNonRingAtomSet, getSTElementVector, toSMILES |
| Methods inherited from interface org.w3c.dom.Document |
adoptNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, getInputEncoding, getStrictErrorChecking, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, normalizeDocument, renameNode, setDocumentURI, setStrictErrorChecking, setXmlStandalone, setXmlVersion |
| Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
ringCount
protected int ringCount
ringNucleusVector
protected java.util.Vector ringNucleusVector
chainCount
protected int chainCount
chainVector
protected java.util.Vector chainVector
ringVector
protected java.util.Vector ringVector
rnMax
protected RingNucleusImpl rnMax
chMax
protected ChainSetImpl chMax
bondSetSet
protected java.util.HashSet bondSetSet
TopologyImpl
public TopologyImpl()
TopologyImpl
public TopologyImpl(org.xmlcml.cml.CMLMolecule molecule)
throws org.xmlcml.cml.CMLException
- adapter promotes SpanningTree to Toplogy; do not reuse sTree
TopologyImpl
public TopologyImpl(org.xmlcml.cml.CMLMolecule molecule,
org.xmlcml.cml.CMLAtom atom)
throws org.xmlcml.cml.CMLException
TopologyImpl
public TopologyImpl(org.xmlcml.cml.CMLMolecule molecule,
org.xmlcml.cml.subset.AtomSet atomSet)
throws org.xmlcml.cml.CMLException
TopologyImpl
public TopologyImpl(org.xmlcml.cml.subset.BondSet bondSet,
org.xmlcml.cml.CMLAtom rootAtom,
org.xmlcml.cml.CMLAtom parentAtom)
throws org.xmlcml.cml.CMLException
findRings
public void findRings()
throws org.xmlcml.cml.CMLException
storeBonds
private void storeBonds(java.util.Vector atomVector,
int count,
org.xmlcml.cml.topology.Ring ring)
throws org.xmlcml.cml.CMLException
calculateTopology
public void calculateTopology(boolean update)
throws org.xmlcml.cml.CMLException
- get all cyclic bonds after spanning tree is created.
- Specified by:
calculateTopology in interface org.xmlcml.cml.topology.Topology
calculateCoordinates
public void calculateCoordinates(boolean update)
removeOverlaps
void removeOverlaps()
updateCoordinates
void updateCoordinates(org.xmlcml.cml.subset.BondSet bondSet)
addSubstituents
void addSubstituents(org.xmlcml.cml.subset.BondSet bs,
java.util.HashSet bondSetSet)
getRingVector
public java.util.Vector getRingVector()
- get rings
getRingList
public org.xmlcml.cml.topology.Ring[] getRingList()
- get rings
getRingNucleusVector
public java.util.Vector getRingNucleusVector()
throws org.xmlcml.cml.CMLException
- get all cyclic bonds after spanning tree is created.
- Specified by:
getRingNucleusVector in interface org.xmlcml.cml.topology.Topology
getRingNucleusList
public org.xmlcml.cml.topology.RingNucleus[] getRingNucleusList()
throws org.xmlcml.cml.CMLException
- get ringNuclei
- Specified by:
getRingNucleusList in interface org.xmlcml.cml.topology.Topology
getChainVector
public java.util.Vector getChainVector()
throws org.xmlcml.cml.CMLException
- Specified by:
getChainVector in interface org.xmlcml.cml.topology.Topology
getChainList
public org.xmlcml.cml.topology.ChainSet[] getChainList()
throws org.xmlcml.cml.CMLException
- get chains
- Specified by:
getChainList in interface org.xmlcml.cml.topology.Topology
findChains
void findChains()
throws org.xmlcml.cml.CMLException
- find the chains
findRingNuclei
public void findRingNuclei()
throws org.xmlcml.cml.CMLException
addChainSet
public void addChainSet(org.xmlcml.cml.topology.ChainSet chain)
- this adds an *existing* chain to the vector (i.e. does not create
it). Called from Chain()
- Specified by:
addChainSet in interface org.xmlcml.cml.topology.Topology
getUniqueNumbering
public java.util.TreeMap getUniqueNumbering()
- get unique numbering (cf. Weininger)
- Specified by:
getUniqueNumbering in interface org.xmlcml.cml.topology.Topology
getRankedMap
java.util.HashMap getRankedMap(java.util.ArrayList list)
getAtomInvariants
java.util.HashMap getAtomInvariants(org.xmlcml.cml.subset.AtomSet atomSet)
getInvariant
java.lang.String getInvariant(org.xmlcml.cml.CMLAtom atom)
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object
- Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method
never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string
concatenation with this object. If the result is
null, string concatenation will instead
use "null".
The default implementation returns
getClass().getName() + "@" +
Integer.toHexString(hashCode()).
main
public static void main(java.lang.String[] args)