|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.proteinshader.structure.Residue
public abstract class Residue
This abstract class serves as a container for one or more Atoms.
The known subclasses are AminoAcid, Heterogen, and Water, but a
Nucleotide subclass will be added at some future date (beyond the
scope of this thesis).
Constructor Summary | |
---|---|
Residue(String residueID,
String chainID,
String modelID,
String structureID)
Constructor for use by subclasses. |
Method Summary | |
---|---|
abstract void |
accept(Visitor visitor)
Accepts a Visitor and does a callback. |
Atom |
addNewAtom(int serialNo,
AtomEnum type,
String atomID,
double temperature,
int charge,
double occupancy,
String altLocation,
double x,
double y,
double z,
VisibilityEnum visibility)
Creates a new Atom with the type and Atom ID given as arguments, adds the Atom to the Residue's collection of Atoms, and returns a reference to the new Atom. |
Atom |
getAtom(String atomID)
Returns the Atom with the atomID given as an argument, or returns null if the Atom is not found. |
String |
getChainID()
Returns the ID of the Chain that this Residue belongs to. |
String |
getModelID()
Returns the ID of the Model that this Residue belongs to. |
String |
getResidueID()
Returns the ID of this Residue. |
String |
getStructureID()
Returns the ID of the Structure that this Residue belongs to. |
Iterator<Atom> |
iteratorAtoms()
Returns an Iterator for the Atoms held by this Residue. |
int |
numberOfAtoms()
Returns the number of Atoms held by this Residue. |
String |
processID(String id,
String typeOfID)
Returns the ID after trimming any leading or trailing whitespace. |
String |
toString()
Returns the ID of this Residue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Residue(String residueID, String chainID, String modelID, String structureID) throws InvalidIDException
residueID
- the ID of the Residue.chainID
- the ID of the Chain.modelID
- the ID of the Model.structureID
- the ID of the Structure.
InvalidIDException
- if residueID is null or does not have
at least one non-whitespace character.Method Detail |
---|
public abstract void accept(Visitor visitor) throws VisitorException
accept
in interface Visitable
visitor
- the Visitor to do a callback with.
VisitorException
- if an error occurs while an object is
being visited.public String getResidueID()
public String getChainID()
public String getModelID()
public String getStructureID()
public Atom addNewAtom(int serialNo, AtomEnum type, String atomID, double temperature, int charge, double occupancy, String altLocation, double x, double y, double z, VisibilityEnum visibility) throws MissingAtomTypeException, InvalidIDException
serialNo
- the Atom serial number.type
- the Atom type as an AtomEnum.atomID
- the ID of the Atom.temperature
- x-ray crystallography the temperature factor.charge
- optional measure of electric charge on the atom.occupancy
- less than 1.0 if atom has more than one location.altLocation
- alternate location if occupancy less than 1.x
- coordinate of the Drawable's center.y
- coordinate of the Drawable's center.z
- coordinate of the Drawable's center.visibility
- visibility status (OPAQUE, TRANSLUCENT,
or INVISIBLE).
MissingAtomTypeException
- if type is null.
InvalidIDException
- if atomID is null or does not have at
least one non-whitespace character.public Atom getAtom(String atomID)
atomID
- the unique ID for the desired Atom.
public Iterator<Atom> iteratorAtoms()
public int numberOfAtoms()
public String processID(String id, String typeOfID) throws InvalidIDException
processID
in interface IDTest
id
- the ID to process.typeOfID
- the type of ID (for possible inclusion in error
message).
InvalidIDException
- if the trimmed ID does not have at
least one character.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |