|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.structure.Calc
public class Calc
utility operations on Atoms, AminoAcids, etc.
Currently the coordinates of an Atom are stored as an array of size 3 (double[3]). It would be more powerful to use Point3D from javax.vecmath. but unfortunately this is not a part of standard java installations, since it comes with java3d . So to keep things simple at the moment biojava does not depend on java3d.
Field Summary | |
---|---|
static float |
degreesPerRadian
|
static float |
radiansPerDegree
|
Constructor Summary | |
---|---|
Calc()
|
Method Summary | |
---|---|
static Atom |
add(Atom a,
Atom b)
add two atoms ( a + b). |
static double |
amount(Atom a)
amount. |
static double |
angle(Atom a,
Atom b)
angle. |
static Atom[] |
centerAtoms(Atom[] atomSet)
center the atoms at the Centroid |
static Atom |
createVirtualCBAtom(AminoAcid amino)
creates a virtual C-beta atom. |
static Atom |
getCenterVector(Atom[] atomSet)
|
static Atom |
getCentroid(Atom[] atomSet)
returns the center of mass of the set of atoms |
static double |
getDistance(Atom a,
Atom b)
calculate distance between two atoms. |
static double |
getPhi(AminoAcid a,
AminoAcid b)
phi angle. |
static double |
getPsi(AminoAcid a,
AminoAcid b)
psi angle. |
static double[] |
getXYZEuler(Matrix m)
Convert a rotation Matrix to Euler angles. |
static double[] |
getZYZEuler(Matrix m)
get euler angles for a matrix given in ZYZ convention. |
static boolean |
isConnected(AminoAcid a,
AminoAcid b)
test if two amino acids are connected, i.e. |
static Matrix |
matrixFromEuler(double heading,
double attitude,
double bank)
this conversion uses NASA standard aeroplane conventions as described on page: http://www.euclideanspace.com/maths/geometry/rotations/euler/index.htm Coordinate System: right hand Positive angle: right hand Order of euler angles: heading first, then attitude, then bank matrix row column ordering: [m00 m01 m02] [m10 m11 m12] [m20 m21 m22] |
static void |
plus(Structure s,
Matrix matrix)
calculate structure + Matrix coodinates ... |
static void |
rotate(Atom atom,
double[][] m)
rotate a single atom aroud a rotation matrix. |
static void |
rotate(Atom atom,
Matrix m)
rotate an atom around a Matrix object |
static void |
rotate(Group group,
double[][] rotationmatrix)
rotate a structure . |
static void |
rotate(Group group,
Matrix m)
rotate a group object |
static void |
rotate(Structure structure,
double[][] rotationmatrix)
rotate a structure . |
static void |
rotate(Structure structure,
Matrix m)
rotate a structure object |
static void |
shift(Atom a,
Atom b)
shift a vector |
static void |
shift(Group group,
Atom a)
shift a Group with a vector. |
static void |
shift(Structure structure,
Atom a)
shift a structure with a vector. |
static double |
skalarProduct(Atom a,
Atom b)
skalar product. |
static Atom |
substract(Atom a,
Atom b)
substract two atoms ( a - b). |
static double |
torsionAngle(Atom a,
Atom b,
Atom c,
Atom d)
torsion angle = angle between the normal vectors of the two plains a-b-c and b-c-d. |
static Atom |
unitVector(Atom a)
return the unit vector of vector a . |
static Atom |
vectorProduct(Atom a,
Atom b)
Vector product . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final float radiansPerDegree
public static final float degreesPerRadian
Constructor Detail |
---|
public Calc()
Method Detail |
---|
public static double getDistance(Atom a, Atom b) throws StructureException
a
- an Atom objectb
- an Atom object
StructureException
- ...public static Atom add(Atom a, Atom b)
a
- an Atom objectb
- an Atom object
public static Atom substract(Atom a, Atom b) throws StructureException
a
- an Atom objectb
- an Atom object
StructureException
- ...public static Atom vectorProduct(Atom a, Atom b)
a
- an Atom objectb
- an Atom object
public static double skalarProduct(Atom a, Atom b)
a
- an Atom objectb
- an Atom object
public static double amount(Atom a)
a
- an Atom object
public static double angle(Atom a, Atom b)
a
- an Atom objectb
- an Atom object
public static Atom unitVector(Atom a)
a
- an Atom object
public static double torsionAngle(Atom a, Atom b, Atom c, Atom d) throws StructureException
a
- an Atom objectb
- an Atom objectc
- an Atom objectd
- an Atom object
StructureException
- ...public static double getPhi(AminoAcid a, AminoAcid b) throws StructureException
a
- an AminoAcid objectb
- an AminoAcid object
StructureException
- ...public static double getPsi(AminoAcid a, AminoAcid b) throws StructureException
a
- an AminoAcid objectb
- an AminoAcid object
StructureException
- ...public static boolean isConnected(AminoAcid a, AminoAcid b) throws StructureException
a
- an AminoAcid objectb
- an AminoAcid object
StructureException
- ...public static void rotate(Atom atom, double[][] m)
atom
- m
- public static void rotate(Structure structure, double[][] rotationmatrix) throws StructureException
structure
- a Structure objectrotationmatrix
- an array (3x3) of double representing the rotation matrix.
StructureException
- ...public static void rotate(Group group, double[][] rotationmatrix) throws StructureException
group
- a group objectrotationmatrix
- an array (3x3) of double representing the rotation matrix.
StructureException
- ...public static void rotate(Atom atom, Matrix m)
atom
- m
- public static void rotate(Group group, Matrix m)
group
- a group to be rotatedm
- a Matrix object representing the translation matrixpublic static void rotate(Structure structure, Matrix m)
structure
- m
- public static void plus(Structure s, Matrix matrix)
s
- matrix
- public static void shift(Structure structure, Atom a)
structure
- a Structure objecta
- an Atom object representing a shift vectorpublic static void shift(Atom a, Atom b)
a
- vector ab
- vector bpublic static void shift(Group group, Atom a)
group
- a group objecta
- an Atom object representing a shift vectorpublic static Atom getCentroid(Atom[] atomSet)
atomSet
- a set of Atoms
public static Atom getCenterVector(Atom[] atomSet)
public static Atom[] centerAtoms(Atom[] atomSet) throws StructureException
atomSet
- a set of Atoms
StructureException
public static Atom createVirtualCBAtom(AminoAcid amino) throws StructureException
amino
-
StructureException
public static double[] getZYZEuler(Matrix m)
m
-
public static double[] getXYZEuler(Matrix m)
m
- the rotation matrix
public static Matrix matrixFromEuler(double heading, double attitude, double bank)
heading
- in radiansattitude
- in radiansbank
- in radians
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |