meshi.symmetryComplex.energy.cylinder
Class CylinderEnergyElement

java.lang.Object
  extended by meshi.energy.EnergyElement
      extended by meshi.symmetryComplex.energy.cylinder.CylinderEnergyElement

public class CylinderEnergyElement
extends EnergyElement

Responsible for energy and forces calculations of the Cylinder energy function on a single atom.
The atom's cartesian coordinates are transformed to Cylindrical Coordinates and forces are transformed back to cartesian coordinates.


Field Summary
protected  Atom atom
          The atom which is kept in the cylinder.
protected  double atomHeight
          The atom's cylindrical coordinates.
protected  double atomR
          The atom's cylindrical coordinates.
protected  double atomTheta
          The atom's cylindrical coordinates.
protected  double force
          Force constants.
protected  double force2
          Force constants.
protected  double height
          The cylinder's dimensions.
protected  double innerR
          The cylinder's dimensions.
protected  double outerR
          The cylinder's dimensions.
protected  double weight
           
 
Fields inherited from class meshi.energy.EnergyElement
atoms, dFormatSrt, dFormatStd, DX, frozen, relativeDiffTolerance, VERY_SMALL, XYZ
 
Constructor Summary
CylinderEnergyElement(Atom atom, CylinderParameters parameters, double weight)
          Constructs an energy elements for the given atom.
 
Method Summary
 double evaluate()
          Calculates the cylinder energy and updates forces on the atom.
static boolean isPointInCylinder(Coordinates coordinates, double outerR, double innerR, double height)
          For loops building.
 void setAtoms()
           
private  void updateCylindricalCoors()
          Updates the cylindrical coordinates according to the cartesian coordinates.
private  void updateForces(double forceOnR, double forceOnHeight)
          Updates the forces on the atom.
 
Methods inherited from class meshi.energy.EnergyElement
atoms, evaluateAtoms, frozen, test, updateFrozen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

atom

protected final Atom atom
The atom which is kept in the cylinder.


weight

protected final double weight

innerR

protected final double innerR
The cylinder's dimensions.


outerR

protected final double outerR
The cylinder's dimensions.


height

protected final double height
The cylinder's dimensions.


atomR

protected double atomR
The atom's cylindrical coordinates.


atomTheta

protected double atomTheta
The atom's cylindrical coordinates.


atomHeight

protected double atomHeight
The atom's cylindrical coordinates.


force

protected final double force
Force constants. Currently both equal to 1 for all atoms but can be changed to atom-specific.


force2

protected final double force2
Force constants. Currently both equal to 1 for all atoms but can be changed to atom-specific.

Constructor Detail

CylinderEnergyElement

public CylinderEnergyElement(Atom atom,
                             CylinderParameters parameters,
                             double weight)
Constructs an energy elements for the given atom.

Method Detail

updateCylindricalCoors

private void updateCylindricalCoors()
Updates the cylindrical coordinates according to the cartesian coordinates.


setAtoms

public void setAtoms()
Specified by:
setAtoms in class EnergyElement

evaluate

public double evaluate()
Calculates the cylinder energy and updates forces on the atom.

Specified by:
evaluate in class EnergyElement

updateForces

private void updateForces(double forceOnR,
                          double forceOnHeight)
Updates the forces on the atom. The parameters are forces in cylidrical coordinates and are transformed to cartesian coordinates.


isPointInCylinder

public static boolean isPointInCylinder(Coordinates coordinates,
                                        double outerR,
                                        double innerR,
                                        double height)
For loops building. Should be changed.