Package etomica.units

Defines units and dimensions that are used for conversions during input or output.

See:
          Description

Interface Summary
Dimensioned Interface for an object with an associated physical dimension.
Unit Interface used to specify the physical units to be used when inputting or outputting a quantity.
 

Class Summary
Ampere The ampere unit of electrical current.
Angle Base for all angular units.
Angstrom  
Area Base for all area units.
Bar The bar unit of pressure, equal to 10^5 N/m^2.
Barye The barye unit of pressure, equal to 1 dyn/cm^2.
Calorie The Joule unit of energy, equal to 1 N-m or 1 kg-m^2/s^2.
Candela The candela is the luminous intensity, in a given direction, of a source that emits monochromatic radiation of frequency 540 x 1012 hertz and that has a radiant intensity in that direction of 1/683 watt per steradian.
Charge The dimension for electrical charge.
CompoundDimension  
CompoundUnit  
Coulomb The coulomb unit of electrical charge.
Count Unit class for the number, or quantity, of something.
CubicCentimeter The cubic centimeter unit of volume, cm^3.
CubicMeter The cubic meter unit of volume, m^3.
Current The dimension for electrical current.
Dalton  
Debye The debye unit of electrical dipole moment, equal to 10^-18 statC-cm, or 3.33564e-30 C-m.
Decimal Decimal representation of something that represents the fractional amount of a whole (e.g., mole fraction) as a decimal value typically between 0 and 1.
Degree Standard degree angular unit, such that for example a right angle is 90 degrees.
Dimension Parent of all Dimension classes, which describe the physical dimensions (e.g., mass, length, force) of a quantity.
DimensionRatio Class to form a dimension from ratio of two dimensions.
Dipole Base unit for electrical dipole moment.
Dyne The dyne unit of force, equal to 1 g-cm/s^2.
ElectricPotential The dimension for electrostatic potential.
Electron Unit of charge equal to the magnitude of the charge on an electron.
ElectronVolt The electronvolt unit of energy, equal to approximately 1.602e-19 Joules.
Energy Dimension for all energy units.
Erg The erg unit of energy, equal to 1 dyn-cm or 1 g-cm^2/s^2.
Force Base for all force units.
Fraction Dimension for a quantity representing a fractional amount.
Gram  
Joule The Joule unit of energy, equal to 1 N-m or 1 kg-m^2/s^2.
Kelvin  
Length Dimension for all units of length.
Lister  
Liter The liter unit of volume, equal to 1000 cm^3 or 0.001 m^3 or 10^27 A^3.
LuminousIntensity The dimension for luminous intensity.
Mass Dimension for all units of mass.
Meter The meter unit of length, equal to 10^10 angstroms.
Mole The mole unit of quantity, approximately equal to 6.022e23 simulation units.
Newton The Newton unit of force, equal to 1 kg-m/s^2.
Null Dimension specified dimensionless quantities which have no other interpretation (e.g., the quantity is not known to be an angle, or a fraction).
Pascal The Pascal unit of pressure, equal to 1 N/m^2.
Percent Decimal representation of something that represents the fractional amount of a whole (e.g., mole fraction) as a percentage value typically between 0 and 100.
Picosecond Simulation unit of time.
Pixel Unit converting between simulation unit of length and pixels rendered in an image.
Poise The Poise unit of viscosity, equal to 1 gram/(cm-sec).
Prefix Base class for all unit prefixes, such as kilo, micro, nano, etc.
PrefixedUnit Implementation of the Unit interface formed from a base Unit (e.
Pressure Dimension for (3D) pressure.
Pressure2D Simulation unit of (2D) pressure is (D-A/ps^2)/A = D/ps^2
Quantity The dimension for the quantity of discrete things (e.g.
Radian Simulation unit for the measure of an angle.
Second  
SimpleUnit Superclass for all base unit classes.
Statcoulomb The statcoulomb unit of electrical charge, which is the standard unit of charge in the CGS unit system.
Temperature The temperature dimension.
Tester  
Time Dimension for all units of time.
Undefined Undefined dimension used for quantities with undefined or unknown dimensions.
UnitFilter  
UnitGraphics  
UnitRatio Class for constructing units forms as ratios of other units.
Viscosity Dimension for all units of viscosity, Mass/(Length-Time)
Volt The Volt unit of electric potential.
Volume Dimension for all volume units.
 

Package etomica.units Description

Defines units and dimensions that are used for conversions during input or output. All quantities used internally by the simulation are given in "simulation units", which is based on the Angstrom as the unit of length, the Dalton as the unit of mass, and the picosecond as the unit of time (a Dalton, or atomic mass unit (amu), is one gram divided by Avogadro's number). The classes given in this package can be used to convert between these units and another unit that might be more natural or convenient. The two key elements of the package are the Unit interface and the abstract Dimension class.

Dimension

Instances of Dimension can be used to indicate the physical nature of a value, e.g., whether it is a quantity of mass, length, force, etc. There are two places where this information is routinely provided: Dimensions are specified via a signature, which is an array of seven values indicating the exponents of the fundamental dimensions that are combined to form the specified dimension. The fundamental dimensions follow the convention defined by the SI system, and are So, for example, the signature of the energy dimension is length2-mass/time2 and is given by the signature array (2, 1, -2, 0, 0, 0, 0). The signature of energy/molecules (e.g., Joules/mole) is (2, 1, -2, 0, 0, -1, 0).

Dimension subclasses are defined for the fundamental dimensions and commonly encountered derived dimensions. These classes have names such as Length, Time, Volume, Energy, and so on. These classes all define static singleton instances with the field name DIMENSION; the field SIM_UNIT in each class gives an instance of Unit that corresponds to the unit derived from simulation units for that dimension. Other dimensions can be defined by constructing instances of CompoundDimension.

Unit

Implementations of the Unit interface provide a convenient means to convert between simulation units and some other particular unit, which need be done only when data is read, written, or displayed.

SimpleUnit is a basic class that holds a conversion factor, a Dimension instance and other descriptive information for implementing a basic Unit. Many specific units are defined by extending this class; examples include Kelvin, Bar, Joule, etc.

A PrefixedUnit class takes a Unit instance and a Prefix, which can be used to construct units such as kilograms (combining Prefix.KILO with Gram.UNIT).

Derived units that are not already defined can be constructed using the CompoundUnit class.

The package etomica.units.systems defines constructs that can collect the units defined by conventional unit systems, such as SI, cgs, English, etc.