cgcmm.pair¶
Overview
cgcmm.pair.cgcmm 
CMM coarsegrain model pair potential. 
Details
CGCMM pair potentials.

class
hoomd.cgcmm.pair.
cgcmm
(r_cut, nlist)¶ CMM coarsegrain model pair potential.
Parameters:  r_cut (float) – Default cutoff radius (in distance units).
 nlist (
hoomd.md.nlist
) – Neighbor list
cgcmm
specifies that a special version of LennardJones pair force should be added to every nonbonded particle pair in the simulation. This potential version is used in the CMM coarse grain model and uses a combination of LennardJones potentials with different exponent pairs between different atom pairs.B. Levine et. al. 2011 describes the CGCMM implementation details in HOOMDblue. Cite it if you utilize the CGCMM potential in your work.
Multiple potential functions can be selected:
\[ \begin{align}\begin{aligned}V_{\mathrm{LJ}}(r) = 4 \varepsilon \left[ \left( \frac{\sigma}{r} \right)^{12}  \alpha \left( \frac{\sigma}{r} \right)^{6} \right]\\V_{\mathrm{LJ}}(r) = \frac{27}{4} \varepsilon \left[ \left( \frac{\sigma}{r} \right)^{9}  \alpha \left( \frac{\sigma}{r} \right)^{6} \right]\\V_{\mathrm{LJ}}(r) = \frac{3\sqrt{3}}{2} \varepsilon \left[ \left( \frac{\sigma}{r} \right)^{12}  \alpha \left( \frac{\sigma}{r} \right)^{4} \right]\end{aligned}\end{align} \]See
hoomd.md.pair.pair
for details on how forces are calculated and the available energy shifting and smoothing modes. Usepair_coeff.set
to set potential coefficients.The following coefficients must be set per unique pair of particle types:
 \(\varepsilon\)  epsilon (in energy units)
 \(\sigma\)  sigma (in distance units)
 \(\alpha\)  alpha (unitless)  optional: defaults to 1.0
 exponents, the choice of LJexponents, currently supported are 126, 96, and 124.
We support three keyword variants 124 (native), lj12_4 (LAMMPS), LJ124 (MPDyn).
Example:
nl = nlist.cell() cg = pair.cgcmm(r_cut=3.0, nlist=nl) cg.pair_coeff.set('A', 'A', epsilon=1.0, sigma=1.0, alpha=1.0, exponents='LJ126') cg.pair_coeff.set('W', 'W', epsilon=3.7605, sigma=1.285588, alpha=1.0, exponents='lj12_4') cg.pair_coeff.set('OA', 'OA', epsilon=1.88697479, sigma=1.09205882, alpha=1.0, exponents='96')

disable
(log=False)¶ Disable the force.
Parameters: log (bool) – Set to True if you plan to continue logging the potential energy associated with this force. Examples:
force.disable() force.disable(log=True)
Executing the disable command will remove the force from the simulation. Any
hoomd.run()
command executed after disabling a force will not calculate or use the force during the simulation. A disabled force can be reenabled withenable()
.By setting log to True, the values of the force can be logged even though the forces are not applied in the simulation. For forces that use cutoff radii, setting log=True will cause the correct r_cut values to be used throughout the simulation, and therefore possibly drive the neighbor list size larger than it otherwise would be. If log is left False, the potential energy associated with this force will not be available for logging.

get_energy
(group)¶ Get the energy of a particle group.
Parameters: group ( hoomd.group
) – The particle group to query the energy for.Returns: The last computed energy for the members in the group. Examples:
g = group.all() energy = force.get_energy(g)