|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbelka.mol.Molecule
public abstract class Molecule
Abstract class describing behavior of a molecule. Molecule can be as simple as single chemical compaund and as complex as protein bound to a DNA with surrounding water.
Field Summary | |
---|---|
protected double[][] |
rot_
|
protected double |
scale_
|
protected double[] |
trans_
|
Constructor Summary | |
---|---|
Molecule()
|
Method Summary | |
---|---|
abstract boolean |
addAfter(Molecule newMol)
Adds a molecule after the current one. |
abstract boolean |
addBefore(Molecule newMol)
Adds a molecule before the current one. |
abstract boolean |
addChain(Chain chain)
Adds a chain to the end of chain list for the current molecule. |
void |
addTransformation(int angle_x,
int angle_y,
int angle_z,
double shift_x,
double shift_y,
double shift_z)
Adds transformation (rotation and translation) to the current transformation. |
abstract Chain |
chainList()
Returns list of chains. |
abstract int |
countAssemblies()
Returns number of assemblies in the molecule. |
abstract int |
countAtoms()
Returns number of atoms in the molecule. |
abstract int |
countChains()
Returns number of chains in the molecule. |
abstract int |
countModels()
Returns number of different NMR models in the molecule. |
static Molecule |
create(String name)
Static method to create a new molecule. |
static Molecule |
create(String name,
String pdbCode)
Static method to create a new molecule. |
abstract void |
disassemble()
Disassembles molecule into null pointers to help garbage collector to free memory. |
abstract Molecule |
extractAfter()
Extracts the molecule following the current one from the list. |
abstract Molecule |
extractBefore()
Extracts the molecule preceeding the current one from the list. |
abstract String |
getName()
Returns molecule's name. |
abstract String |
getPDBCode()
Returns molecule's PDB-code. |
double[][] |
getRotation()
Returns current rotation matrix. |
double |
getScale()
Returns current scale. |
double[] |
getTranslation()
Returns current translation vector. |
boolean |
isFrozen()
Returns status of freezing. |
abstract Molecule |
next()
Returns next molecule in list. |
abstract Molecule |
prev()
Returns previous molecule in list. |
abstract boolean |
rotate(double[][] rot,
double[] trans)
The function transforms a molecule. |
abstract void |
selectAllAtoms(boolean val)
Select or deselect all atoms in a molecule. |
void |
setFrozen(boolean val)
Freez or unfreez the object. |
void |
setScale(double scale)
Sets scale to use. |
void |
setTransformation(double[][] rot,
double[] trans)
Sets transforamtion (rotation and translation) for the object. |
String |
toString()
Returns string representation of the molecule. |
void |
transform()
Performs transformation of the object using current values for transformation. |
void |
transformSize()
Performs transformation of object size and coordinates using current scale. |
void |
transformXY()
Performs transformation of X- and Y-coordinates of the object using current values for transformation. |
void |
transformYZ()
Performs transformation of Y- and Z-coordinates of the object using current values for transformation. |
void |
transformZX()
Performs transformation of Z- and X-coordinates of the object using current values for transformation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected double[][] rot_
protected double[] trans_
protected double scale_
Constructor Detail |
---|
public Molecule()
Method Detail |
---|
public static Molecule create(String name, String pdbCode)
name
- molecule's name.pdbCode
- molecule's PDB-code.
public static Molecule create(String name)
name
- molecule's name.
public abstract void disassemble()
public abstract Molecule next()
public abstract Molecule prev()
public abstract boolean addAfter(Molecule newMol)
newMol
- molecule to add.
public abstract boolean addBefore(Molecule newMol)
newMol
- molecule to add.
public abstract Molecule extractAfter()
public abstract Molecule extractBefore()
public abstract Chain chainList()
public abstract boolean addChain(Chain chain)
chain
- chain to add.
public abstract String getName()
public abstract String getPDBCode()
public abstract int countChains()
public abstract int countAssemblies()
public abstract int countAtoms()
public abstract int countModels()
public abstract void selectAllAtoms(boolean val)
val
- if true -- select all atoms, if false -- deselect.public abstract boolean rotate(double[][] rot, double[] trans)
rot
- rotation matrix.trans
- translation vector.
public String toString()
toString
in class Object
public double[][] getRotation()
public double[] getTranslation()
public double getScale()
public boolean isFrozen()
public void setFrozen(boolean val)
addTransformation(int, int, int, double, double, double)
but scaling and setting
transfromation work as usuall: transformSize()
and
setTransformation(double[][], double[])
.
public void setTransformation(double[][] rot, double[] trans)
transform()
is called.
rot
- rotation matrix.trans
- translation vector.public void addTransformation(int angle_x, int angle_y, int angle_z, double shift_x, double shift_y, double shift_z)
transformXY()
,
transformYZ()
, transformZX()
, transform()
.
angle_x
- anlge of rotation around X-axis.angle_y
- anlge of rotation around Y-axis.angle_z
- anlge of rotation around Z-axis.shift_x
- shift long X-axis.shift_y
- shift long Y-axis.shift_z
- shift long Z-axis.public void setScale(double scale)
transformSize()
is called.
public void transform()
public void transformXY()
public void transformYZ()
public void transformZX()
public void transformSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |