-
I just started to use HOOMD this morning, so far, it's really intuitive and easy to work with.
The simulation works well when I'm using the CPU ( This does not seem to depend on the method of integration. I struggled a bit with the orientations and the moment of inertia to have all my particles lying on the xy plane and correctly rotate along the z axis. Perhaps, the issue is here? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
It would appear that the original author of the Gay-Berne code did not consider 2D simulations when implementing it - the parallel axis is pointing in the z direction (in particle local space). This is why you needed a rotation about x to place the long axis in the plane and set HOOMD-blue computes all simulations in a 3D space. 2D simulations assume that Thanks for the complete script. I'll take a closer look in a few days. If you have time to try more in the meantime, here are some things I would check:
A non-zero hoomd-blue/hoomd/md/TwoStepLangevin.cc Lines 107 to 122 in 2d9d4df |
Beta Was this translation helpful? Give feedback.
-
Thanks for the incredibly fast answer. I compiled HOOMD myself, maybe I messed up some configurations on the floating point precision on the GPU? Indeed, with I = [0, 0, 1] and orientation = [1, 0, 0, 0], my particles stay on the plane; fz and torquexy start and stay at 0 on GPU and CPU. Is there a way to create a 2D box along x and z or y and z? LJ stays in plane on CPU and GPU with max fz and torquexy = 0 at all time. |
Beta Was this translation helpful? Give feedback.
-
I opened #1907 to track the implementation of this fix. |
Beta Was this translation helpful? Give feedback.
A ~1e-14 force in the 0th frame is enough to start pushing the particles out of the plane. I think the best solution at this point would be to modify all the integrators to force F_z = 0 when in 2D simulations. With that change, your forces should stay bounded and very small. Would you be interested in contributing this change? If not, I can get to it at some point in the next few weeks.
To make an ellipsoid in ALJ, use a single vertex shape with
rounding_radii = [a, b, c]
. Note that ALJ computes a single interaction at the closest point of contact. I'm not familiar enough with GB to know whether it can implement purely repulsive interactions.HPMC's ellipsoid shape is by far the easiest …