public class JmolMolecule
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
ac |
int[] |
altElementCounts |
int |
altElementMax |
BS |
atomList |
int[] |
elementCounts |
int |
elementNumberMax |
int |
firstAtomIndex |
int |
indexInModel |
java.lang.String |
mf |
int |
modelIndex |
int |
moleculeIndex |
int |
nElements |
Node[] |
nodes |
Constructor and Description |
---|
JmolMolecule() |
Modifier and Type | Method and Description |
---|---|
static JmolMolecule[] |
addMolecule(JmolMolecule[] molecules,
int iMolecule,
Node[] atoms,
int iAtom,
BS bsBranch,
int modelIndex,
int indexInModel,
BS bsExclude) |
private static JmolMolecule[] |
allocateArray(JmolMolecule[] molecules,
int len) |
static BS |
getBitSetForMF(Atom[] at,
BS bsAtoms,
java.lang.String mf) |
static BS |
getBranchBitSet(Node[] atoms,
int atomIndex,
BS bsToTest,
javajs.util.Lst<BS> 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(Node[] atoms,
Node atom,
BS bsToTest,
boolean allowCyclic,
boolean allowBioResidue,
javajs.util.Lst<BS> biobranches,
BS bsResult) |
java.lang.String |
getMolecularFormula(boolean includeMissingHydrogens,
float[] wts,
boolean isEmpirical) |
static java.lang.String |
getMolecularFormula(Node[] atoms,
BS bsSelected,
boolean includeMissingHydrogens,
float[] wts,
boolean isEmpirical) |
static JmolMolecule[] |
getMolecules(BNode[] atoms,
BS[] bsModelAtoms,
javajs.util.Lst<BS> biobranches,
BS bsExclude)
Creates an array of JmolMolecules from a set of atoms in the form of simple
JmolNodes.
|
private static JmolMolecule |
initialize(Node[] nodes,
int moleculeIndex,
int firstAtomIndex,
BS atomList,
int modelIndex,
int indexInModel) |
public Node[] nodes
public int moleculeIndex
public int modelIndex
public int indexInModel
public int firstAtomIndex
public int ac
public int nElements
public int[] elementCounts
public int[] altElementCounts
public int elementNumberMax
public int altElementMax
public java.lang.String mf
public BS atomList
public static final JmolMolecule[] getMolecules(BNode[] atoms, BS[] bsModelAtoms, javajs.util.Lst<BS> biobranches, BS 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 BS getBranchBitSet(Node[] atoms, int atomIndex, BS bsToTest, javajs.util.Lst<BS> 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, Node[] atoms, int iAtom, BS bsBranch, int modelIndex, int indexInModel, BS bsExclude)
public static java.lang.String getMolecularFormula(Node[] atoms, BS bsSelected, boolean includeMissingHydrogens, float[] wts, boolean isEmpirical)
public java.lang.String getMolecularFormula(boolean includeMissingHydrogens, float[] wts, boolean isEmpirical)
private static JmolMolecule initialize(Node[] nodes, int moleculeIndex, int firstAtomIndex, BS atomList, int modelIndex, int indexInModel)
private static boolean getCovalentlyConnectedBitSet(Node[] atoms, Node atom, BS bsToTest, boolean allowCyclic, boolean allowBioResidue, javajs.util.Lst<BS> biobranches, BS bsResult)
private static JmolMolecule[] allocateArray(JmolMolecule[] molecules, int len)