|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.proteinshader.structure.Residue org.proteinshader.structure.AminoAcid
public class AminoAcid
This concrete subclass of the abstract class Residue stores
information on an amino acid in a PDB structure entry.
An AminoAcid object has three caches (LinkedHashMaps) for atoms. A cache that
all Atoms are placed in, a cache for backbone Atoms (N, CA, and C only), and
a cache for side chain Atoms. Side chain Atoms are identified by process of
elimination. If an Atom is not a backbone Atom, a main chain oxygen, or a
main chain hydrogen, then it is included in the side chain cache. Hydrogen
Atoms are tested by both the newer (V3) and older (V2 and earlier)
nomenclatures.
Backbone atoms: N, CA, C
Main chain oxygen: O or OXT
Terminal amino hydrogen:
Names (V3): H1, H2, H3
Names (V2): 1H, 2H, 3H
Non-terminal amino hydrogen:
Names (V3): H, H2
Names (V2): H, HN2
Names (older): HN
Alpha-carbon hydrogen:
Name (V3 and V2): HA
Glycine (V3): HA2
Glycine (V2): 1HA
Note that HA3 (V3 nomenclature) and 2HA (older nomenclature) are considered
to be the glycine side chain (rather than part of the main chain).
Terminal OXT hydrogen:
Name (V3 and older): HXT
Constructor Summary | |
---|---|
AminoAcid(AminoAcidEnum type,
String residueID,
String chainID,
String modelID,
String structureID)
Constructs an AminoAcid with the type and IDs given as arguments. |
Method Summary | |
---|---|
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 |
getC()
Returns the carbon Atom of the carbonyl group if it exists. |
Atom |
getCA()
Returns the alpha carbon Atom if it exists. |
Point3d |
getCenter()
Returns a new Point3d object based on the xyz-coordinates of the alpha-carbon. |
Atom |
getHAor1HA()
Returns the hydrogen Atom on the alpha carbon if it exists. |
Atom |
getHorHN()
Returns the hydrogen Atom on the nitrogen of the amino group. |
Atom |
getN()
Returns the nitrogen Atom of the amino group if it exists. |
Atom |
getO()
Returns the oxygen Atom of the carbonyl group if it exists. |
Atom |
getOXT()
Returns the Chain terminating oxygen if it exists. |
String |
getRegionID()
Returns the regionID if the AminoAcid has been assigned to a Region. |
RegionEnum |
getRegionType()
Returns the region type (LOOP, HELIX, or BETA_STRAND) if the AminoAcid has been assigned to a Region. |
Quaternion |
getRotation()
Returns the rotation (the equivalent of a Frenet Frame) that will be needed for creating a Segment object based on this AminoAcid. |
Vec3d |
getTranslation()
Returns a new Ved3d object based on the xyz-coordinates of the alpha-carbon. |
AminoAcidEnum |
getType()
Returns the type of amino aicd: ALA, ARG, ASN, etc. The type cannot be null because it is checked by the constructor. |
Iterator<Atom> |
iteratorBackboneAtoms()
Returns an Iterator for the backbone Atoms held by this Residue. |
Iterator<Atom> |
iteratorSideChainAtoms()
Returns an Iterator for the side chain Atoms held by this Residue. |
int |
numberOfBackboneAtoms()
Returns the number of Atoms in the backbone (three if no atoms are missing in the structure). |
int |
numberOfSideChainAtoms()
Returns the number of Atoms in the side chain. |
void |
setRegionIDAndType(String regionID,
RegionEnum regionType)
Sets the regionID and the Region type. |
void |
setRotation(double x,
double y,
double z,
double w)
Sets the rotation (the equivalent of a Frenet Frame) that will be needed for creating a Segment object based on this AminoAcid. |
void |
setRotation(Quaternion rotation)
Sets the rotation (the equivalent of a Frenet Frame) that will be needed for creating a Segment object based on this AminoAcid. |
Methods inherited from class org.proteinshader.structure.Residue |
---|
getAtom, getChainID, getModelID, getResidueID, getStructureID, iteratorAtoms, numberOfAtoms, processID, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AminoAcid(AminoAcidEnum type, String residueID, String chainID, String modelID, String structureID) throws MissingAATypeException, InvalidIDException
type
- the type of amino acid as an AminoAcidEnum.residueID
- the ID of the AminoAcid.chainID
- the ID of the Chain.modelID
- the ID of the Model.structureID
- the ID of the Structure.
MissingAATypeException
- if type is null.
InvalidIDException
- if residueID is null or does not have
at least one non-whitespace character.Method Detail |
---|
public void accept(Visitor visitor) throws VisitorException
accept
in interface Visitable
accept
in class Residue
visitor
- the Visitor to do a callback with.
VisitorException
- if an error occurs while an object is
being visited.public AminoAcidEnum getType()
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
addNewAtom
in class Residue
serialNo
- the Atom serial number.type
- the Atom type as an AtomEnum.atomID
- the ID of the Atom.temperature
- the x-ray crystallography temperature factor.charge
- optional measure of an atom's electric charge.occupancy
- less than 1 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 getN()
public Atom getCA()
public Atom getC()
public Atom getO()
public Atom getHAor1HA()
public Atom getHorHN()
public Atom getOXT()
public String getRegionID()
public RegionEnum getRegionType()
public void setRegionIDAndType(String regionID, RegionEnum regionType)
regionID
- will be a loopID, helixID, or a betaStrandID.regionType
- will be LOOP, HELIX, or BETA_STRAND.public Iterator<Atom> iteratorBackboneAtoms()
public Iterator<Atom> iteratorSideChainAtoms()
public int numberOfBackboneAtoms()
public int numberOfSideChainAtoms()
public Point3d getCenter()
public Vec3d getTranslation()
public Quaternion getRotation()
public void setRotation(Quaternion rotation)
rotation
- the rotation as a Quaternion.public void setRotation(double x, double y, double z, double w)
x
- the x-value of the Quaternion.y
- the y-value of the Quaternion.z
- the z-value of the Quaternion.w
- the w-value of the Quaternion.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |