ffe.lang
Class Atom

java.lang.Object
  extended byjavax.swing.tree.DefaultMutableTreeNode
      extended byffe.lang.FNode
          extended byffe.lang.Atom
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode

public final class Atom
extends FNode

The Atom class represents a single atom.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.tree.DefaultMutableTreeNode
 
Field Summary
static java.util.ArrayList atompool
           
static java.util.Hashtable hybridTable
           
 int xyzindex
           
 
Fields inherited from class ffe.lang.FNode
selected
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
Atom(int xyznum, java.lang.String id, MMAtom mmdata, double[] d)
          Constructor used when parsing XYZ files
Atom(int xyznum, java.lang.String id, MMAtom mmdata, double[] d, java.lang.String r, int n, java.lang.String c)
           
Atom(java.lang.String s)
          Constructor
Atom(java.lang.String id, MMAtom mmdata, double[] d)
           
 
Method Summary
 void addTrajectoryCoords(javax.vecmath.Vector3d coords, int position)
           
 void destroy()
           
 void drawLabel(Graphics3D graphics, javax.media.j3d.J3DGraphics2D g2d, javax.media.j3d.Node node, boolean labelAtoms, boolean labelResidues)
           
 boolean equals(java.lang.Object object)
          Overidden equals method
 void getAcceleration(double[] t)
           
 java.util.ArrayList getAngles()
           
 javax.media.j3d.Appearance getAppearance()
           
 int getAtomicNum()
          Gets the Atomic Number
 java.util.List getAtomList()
          Returns an ArrayList of all Atoms below the present FNode.
 java.lang.String getAtomType()
           
 Bond getBond(Atom a)
           
 int getBondCount()
           
 java.util.ArrayList getBonds()
          Gets the list of the Bonds this Atom helps to form
 java.lang.String getChain()
          Get the chain name
 float getCharge()
          Gets the partial atomic charge
 javax.vecmath.Color3f getColor()
           
 java.util.ArrayList getDihedrals()
           
 float getEpsilon()
          Gets the Epsilon value
 void getForce(double[] t)
           
 int getHybridization()
          Gets the Atomic Hybridization
 java.lang.String getID()
          Gets the ID
 java.lang.String getIdent()
          Gets the atom ID
 void getInducedDipole(double[] t)
           
 javax.media.j3d.Group getJ3D()
           
 java.lang.String getKey()
          Gets the atom Key
 double getMagnitude(boolean relative)
           
 float getMass()
          Gets the Atomic Mass
static double getMaxAcceleration()
           
static double getMaxForce()
           
static double getMaxInduced()
           
static double getMaxVelocity()
           
 int getNumAngles()
           
 int getNumBonds()
          Gets the number of atoms bonded to Atom
 int getNumDihedrals()
           
 java.lang.String getResidueName()
          Get the residue name
 int getResidueNumber()
           
 float getSigma()
          Gets the Sigma value
 javax.vecmath.Vector3f getTrajectoryCoords(int position)
           
 int getTrajectoryLength()
           
 void getV3D(javax.vecmath.Vector3d temp)
          Gets the Atom's Cartesian Coordinates return The Cartesian Coordinates
 float getVDWR()
          Gets the van der Waals radius return van der Waals radius
 void getVelocity(double[] t)
           
 double getX()
          Gets the x coordinate
 void getXYZ(double[] xyz)
          Gets the Atom's Cartesian Coordinates return The Cartesian Coordinates
 int getXYZIndex()
          Gets the XYZ Index
 double getY()
          Gets the y coordinate
 double getZ()
          Gets the z coordinate
 boolean initJ3D()
           
 void initVec()
           
 boolean isBonded(Atom a)
          Checks to see if an Atom is bonded to this Atom
 boolean isBondVisible()
           
 boolean isDangeling()
          Gets whether or not the Atom is under-constrained
 boolean isVisible()
           
 void move(double[] d)
          Add a vector to the Atom's current position vector
 void moveto(double[] d)
          Moves the atom to the specified location
 void moveto(double x, double y, double z)
           
 void print()
          Prints the atom identity and Cartesian coordinates to stout
 void reInit(int index, java.lang.String i, MMAtom mmdata, double[] d)
           
 void setAcceleration(double x, double y, double z)
           
 void setAngle(Angle a)
           
 void setBond(Bond b)
          Specify that this Atom is part of a Bond
 void setCurrentCycle(int cycle)
           
 void setDihedral(Dihedral d)
           
 void setForce(double x, double y, double z)
           
 void setInducedDipole(double x, double y, double z)
           
static void setMaxAcceleration(double f)
           
static void setMaxForce(double f)
           
static void setMaxInduced(double f)
           
static void setMaxVelocity(double f)
           
 void setSelected(boolean b)
           
 void setVeclocity(double x, double y, double z)
           
 void setVectorTransform3d(double[] orient, double mag)
           
 void setVisible(boolean v)
           
 void setXYZIndex(int index)
           
 boolean showHydrogen()
           
 void switchColor(int ctype, javax.vecmath.Color3f newCol, javax.media.j3d.Material newMat)
           
 void switchView(int viewtype)
           
 java.lang.String toShortString()
           
 java.lang.String toString()
          Overidden toString method returns the FNode's name
 void update()
          Atomic Positions are not updated unless the atom is visible -> this allows better performance for rendering partial structures during an interactive dynamics run or during trajectory playback.
 void updateTransforms()
           
 
Methods inherited from class ffe.lang.FNode
findCenter, getBondList, getFSystemNode, getList, getListIterator, getMoleculeNode, getMW, getName, getPolymerNode, getResidueNode, getTermList, isSelected, setName
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

xyzindex

public int xyzindex

atompool

public static java.util.ArrayList atompool

hybridTable

public static final java.util.Hashtable hybridTable
Constructor Detail

Atom

public Atom(java.lang.String s)
Constructor


Atom

public Atom(java.lang.String id,
            MMAtom mmdata,
            double[] d)

Atom

public Atom(int xyznum,
            java.lang.String id,
            MMAtom mmdata,
            double[] d)
Constructor used when parsing XYZ files


Atom

public Atom(int xyznum,
            java.lang.String id,
            MMAtom mmdata,
            double[] d,
            java.lang.String r,
            int n,
            java.lang.String c)
Method Detail

addTrajectoryCoords

public final void addTrajectoryCoords(javax.vecmath.Vector3d coords,
                                      int position)

destroy

public final void destroy()
Overrides:
destroy in class FNode

equals

public final boolean equals(java.lang.Object object)
Overidden equals method

Overrides:
equals in class FNode
Parameters:
object - The Object to compare with this
Returns:
True if this atom and object do not reference the same object, are of the same class, and have the same id

getVelocity

public void getVelocity(double[] t)

getAcceleration

public void getAcceleration(double[] t)

getForce

public void getForce(double[] t)

setMaxForce

public static void setMaxForce(double f)

setMaxVelocity

public static void setMaxVelocity(double f)

setMaxAcceleration

public static void setMaxAcceleration(double f)

setMaxInduced

public static void setMaxInduced(double f)

getMaxForce

public static double getMaxForce()

getMaxVelocity

public static double getMaxVelocity()

getMaxAcceleration

public static double getMaxAcceleration()

getMaxInduced

public static double getMaxInduced()

getInducedDipole

public void getInducedDipole(double[] t)

setVeclocity

public void setVeclocity(double x,
                         double y,
                         double z)

setAcceleration

public void setAcceleration(double x,
                            double y,
                            double z)

setForce

public void setForce(double x,
                     double y,
                     double z)

setInducedDipole

public void setInducedDipole(double x,
                             double y,
                             double z)

getAngles

public final java.util.ArrayList getAngles()

getAppearance

public final javax.media.j3d.Appearance getAppearance()

getAtomicNum

public final int getAtomicNum()
Gets the Atomic Number

Returns:
Atomic Number

getAtomList

public final java.util.List getAtomList()
Description copied from class: FNode
Returns an ArrayList of all Atoms below the present FNode.

Overrides:
getAtomList in class FNode

getAtomType

public final java.lang.String getAtomType()

getBond

public final Bond getBond(Atom a)

getBondCount

public final int getBondCount()

getBonds

public final java.util.ArrayList getBonds()
Gets the list of the Bonds this Atom helps to form

Returns:
A list of the bonds this atom helps to form

getCharge

public final float getCharge()
Gets the partial atomic charge

Returns:
partial atomic charge

getColor

public final javax.vecmath.Color3f getColor()

getDihedrals

public final java.util.ArrayList getDihedrals()

getEpsilon

public final float getEpsilon()
Gets the Epsilon value

Returns:
Epsilon value

getHybridization

public final int getHybridization()
Gets the Atomic Hybridization

Returns:
Atomic Hybridization

getID

public final java.lang.String getID()
Gets the ID

