Package org.jmol.modelset
Class BondCollection
- java.lang.Object
-
- org.jmol.modelset.AtomCollection
-
- org.jmol.modelset.BondCollection
-
- Direct Known Subclasses:
ModelSet
public abstract class BondCollection extends AtomCollection
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jmol.modelset.AtomCollection
AtomCollection.AtomSorter
-
-
Field Summary
Fields Modifier and Type Field Description Bond[]boprotected static intBOND_GROWTH_INCREMENTintbondCountprotected BSbsAromaticprivate BSbsAromaticDoubleprivate BSbsAromaticSingleprotected shortdefaultCovalentMadprotected Bond[][][]freeBondsbooleanhaveHiddenBondsprotected static intMAX_BONDS_LENGTH_TO_CACHEprotected static intMAX_NUM_TO_CACHEprotected intmoleculeCountprotected JmolMolecule[]moleculesprotected int[]numCached-
Fields inherited from class org.jmol.modelset.AtomCollection
aaRet, ac, at, atomNames, atomResnos, atomSeqIDs, atomSerials, atomTensorList, atomTensors, atomTypes, averageAtomPoint, bfactor100s, bioModelset, bondingRadii, bsClickable, bsModulated, bsPartialCharges, bspf, bsVisible, canSkipLoad, g3d, haveStraightness, hydrophobicities, maxBondingRadius, occupancies, partialCharges, preserveState, surfaceDistance100s, TAINT_ATOMNAME, TAINT_ATOMNO, TAINT_ATOMTYPE, TAINT_BONDINGRADIUS, TAINT_CHAIN, TAINT_COORD, TAINT_ELEMENT, TAINT_FORMALCHARGE, TAINT_HYDROPHOBICITY, TAINT_MAX, TAINT_OCCUPANCY, TAINT_PARTIALCHARGE, TAINT_RESNO, TAINT_SEQID, TAINT_TEMPERATURE, TAINT_VALENCE, TAINT_VANDERWAALS, TAINT_VIBRATION, tainted, trajectory, userSettableValues, vibrations, vwr
-
-
Constructor Summary
Constructors Constructor Description BondCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddBondToAtom(Atom atom, Bond bond)intaddHBond(Atom atom1, Atom atom2, int order, float energy)private Bond[]addToBonds(Bond newBond, Bond[] oldBonds)protected booleanallowAromaticBond(Bond b)voidassignAromaticBondsBs(boolean isUserCalculation, BS bsBonds)algorithm discussed above.private booleanassignAromaticDouble(Bond bond)try to assign AROMATICDOUBLE to this bond.private booleanassignAromaticDoubleForAtom(Atom atom)N atoms with 3 bonds cannot also have a double bond; other atoms need one and only one double bond; the rest must be single bonds.private booleanassignAromaticMustBeSingle(Atom atom)private voidassignAromaticNandO(BS bsSelected)private booleanassignAromaticSingle(Bond bond)try to assign AROMATICSINGLE to this bond.private booleanassignAromaticSingleForAtom(Atom atom, int notBondIndex)N atoms with 3 bonds cannot also have a double bond; other atoms needs all single bonds, because the bond leading up to it is double.BSassignBond(int bondIndex, char type)BondbondAtoms(Atom atom1, Atom atom2, int order, short mad, BS bsBonds, float energy, boolean addGroup, boolean isNew)protected BondbondMutually(Atom atom, Atom atomOther, int order, short mad, float energy)protected voiddBb(BS bsBond, boolean isFullModel)protected voiddBm(BS bsBonds, boolean isFullModel)send request up to ModelCollection level.protected voiddeleteAllBonds2()protected int[]deleteConnections(float minD, float maxD, int order, BS bsA, BS bsB, boolean isBonds, boolean matchNull)voiddisplayBonds(BondSet bs, boolean isDisplay)protected floatfixD(float d, boolean isF)protected BSgetAtomBitsMDb(int tokType, java.lang.Object specInfo)BSgetAtomsConnected(float min, float max, int intType, BS bs)shortgetBondColix1(int i)shortgetBondColix2(int i)protected intgetBondCountInModel(int modelIndex)for general useBondIteratorgetBondIterator(BS bsBonds)BondIteratorgetBondIteratorForType(int bondType, BS bsAtoms)BSgetBondsForSelectedAtoms(BS bsAtoms, boolean bondSelectionModeOr)shortgetDefaultMadFromOrder(int order)When creating a new bond, determine bond diameter from orderprotected BondgetOrAddBond(Atom atom, Atom atomOther, int order, short mad, BS bsBonds, float energy, boolean overrideBonding)protected booleanisInRange(Atom atom1, Atom atom2, float minD, float maxD, boolean minFrac, boolean maxfrac, boolean isFractional)protected voidreleaseModelSetBC()protected voidremoveUnnecessaryBonds(Atom atom, boolean deleteAtom)voidresetAromatic()voidresetMolecules()protected BondsetBond(int index, Bond bond)protected voidsetupBC()-
Methods inherited from class org.jmol.modelset.AtomCollection
addTensor, calculateHydrogens, calculateSurface, calculateVolume, chainToUpper, clearBfactorRange, clearVisibleSets, deleteModelAtoms, fillADa, findMaxRadii, findNearest2, fixFormalCharges, generateCrystalClass, getAllAtomTensors, getAtomBitsMDa, getAtomicCharges, getAtomIdentityInfo, getAtomIndices, getAtomInfo, getAtomPointVector, getAtomsFromAtomNumberInFrame, getAtomsInFrame, getAtomsNearPlane, getAtomTensor, getAtomTensorList, getAtomTypes, getBfactor100Hi, getBfactor100Lo, getBFactors, getBondingRadii, getChainBits, getClickableSet, getElementName, getFirstAtomIndexFromAtomNumber, getHybridizationAndAxes, getHydrophobicity, getLabeler, getMaxVanderwaalsRadius, getMissingHydrogenCount, getModulation, getPartialCharges, getQuaternion, getRadiusVdwJmol, getSeqcodeBits, getSpecNameOrNull, getSurfaceDistance100, getSurfaceDistanceMax, getTaintedAtoms, getUserSettableType, getVibCoord, getVibration, getVisibleSet, isAtomHidden, isCursorOnTopOf, isModulated, mergeAtomArrays, modelSetHasVibrationVectors, releaseModelSetAC, scaleVectorsToMax, setAPa, setAtomCoord, setAtomCoord2, setAtomCoordRelative, setAtomData, setAtomName, setAtomNumber, setAtomsCoordRelative, setAtomTensors, setBFactor, setBsHidden, setCapacity, setElement, setFormalCharges, setOccupancy, setPartialCharge, setPreserveState, setTaintedAtoms, setupAC, setVibrationVector, taintAtom, taintAtoms, unTaintAtoms, validateBspf, validateBspfForModel
-
-
-
-
Field Detail
-
bo
public Bond[] bo
-
bondCount
public int bondCount
-
numCached
protected int[] numCached
-
freeBonds
protected Bond[][][] freeBonds
-
molecules
protected JmolMolecule[] molecules
-
moleculeCount
protected int moleculeCount
-
defaultCovalentMad
protected short defaultCovalentMad
-
bsAromaticSingle
private BS bsAromaticSingle
-
bsAromaticDouble
private BS bsAromaticDouble
-
bsAromatic
protected BS bsAromatic
-
haveHiddenBonds
public boolean haveHiddenBonds
-
BOND_GROWTH_INCREMENT
protected static final int BOND_GROWTH_INCREMENT
- See Also:
- Constant Field Values
-
MAX_BONDS_LENGTH_TO_CACHE
protected static final int MAX_BONDS_LENGTH_TO_CACHE
- See Also:
- Constant Field Values
-
MAX_NUM_TO_CACHE
protected static final int MAX_NUM_TO_CACHE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setupBC
protected void setupBC()
-
releaseModelSetBC
protected void releaseModelSetBC()
-
resetMolecules
public void resetMolecules()
-
getBondIteratorForType
public BondIterator getBondIteratorForType(int bondType, BS bsAtoms)
-
getBondIterator
public BondIterator getBondIterator(BS bsBonds)
-
getBondColix1
public short getBondColix1(int i)
-
getBondColix2
public short getBondColix2(int i)
-
getBondCountInModel
protected int getBondCountInModel(int modelIndex)
for general use- Parameters:
modelIndex- the model of interest or -1 for all- Returns:
- the actual number of connections
-
getBondsForSelectedAtoms
public BS getBondsForSelectedAtoms(BS bsAtoms, boolean bondSelectionModeOr)
-
bondAtoms
public Bond bondAtoms(Atom atom1, Atom atom2, int order, short mad, BS bsBonds, float energy, boolean addGroup, boolean isNew)
-
getOrAddBond
protected Bond getOrAddBond(Atom atom, Atom atomOther, int order, short mad, BS bsBonds, float energy, boolean overrideBonding)
-
bondMutually
protected Bond bondMutually(Atom atom, Atom atomOther, int order, short mad, float energy)
-
deleteAllBonds2
protected void deleteAllBonds2()
-
getDefaultMadFromOrder
public short getDefaultMadFromOrder(int order)
When creating a new bond, determine bond diameter from order- Parameters:
order-- Returns:
- if hydrogen bond, default to 1; otherwise 0 (general default)
-
deleteConnections
protected int[] deleteConnections(float minD, float maxD, int order, BS bsA, BS bsB, boolean isBonds, boolean matchNull)
-
fixD
protected float fixD(float d, boolean isF)
-
isInRange
protected boolean isInRange(Atom atom1, Atom atom2, float minD, float maxD, boolean minFrac, boolean maxfrac, boolean isFractional)
-
dBm
protected void dBm(BS bsBonds, boolean isFullModel)
send request up to ModelCollection level. Done this way to avoid JavaScript super call- Parameters:
bsBonds-isFullModel-
-
dBb
protected void dBb(BS bsBond, boolean isFullModel)
-
resetAromatic
public void resetAromatic()
-
assignAromaticBondsBs
public void assignAromaticBondsBs(boolean isUserCalculation, BS bsBonds)algorithm discussed above.- Parameters:
isUserCalculation- if set, don't reset the base aromatic bitset and do report changes to STICKS as though this were a bondOrder command.bsBonds- passed to us by autoBond routine
-
assignAromaticDouble
private boolean assignAromaticDouble(Bond bond)
try to assign AROMATICDOUBLE to this bond. Each atom needs to be have all single bonds except for this one.- Parameters:
bond-- Returns:
- true if successful; false otherwise
-
assignAromaticSingle
private boolean assignAromaticSingle(Bond bond)
try to assign AROMATICSINGLE to this bond. Each atom needs to be able to have one aromatic double bond attached.- Parameters:
bond-- Returns:
- true if successful; false otherwise
-
assignAromaticSingleForAtom
private boolean assignAromaticSingleForAtom(Atom atom, int notBondIndex)
N atoms with 3 bonds cannot also have a double bond; other atoms needs all single bonds, because the bond leading up to it is double.- Parameters:
atom-notBondIndex- that index of the bond leading to this atom --- to be ignored- Returns:
- true if successful, false if not
-
assignAromaticDoubleForAtom
private boolean assignAromaticDoubleForAtom(Atom atom)
N atoms with 3 bonds cannot also have a double bond; other atoms need one and only one double bond; the rest must be single bonds.- Parameters:
atom-- Returns:
- true if successful, false if not
-
allowAromaticBond
protected boolean allowAromaticBond(Bond b)
-
assignAromaticMustBeSingle
private boolean assignAromaticMustBeSingle(Atom atom)
-
assignAromaticNandO
private void assignAromaticNandO(BS bsSelected)
-
getAtomBitsMDb
protected BS getAtomBitsMDb(int tokType, java.lang.Object specInfo)
-
assignBond
public BS assignBond(int bondIndex, char type)
-
removeUnnecessaryBonds
protected void removeUnnecessaryBonds(Atom atom, boolean deleteAtom)
-
displayBonds
public void displayBonds(BondSet bs, boolean isDisplay)
-
-