ThermodynamicQuantities¶
- class hoomd.md.compute.ThermodynamicQuantities(filter)¶
Bases:
Compute
Compute thermodynamic properties of a subset of the system.
- Parameters:
filter (
hoomd.filter
) – Particle filter to compute thermodynamic properties for.
ThermodynamicQuantities
acts on a subset of particles in the system and calculates thermodynamic properties of those particles. Add aThermodynamicQuantities
instance to a logger to save these quantities to a file, seehoomd.logging.Logger
for more details.Note
For compatibility with
hoomd.md.constrain.Rigid
,ThermodynamicQuantities
performs all sums over free particles and rigid body centers - ignoring constituent particles to avoid double counting.Examples:
f = filter.Type("A") compute.ThermodynamicQuantities(filter=f)
Members inherited from
AutotunedObject
:- property kernel_parameters¶
Kernel parameters.
Read more...
- property is_tuning_complete¶
Check if kernel parameter tuning is complete.
Read more...
- tune_kernel_parameters()¶
Start tuning kernel parameters.
Read more...
Members defined in
ThermodynamicQuantities
:- property degrees_of_freedom¶
Number of degrees of freedom in the subset .
See also
hoomd.State.update_group_dof
describes when is updated.(
Loggable
: category=”scalar”)
- property kinetic_temperature¶
Instantaneous thermal energy of the subset .
(
Loggable
: category=”scalar”)
- property potential_energy¶
Potential energy that the subset contributes to the system .
where the net energy terms are computed by
hoomd.md.Integrator
over all of the forces inhoomd.md.Integrator.forces
.(
Loggable
: category=”scalar”)
- property pressure¶
Instantaneous pressure of the subset .
where is the dimensionality of the system, is the volume of the simulation box (or area in 2D), and is the isotropic virial:
W_\mathrm{isotropic} = & \left( W_{\mathrm{net},\mathrm{additional}}^{xx} + W_{\mathrm{net},\mathrm{additional}}^{yy} + W_{\mathrm{net},\mathrm{additional}}^{zz} \right) \\ + & \sum_{i \in \mathrm{filter}} \left( W_\mathrm{{net},i}^{xx} + W_\mathrm{{net},i}^{yy} + W_\mathrm{{net},i}^{zz} \right)where the net virial terms are computed by
hoomd.md.Integrator
over all of the forces inhoomd.md.Integrator.forces
and in 2D simulations.(
Loggable
: category=”scalar”)
- property pressure_tensor¶
Instantaneous pressure tensor of the subset .
The six components of the pressure tensor are given in the order: (, , , , , ):
where the net virial terms are computed by
hoomd.md.Integrator
over all of the forces inhoomd.md.Integrator.forces
, is the k-th component of the velocity of particle and is the total simulation box volume (or area in 2D).(
Loggable
: category=”sequence”)
- property rotational_degrees_of_freedom¶
Number of rotational degrees of freedom in the subset .
Integration methods (
hoomd.md.methods
) determine the number of degrees of freedom they give to each particle. Each integration method operates on a subset of the system that may be distinct from the subset from the subset given toThermodynamicQuantities
.When
hoomd.md.Integrator.integrate_rotational_dof
isFalse
, . When it isTrue
, the given degrees of freedom depend on the dimensionality of the system.In 2D:
where is the particles’s moment of inertia.
In 3D:
See also
hoomd.State.update_group_dof
describes when is updated.(
Loggable
: category=”scalar”)
- property rotational_kinetic_energy¶
Rotational kinetic energy of the subset .
is the moment of inertia and is the angular momentum in the (diagonal) reference frame of the particle.
(
Loggable
: category=”scalar”)
- property translational_degrees_of_freedom¶
Number of translational degrees of freedom in the subset .
When using a single integration method on all particles that is momentum conserving, the center of mass motion is conserved and the number of translational degrees of freedom is:
where is the dimensionality of the system and is the number of degrees of freedom removed by constraints (
hoomd.md.constrain
) in the subset. The fraction distributes the momentum conservation constraint evenly whenThermodynamicQuantities
is applied to multiple subsets.Note
When using rigid bodies (
hoomd.md.constrain.Rigid
), is the number of rigid body centers plus free particles selected by the filter and is total number of rigid body centers plus free particles in the whole system.When
hoomd.md.Integrator.rigid
is not set, is the total number of particles selected by the filter and is the total number of particles in the system, regardless of theirbody
value.When using multiple integration methods, a single integration method on fewer than all particles, or a single integration method that is not momentum conserving,
hoomd.md.Integrator
assumes that linear momentum is not conserved and counts the center of mass motion in the degrees of freedom:(
Loggable
: category=”scalar”)