Utils

Utils

flowermd.utils.utils.get_target_box_mass_density(density, mass, x_constraint=None, y_constraint=None, z_constraint=None)

Utility for calculating box lengths that match a given mass density.

If no constraints are set, the target box is cubic. Setting constraints will hold those box vectors constant and adjust others to match the target density.

Parameters:
  • density (float, or unyt.unyt_array, required) – The density used to calculate volume.

  • mass (float, or unyt.unyt_array, required) – The mass used to calculate volume.

  • x_constraint (float, optional, defualt=None) – Fixes the box length (nm) along the x axis.

  • y_constraint (float, optional, default=None) – Fixes the box length (nm) along the y axis.

  • z_constraint (float, optional, default=None) – Fixes the box length (nm) along the z axis.

flowermd.utils.utils.get_target_box_number_density(density, n_beads, x_constraint=None, y_constraint=None, z_constraint=None)

Utility for calculating box lengths that match a given number density.

If no constraints are set, the target box is cubic. Setting constraints will hold those box vectors constant and adjust others to match the target density.

Parameters:
  • density (float, or unyt.unyt_array, required) – The density used to calculate volume.

  • n_beads (int, required) – The number of beads used to calculate volume.

  • x_constraint (float, optional, defualt=None) – Fixes the box length (nm) along the x axis.

  • y_constraint (float, optional, default=None) – Fixes the box length (nm) along the y axis.

  • z_constraint (float, optional, default=None) – Fixes the box length (nm) along the z axis.

Base Types

class flowermd.utils.base_types.HOOMDThermostats

Types of HOOMD thermostats used in NVT or NPT simulations.

BERENDSEN

The Berendsen thermostat.

BUSSI

The Bussi-Donadio-Parrinello thermostat.

MTTK

The Nosé-Hoover thermostat.