md.alchemy.pair¶
Overview
Alchemical degree of freedom \(\alpha_i\) associated with a specific pair force. |
|
A read-only mapping of alchemical degrees of freedom accessed by type. |
|
Alchemical Lennard Jones Gauss pair force. |
Details
Alchemical pair forces.
- class hoomd.md.alchemy.pair.AlchemicalDOF¶
Alchemical degree of freedom \(\alpha_i\) associated with a specific pair force.
AlchemicalDOF
represents an alchemical degree of freedom to be numerically integrated via analchemical integration method
.Note
To access an alchemical degree of freedom for a particular type pair, query the corresponding attribute in the alchemical pair force instance.
Added in version 3.1.0.
- property alchemical_forces¶
Per particle forces in alchemical alpha space.
\[F_{\mathrm{alchemical},i} = -\frac{\mathrm{d}U_i}{\mathrm{d}\alpha}\](
Loggable
: category=”particle”, default=False)
- class hoomd.md.alchemy.pair.AlchemicalDOFStore(name, pair_instance, dof_cls)¶
Bases:
Mapping
A read-only mapping of alchemical degrees of freedom accessed by type.
The class acts as a cache so once an alchemical DOF is queried it is returned and not recreated when queried again.
Added in version 3.1.0.
- __contains__(key)¶
Return whether the key is in the mapping.
- __getitem__(key)¶
Get the alchemical degree of freedom for the given type pair.
- __iter__()¶
Iterate over keys.
- __len__()¶
Get the length of the mapping.
- class hoomd.md.alchemy.pair.LJGauss(nlist, default_r_cut=None, default_r_on=0.0, mode='none')¶
Bases:
LJGauss
Alchemical Lennard Jones Gauss pair force.
- Parameters:
nlist (hoomd.md.nlist.NeighborList) – Neighbor list.
default_r_cut (float) – Default cutoff radius \([\mathrm{length}]\).
default_r_on (float) – Default turn-on radius \([\mathrm{length}]\).
mode (str) – Energy shifting/smoothing mode.
LJGauss
computes the Lennard-Jones Gauss force on all particles in the simulation state, with additional alchemical degrees of freedom:\[U(r) = 1\ [\mathrm{energy}] \cdot \left[ \left ( \frac{1\ [\mathrm{length}]}{r} \right)^{12} - \left ( \frac{2\ [\mathrm{length}]}{r} \right)^{6} \right] - \alpha_{1}\epsilon \exp \left[ - \frac{\left(r - \alpha_{2}r_{0}\right)^{2}}{2 (\alpha_{3}\sigma)^{2}} \right],\]where \(\alpha_i\) are the alchemical degrees of freedom.
Note
\(\alpha_i\) not accessed are set to 1.
Attention
hoomd.md.alchemy.pair.LJGauss
does not support execution on GPUs.Attention
hoomd.md.alchemy.pair.LJGauss
does not support MPI parallel simulations.Added in version 3.1.0.
- params¶
The potential parameters. The dictionary has the following keys:
epsilon
(float
, required) - energy parameter \(\varepsilon\) \([\mathrm{energy}]\)sigma
(float
, required) - Gaussian width \(\sigma\) \([\mathrm{length}]\)r0
(float
, required) - Gaussian center \(r_0\) \([\mathrm{length}]\)
Type:
TypeParameter
[tuple
[particle_type
,particle_type
],dict
]
- epsilon¶
Alchemical degrees of freedom for the potential parameter \(\epsilon\).
Type:
AlchemicalDOFStore
[tuple
[particle_type
,particle_type
],AlchemicalDOF
])
- sigma¶
Alchemical degrees of freedom for the potential parameter \(\sigma\).
Type:
AlchemicalDOFStore
[tuple
[particle_type
,particle_type
],AlchemicalDOF
])
- r0¶
Alchemical degrees of freedom for the potential parameter \(r_0\).
Type:
AlchemicalDOFStore
[tuple
[particle_type
,particle_type
],AlchemicalDOF
])