@TestClass(value="org.openscience.cdk.graph.SpanningTreeTest") public class SpanningTree extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean[] |
bondsInTree |
Constructor and Description |
---|
SpanningTree(IAtomContainer atomContainer)
Create a new spanning tree for the provided molecule.
|
Modifier and Type | Method and Description |
---|---|
IRingSet |
getAllRings()
All basic rings and the all pairs of basic rings share at least one edge
combined.
|
IRingSet |
getBasicRings()
The basic rings of the spanning tree.
|
int |
getBondsAcyclicCount()
Number of acyclic bonds.
|
int |
getBondsCyclicCount()
Number of cyclic bonds.
|
IAtomContainer |
getCyclicFragmentsContainer()
Returns an IAtomContainer which contains all the atoms and bonds which
are involved in ring systems.
|
IAtomContainer |
getPath(IAtomContainer spt,
IAtom a1,
IAtom a2)
Find a path connected a1 and a2 in the tree.
|
IAtomContainer |
getSpanningTree()
Access the computed spanning tree of the input molecule.
|
int |
getSpanningTreeSize()
Size of the spanning tree specified as the number of edges in the tree.
|
boolean |
isDisconnected()
Is the molecule disconnected and has more then one component.
|
@TestMethod(value="testSpanningTree_IAtomContainer") public SpanningTree(IAtomContainer atomContainer)
atomContainer
- molecule to make a spanning tree for.@TestMethod(value="testIsDisconnected") public boolean isDisconnected()
@TestMethod(value="testGetSpanningTree") public IAtomContainer getSpanningTree()
@TestMethod(value="testGetPath_IAtomContainer_IAtom_IAtom") public IAtomContainer getPath(IAtomContainer spt, IAtom a1, IAtom a2) throws NoSuchAtomException
spt
- spanning treea1
- start of path (source)a2
- end of path (target)NoSuchAtomException
- thrown if the atom is not in the spanning
tree@TestMethod(value="testGetBasicRings") public IRingSet getBasicRings() throws NoSuchAtomException
NoSuchAtomException
- atoms not found in the molecule@TestMethod(value="testGetCyclicFragmentsContainer") public IAtomContainer getCyclicFragmentsContainer()
getAllRings()
,
getBasicRings()
@TestMethod(value="testGetAllRings") public IRingSet getAllRings() throws NoSuchAtomException
NoSuchAtomException
- atom was not found in the moleculegetBasicRings()
@TestMethod(value="testGetSpanningTreeSize") public int getSpanningTreeSize()
@TestMethod(value="testGetBondsAcyclicCount") public int getBondsAcyclicCount()
@TestMethod(value="testGetBondsCyclicCount") public int getBondsCyclicCount()
Copyright © 2014. All Rights Reserved.