org.jscience.chemistry.gui.extended.molecule
Class Ring

java.lang.Object
  extended by org.jscience.chemistry.gui.extended.molecule.Ring

public class Ring
extends java.lang.Object

Tripos base Ring class


Field Summary
protected  int[] atoms
          Ids of the atoms in the ring *
protected  int id
          Ring id
protected  int numAtoms
          Number of atoms in ring *
protected  float tx
          Transformed ring centroid *
protected  float ty
          Transformed ring centroid *
protected  float tz
          Transformed ring centroid *
protected  float x
          Ring centroid *
protected  float y
          Ring centroid *
protected  float z
          Ring centroid *
 
Constructor Summary
Ring()
          Default constructor
Ring(float x, float y, float z)
          Real coordinates constructor
Ring(float x, float y, float z, float tx, float ty, float tz)
          Real and transformed coordinates constructor
Ring(int id, float x, float y, float z, float tx, float ty, float tz, int numAtoms, int[] atoms)
          Full constructor
Ring(Ring ring)
          Copy constructor
 
Method Summary
 boolean contains(Atom a)
          Return true if an atom is in this ring
 int getId()
          Return ring id
 int getNumAtoms()
          Return number of atoms in the ring
 float getTx()
          Return transformed ring centroid X coordinate
 float getTy()
          Return transformed ring centroid Y coordinate
 float getTz()
          Return transformed ring centroid Z coordinate
 float getX()
          Return ring centroid X coordinate
 float getY()
          Return ring centroid Y coordinate
 float getZ()
          Return ring centroid Z coordinate
protected  void setCentroid(float x, float y, float z)
          Set the centroid of the ring
 void setId(int id)
          Set ring id
 void setTx(float x)
          Set transformed ring centroid X coordinate
 void setTy(float y)
          Set transformed ring centroid Y coordinate
 void setTz(float z)
          Set transformed ring centroid Z coordinate
 void setX(float x)
          Set ring centroid X coordinate
 void setY(float y)
          Set ring centroid Y coordinate
 void setZ(float z)
          Set ring centroid Z coordinate
protected  void transform(Matrix3D m)
          Transforms center point coordinates
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected int id
Ring id


x

protected float x
Ring centroid *


y

protected float y
Ring centroid *


z

protected float z
Ring centroid *


tx

protected float tx
Transformed ring centroid *


ty

protected float ty
Transformed ring centroid *


tz

protected float tz
Transformed ring centroid *


numAtoms

protected int numAtoms
Number of atoms in ring *


atoms

protected int[] atoms
Ids of the atoms in the ring *

Constructor Detail

Ring

public Ring(int id,
            float x,
            float y,
            float z,
            float tx,
            float ty,
            float tz,
            int numAtoms,
            int[] atoms)
Full constructor

Parameters:
id - ring id (1 based)
x - x coord of centroid
y - y coord of centroid
z - z coord of centroid
tx - tx coord of centroid
ty - ty coord of centroid
tz - tz coord of centroid
numAtoms - number of atoms in the ring
atoms - ids of the atoms in the ring

Ring

public Ring()
Default constructor


Ring

public Ring(float x,
            float y,
            float z)
Real coordinates constructor

Parameters:
x - x coord of centroid
y - y coord of centroid
z - z coord of centroid

Ring

public Ring(float x,
            float y,
            float z,
            float tx,
            float ty,
            float tz)
Real and transformed coordinates constructor

Parameters:
x - x coord of centroid
y - y coord of centroid
z - z coord of centroid
tx - tx coord of centroid
ty - ty coord of centroid
tz - tz coord of centroid

Ring

public Ring(Ring ring)
Copy constructor

Parameters:
ring - ring to be copied
Method Detail

setCentroid

protected void setCentroid(float x,
                           float y,
                           float z)
Set the centroid of the ring

Parameters:
x - x coordinate of the centroid
y - y coordinate of the centroid
z - z coordinate of the centroid

transform

protected void transform(Matrix3D m)
Transforms center point coordinates

Parameters:
m - the trnasformation matrix to be applied

getId

public int getId()
Return ring id


getNumAtoms

public int getNumAtoms()
Return number of atoms in the ring


getX

public float getX()
Return ring centroid X coordinate


getY

public float getY()
Return ring centroid Y coordinate


getZ

public float getZ()
Return ring centroid Z coordinate


getTx

public float getTx()
Return transformed ring centroid X coordinate


getTy

public float getTy()
Return transformed ring centroid Y coordinate


getTz

public float getTz()
Return transformed ring centroid Z coordinate


contains

public boolean contains(Atom a)
Return true if an atom is in this ring

Parameters:
atom - the atom

setId

public void setId(int id)
Set ring id


setX

public void setX(float x)
Set ring centroid X coordinate


setY

public void setY(float y)
Set ring centroid Y coordinate


setZ

public void setZ(float z)
Set ring centroid Z coordinate


setTx

public void setTx(float x)
Set transformed ring centroid X coordinate


setTy

public void setTy(float y)
Set transformed ring centroid Y coordinate


setTz

public void setTz(float z)
Set transformed ring centroid Z coordinate