Programs

Configuration files

The parameters listed for each program are read from text configuration files. The syntax is given by example for the arguments that follow.

  • T Temperature
  • L Box size
  • enable_thermostat Activate the thermostat
T = 1.2
L = 32 32 32
enable_thermostat = F

Boolean values are input as T (True) or F (False). For vectors (such as the box size L), several components are listed, separated by a space. For more examples, the subdirectories in experiments/ contain configuration files for some simulations.

single_dimer_pbc

Synopsis

Source code: single_dimer_pbc

Simulate a single dimer nanomotor

Consider a dimer nanomotor in a periodic simulation cell filled with A particles. After a collision with the catalytic sphere of the dimer, a A particle is converted to B.

Parameters

  • L length of simulation box in the 3 dimensions
  • rho fluid number density
  • T Temperature. Used for setting initial velocities and (if enabled) bulk thermostatting.
  • tau MPCD collision time
  • probability probability to change A to B upon collision
  • bulk_rmpcd use bulkd rmpcd reaction for B->A instead of resetting
  • bulk_rate rate of B->A reaction
  • N_MD number MD steps occuring in tau
  • N_loop number of MPCD timesteps
  • colloid_sampling interval (in MD steps) of sampling the colloid position and velocity
  • equilibration_loops number of MPCD steps for equilibration
  • sigma_C radius of C sphere
  • sigma_N radius of N sphere
  • d length of rigid link
  • epsilon_C interaction parameter of C sphere with both solvent species (2 elements)
  • epsilon_N interaction parameter of N sphere with both solvent species (2 elements)
  • epsilon_C_C interaction parameter among C spheres
  • epsilon_N_C interaction parameter among N and C spheres
  • epsilon_N_N interaction parameter among N spheres

chemotactic_cell

Synopsis

Source code: chemotactic_cell

Model a chemotactic experiment in a microfluidic channel

In this simulation, an inlet (x=0) is fed with A and S fluid species in the lower and upper halves in the y direction, respectively. A constant accerelation is applied in the x direction and walls in the z direction confine the flow, leading to a Poiseuille velocity profile.

The colloid is a passive sphere, an active sphere or a dimer nanomotor.

Parameters

  • g magnitude of acceleration
  • buffer_length length of the inlet buffer
  • max_speed maximum velocity of profile to initialize the velocities
  • probability probability of reaction
  • alpha angle of collision
  • store_rho_xy store the xy density of solvent particles on a grid
  • store_rho_xy_z bounds in z for the slice of rho_xy to store (2 elements)
  • dimer simulate a dimer nanomotor (boolean, else it is a single sphere)
  • N_type assign N species to the single sphere (boolean, else it is a C sphere)
  • L length of simulation box in the 3 dimensions
  • rho fluid number density
  • T Temperature. Used for setting initial velocities and for wall thermostatting.
  • d length of rigid link
  • N_in_front place N sphere in front (higher x), for the dimer nanomotor
  • tau MPCD collision time
  • N_MD number MD steps occuring in tau
  • N_loop number of MPCD timesteps
  • colloid_sampling interval (in MD steps) of sampling the colloid position and velocity
  • steps_fixed number of steps during which the colloid is fixed (only when buffer_length>0)
  • equilibration_loops number of MPCD steps for equilibration (only when buffer_length=0)
  • sigma_C radius of C sphere
  • sigma_N radius of N sphere
  • track_y_shift shift of the track in the y direction with respect to Ly/2
  • epsilon_C interaction parameter of C sphere with both solvent species (2 elements)
  • epsilon_N interaction parameter of N sphere with both solvent species (2 elements)

single_janus_pbc

Synopsis

Source code: single_janus_pbc

Simulate a single Janus particle

This simulations models a chemically active Janus particle in a periodic simulation box.

The coordinates of the Janus particle’s beads must be provided in a H5MD file, as a “fixed-in-time” dataset. The body of the particle can operate as a rigid-body (RATTLE) or an elastic network.

