|
JMV 0.80 Programmer's Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | 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
Nested 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 and stores it in m_iaBondList |
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 |
findAtomInResidue(java.lang.String name,
int resId)
Gets the atom given its name and residue id |
java.util.Vector |
getAllPositions()
Gets all the coordinates for the Atoms in this Molecule, for all times |
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 for time 0 |
float[] |
getCoords(int time)
Gets all the coordinates for each Atom in this Molecule for a specified timestep |
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)
gets the coordinates of an atom position for time 0 |
float[] |
getPosition(int atomIndex,
int timeIndex)
gets the coordinates of an atom position for a specified time index |
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)
public Molecule.Atom getAtom(int index)
index
- the index for the atom
public float[] getCoords()
public float[] getCoords(int time)
time
- the time position to get the coordinates for
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 java.util.Vector getAllPositions()
public 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 atom
public float[] getPosition(int atomIndex)
atomIndex
- the index of the atom in this Molecule's atom vector
public 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)
public float atomRadius(int index)
index
- the index of the Atom to get the radius for
public static char getAtomCharacter(java.lang.String name)
name
- the name of the atom gotten from the pdb file
public void createBondList()
public int[][] getBondList()
public void createCAList()
public Molecule.Atom findAtomInResidue(java.lang.String name, int resId)
name
- the name of the atom ("O", "CA", etc)resId
- the residue id in which you wish to find the atom
|
Copyright (C) 2000-2002 The Board of Trustees of the University of Illinois | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |