RdcPanda
Class sp3Carbon

java.lang.Object
  extended by RdcPanda.sp3Carbon

public class sp3Carbon
extends java.lang.Object

represeting the tetrahedral of the sp3 Carbon configuration IN order to compute the coordinates we need only to know the coordinates of the top atom then using the information provided by the sp3Carbon object we should be able to compute all the coordinates of other atoms. atomOfChi | | Top | | center / | \ / | \ / | \ vertex1 vertex2 vertex3 The angles are defined as shown in the above figure. Written by Lincong Wang (2001-2005).


Constructor Summary
sp3Carbon()
          Instantiates a new sp3 carbon.
sp3Carbon(double[] anglesAndLen, boolean ter)
          The Constructor.
sp3Carbon(double[] atomOfChi, double[] top, double[] center, double[] vertex1, double[] vertex2, double[] vertex3, boolean ter)
          Instantiates a new sp3 carbon.
sp3Carbon(double theta1a, double theta2a, double theta3a, double chia, double theta2da, double theta3da, double d1a, double d2a, double d3a, boolean ter)
          Instantiates a new sp3 carbon.
 
Method Summary
 double[] addCoords(double[] n1, double[] n2)
          Add two coordinates.
 double[] anglesAndLenOfSp3(double[] atomOfChi, double[] top, double[] center, double[] vertex1, double[] vertex2, double[] vertex3)
          Compute the side-chain angles as represented by SP3 object from the coordinates of 4 atoms.
 double[] getAll()
          Gets the all.
 boolean isTerminal()
          Checks if is terminal.
 void printArray(double[] n1)
          Prints the array.
 Matrix[] tetrahedral(double[] center, Matrix mat, sp3Carbon atomC)
          Compute the coordinates of sp3 atoms from a sp3Carbon object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

sp3Carbon

public sp3Carbon()
Instantiates a new sp3 carbon.


sp3Carbon

public sp3Carbon(double theta1a,
                 double theta2a,
                 double theta3a,
                 double chia,
                 double theta2da,
                 double theta3da,
                 double d1a,
                 double d2a,
                 double d3a,
                 boolean ter)
Instantiates a new sp3 carbon.

Parameters:
theta1a - the theta1a
theta2a - the theta2a
theta3a - the theta3a
chia - the chia
theta2da - the theta2da
theta3da - the theta3da
d1a - the d1a
d2a - the d2a
d3a - the d3a
ter - the ter

sp3Carbon

public sp3Carbon(double[] anglesAndLen,
                 boolean ter)
The Constructor.

Parameters:
anglesAndLen - has all the data for specifying a sp3Carbon object except whether it is a termial one
ter - the ter

sp3Carbon

public sp3Carbon(double[] atomOfChi,
                 double[] top,
                 double[] center,
                 double[] vertex1,
                 double[] vertex2,
                 double[] vertex3,
                 boolean ter)
Instantiates a new sp3 carbon.

Parameters:
atomOfChi - the atom of chi
top - the top
center - the center
vertex1 - the vertex1
vertex2 - the vertex2
vertex3 - the vertex3
ter - the ter
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isTerminal

public boolean isTerminal()
Checks if is terminal.

Returns:
true, if is terminal

getAll

public double[] getAll()
Gets the all.

Returns:
the all

addCoords

public double[] addCoords(double[] n1,
                          double[] n2)
Add two coordinates.

Parameters:
n1 - the coordinate for the nucleus of the atom 1
n2 - the coordinate for the nucleus of the atom 2
Returns:
a vector from n1->n2

printArray

public void printArray(double[] n1)
Prints the array.

Parameters:
n1 - the n1

tetrahedral

public Matrix[] tetrahedral(double[] center,
                            Matrix mat,
                            sp3Carbon atomC)
Compute the coordinates of sp3 atoms from a sp3Carbon object. The program may have bugs if there exists gap in the sequence. We want to compute all the relavant angles. Six plus angles for HA and CO, CACB vectors The rotation is specifed as: rotate along +y to the plane as specified by CH1 angle then rotate along +x to the vector from the center to one of the bottom atom. at this stage the +y axis is on this vector

Parameters:
mat - the Matrix to the center ("top") of the tetrahedral, that is: a matrix specifying the plane defined by the three atoms (atomOfChi, top, center) with the top-->center vector on the +y axis and z-axis also in the plane, This is also the first plane defining the Chi angle
center - coordinate of the center, really the top atom (vertice) of tetrahedral.
atomC - the carbon atom of SP3 class with all the informs about bond angles
Returns:
an array of Matrix in the order The coordinates for the 3 bottom atoms. and if it is not a terminal atom the method also return The rotation matrix to the plane specfied by (top, center, vertex1) with vector (center->vectex1) in +y-axis and z-axis in the plane (x-axis perpendicular to it) The similar rotation matrix to the vector center->vectex2 (+y-axis) The similar rotation matrix to the vector center->vectex3 (+y-axis)

anglesAndLenOfSp3

public double[] anglesAndLenOfSp3(double[] atomOfChi,
                                  double[] top,
                                  double[] center,
                                  double[] vertex1,
                                  double[] vertex2,
                                  double[] vertex3)
Compute the side-chain angles as represented by SP3 object from the coordinates of 4 atoms. The Chi di-angle is specified by atomOfChi, top, center and vertex1. The structure is as shown atomOfChi | | Top | | center / | \ / | \ / | \ vertex1 vertex2 vertex3

Parameters:
atomOfChi - the coord for the atom leading to the top, needed for computing Chi di-angle
top - the coord for top atom
center - the coord for center of the tetrahedral, really its "top" atom
vertex1 - the coord for 1st bottom atom of the tetrahedral
vertex2 - the coord for 2nd bottom atom of the tetrahedral
vertex3 - the coord for 3rd bottom atom of the tetrahedral
Returns:
an object of sp3Carbon class