public class JmolMolecule
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int[] |
altElementCounts |
int |
altElementMax |
int |
atomCount |
java.util.BitSet |
atomList |
int[] |
elementCounts |
int |
elementNumberMax |
int |
firstAtomIndex |
int |
indexInModel |
java.lang.String |
mf |
int |
modelIndex |
int |
moleculeIndex |
int |
nElements |
JmolNode[] |
nodes |
Modifier | Constructor and Description |
---|---|
|
JmolMolecule() |
private |
JmolMolecule(JmolNode[] nodes,
int moleculeIndex,
int firstAtomIndex,
java.util.BitSet atomList,
int modelIndex,
int indexInModel) |
Modifier and Type | Method and Description |
---|---|
static JmolMolecule[] |
addMolecule(JmolMolecule[] molecules,
int iMolecule,
JmolNode[] atoms,
int iAtom,
java.util.BitSet bsBranch,
int modelIndex,
int indexInModel,
java.util.BitSet bsExclude) |
private static JmolMolecule[] |
allocateArray(JmolMolecule[] molecules,
int len) |
static java.util.BitSet |
getBranchBitSet(JmolNode[] atoms,
int atomIndex,
java.util.BitSet bsToTest,
java.util.List<java.util.BitSet> biobranches,
int atomIndexNot,
boolean allowCyclic,
boolean allowBioResidue)
given a set of atoms, a subset of atoms to test, two atoms that start the
branch, and whether or not to allow the branch to cycle back on itself,
deliver the set of atoms constituting this branch.
|
private static boolean |
getCovalentlyConnectedBitSet(JmolNode[] atoms,
JmolNode atom,
java.util.BitSet bsToTest,
boolean allowCyclic,
boolean allowBioResidue,
java.util.List<java.util.BitSet> biobranches,
java.util.BitSet bsResult) |
private void |
getElementAndAtomCount(boolean includeMissingHydrogens) |
java.lang.String |
getMolecularFormula(boolean includeMissingHydrogens) |
static java.lang.String |
getMolecularFormula(JmolNode[] atoms,
java.util.BitSet bsSelected,
boolean includeMissingHydrogens) |
static JmolMolecule[] |
getMolecules(JmolNode[] atoms,
java.util.BitSet[] bsModelAtoms,
java.util.List<java.util.BitSet> biobranches,
java.util.BitSet bsExclude)
Creates an array of JmolMolecules from a set of atoms in the form of simple
JmolNodes.
|
public JmolNode[] nodes
public int moleculeIndex
public int modelIndex
public int indexInModel
public int firstAtomIndex
public int atomCount
public int nElements
public int[] elementCounts
public int[] altElementCounts
public int elementNumberMax
public int altElementMax
public java.lang.String mf
public java.util.BitSet atomList
public JmolMolecule()
private JmolMolecule(JmolNode[] nodes, int moleculeIndex, int firstAtomIndex, java.util.BitSet atomList, int modelIndex, int indexInModel)
public static final JmolMolecule[] getMolecules(JmolNode[] atoms, java.util.BitSet[] bsModelAtoms, java.util.List<java.util.BitSet> biobranches, java.util.BitSet bsExclude)
atoms
- set of atoms to checkbsModelAtoms
- per-model atom list, or nullbiobranches
- pre-defined connections, like bonds but not to be followed internallybsExclude
- TODOpublic static java.util.BitSet getBranchBitSet(JmolNode[] atoms, int atomIndex, java.util.BitSet bsToTest, java.util.List<java.util.BitSet> biobranches, int atomIndexNot, boolean allowCyclic, boolean allowBioResidue)
atoms
- atomIndex
- the first atom of the branchbsToTest
- some subset of those atomsbiobranches
- pre-determined groups of connected atomsatomIndexNot
- the "root" atom stopping branch development; often a ring atom; if
-1, then this method will return all atoms in a connected set of
atoms.allowCyclic
- allowallowBioResidue
- TODOpublic static final JmolMolecule[] addMolecule(JmolMolecule[] molecules, int iMolecule, JmolNode[] atoms, int iAtom, java.util.BitSet bsBranch, int modelIndex, int indexInModel, java.util.BitSet bsExclude)
public static java.lang.String getMolecularFormula(JmolNode[] atoms, java.util.BitSet bsSelected, boolean includeMissingHydrogens)
public java.lang.String getMolecularFormula(boolean includeMissingHydrogens)
private void getElementAndAtomCount(boolean includeMissingHydrogens)
private static boolean getCovalentlyConnectedBitSet(JmolNode[] atoms, JmolNode atom, java.util.BitSet bsToTest, boolean allowCyclic, boolean allowBioResidue, java.util.List<java.util.BitSet> biobranches, java.util.BitSet bsResult)
private static JmolMolecule[] allocateArray(JmolMolecule[] molecules, int len)