

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object org.proteinshader.structure.visitor.Visitor org.proteinshader.structure.visitor.FrenetFrameGeneratorVisitor
public class FrenetFrameGeneratorVisitor
Calculates a discrete Frenet frame for each AminoAcid visited.
In order to represent amino acids as segments of a tube or ribbon in
a "cartoon" like drawing, it is necessary to have a local coordinate
frame for each alphacarbon (the alphacarbon will be considered as
the center of a Segment object). This class will traverse the
AminoAcids of each Chain and calculate a discrete Frenet frame to
assign to each AminoAcid. The Frenet frame will be calculated as
three column vectors: the normal, the binormal, and the tangent.
There three column vectors form the rotation matix [N B T], which
will be converted to a Quaterion object that will be given to the
setRotation() method of each AminoAcid.
ALGORITHM:
The discrete Frenet frame for alphacarbon(i) will be calculated based
on the triangle formed by the vertices alphacarbon(i) and the
previous and next alphacarbons, alphacarbon(i1) and
alphacarbon(i+1), respectively. In the equations below, CA is the
symbol for an alphacarbon.
T = tangent vector = CA(i+1)  CA(i1)
V = nontangent vector = CA(i)  CA(i1)
B = binormal vector = V x T, where 'x' means the crossproduct
N = normal vector = B x T, where 'x' means the crossproduct
The matrix [N B T] forms a righthanded coordinate system (and OpenGL
uses a righthanded coordinate system).
At the beginning of the Chain, there is no CA(i1), so...
Field Summary  

static double 
MAX_CA_DISTANCE
The maximum distance from one alphacarbon to the next alphacarbon in a chain of amino acids should not be greater than 4.5 angstroms. 
Constructor Summary  

FrenetFrameGeneratorVisitor()
Constructs a FrenetFrameGeneratorVisitor. 
Method Summary  

void 
calculateRotation(AminoAcid prev,
AminoAcid cur,
AminoAcid next)
Calculates the equivalent of a discrete Frenet frame (a rotation matrix [N B T]) and uses it to set the rotation attribute of the current AminoAcid. 
Quaternion 
calculateRotation(Atom atom1,
Atom atom2,
Atom atom3)
Calculates a rotation matrix [N B T] based on the xyzcenters of the three Atoms given as arguments, and then converts the rotation matrix into a Quaternion that is returned. 
void 
visit(AminoAcid aminoAcid)
The AminoAcid being visited is considered as CA(i+1), while the last two AminoAcids are considered to be CA(i) and CA(i1). 
void 
visit(Chain chain)
All AminoAcids of the Chain will be visited. 
Methods inherited from class org.proteinshader.structure.visitor.Visitor 

clear, includeAAHetAndWater, setDebug, setMode, setMode, setMode, setMode, setMode, setMode, setVisitSegments, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit 
Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Field Detail 

public static final double MAX_CA_DISTANCE
Constructor Detail 

public FrenetFrameGeneratorVisitor()
Method Detail 

public void visit(Chain chain) throws VisitorException
visit
in class Visitor
chain
 the Chain to generate Loops for.
VisitorException
 if an error occurs while visiting.public void visit(AminoAcid aminoAcid) throws VisitorException
visit
in class Visitor
aminoAcid
 the next AminoAcid in the Chain.
VisitorException
 if an error occurs while visiting.public void calculateRotation(AminoAcid prev, AminoAcid cur, AminoAcid next)
prev
 alphacarbon(i1)cur
 alphacarbon(i)next
 alphacarbon(i+1)public Quaternion calculateRotation(Atom atom1, Atom atom2, Atom atom3)
atom1
 the first Atom in a triangle is CA(i1) or N(i).atom2
 the second Atom in a triangle is always CA(i).atom3
 the third Atom in a triangle is CA(i+1) or C(i).


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 