|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.strbio.mol.Atom
public class Atom
Class to represent an atom. Besides the things already here, the following things might be useful for some people:
Version 1.12, 2/16/99 - changed writePDB to take a null protein name. Version 1.11, 8/7/98 - changed PrintfStream to Printf Version 1.1, 4/14/98 - added type, occupancy, tempFactor fields. Changed ali to altLoc, to conform to PDB recommendation. Version 1.0, 3/31/98 - original version
AtomNode
,
Molecule
,
Residue
,
Protein
Field Summary | |
---|---|
char |
altLoc
Here's where you store the Alternate Location Indicator character, which is right after the name in the PDB. |
DVector |
coord
Atomic coordinates. |
int |
n
Atom serial number. |
java.lang.String |
name
Name of the atom (as used in the PDB)... i.e. |
double |
occupancy
Occupancy in a structure. |
double |
tempFactor
Temperature (B) factor. |
Constructor Summary | |
---|---|
Atom()
Constructor makes ALI ' ' and coord and name null. |
|
Atom(Atom q)
copies another atom, making its own copy of the data |
Method Summary | |
---|---|
static double |
bondAngle(Atom a,
Atom b,
Atom c)
returns the bond angle in radians between three atoms, or Double.NaN if the coordinates of any are unknown. |
static double |
dihedralAngle(Atom a,
Atom b,
Atom c,
Atom d)
returns the dihedral angle in radians between four atoms, or Double.NaN if the coordinates of any are unknown. |
static double |
distance(Atom a,
Atom b)
returns the distance between two atoms, or Double.NaN if the coordinates of either are unknown. |
static void |
find4(Atom a,
Atom b,
Atom c,
Atom d,
double r,
double theta,
double phi)
relocate an atom (D) , given three nearby atoms (A, B, and C) with known location, a bond length CD, bond angle BCD, and dihedral angle ABCD. |
void |
find4(Atom a,
Atom b,
Atom c,
double r,
double theta,
double phi)
relocate this atom (D) , given three nearby atoms (A, B, and C) with known location, a bond length CD, bond angle BCD, and dihedral angle ABCD. |
void |
readPDB(java.lang.String buffer)
Read an atom out of a PDB file. |
void |
rotate(DMatrix rot)
rotate an atom by multiplying by a 3x3 rotation matrix. |
void |
transform(DMatrix trans)
transform the position of an atom using a 3x4 (or 4x4 with the last column constant) transformation matrix. |
void |
translate(DVector trans)
translate an atom by adding a DVector(3) to its coordinates. |
void |
writePDB(Printf outfile,
java.lang.String protname,
char chainid,
java.lang.String restype,
int resnum)
Write the atom to a file in PDB format. |
double |
x()
returns the first coordinate, or Double.NaN if unknown |
double |
y()
returns the second coordinate, or Double.NaN if unknown |
double |
z()
returns the third coordinate, or Double.NaN if unknown |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String name
public char altLoc
public int n
public DVector coord
public double occupancy
public double tempFactor
Constructor Detail |
---|
public Atom()
public Atom(Atom q)
Method Detail |
---|
public final double x()
public final double y()
public final double z()
public static final double distance(Atom a, Atom b)
public static final double bondAngle(Atom a, Atom b, Atom c)
public static final double dihedralAngle(Atom a, Atom b, Atom c, Atom d)
public final void find4(Atom a, Atom b, Atom c, double r, double theta, double phi)
a
- first atom (A)b
- second atom (B)c
- third atom (C)r
- bond length CD, in Angstromstheta
- bond angle BCD, in radiansphi
- dihedral angle ABCD, in radianspublic static final void find4(Atom a, Atom b, Atom c, Atom d, double r, double theta, double phi)
a
- first atom (A)b
- second atom (B)c
- third atom (C)d
- fourth atom (D)r
- bond length CD, in Angstromstheta
- bond angle BCD, in radiansphi
- dihedral angle ABCD, in radianspublic final void translate(DVector trans)
public final void rotate(DMatrix rot)
public final void transform(DMatrix trans)
public final void writePDB(Printf outfile, java.lang.String protname, char chainid, java.lang.String restype, int resnum) throws java.io.IOException
outfile
- an open Printfprotname
- the name of the protein or moleculechainid
- the Chain ID character, or space if nonerestype
- the 3-letter code for the residue/base it's part of
java.lang.IllegalArgumentException
- if the coordinates are unknown
java.io.IOException
public final void readPDB(java.lang.String buffer)
buffer
- the ATOM line from the PDB file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |