AtomAction
, java.io.Serializable
public class AtomActionRandomizeVelocity extends java.lang.Object implements AtomAction, java.io.Serializable
Constructor | Description |
---|---|
AtomActionRandomizeVelocity(double temperature,
IRandom random) |
Constructs class to assign velocities according to the given temperature.
|
Modifier and Type | Method | Description |
---|---|---|
void |
actionPerformed(IAtom a) |
Assigns velocity to atom with components selected from a Maxwell-Boltzmann
distribution with temperature most recently set for the action.
|
double |
getTemperature() |
|
void |
setTemperature(double temperature) |
protected final IRandom random
public AtomActionRandomizeVelocity(double temperature, IRandom random)
public void actionPerformed(IAtom a)
actionPerformed
in interface AtomAction
a
- the specified atompublic double getTemperature()
public void setTemperature(double temperature)
temperature
- The temperature to set.