hpmc.compute

Overview

hpmc.compute.free_volume Compute the free volume available to a test particle by stochastic integration.

Details

Compute properties of hard particle configurations.

class hoomd.hpmc.compute.free_volume(mc, seed, suffix='', test_type=None, nsample=None)

Compute the free volume available to a test particle by stochastic integration.

Parameters:
  • mc (hoomd.hpmc.integrate) – MC integrator.
  • seed (int) – Random seed for MC integration.
  • type (str) – Type of particle to use for integration
  • nsample (int) – Number of samples to use in MC integration
  • suffix (str) – Suffix to use for log quantity

:py:class`free_volume` computes the free volume of a particle assembly using stochastic integration with a test particle type. It works together with an HPMC integrator, which defines the particle types used in the simulation. As parameters it requires the number of MC integration samples (nsample), and the type of particle (test_type) to use for the integration.

Once initialized, the compute provides a log quantity called hpmc_free_volume, that can be logged via hoomd.analyze.log. If a suffix is specified, the log quantities name will be hpmc_free_volume_suffix.

Examples:

mc = hpmc.integrate.sphere(seed=415236)
compute.free_volume(mc=mc, seed=123, test_type='B', nsample=1000)
log = analyze.log(quantities=['hpmc_free_volume'], period=100, filename='log.dat', overwrite=True)
disable()

Disables the compute.

Examples:

c.disable()

Executing the disable command will remove the compute from the system. Any hoomd.run() command executed after disabling a compute will not be able to log computed values with hoomd.analyze.log.

A disabled compute can be re-enabled with enable().

enable()

Enables the compute.

Examples:

c.enable()

See disable().

restore_state()

Restore the state information from the file used to initialize the simulations