ProtoCaller.Protocol package¶
Here the user can find the Protocol
class,
which is designed to be a general bundle of an arbitrarily large set of
molecular dynamics parameters used for simulations. The API has been designed
to be general and interconvertible between packages. However, only GROMACS
.mdp files can be currently output. This will be addressed in future versions
of ProtoCaller.
Module contents¶
-
class
ProtoCaller.Protocol.
Protocol
(use_preset=None, extra_params=None, **kwargs)¶ Bases:
object
A wrapper for different simulation parameters.
- Parameters
use_preset (str, None) – Which default preset to use. Allowed values: “minimisation”, “equilibration_nvt”, “equilibration_npt”, “production” “vacuum”.
extra_params (dict) – Used to set custom attributes with illegal Python characters in them.
kwargs – Used to set any of the attributes, custom or not.
-
integrator
¶ Which integrator to use. Allowed values: “leapfrog”, “velocity_verlet”, “steep”, “l-bfgs”, “stochastic”.
- Type
string
-
timestep
¶ What timestep to use in ps.
- Type
float
-
n_steps
¶ How many timesteps to run the simulation for.
- Type
int
-
skip_positions
¶ How many timesteps to skip when writing the positions.
- Type
int
-
skip_velocities
¶ How many timesteps to skip when writing the velocities.
- Type
int
-
skip_forces
¶ How many timesteps to skip when writing the forces.
- Type
int
-
skip_energies
¶ How many timesteps to skip when writing the energies.
- Type
int
-
periodic_boundary_conditions
¶ Whether and how to implement periodic boundary conditions.
- Type
string
-
neighbour_cutoff
¶ Cutoff in nm for neighbour list.
- Type
float
-
neighbour_frequency
¶ How often to update the neighbour list in timesteps.
- Type
int
-
coulomb_type
¶ What type of Coulomb interactions to use. Allowed values: “cutoff”, “ewald”, “pme”.
- Type
string
-
pme_order
¶ What order of PME to use. Ignored if coulomb_type is not PME.
- Type
int
-
coulomb_cutoff
¶ Cutoff in nm for electrostatics.
- Type
float
-
vdw_type
¶ What type of van der Waals interactions to use. Allowed values: “cutoff”, “pme”.
- Type
string
-
vdw_corr
¶ What type of long-distance correction to apply. Allowed values: “no”, “energy”, “energy_pressure”.
- Type
string
-
vdw_cutoff
¶ Cutoff in nm for van der Waals interactions.
- Type
float
-
thermostat
¶ What thermostat to use. Allowed values: “no”, “berendsen”, “nose-hoover”, “andersen”.
- Type
string
-
temp_frequency
¶ Thermostat friction coefficient / collision frequency in THz.
- Type
int
-
temp_time_coupling
¶ Time constant for thermostat coupling in ps. -1 means no coupling.
- Type
float
-
temperature
¶ Simulation temperature.
- Type
int
-
temp_groups
¶ Which parts of the system to heat up. Allowed values: “all”.
- Type
string
-
barostat
¶ What barostat to use. Allowed values: “no”, “berendsen”, “parrinello-rahman”, “mttk”.
- Type
string
-
pres_frequency
¶ Barostat friction coefficient / collision frequency in THz.
- Type
int
-
pres_time_coupling
¶ Time constant for barostat coupling in ps. -1 means no coupling.
- Type
float
-
pressure
¶ Simulation pressure.
- Type
float
-
compressibility
¶ System compressibility.
- Type
float
-
random_velocities
¶ Whether to generate random velocities.
- Type
bool
-
random_velocities_temperature
¶ Temperature to sample velocities from.
- Type
int
-
random_velocities_seed
¶ Seed for random velocity sampling. -1 is random seed.
- Type
int
-
constraint
¶ Which constraints to apply. Allowed values: “no”, “h_bonds”, “h_angles”, “all_bonds”, “all_angles”.
- Type
string
-
constraint_type
¶ Which constraint algorithm to use. Allowed values: “lincs”, “shake”.
- Type
string
-
free_energy
¶ Whether this is a free energy calculation.
- Type
bool
-
current_lambda
¶ The current lambda. Indices start from 0.
- Type
int
-
coulomb_lambdas
¶ Initialises coulomb_lambdas.
- Type
[float]
-
vdw_lambdas
¶ Initialises vdw_lambdas.
- Type
[float]
-
bonded_lambdas
¶ Initialises bonded_lambdas.
- Type
[float]
-
restraint_lambdas
¶ Initialises restraint_lambdas.
- Type
[float]
-
mass_lambdas
¶ Initialises mass_lambdas.
- Type
[float]
-
temperature_lambdas
¶ Initialises temperature_lambdas.
- Type
[float]
-
write_derivatives
¶ Whether to write dH/dλ.
- Type
bool
-
softcore_vdw
¶ Apply soft-core potential to van der Waals interactions.
- Type
bool
-
softcore_coulomb
¶ Apply soft-core potential to Coulomb interactions.
- Type
bool
-
softcore_alpha
¶ Soft-core alpha parameter, default is 0.5.
- Type
float
-
softcore_lambda_power
¶ Power for lambda in the soft-core function.
- Type
int
-
write
(engine, filebase='protocol')¶ Writes the protocol to a file for a specific MD engine.
- Parameters
engine (str) – Determines the format of the file. Allowed values: “GROMACS”.
filebase (str, optional) – The base of the output file.
- Returns
filename – The absolute path to the output parameter file.
- Return type
str