Package org.jmol.modelset
Class BondCollection
java.lang.Object
org.jmol.modelset.AtomCollection
org.jmol.modelset.BondCollection
- Direct Known Subclasses:
ModelSet
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jmol.modelset.AtomCollection
AtomCollection.AtomSorter
-
Field Summary
FieldsModifier and TypeFieldDescriptionBond[]
protected static final int
int
protected javajs.util.BS
private javajs.util.BS
private javajs.util.BS
protected short
protected Bond[][][]
protected boolean
boolean
protected static final int
protected static final int
protected int
protected JmolMolecule[]
protected int[]
Fields inherited from class org.jmol.modelset.AtomCollection
aaRet, ac, at, atomNames, atomResnos, atomSeqIDs, atomSerials, atomTensorList, atomTensors, atomTypes, bfactor100s, bioModelset, bondingRadii, bsClickable, bsModulated, bsPartialCharges, bspf, bsVisible, CALC_H_ALLOW_H, CALC_H_DOALL, CALC_H_HAVEH, CALC_H_IGNORE_H, CALC_H_JUSTC, CALC_H_QUICK, canSkipLoad, dssrData, g3d, haveChirality, haveStraightness, hydrophobicities, maxBondingRadius, occupancies, partialCharges, pointGroup, 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_SITE, TAINT_TEMPERATURE, TAINT_VALENCE, TAINT_VANDERWAALS, TAINT_VIBRATION, tainted, trajectory, userSettableValues, vibrations, vwr
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addBondToAtom
(Atom atom, Bond bond) int
private Bond[]
addToBonds
(Bond newBond, Bond[] oldBonds) protected boolean
void
assignAromaticBondsBs
(boolean isUserCalculation, javajs.util.BS bsBonds) algorithm discussed above.private boolean
assignAromaticDouble
(Bond bond) try to assign AROMATICDOUBLE to this bond.private boolean
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 boolean
private void
assignAromaticNandO
(javajs.util.BS bsSelected) private boolean
assignAromaticSingle
(Bond bond) try to assign AROMATICSINGLE to this bond.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.bondAtoms
(Atom atom1, Atom atom2, int order, short mad, javajs.util.BS bsBonds, float energy, boolean addGroup, boolean isNew) protected Bond
bondMutually
(Atom atom, Atom atomOther, int order, short mad, float energy) protected void
dBb
(javajs.util.BS bsBond, boolean isFullModel) protected void
protected int[]
deleteConnections
(float minD, float maxD, int order, javajs.util.BS bsA, javajs.util.BS bsB, boolean isBonds, boolean matchNull) void
displayBonds
(BondSet bs, boolean isDisplay) protected float
fixD
(float d, boolean isF) protected javajs.util.BS
getAtomBitsMDb
(int tokType, Object specInfo) javajs.util.BS
getAtomsConnected
(float min, float max, int intType, javajs.util.BS bs) short
getBondColix1
(int i) short
getBondColix2
(int i) protected int
getBondCountInModel
(int modelIndex) for general usegetBondIterator
(javajs.util.BS bsBonds) getBondIteratorForType
(int bondType, javajs.util.BS bsAtoms) javajs.util.BS
getBondsForSelectedAtoms
(javajs.util.BS bsAtoms, boolean bondSelectionModeOr) short
getDefaultMadFromOrder
(int order) When creating a new bond, determine bond diameter from orderprotected Bond
getOrAddBond
(Atom atom, Atom atomOther, int order, short mad, javajs.util.BS bsBonds, float energy, boolean overrideBonding) protected boolean
isInRange
(Atom atom1, Atom atom2, float minD, float maxD, boolean minFrac, boolean maxfrac, boolean isFractional) Consider the min/max option for CONNECTprotected void
void
removeUnnecessaryBonds
(Atom atom, boolean deleteAtom) void
protected Bond
protected void
setupBC()
Methods inherited from class org.jmol.modelset.AtomCollection
addTensor, calculateHydrogens, calculateSurface, calculateVolume, chainToUpper, clearBfactorRange, clearVisibleSets, deleteModelAtoms, fillADa, findMaxRadii, findNearest2, fixFormalCharges, generateCrystalClass, getAllAtomTensors, getAtom, 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, getOccupancyFloat, getPartialCharges, getQuaternion, getRadiusVdwJmol, getSeqcodeBits, getSpecNameOrNull, getSurfaceDistance100, getSurfaceDistanceMax, getTaintedAtoms, getUserSettableType, getVibCoord, getVibration, getVisibleSet, isAtomHidden, isCursorOnTopOf, isDeleted, isModulated, mergeAtomArrays, modelSetHasVibrationVectors, releaseModelSetAC, scaleVectorsToMax, setAPa, setAtomCoord, setAtomCoord2, setAtomCoordRelative, setAtomData, setAtomName, setAtomNumber, setAtomsCoordRelative, setAtomTensors, setBFactor, setBondingRadius, setBsHidden, setCapacity, setElement, setFormalCharges, setOccupancy, setPartialCharge, setPreserveState, setSite, setTaintedAtoms, setupAC, setVibrationVector, taintAtom, taintAtoms, unTaintAtoms, validateBspf, validateBspfForModel
-
Field Details
-
bo
-
bondCount
public int bondCount -
numCached
protected int[] numCached -
freeBonds
-
molecules
-
moleculeCount
protected int moleculeCount -
defaultCovalentMad
protected short defaultCovalentMad -
bsAromaticSingle
private javajs.util.BS bsAromaticSingle -
bsAromaticDouble
private javajs.util.BS bsAromaticDouble -
bsAromatic
protected javajs.util.BS bsAromatic -
haveHiddenBonds
public boolean haveHiddenBonds -
BOND_GROWTH_INCREMENT
protected static final int BOND_GROWTH_INCREMENT- See Also:
-
MAX_BONDS_LENGTH_TO_CACHE
protected static final int MAX_BONDS_LENGTH_TO_CACHE- See Also:
-
MAX_NUM_TO_CACHE
protected static final int MAX_NUM_TO_CACHE- See Also:
-
haveAtropicBonds
protected boolean haveAtropicBonds
-
-
Constructor Details
-
BondCollection
public BondCollection()
-
-
Method Details
-
setupBC
protected void setupBC() -
releaseModelSetBC
protected void releaseModelSetBC() -
getBondIteratorForType
-
getBondIterator
-
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 javajs.util.BS getBondsForSelectedAtoms(javajs.util.BS bsAtoms, boolean bondSelectionModeOr) -
bondAtoms
-
getOrAddBond
-
setBond
-
bondMutually
-
addBondToAtom
-
addToBonds
-
addHBond
-
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, javajs.util.BS bsA, javajs.util.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) Consider the min/max option for CONNECT- Parameters:
atom1
-atom2
-minD
-maxD
-minFrac
-maxfrac
-isFractional
-- Returns:
- true if in range
-
dBb
protected void dBb(javajs.util.BS bsBond, boolean isFullModel) -
resetAromatic
public void resetAromatic() -
assignAromaticBondsBs
public void assignAromaticBondsBs(boolean isUserCalculation, javajs.util.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
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
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
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
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
-
assignAromaticMustBeSingle
-
assignAromaticNandO
private void assignAromaticNandO(javajs.util.BS bsSelected) -
getAtomBitsMDb
-
removeUnnecessaryBonds
-
displayBonds
-
getAtomsConnected
public javajs.util.BS getAtomsConnected(float min, float max, int intType, javajs.util.BS bs)
-