HarmonicAveragedThermodynamicQuantities

class hoomd.md.compute.HarmonicAveragedThermodynamicQuantities(filter, kT, harmonic_pressure=0)

Bases: Compute

Compute harmonic averaged thermodynamic properties of particles.

Parameters:
  • filter (hoomd.filter.filter_like) – Particle filter to compute thermodynamic properties for.

  • kT (float) – Temperature of the system \([\mathrm{energy}]\).

  • harmonic_pressure (float) – Harmonic contribution to the pressure \([\mathrm{pressure}]\). If omitted, the HMA pressure can still be computed, but will be similar in precision to the conventional pressure.

HarmonicAveragedThermodynamicQuantities acts on a given subset of particles and calculates harmonically mapped average (HMA) properties of those particles when requested. HMA computes properties more precisely (with less variance) for atomic crystals in NVT simulations. The presence of diffusion (vacancy hopping, etc.) will prevent HMA from providing improvement. HMA tracks displacements from the lattice positions, which are saved either during first call to Simulation.run or when the compute is first added to the simulation, whichever occurs last.

Note

HarmonicAveragedThermodynamicQuantities is an implementation of the methods section of Sabry G. Moustafa, Andrew J. Schultz, and David A. Kofke. (2015). “Very fast averaging of thermal properties of crystals by molecular simulation”. Phys. Rev. E 92, 043303 doi:10.1103/PhysRevE.92.043303

Examples:

hma = hoomd.compute.HarmonicAveragedThermodynamicQuantities(
    filter=hoomd.filter.Type("A"), kT=1.0
)

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 HarmonicAveragedThermodynamicQuantities:

filter

Subset of particles compute thermodynamic properties for.

Type:

hoomd.filter.filter_like

kT

Temperature of the system \([\mathrm{energy}]\).

Type:

float

harmonic_pressure

Harmonic contribution to the pressure \([\mathrm{pressure}]\).

Type:

float

property potential_energy

Average potential energy \([\mathrm{energy}]\).

(Loggable: category=”scalar”)

property pressure

Average pressure \([\mathrm{pressure}]\).

(Loggable: category=”scalar”)