[BUG]particles move out of box

39 views
Skip to first unread message

Xiaotian Li

unread,
Dec 6, 2023, 12:14:34 AM12/6/23
to hoomd-users
I defined a 2D box (both configuration.box.Lz =0 and box.dimensions=2 are checked right in .gsd file) in HOOMD v4.3 to operate MD (integrator = brownian and langevin were both tried but failed to avoid that problem)
I read the result.gsd, finding that in some of the gsd files, the particles in box are out of the box in z-direction while no warnings appeared during the simulation, and in the other gsd files, the particles stay in the 2D box correctly. Is there anyone who has met with similar problems? How can I locate the codes or modules where the problem occured? Anyone's comments are welcome!

I defined two pair interactions: gaussian for 'A-B' and Yukawa for 'A-A'.
I kept particles 'B' stationary and allow particles 'A' to move.

Joshua Anderson

unread,
Dec 6, 2023, 10:10:29 AM12/6/23
to hoomd...@googlegroups.com
You do not provide enough information to reproduce the behavior you observe, or even guess at a possible root cause.
------
Joshua A. Anderson, Ph.D.
Research Area Specialist, Chemical Engineering, University of Michigan

--
You received this message because you are subscribed to the Google Groups "hoomd-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hoomd-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hoomd-users/c92379c6-410b-4232-9240-51047f1d3316n%40googlegroups.com.

Xiaotian Li

unread,
Dec 8, 2023, 6:53:10 AM12/8/23
to hoomd-users
I have fixed the problem. The reason why particles move out of the box is that the positions of particles are mis-generated
 by numpy.random(numpy.shape(array)), where the array is (n_rows,3). Even though the box is 2D, the particles are defined out of the box in the first frame.
I appreciate your kindness.

Joshua Anderson

unread,
Dec 8, 2023, 6:56:30 AM12/8/23
to hoomd...@googlegroups.com
Thank you for confirming that you found a fix.

------
Joshua A. Anderson, Ph.D.
Research Area Specialist, Chemical Engineering, University of Michigan
Reply all
Reply to author
Forward
0 new messages