RemoveDrift¶
- class hoomd.update.RemoveDrift(reference_positions, trigger=1)¶
Bases:
Updater
Remove the average drift from a restrained system.
- Parameters:
reference_positions ((N_particles, 3)
numpy.ndarray
offloat
) – the reference positions \([\mathrm{length}]\).trigger (hoomd.trigger.trigger_like) – Select the timesteps to remove drift.
RemoveDrift
computes the mean drift \(\vec{D}\) from the givenreference_positions
(\(\vec{r}_{ref, i}\)):\[\vec{D} = \frac{1}{\mathrm{N_{particles}}} \sum_{i=0}^\mathrm{N_{particles-1}} \mathrm{minimum\_image}(\vec{r}_i - \vec{r}_{ref,i})\]RemoveDrift
then shifts all particles in the system by \(-\vec{D}\):\[\vec{r}_i \leftarrow \mathrm{minimum\_image}(\vec{r}_i - \vec{D})\]Tip
Use
RemoveDrift
withhoomd.hpmc.external.Harmonic
to improve the accuracy of Frenkel-Ladd calculations.Example:
remove_drift = hoomd.update.RemoveDrift( reference_positions=[(0, 0, 0), (1, 0, 0)] ) simulation.operations.updaters.append(remove_drift)
Members inherited from
AutotunedObject
:- property kernel_parameters¶
Kernel parameters.
Read more...
- property is_tuning_complete¶
Check if kernel parameter tuning is complete.
Read more...
- tune_kernel_parameters()¶
Start tuning kernel parameters.
Read more...
Members inherited from
Integrator
:- trigger¶
The trigger to activate this operation.
Read more...
Members defined in
RemoveDrift
:- reference_positions¶
the reference positions \([\mathrm{length}]\).
Example:
remove_drift.reference_positions = [ (0, 0, 0), (1, 0, 0), ]
- Type:
(N_particles, 3)
numpy.ndarray
offloat