RemoveDrift

class hoomd.update.RemoveDrift(reference_positions, trigger=1)

Bases: Updater

Remove the average drift from a restrained system.

Parameters:

RemoveDrift computes the mean drift D\vec{D} from the given reference_positions (rref,i\vec{r}_{ref, i}):

D=1Nparticlesi=0Nparticles1minimum_image(rirref,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 D-\vec{D}:

riminimum_image(riD)\vec{r}_i \leftarrow \mathrm{minimum\_image}(\vec{r}_i - \vec{D})

Tip

Use RemoveDrift with hoomd.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 TriggeredOperation:

trigger

The trigger to activate this operation. Read more...


Members defined in RemoveDrift:

reference_positions

the reference positions [length][\mathrm{length}].

Example:

remove_drift.reference_positions = [
    (0, 0, 0),
    (1, 0, 0),
]
Type:

(N_particles, 3) numpy.ndarray of float