Surface Wetting

Details

Surface wetting module for FlowerMD.

class flowermd.modules.surface_wetting.DropletSimulation

Simulation which creates a droplet.

run_droplet(shrink_kT, shrink_steps, shrink_period, shrink_density, expand_kT, expand_steps, expand_period, hold_kT, hold_steps, final_density, tau_kt)

Run droplet simulation.

The steps for creating a droplet are: 1. Shrink the box to a high density (i.e. shrink_density) at a high temperature (i.e. shrink_kT) to get the droplet to form. 2. Expand the box back to a low density (i.e. ‘final_density’) at a low temperature (i.e. expand_kT). Keeping the temperature low will keep the droplet from falling apart. 3. Run the simulation at the final_density and low temperature (i.e. hold_kT) to equilibrate the droplet.

Parameters:
  • shrink_kT (float or hoomd.variant.Ramp, required) – The temperature to run the simulation at while shrinking.

  • shrink_steps (int, required) – The number of steps to run the simulation while shrinking.

  • shrink_period (int, required) – The number of steps between updates to the box size while shrinking.

  • shrink_density (float, required) – The high density to shrink the box to. Note: the units of the density are in g/cm^3.

  • expand_kT (float or hoomd.variant.Ramp, required) – The temperature to run the simulation at while expanding.

  • expand_steps (int, required) – The number of steps to run the simulation while expanding.

  • expand_period (int, required) – The number of steps between updates to the box size while expanding.

  • hold_kT (float or hoomd.variant.Ramp, required) – The temperature to run the simulation at while equilibrating.

  • hold_steps (int, required) – The number of steps to run the simulation while equilibrating.

  • final_density (float, required) – The low density to equilibrate the box to. Note: the units of the density are in g/cm^3.

  • tau_kt (float, required) – The time constant for the thermostat.

class flowermd.modules.surface_wetting.InterfaceBuilder

Bases: object

Builds an interface with droplet on top of a surface.

Create the snapshot and forces for the surface droplet simulation.

This class creates a new snapshot that combines the surface and droplet snapshots by putting the droplet particles on top of the surface particles with the correct spacing (i.e. gap) between the two. Also combines the hoomd forces from the surface and droplet simulations, and adds the forces for the new pair interactions between the droplet and surface particles.

Droplet reference values are used as the reference to scale the mass, energy and length values in the new snapshot.

Parameters:
  • surface_snapshot (hoomd.snapshot.Snapshot or str, required) – A snapshot of the surface simulation, or a path to a GSD file of the surface simulation.

  • surface_ff (List of hoomd.md.force.Force, required) – List of HOOMD force objects used in the surface simulation.

  • drop_snapshot (hoomd.snapshot.Snapshot or str, required) – A snapshot of the droplet simulation, or a path to a GSD file of the droplet simulation.

  • drop_ff (List of hoomd.md.force.Force, required) – List of HOOMD force objects used in the droplet simulation.

  • drop_ref_values (dict, required) – Dictionary of reference values for the droplet simulation.

  • box_height (unyt.unyt_quantity or float, required) – The height of the simulation box.

  • gap (unyt.unyt_quantity or float, required) – The gap between the droplet and the surface.

property hoomd_forces

The forces for the surface and droplet particles.

property hoomd_snapshot

The snapshot containing the surface and droplet particles.

class flowermd.modules.surface_wetting.WettingSimulation

Bases: Simulation

Simulation of surface wetting.

Parameters:
  • initial_state (hoomd.snapshot.Snapshot or str, required) – A snapshot to initialize a simulation from, or a path to a GSD file to initialize a simulation from. This snapshot contains the surface and droplet particles.

  • forcefield (List of hoomd.md.force.Force, required) – List of HOOMD force objects used in the simulation. This forcefield contains the surface and droplet forces.

  • fix_surface (bool, optional, default=True) – If True, the surface particles are not integrated over.

property fix_surface

If True, the surface particles are not integrated over.