Package org.jmol.util
Class JmolMolecule
java.lang.Object
org.jmol.util.JmolMolecule
- Direct Known Subclasses:
SmilesSearch
,SmilesSearch.SmilesTarget
an independent class utilizing only org.jmol.api.JmolNode, not org.jmol.modelset.Atom
for use in finding molecules in models and SMILES strings
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final JmolMolecule[]
addMolecule
(JmolMolecule[] molecules, int iMolecule, Node[] atoms, int iAtom, BS bsBranch, int modelIndex, int indexInModel, BS bsExclude) static BS
getBitSetForMF
(Atom[] at, BS bsAtoms, String mf) static BS
getBranchBitSet
(Node[] atoms, int atomIndex, BS bsToTest, 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.static BS
getBranchesForInversion
(Node[] at, int atomIndex, BS bsToTest) int[]
getMFArray
(boolean includeMissingHydrogens, float[] wts, boolean isEmpirical) getMolecularFormula
(boolean includeMissingHydrogens, float[] wts, boolean isEmpirical) static String
getMolecularFormulaAtoms
(Node[] atoms, BS bsSelected, float[] wts, boolean isEmpirical) static final JmolMolecule[]
Creates an array of JmolMolecules from a set of atoms in the form of simple JmolNodes.
-
Field Details
-
nodes
-
moleculeIndex
public int moleculeIndex -
modelIndex
public int modelIndex -
indexInModel
public int indexInModel -
firstAtomIndex
public int firstAtomIndex -
ac
public int ac -
nElements
public int nElements -
elementCounts
public int[] elementCounts -
altElementCounts
public int[] altElementCounts -
elementNumberMax
public int elementNumberMax -
altElementMax
public int altElementMax -
mf
-
atomList
-
atNos
public int[] atNos
-
-
Constructor Details
-
JmolMolecule
public JmolMolecule()
-
-
Method Details
-
getMolecules
public static final JmolMolecule[] getMolecules(Node[] atoms, BS[] bsModelAtoms, Lst<BS> biobranches, BS bsExclude) Creates an array of JmolMolecules from a set of atoms in the form of simple JmolNodes. Allows for appending onto an already established set of branches (from BioPolymer).- Parameters:
atoms
- set of atoms to checkbsModelAtoms
- per-model atom list, or nullbiobranches
- pre-defined connections, like bonds but not to be followed internallybsExclude
- TODO- Returns:
- an array of JmolMolecules
-
getBranchBitSet
public static BS getBranchBitSet(Node[] atoms, int atomIndex, BS bsToTest, 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.- Parameters:
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
- TODO- Returns:
- a bitset of atoms along this branch
-
addMolecule
public static final JmolMolecule[] addMolecule(JmolMolecule[] molecules, int iMolecule, Node[] atoms, int iAtom, BS bsBranch, int modelIndex, int indexInModel, BS bsExclude) -
getMolecularFormulaAtoms
-
getMolecularFormula
public String getMolecularFormula(boolean includeMissingHydrogens, float[] wts, boolean isEmpirical) -
getMFArray
public int[] getMFArray(boolean includeMissingHydrogens, float[] wts, boolean isEmpirical) -
getBitSetForMF
-
getBranchesForInversion
-