Returns:
ID

getResidueName

public final java.lang.String getResidueName()
Get the residue name

Returns:
String

getResidueNumber

public final int getResidueNumber()

getChain

public final java.lang.String getChain()
Get the chain name

Returns:
String

getIdent

public final java.lang.String getIdent()
Gets the atom ID

Returns:
atom ID

getJ3D

public final javax.media.j3d.Group getJ3D()

getKey

public final java.lang.String getKey()
Gets the atom Key

Returns:
atom Key

getMass

public final float getMass()
Gets the Atomic Mass

Returns:
Atomic Mass

getNumAngles

public final int getNumAngles()

getNumBonds

public final int getNumBonds()
Gets the number of atoms bonded to Atom

Returns:
Number of atoms bonded to this atom

getNumDihedrals

public final int getNumDihedrals()

getSigma

public float getSigma()
Gets the Sigma value

Returns:
Sigma value

getTrajectoryCoords

public javax.vecmath.Vector3f getTrajectoryCoords(int position)

getTrajectoryLength

public int getTrajectoryLength()

getV3D

public void getV3D(javax.vecmath.Vector3d temp)
Gets the Atom's Cartesian Coordinates return The Cartesian Coordinates


getVDWR

public float getVDWR()
Gets the van der Waals radius return van der Waals radius


getX

public double getX()
Gets the x coordinate

Returns:
x coordinate

getXYZ

public void getXYZ(double[] xyz)
Gets the Atom's Cartesian Coordinates return The Cartesian Coordinates


getXYZIndex

public final int getXYZIndex()
Gets the XYZ Index

Returns:
XYZ Index

getY

public final double getY()
Gets the y coordinate

Returns:
y coordinate

getZ

public final double getZ()
Gets the z coordinate

Returns:
z coordinate

isBonded

public final boolean isBonded(Atom a)
Checks to see if an Atom is bonded to this Atom

Parameters:
a - Atom to check
Returns:
True is Atom a is bonded to thisthis atom

isVisible

public boolean isVisible()

isBondVisible

public boolean isBondVisible()

showHydrogen

public boolean showHydrogen()

isDangeling

public boolean isDangeling()
Gets whether or not the Atom is under-constrained

Returns:
True if the atom is under-constrained (ie has can accept bonds)

initJ3D

public boolean initJ3D()

initVec

public void initVec()

move

public final void move(double[] d)
Add a vector to the Atom's current position vector

Parameters:
d - Vector to add to the current position

moveto

public final void moveto(double[] d)
Moves the atom to the specified location

Parameters:
d - Location to move this Atom to

moveto

public final void moveto(double x,
                         double y,
                         double z)

print

public final void print()
Prints the atom identity and Cartesian coordinates to stout

Overrides:
print in class FNode

reInit

public final void reInit(int index,
                         java.lang.String i,
                         MMAtom mmdata,
                         double[] d)

setAngle

public final void setAngle(Angle a)

setBond

public final void setBond(Bond b)
Specify that this Atom is part of a Bond

Parameters:
b - Bond that this Atom is part of

setCurrentCycle

public final void setCurrentCycle(int cycle)

setDihedral

public final void setDihedral(Dihedral d)

setXYZIndex

public final void setXYZIndex(int index)

setSelected

public void setSelected(boolean b)
Overrides:
setSelected in class FNode

switchColor

public final void switchColor(int ctype,
                              javax.vecmath.Color3f newCol,
                              javax.media.j3d.Material newMat)
Overrides:
switchColor in class FNode

switchView

public final void switchView(int viewtype)
Overrides:
switchView in class FNode

drawLabel

public void drawLabel(Graphics3D graphics,
                      javax.media.j3d.J3DGraphics2D g2d,
                      javax.media.j3d.Node node,
                      boolean labelAtoms,
                      boolean labelResidues)
Overrides:
drawLabel in class FNode

getMagnitude

public double getMagnitude(boolean relative)

setVisible

public final void setVisible(boolean v)

toString

public java.lang.String toString()
Description copied from class: FNode
Overidden toString method returns the FNode's name

Overrides:
toString in class FNode

toShortString

public java.lang.String toShortString()

update

public void update()
Atomic Positions are not updated unless the atom is visible -> this allows better performance for rendering partial structures during an interactive dynamics run or during trajectory playback.


updateTransforms

public void updateTransforms()

setVectorTransform3d

public void setVectorTransform3d(double[] orient,
                                 double mag)