Simulations (relentless.simulate)#
relentless.simulate implements a generalizable and human-readable
interface for performing molecular simulations. The simulations are used to
evolve a system described by interactions in relentless.potential to
generate statistical ensembles. This module implements code to translate one
common simulation “recipe” into a running simulation in a variety of popular
packages. This gives you the freedom to choose simulation software this is
most compatible with your environment and resources using a single common code!
It also helps document workflows that can be shared and reproduced by others.
Example
init = relentless.simulate.InitializeRandomly(seed=1)
avg = relentless.simulate.EnsembleAverage(
check_thermo_every=5,
check_rdf_every=5,
rdf_dr=0.1)
ops = [relentless.simulate.RunLangevinDynamics(
steps=1e3,
timestep=0.001,
friction=0.8,
seed=2),
relentless.simulate.RunLangevinDynamics(
steps=1e4,
timestep=0.001,
friction=0.8,
seed=3,
analyzers=avg)
]
# perform simulation using LAMMPS and save ensemble
lmp = relentless.simulate.LAMMPS(init, ops)
sim = lmp.run(potentials)
sim[avg].ensemble.save('ensemble.json')
Engines#
|
Simulation of a dilute system. |
|
Simulation using HOOMD-blue. |
|
Simulation using LAMMPS. |
Initializers#
|
Initialize a simulation from a file. |
|
Initialize a randomly generated simulation box. |
Molecular dynamics#
|
Perform a molecular dynamics simulation. |
Thermostats#
|
Berendsen thermostat. |
|
Nosé-Hoover thermostat. |
Barostats#
|
Berendsen barostat. |
|
MTK barostat. |
Other dynamics#
|
Perform energy minimization on a configuration. |
|
Perform a Brownian dynamics simulation. |
|
Perform a Langevin dynamics simulation. |
Analyzers#
|
Compute average properties. |
|
Record quantities during a simulation. |
|
Write a simulation trajectory to file. |
Running a simulation#
Results#
|
Specific instance of a simulation and its data. |
Defining interactions#
|
Set of interaction potentials. |
|
Tabulator for an interaction potential. |
|
Tabulate one or more pair potentials. |
Developer classes#
|
Simulation engine. |
|
Operation to be performed by a |
Analysis operation to be performed by a |
|
|
Barostat. |
|
Thermostat. |