glotzerlab / hoomd-blue

Molecular dynamics and Monte Carlo soft matter simulation on GPUs.

Home Page:http://glotzerlab.engin.umich.edu/hoomd-blue

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Filter option to RemoveDrift()

rskye144 opened this issue · comments

Description

The function hoomd.update.RemoveDrift() currently updates the position of all particles in the simulation. I would like to be able to pass a subset of particles so that the center-of-mass calculation and position update applies only to the filtered particles. In particular, this is useful in the case where a system has "dummy" particles which are not part of the integrator.

Proposed solution

The function RemoveDrift() will take in a filter argument similarly to the integrator or writer functions.

Additional context

In particular, I'm implementing Frenkel-Ladd free energy calculations in MD, which is theoretically supported by RemoveDrift() (in the documentation here). However, the suggested method of creating a dummy lattice of reference particles to restrain the crystal has a systematic error if reference particles are moved by RemoveDrift()

Indeed. Feel free to submit a pull request that adds this functionality.

Alternately, you can use the Einstein molecule (https://doi.org/10.1063/1.2790426) approach which does not require RemoveDrift.