etomica.data.meter
Class MeterTemperature

java.lang.Object
  extended by etomica.data.DataSourceScalar
      extended by etomica.data.meter.MeterTemperature
All Implemented Interfaces:
IDataSource, IEtomicaDataSource, Serializable

public class MeterTemperature
extends DataSourceScalar

Meter for measurement of the temperature based on kinetic-energy equipartition. The class uses a MeterKineticEnergy by default to calculate the kinetic energy, but any DataSourceScalar can be used for this purpose by calling setKineticEnergyMeter. If the ISimulation is not given, the class will assume that all atoms have only translational degrees of freedom. If the ISimulation is given, this class will examine the ISpecies and calculate the actual number of degrees of freedom (more for oriented atoms or molecules).

See Also:
Serialized Form

Field Summary
protected  IBox box
           
protected  DataSourceScalar meterKE
           
protected  ISimulation sim
           
 
Fields inherited from class etomica.data.DataSourceScalar
data, dataInfo, tag
 
Constructor Summary
MeterTemperature(IBox box, int D)
           
MeterTemperature(ISimulation sim, IBox box, int D)
           
 
Method Summary
 double getDataAsScalar()
          Returns a single scalar value as the measurement for the given box.
 Dimension getDimension()
           
static EtomicaInfo getEtomicaInfo()
           
 void setKineticEnergyMeter(DataSourceScalar meterKineticEnergy)
           
 
Methods inherited from class etomica.data.DataSourceScalar
getData, getDataDouble, getDataInfo, getTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

box

protected IBox box

meterKE

protected DataSourceScalar meterKE

sim

protected final ISimulation sim
Constructor Detail

MeterTemperature

public MeterTemperature(IBox box,
                        int D)

MeterTemperature

public MeterTemperature(ISimulation sim,
                        IBox box,
                        int D)
Method Detail

setKineticEnergyMeter

public void setKineticEnergyMeter(DataSourceScalar meterKineticEnergy)

getEtomicaInfo

public static EtomicaInfo getEtomicaInfo()

getDataAsScalar

public double getDataAsScalar()
Description copied from class: DataSourceScalar
Returns a single scalar value as the measurement for the given box. Subclasses define this method to specify the measurement they make.

Specified by:
getDataAsScalar in class DataSourceScalar

getDimension

public Dimension getDimension()