@TestClass(value="org.openscience.cdk.graph.ConnectivityCheckerTest") public class ConnectivityChecker extends Object
boolean isConnected = ConnectivityChecker.isConnected(atomContainer);
A disconnected AtomContainer can be fragmented into connected fragments by using code like:
MoleculeSet fragments = ConnectivityChecker.partitionIntoMolecules(disconnectedContainer); int fragmentCount = fragments.getMoleculeCount();
Constructor and Description |
---|
ConnectivityChecker() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isConnected(IAtomContainer atomContainer)
Check whether a set of atoms in an
IAtomContainer is connected. |
static IMoleculeSet |
partitionIntoMolecules(IAtomContainer atomContainer)
Partitions the atoms in an AtomContainer into covalently connected components.
|
@TestMethod(value="testIsConnected_IAtomContainer,testPartitionIntoMolecules_IsConnected_Consistency") public static boolean isConnected(IAtomContainer atomContainer)
IAtomContainer
is connected.atomContainer
- The IAtomContainer
to be check for connectednessIAtomContainer
is connected@TestMethod(value="testPartitionIntoMolecules_IAtomContainer,testPartitionIntoMoleculesKeepsAtomIDs,testPartitionIntoMolecules_IsConnected_Consistency") public static IMoleculeSet partitionIntoMolecules(IAtomContainer atomContainer)
atomContainer
- The AtomContainer to be partitioned into connected components, i.e. molecules