lorenzo-rovigatti / oxDNA

A new version of the code to simulate the oxDNA/oxRNA models, now equipped with Python bindings
https://dna.physics.ox.ac.uk/
GNU General Public License v3.0
38 stars 26 forks source link

[BUG] Rye Reader method `inbox` does not move all points inside the box #98

Closed JeDeveloper closed 2 months ago

JeDeveloper commented 3 months ago

Describe the bug In the attached .top and .dat files, the RyeReader inbox method does not actually place all points inside the simulation box. This issue may be specific to patchy particles but I can't be sure.

To Reproduce Download the example provided, and run the script demo.py. Assertion will trigger. inbox_err_eg.zip

Expected behavior The RyeReader inbox function places all particles within the box.

Desktop (please complete the following information): -Ubuntu 22.04.04 LTS -architecture: aarch64 -oxpy version: 3.6.1.dev29+gb38ae1c6.d20240219 -oxDNA commit ID 2d33bcc29715de82adad39be076ec5045d32e671

ErikPoppleton commented 2 months ago

It turns out that the way I had implementing inboxing, it was always centering the structure and doing so after inboxing was complete. This meant that structures with a dimension larger than half the box would bet outside the box after centering. I fixed inboxing in b23bdb79cf9e52841b7013e49e4693ec31ebf666 to correctly handle centering. Here's an update to your example directory to demonstrate inboxing with and without centering (oxView can open the xyz files). inbox_err_eg.zip