|
JMV 0.74 Programmer's Documentation | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Molecule
Molecule.java class for storing information about a molecule read in from a pdb file
Inner Class Summary | |
class |
Molecule.Atom
inner class Atom for use in Molecule |
Constructor Summary | |
Molecule()
Constructor |
Method Summary | |
void |
addAtom(int serial,
java.lang.String name,
java.lang.String loc,
java.lang.String residue,
java.lang.String chain,
java.lang.String resid,
java.lang.String insertion,
float occ,
float temp,
java.lang.String segmentId,
java.lang.String symbol,
java.lang.String charge)
Adds an Atom to this Molecule |
void |
addAtom(Molecule.Atom newAtom)
Add an Atom to this Molecule |
void |
addNewPosition(int atomIndex,
float[] position)
Adds a new position for a new time index for a specified Atom |
float |
atomRadius(int index)
Gets the radius for a specified Atom |
static float |
atomRadius(java.lang.String atomName)
Gets a radius for an atom based on its name gotten from the pdb. |
void |
calc_minmax()
Calculates the minimum and maximum x, y, and z coordinates Stores the values in m_fMinX, m_fMaxX, m_fMinY, m_fMaxY, m_fMinZ, m_fMaxZ |
void |
createBondList()
Creates the neighbor list, listing the neighbors of each atom for drawing bonds It creates a 2D array, where each element contains an array of integers that correspond to the indeces of its neighbors |
void |
createCAList()
Creates a list of atom indeces that are all the C-Alpha (CA) atoms in the molecule Stores result in m_iaCAList |
Molecule.Atom |
getAtom(int index)
Gets the atom at a specific index |
static char |
getAtomCharacter(java.lang.String name)
Gets a character representing this atom, based on the String name gotten from the pdb. |
int[][] |
getBondList()
Gets the list of bonds between atoms |
float[] |
getCoords()
Gets all the coordinates for each Atom in this Molecule |
float |
getMaxX()
Gets maximum x coordinate for this Molecule |
float |
getMaxY()
Gets maximum y coordinate for this Molecule |
float |
getMaxZ()
Gets maximum z coordinate for this Molecule |
float |
getMinX()
Gets minimum x coordinate for this Molecule |
float |
getMinY()
Gets minimum y coordinate for this Molecule |
float |
getMinZ()
Gets minimum z coordinate for this Molecule |
float[] |
getPosition(int atomIndex,
int timeIndex)
Gets all the coordinates for the Atoms in this Molecule, for all times |
int |
numAtoms()
Returns the number of atoms in the molecule |
void |
print()
Prints information for the Molecule: the serial, name, residue id, and (x,y,z) coordinate for each Atom |
void |
setPositions(java.util.Vector positions)
Sets the coordinates for the Atoms in the Molecule |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Molecule()
Method Detail |
public int numAtoms()
public void addAtom(Molecule.Atom newAtom)
Atom
- the Atom to addpublic Molecule.Atom getAtom(int index)
index
- the index for the atompublic float[] getCoords()
public void addAtom(int serial, java.lang.String name, java.lang.String loc, java.lang.String residue, java.lang.String chain, java.lang.String resid, java.lang.String insertion, float occ, float temp, java.lang.String segmentId, java.lang.String symbol, java.lang.String charge)
serial
- the serial numbername
- the Atom nameloc
- the location of the Atomresidue
- the residue the Atom is inchain
- the chain the Atom is inresid
- the id for the residue the Atom is ininsertion
- the insertion codeocc
- the occupancy of the Atomtemp
- the temperature of the AtomsegmentId
- the id for the segment the Atom is insymbol
- the atomic symbol for the Atomcharge
- the charge of the Atompublic void setPositions(java.util.Vector positions)
positions
- a Vector containing the (x,y,z) coordinates for each
Atom for each time indexpublic float[] getPosition(int atomIndex, int timeIndex)
atomIndex
- the index of the atom in this Molecule's atom vectortimeIndex
- the index of the time position for this atompublic void calc_minmax()
public float getMinX()
public float getMaxX()
public float getMinY()
public float getMaxY()
public float getMinZ()
public float getMaxZ()
public void addNewPosition(int atomIndex, float[] position)
atomIndex
- the index of the Atom to modifyposition
- a float array of the (x,y,z) coordinate to addpublic void print()
public static float atomRadius(java.lang.String atomName)
name
- the name of the atom gotten from the pdb filepublic float atomRadius(int index)
index
- the index of the Atom to get the radius forpublic static char getAtomCharacter(java.lang.String name)
name
- the name of the atom gotten from the pdb filepublic void createBondList()
public int[][] getBondList()
public void createCAList()
|
Copyright (C) 2000-2002 The Board of Trustees of the University of Illinois | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |