Error in rdf plot of 2d system.

27 views
Skip to first unread message

Jenis Thongam

unread,
Dec 13, 2022, 12:20:35 PM12/13/22
to freud-users
Hello,
I have a system of 2d ellipsoids built using lammps. As lammps does not particularly allow building of 2d system, I include z axis value of (0 to 1) and the define the system as 2d using "fix 3 all enforce2d". Now from the output dump file, I am trying to calculate the rdf of the frames.
I am getting the rdf curve when I set "box = freud.box.Box.cube(76.7495)". Since my system is 2d, I am confused as to why the the box has to be a cube.
Further I tried setting the z component to 0 ( "box.Lz = 0, box.xz = 0, box.yz = 0") but I get the error of "The AABBQuery r_max is too large for this box."
Can someone please help me out in this?

Thank you for your time,
Regards,
Jenis.
rdf_from_pos.ipynb
pos

Tommy Waltmann

unread,
Dec 14, 2022, 9:24:28 AM12/14/22
to freud-users
Hi Jenis,

Boxes in freud can be constructed in a variety of ways, boxes don't need to be constructed as cubes. Please see the box documentation for more details on this: https://freud.readthedocs.io/en/latest/modules/box.html . Additionally, to do the RDF calculation on a 2D system, please set the `is2D` property of the box to be True and pass positions of the form [x, y, 0]. This is also mentioned in the documentation for the RDF class here: https://freud.readthedocs.io/en/latest/modules/density.html#freud.density.RDF

Hope this clarifies how to do the calculation properly!

Best,
Tommy

Jenis Thongam

unread,
Dec 15, 2022, 5:00:06 AM12/15/22
to Tommy Waltmann, freud-users
Dear Tommy,

Thank you so much for the clarification. I can now implement the 2d rdf plot of my system without any error.

Regards,
Jenis

--
You received this message because you are subscribed to a topic in the Google Groups "freud-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/freud-users/qvSPK4wg9eI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to freud-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/freud-users/a375b087-3db3-4ea1-b9f1-b0a11c1e4f51n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages