dpd¶
- mdhelper.openmm.pair.dpd(cutoff: float | Quantity, cutoff_dpd: float | Quantity = None, *, mix: str = None, per_params: list = None, global_params: dict[str, float | Quantity] = None, tab_funcs: dict[str, ndarray[int | float] | Quantity | Discrete2DFunction] = None) CustomNonbondedForce [source]¶
Implements the conservative part of the dissipative particle dynamics (DPD) force.
Note
This does not include an implementation of the DPD thermostat.
The potential energy between two DPD beads is given by:
\[u_\mathrm{DPD}(r_{12})=\frac{1}{2}A_{12}r_\mathrm{cut} \left(1-\frac{r}{r_\mathrm{cut}}\right)^2\]where \(A_{12}\) is the conservative force parameter in \(\mathrm{kJ/(mol\cdot nm)}\) and \(r_\mathrm{cut}\) is the interaction cutoff distance in \(\mathrm{nm}\).
As \(A_{12}\) has no well-defined mixing rule, it must be
evaluated using a custom mixing rule in mix with necessary per-particle parameters in per_params,
specified as a global parameter in global_params, or
provided for each pair of atom types in tab_funcs while specifying
mix="A12=A(type1,type2);"
andper_params=("type",)
.
After creating the pair potential, particles should be registered using
openmm.openmm.CustomNonbondedForce.addParticle()
.- Parameters:
- cutofffloat or openmm.unit.Quantity
Shared cutoff distance for all nonbonded interactions in the simulation sytem. Must be less than half the minimum periodic simulation box dimension.
Reference unit: \(\mathrm{nm}\).
- cutoff_dpdfloat or openmm.unit.Quantity, optional
Cutoff distance \(r_\mathrm{cut}\) for the DPD potential. Must be less than the shared cutoff distance. If not provided, it is set to the shared cutoff distance.
Reference unit: \(\mathrm{nm}\).
- mixstr, keyword-only, optional
Mixing rule for \(A_{12}\). Must be defined if \(A_{12}\) is not a global parameter. The string containing the expression for \(A_{12}\) must be written in valid C++ syntax, with any custom global and per-particle parameters and tabulated functions defined in global_params, per_params, and tab_funcs, respectively.
- global_paramsdict, keyword-only, optional
Additional global parameters for use in the definition of \(A_{12}\).
- per_paramslist, keyword-only, optional
Additional per-particle parameters for use in the definition of \(A_{12}\).
- tab_funcsdict, keyword-only, optional
Optional tabulated functions for use in the definition of \(A_{12}\).
- Returns:
- pair_dpdopenmm.CustomNonbondedForce
DPD pair potential.