etomica.units.systems
Class LJ.LJUnit

java.lang.Object
  extended by etomica.units.systems.LJ.LJUnit
All Implemented Interfaces:
Unit, Serializable
Enclosing class:
LJ

public abstract static class LJ.LJUnit
extends Object
implements Unit

See Also:
Serialized Form

Field Summary
protected  LJ lj
           
 
Constructor Summary
protected LJ.LJUnit(LJ ljSystem)
          Unit must provide instance of LJ unit system at construction.
 
Method Summary
abstract  Dimension dimension()
          Returns the dimension of the unit.
abstract  double fromSim(double x)
          Takes the given value in simulation units and converts it to class units (considering prefix).
 boolean prefixAllowed()
          Indicates if the unit is appropriate for use with a prefix.
abstract  String symbol()
          Returns the symbol of unit, such as "g" for grams.
 double toSim(double x)
          Takes the given value in class units (considering prefix) and converts it to simulation units.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lj

protected final LJ lj
Constructor Detail

LJ.LJUnit

protected LJ.LJUnit(LJ ljSystem)
Unit must provide instance of LJ unit system at construction. Conversions should be defined for each unit in reference to lj.sigma, lj.epsilon, and lj.mass.

Method Detail

dimension

public abstract Dimension dimension()
Description copied from interface: Unit
Returns the dimension of the unit. For example, the dimension of grams is mass.

Specified by:
dimension in interface Unit

symbol

public abstract String symbol()
Description copied from interface: Unit
Returns the symbol of unit, such as "g" for grams.

Specified by:
symbol in interface Unit

fromSim

public abstract double fromSim(double x)
Description copied from interface: Unit
Takes the given value in simulation units and converts it to class units (considering prefix).

Specified by:
fromSim in interface Unit
Parameters:
x - a value in simulation units
Returns:
the value converted to units of the class

toSim

public double toSim(double x)
Description copied from interface: Unit
Takes the given value in class units (considering prefix) and converts it to simulation units.

Specified by:
toSim in interface Unit
Parameters:
x - a value in units of the class
Returns:
the value converted to simulation units

prefixAllowed

public boolean prefixAllowed()
Description copied from interface: Unit
Indicates if the unit is appropriate for use with a prefix.

Specified by:
prefixAllowed in interface Unit