org.jmol.modelset
Class AtomCollection
java.lang.Object
org.jmol.modelset.AtomCollection
- Direct Known Subclasses:
- BondCollection
public abstract class AtomCollection
- extends Object
Method Summary |
private void |
calcBfactorRange(BitSet bs)
|
private void |
calcSurfaceDistances()
|
Point3f[][] |
calculateHydrogens(BitSet bs,
int[] nTotal,
boolean doAll,
boolean justCarbon,
List vConnect)
get a list of potential H atom positions based on
elemental valence and formal charge |
Point3f[] |
calculateSurface(BitSet bsSelected,
float envelopeRadius)
|
float |
calculateVolume(BitSet bs,
int iType)
|
void |
clearBfactorRange()
|
protected void |
deleteModelAtoms(int firstAtomIndex,
int nAtoms,
BitSet bs)
|
protected void |
fillAtomData(AtomData atomData,
int mode)
|
BitSet |
findAtomsInRectangle(Rectangle rect,
BitSet bsModels)
|
protected void |
findMaxRadii()
|
protected void |
findNearestAtomIndex(int x,
int y,
Atom[] closest,
BitSet bsNot)
|
private BitSet |
findNotAttached(int nAttached,
int[][] angles,
int[] ptrs,
int nPtrs)
|
protected BitSet |
getAtomBits(int tokType,
Object specInfo)
general unqualified lookup of atom set type |
String |
getAtomChain(int i)
|
short |
getAtomColix(int i)
|
int |
getAtomCount()
|
float[] |
getAtomicCharges()
|
String |
getAtomicPropertyState(int taintWhat,
BitSet bsSelected)
|
void |
getAtomicPropertyState(StringBuffer commands,
byte type,
BitSet bs,
String label,
float[] fData)
|
int |
getAtomIndexFromAtomNumber(int atomNumber,
BitSet bsVisibleFrames)
|
int[] |
getAtomIndices(BitSet bs)
|
String |
getAtomInfo(int i,
String format)
|
String |
getAtomInfoXYZ(int i,
boolean useChimeFormat)
|
int |
getAtomModelIndex(int i)
|
String |
getAtomName(int i)
|
int |
getAtomNumber(int i)
|
Point3f |
getAtomPoint3f(int i)
|
List |
getAtomPointVector(BitSet bs)
|
float |
getAtomRadius(int i)
|
String |
getAtomSequenceCode(int i)
|
BitSet |
getAtomsWithin(float distance,
Point4f plane)
|
String[] |
getAtomTypes()
|
float |
getAtomVdwRadius(int i,
int iType)
|
private Atom[] |
getAttached(Atom atom,
int nMax,
boolean doSort)
|
int |
getBfactor100Hi()
|
int |
getBfactor100Lo()
|
short[] |
getBFactors()
|
protected BitSet |
getChainBits(char chainId)
|
protected String |
getChimeInfo(int tok,
BitSet bs)
|
BitSet |
getClickableSet()
|
(package private) String |
getElementName(int i)
|
int |
getElementNumber(int i)
|
String |
getElementSymbol(int i)
|
Object[] |
getEllipsoid(int i)
|
protected boolean |
getHaveStraightness()
|
Object |
getHelixData(BitSet bs,
int tokType)
|
String |
getHybridizationAndAxes(int atomIndex,
Vector3f z,
Vector3f x,
String lcaoTypeRaw,
boolean hybridizationCompatible,
boolean doAlignZ)
|
private String |
getHybridizationAndAxesD(int atomIndex,
Vector3f z,
Vector3f x,
String lcaoType)
dsp3 (trigonal bipyramidal, see-saw, T-shaped)
or d2sp3 (square planar, square pyramidal, octahedral) |
private BitSet |
getIdentifierOrNull(String identifier)
overhauled by RMH Nov 1, 2006. |
float[] |
getIonicRadii()
|
float |
getMaxVanderwaalsRadius()
|
float[] |
getPartialCharges()
|
Quaternion |
getQuaternion(int i,
char qtype)
|
protected float |
getRadiusVdwJmol(Atom atom)
|
protected BitSet |
getSeqcodeBits(int seqcode,
boolean returnEmpty)
|
private BitSet |
getSpecName(String name)
|
private BitSet |
getSpecNameOrNull(String name,
boolean checkStar)
|
(package private) int |
getSurfaceDistance100(int atomIndex)
|
int |
getSurfaceDistanceMax()
|
BitSet |
getTaintedAtoms(byte type)
|
static int |
getUserSettableType(String dataType)
|
float |
getVibrationCoord(int atomIndex,
char c)
|
Vector3f |
getVibrationVector(int atomIndex,
boolean forceNew)
|
BitSet |
getVisibleSet()
|
boolean |
isAtomHidden(int iAtom)
|
private boolean |
isAtomNameMatch(Atom atom,
String strPattern,
boolean checkStar)
|
(package private) boolean |
isCursorOnTopOf(Atom contender,
int x,
int y,
int radius,
Atom champion)
used by Frame and AminoMonomer and NucleicMonomer -- does NOT check for clickability |
private boolean |
isTainted(int atomIndex,
byte type)
|
private void |
loadCoordinates(String data,
boolean isVibrationVectors,
boolean doTaint)
|
protected void |
mergeAtomArrays(AtomCollection mergeModelSet)
|
boolean |
modelSetHasVibrationVectors()
|
protected void |
releaseModelSet()
|
void |
setAtomCoord(BitSet bs,
int tokType,
Object xyzValues)
|
void |
setAtomCoord(int atomIndex,
float x,
float y,
float z)
|
protected void |
setAtomCoordRelative(BitSet bs,
float x,
float y,
float z)
|
void |
setAtomCoordRelative(int atomIndex,
float x,
float y,
float z)
|
void |
setAtomData(int type,
String name,
String dataString,
boolean isDefault)
|
protected void |
setAtomName(int atomIndex,
String name)
|
protected boolean |
setAtomNumber(int atomIndex,
int atomno)
|
void |
setAtomProperty(BitSet bs,
int tok,
int iValue,
float fValue,
String sValue,
float[] values,
String[] list)
|
protected void |
setAtomType(int atomIndex,
String type)
|
private void |
setAtomVibrationVector(int atomIndex,
float x,
float y,
float z)
|
private void |
setBf(int i)
|
protected boolean |
setBFactor(int atomIndex,
float bfactor)
|
void |
setBsHidden(BitSet bs)
|
protected void |
setElement(Atom atom,
int atomicNumber)
|
protected void |
setEllipsoid(int atomIndex,
Object[] ellipsoid)
|
void |
setFormalCharges(BitSet bs,
int formalCharge)
|
void |
setHaveStraightness(boolean TF)
|
protected boolean |
setIonicRadius(int atomIndex,
float radius)
|
protected boolean |
setOccupancy(int atomIndex,
int occupancy)
|
protected boolean |
setPartialCharge(int atomIndex,
float partialCharge)
|
void |
setPreserveState(boolean TF)
|
void |
setTaintedAtoms(BitSet bs,
byte type)
|
protected void |
setVibrationVector(int atomIndex,
float x,
float y,
float z)
|
private void |
setVibrationVector(int atomIndex,
int tok,
float fValue)
|
void |
taint(BitSet bsAtoms,
byte type)
|
protected void |
taint(int atomIndex,
byte type)
|
private void |
untaint(int atomIndex,
byte type)
|
void |
unTaintAtoms(BitSet bs,
byte type)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
viewer
public Viewer viewer
g3d
protected Graphics3D g3d
atoms
public Atom[] atoms
atomCount
int atomCount
atomNames
String[] atomNames
atomTypes
String[] atomTypes
atomSerials
int[] atomSerials
vibrationVectors
public Vector3f[] vibrationVectors
occupancies
byte[] occupancies
bfactor100s
short[] bfactor100s
partialCharges
float[] partialCharges
ionicRadii
float[] ionicRadii
ellipsoids
protected Object[][] ellipsoids
surfaceDistance100s
protected int[] surfaceDistance100s
haveStraightness
protected boolean haveStraightness
bsHidden
private BitSet bsHidden
maxBondingRadius
protected float maxBondingRadius
maxVanderwaalsRadius
private float maxVanderwaalsRadius
hasBfactorRange
private boolean hasBfactorRange
bfactor100Lo
private int bfactor100Lo
bfactor100Hi
private int bfactor100Hi
surfaceDistanceMax
private int surfaceDistanceMax
bsSurface
private BitSet bsSurface
nSurfaceAtoms
private int nSurfaceAtoms
bspf
protected Bspf bspf
preserveState
protected boolean preserveState
TAINT_ATOMNAME
public static final byte TAINT_ATOMNAME
- See Also:
- Constant Field Values
TAINT_ATOMTYPE
public static final byte TAINT_ATOMTYPE
- See Also:
- Constant Field Values
TAINT_COORD
public static final byte TAINT_COORD
- See Also:
- Constant Field Values
TAINT_ELEMENT
public static final byte TAINT_ELEMENT
- See Also:
- Constant Field Values
TAINT_FORMALCHARGE
public static final byte TAINT_FORMALCHARGE
- See Also:
- Constant Field Values
TAINT_IONICRADIUS
private static final byte TAINT_IONICRADIUS
- See Also:
- Constant Field Values
TAINT_OCCUPANCY
private static final byte TAINT_OCCUPANCY
- See Also:
- Constant Field Values
TAINT_PARTIALCHARGE
private static final byte TAINT_PARTIALCHARGE
- See Also:
- Constant Field Values
TAINT_TEMPERATURE
private static final byte TAINT_TEMPERATURE
- See Also:
- Constant Field Values
TAINT_VALENCE
private static final byte TAINT_VALENCE
- See Also:
- Constant Field Values
TAINT_VANDERWAALS
private static final byte TAINT_VANDERWAALS
- See Also:
- Constant Field Values
TAINT_VIBRATION
private static final byte TAINT_VIBRATION
- See Also:
- Constant Field Values
TAINT_ATOMNO
public static final byte TAINT_ATOMNO
- See Also:
- Constant Field Values
TAINT_MAX
public static final byte TAINT_MAX
- See Also:
- Constant Field Values
userSettableValues
private static final String[] userSettableValues
tainted
protected BitSet[] tainted
minimumPixelSelectionRadius
private static final int minimumPixelSelectionRadius
- See Also:
- Constant Field Values
bsEmpty
private final BitSet bsEmpty
bsFoundRectangle
private final BitSet bsFoundRectangle
sqrt3_2
private static final float sqrt3_2
vRef
private static final Vector3f vRef
almost180
private static final float almost180
- See Also:
- Constant Field Values
AtomCollection
public AtomCollection()
releaseModelSet
protected void releaseModelSet()
mergeAtomArrays
protected void mergeAtomArrays(AtomCollection mergeModelSet)
setHaveStraightness
public void setHaveStraightness(boolean TF)
getHaveStraightness
protected boolean getHaveStraightness()
getAtomPointVector
public List getAtomPointVector(BitSet bs)
getAtomCount
public int getAtomCount()
modelSetHasVibrationVectors
public boolean modelSetHasVibrationVectors()
getAtomTypes
public String[] getAtomTypes()
getPartialCharges
public float[] getPartialCharges()
getIonicRadii
public float[] getIonicRadii()
getBFactors
public short[] getBFactors()
setBsHidden
public void setBsHidden(BitSet bs)
isAtomHidden
public boolean isAtomHidden(int iAtom)
getAtomInfo
public String getAtomInfo(int i,
String format)
getAtomInfoXYZ
public String getAtomInfoXYZ(int i,
boolean useChimeFormat)
getElementSymbol
public String getElementSymbol(int i)
getElementNumber
public int getElementNumber(int i)
getElementName
String getElementName(int i)
getAtomName
public String getAtomName(int i)
getAtomNumber
public int getAtomNumber(int i)
getAtomPoint3f
public Point3f getAtomPoint3f(int i)
getAtomRadius
public float getAtomRadius(int i)
getAtomVdwRadius
public float getAtomVdwRadius(int i,
int iType)
getAtomColix
public short getAtomColix(int i)
getAtomChain
public String getAtomChain(int i)
getAtomSequenceCode
public String getAtomSequenceCode(int i)
getAtomModelIndex
public int getAtomModelIndex(int i)
getEllipsoid
public Object[] getEllipsoid(int i)
getQuaternion
public Quaternion getQuaternion(int i,
char qtype)
getHelixData
public Object getHelixData(BitSet bs,
int tokType)
getAtomIndexFromAtomNumber
public int getAtomIndexFromAtomNumber(int atomNumber,
BitSet bsVisibleFrames)
setFormalCharges
public void setFormalCharges(BitSet bs,
int formalCharge)
getAtomicCharges
public float[] getAtomicCharges()
getRadiusVdwJmol
protected float getRadiusVdwJmol(Atom atom)
getMaxVanderwaalsRadius
public float getMaxVanderwaalsRadius()
findMaxRadii
protected void findMaxRadii()
clearBfactorRange
public void clearBfactorRange()
calcBfactorRange
private void calcBfactorRange(BitSet bs)
setBf
private void setBf(int i)
getBfactor100Lo
public int getBfactor100Lo()
getBfactor100Hi
public int getBfactor100Hi()
getSurfaceDistanceMax
public int getSurfaceDistanceMax()
calculateVolume
public float calculateVolume(BitSet bs,
int iType)
getSurfaceDistance100
int getSurfaceDistance100(int atomIndex)
calcSurfaceDistances
private void calcSurfaceDistances()
calculateSurface
public Point3f[] calculateSurface(BitSet bsSelected,
float envelopeRadius)
setAtomCoord
public void setAtomCoord(BitSet bs,
int tokType,
Object xyzValues)
setAtomVibrationVector
private void setAtomVibrationVector(int atomIndex,
float x,
float y,
float z)
setAtomCoord
public void setAtomCoord(int atomIndex,
float x,
float y,
float z)
setAtomCoordRelative
public void setAtomCoordRelative(int atomIndex,
float x,
float y,
float z)
setAtomCoordRelative
protected void setAtomCoordRelative(BitSet bs,
float x,
float y,
float z)
setAtomProperty
public void setAtomProperty(BitSet bs,
int tok,
int iValue,
float fValue,
String sValue,
float[] values,
String[] list)
setElement
protected void setElement(Atom atom,
int atomicNumber)
getVibrationCoord
public float getVibrationCoord(int atomIndex,
char c)
getVibrationVector
public Vector3f getVibrationVector(int atomIndex,
boolean forceNew)
setVibrationVector
protected void setVibrationVector(int atomIndex,
float x,
float y,
float z)
setVibrationVector
private void setVibrationVector(int atomIndex,
int tok,
float fValue)
setAtomName
protected void setAtomName(int atomIndex,
String name)
setAtomType
protected void setAtomType(int atomIndex,
String type)
setAtomNumber
protected boolean setAtomNumber(int atomIndex,
int atomno)
setOccupancy
protected boolean setOccupancy(int atomIndex,
int occupancy)
setPartialCharge
protected boolean setPartialCharge(int atomIndex,
float partialCharge)
setIonicRadius
protected boolean setIonicRadius(int atomIndex,
float radius)
setBFactor
protected boolean setBFactor(int atomIndex,
float bfactor)
setEllipsoid
protected void setEllipsoid(int atomIndex,
Object[] ellipsoid)
setAtomData
public void setAtomData(int type,
String name,
String dataString,
boolean isDefault)
loadCoordinates
private void loadCoordinates(String data,
boolean isVibrationVectors,
boolean doTaint)
setPreserveState
public void setPreserveState(boolean TF)
getUserSettableType
public static int getUserSettableType(String dataType)
isTainted
private boolean isTainted(int atomIndex,
byte type)
getTaintedAtoms
public BitSet getTaintedAtoms(byte type)
taint
public void taint(BitSet bsAtoms,
byte type)
taint
protected void taint(int atomIndex,
byte type)
untaint
private void untaint(int atomIndex,
byte type)
setTaintedAtoms
public void setTaintedAtoms(BitSet bs,
byte type)
unTaintAtoms
public void unTaintAtoms(BitSet bs,
byte type)
getAtomicPropertyState
public String getAtomicPropertyState(int taintWhat,
BitSet bsSelected)
getAtomicPropertyState
public void getAtomicPropertyState(StringBuffer commands,
byte type,
BitSet bs,
String label,
float[] fData)
findNearestAtomIndex
protected void findNearestAtomIndex(int x,
int y,
Atom[] closest,
BitSet bsNot)
isCursorOnTopOf
boolean isCursorOnTopOf(Atom contender,
int x,
int y,
int radius,
Atom champion)
- used by Frame and AminoMonomer and NucleicMonomer -- does NOT check for clickability
- Parameters:
contender
- x
- y
- radius
- champion
-
- Returns:
- true if user is pointing to this atom
findAtomsInRectangle
public BitSet findAtomsInRectangle(Rectangle rect,
BitSet bsModels)
fillAtomData
protected void fillAtomData(AtomData atomData,
int mode)
calculateHydrogens
public Point3f[][] calculateHydrogens(BitSet bs,
int[] nTotal,
boolean doAll,
boolean justCarbon,
List vConnect)
- get a list of potential H atom positions based on
elemental valence and formal charge
- Parameters:
bs
- nTotal
- doAll
- -- whether we add to C that already have H or not.justCarbon
- vConnect
-
- Returns:
- array of arrays of points added to specific atoms
getHybridizationAndAxes
public String getHybridizationAndAxes(int atomIndex,
Vector3f z,
Vector3f x,
String lcaoTypeRaw,
boolean hybridizationCompatible,
boolean doAlignZ)
getHybridizationAndAxesD
private String getHybridizationAndAxesD(int atomIndex,
Vector3f z,
Vector3f x,
String lcaoType)
- dsp3 (trigonal bipyramidal, see-saw, T-shaped)
or d2sp3 (square planar, square pyramidal, octahedral)
- Parameters:
atomIndex
- z
- x
- lcaoType
-
- Returns:
- valid hybridization or null
getAttached
private Atom[] getAttached(Atom atom,
int nMax,
boolean doSort)
findNotAttached
private BitSet findNotAttached(int nAttached,
int[][] angles,
int[] ptrs,
int nPtrs)
getChimeInfo
protected String getChimeInfo(int tok,
BitSet bs)
getAtomBits
protected BitSet getAtomBits(int tokType,
Object specInfo)
- general unqualified lookup of atom set type
- Parameters:
tokType
- specInfo
-
- Returns:
- BitSet; or null if we mess up the type
getIdentifierOrNull
private BitSet getIdentifierOrNull(String identifier)
- overhauled by RMH Nov 1, 2006.
- Parameters:
identifier
-
- Returns:
- null or bs
getSpecName
private BitSet getSpecName(String name)
getSpecNameOrNull
private BitSet getSpecNameOrNull(String name,
boolean checkStar)
isAtomNameMatch
private boolean isAtomNameMatch(Atom atom,
String strPattern,
boolean checkStar)
getSeqcodeBits
protected BitSet getSeqcodeBits(int seqcode,
boolean returnEmpty)
getChainBits
protected BitSet getChainBits(char chainId)
getAtomIndices
public int[] getAtomIndices(BitSet bs)
getAtomsWithin
public BitSet getAtomsWithin(float distance,
Point4f plane)
getVisibleSet
public BitSet getVisibleSet()
getClickableSet
public BitSet getClickableSet()
deleteModelAtoms
protected void deleteModelAtoms(int firstAtomIndex,
int nAtoms,
BitSet bs)