Parameters

  • L length of simulation box in the 3 dimensions
  • rho fluid number density
  • T Temperature. Used for setting initial velocities and (if enabled) bulk thermostatting.
  • tau MPCD collision time
  • probability probability to change A to B upon collision
  • bulk_rate rate of B->A reaction
  • N_MD number MD steps occuring in tau
  • N_loop number of MPCD timesteps
  • colloid_sampling interval (in MD steps) of sampling the colloid position and velocity
  • equilibration_loops number of MPCD steps for equilibration
  • epsilon_C interaction parameter of C sphere with both solvent species (2 elements)
  • epsilon_N interaction parameter of N sphere with both solvent species (2 elements)
  • data_filename filename for input Janus coordinates
  • epsilon_colloid interaction parameter for colloid-colloid interactions
  • link_treshold distance criterion for finding rigid-body links
  • do_read_links read link information from a file
  • links_file filename for the links data
  • do_rattle perform RATTLE
  • do_lennard_jones compute colloid-colloid Lennard-Jones forces
  • do_elastic compute colloid-colloid elastic network forces
  • elastic_k elastic constant for the elastic network
  • rattle_pos_tolerance absolute tolerance for Rattle (position part)
  • rattle_vel_tolerance absolute tolerance for Rattle (velocity part)
  • sigma radius of the colloidal beads for colloid-solvent interactions
  • sigma_colloid radius of the colloidal beads for colloid-colloid interactions
  • polar_r_max maximal radius for the polar fields

poiseuille_flow

Synopsis

Source code: poiseuille_flow

Simulate a forced flow between two plates

Consider a pure fluid under a constant acceleration in the x-direction. Confining plates, modeled as Bounce-back boundary conditions are used in the z-direction in addition to ghost cells for the collisions near the walls.

Parameters

  • L length of simulation box in the 3 dimensions
  • g strength of the constant acceleration in x
  • rho fluid number density
  • T Temperature. Used for setting initial velocities, for wall thermostatting and (if enabled) bulk thermostatting.
  • tau MPCD collision time
  • alpha MPCD collision angle
  • thermostat whether to enable bulk thermostatting
  • N_therm number of unsampled thermalization MPCD timesteps
  • N_loop number of MPCD timesteps

single_sphere_thermo_trap

Synopsis

Source code: single_sphere_thermo_trap

Simulate a thermal gradient with an embedded colloidal sphere

Consider a pure fluid under a thermal gradient in the z-direction. The confining plates are modeled as bounce-back boundary conditions in the z-direction in addition to ghost cells for the collisions near the walls.

The x-z components of the fluid velocity field is stored at fixed intervals in the center-y layer of cells.

The sphere can be either fixed or held by an harmonic trap.

Parameters

  • L length of simulation box in the 3 dimensions
  • rho fluid number density
  • T Temperature. Used for setting initial velocities.
  • wall_T Temperature at the walls (two values).
  • k trap stiffness
  • tau MPCD collision time
  • alpha MPCD collision angle
  • N_therm number of unsampled thermalization MPCD timesteps
  • N_loop number of MPCD timesteps
  • N_MD number of MD timesteps per tau
  • vxz_interval interval for storing the xz velocity field
  • sigma size of spherical colloid
  • epsilon interaction parameter of sphere with fluid
  • move enable motion of the sphere (boolean)

n_colloids_pbc

Synopsis

Source code: n_colloids_pbc

Simulate an ensemble of spherical colloids

The periodic simulation box is filled with a number of spherical colloids, that interact with an attractive Lennard-Jones potential, and with solvent particles. The temperature is controlled with the MPCD Anderson thermostat.

Parameters

  • L length of simulation box in the 3 dimensions
  • rho fluid number density
  • T Temperature. Used for setting initial velocities and for thermostatting.
  • T_final Target temperature. Used for thermostatting with temperature program from T to T_final.
  • tau MPCD collision time
  • N_MD number MD steps occuring in tau
  • colloid_sampling interval (in MD steps) of sampling the colloid position and velocity
  • N_loop number of MPCD timesteps
  • N_colloids number of colloids
  • epsilon solvent-colloid epsilon
  • sigma radius of the colloids
  • epsilon_colloids colloid-colloid epsilon