-
Notifications
You must be signed in to change notification settings - Fork 160
Description
Description
In HPMC, enable 3D objects constrained to move in a plane, with out-of-plane rotations enabled.
Motivation
It's possible to do quasi-2D without out-of-plane rotations now, but having objects with out-of-plane rotations would be nice for studying interfacially confined objects (such as work from Escobedo group Thapar, V., T. Hanrath, and F. A. Escobedo. Soft Matter (2015)).
This topic has been raised many years ago (see #733). I am wondering whether there's any internal updates to this feature. If not, I can work on an implementation (or a similar approach) when I have time. Thanks!
Some testings I did
Just some current code behaviors I would like to share.
- Using
hoomd.hpmc.external.Linearcan "qualitatively" achieve quasi-2D, but it's at best a hack, and one needs to play around with the alpha parameter. - Setting box to 2D
[Lx,Ly, 0, 0,0,0]gives a nice quasi-2D system, but no out-of-plane rotations.
Proposed solution
Add a translate_move_dimensions parameter to HPMCIntegrator, as discussed in #733.
The parameter accepts integers 2 or 3, defaulting to None.
When set to 2 in a 3D simulation, the z-component of trial translation displacements is zeroed.
So now the API looks like
mc = hoomd.hpmc.integrate.ConvexPolyhedron()
mc.translate_move_dimensions = 2 # xy-only translations, full 3D rotations
Additional context
No response