-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PBC for negative coordinates #87
Comments
What exactly to you have tested? The PBCs in packmol are somewhat "special" in the sense that, appart the periodicity, they also define constraints for the coordinates. That is, if we set
This will automatically add a constraint of the type So, if for example we set explicitly a constraint like Maybe that is the issue, and it can be clarified in the documentation. |
I am using something like the following:
I get all molecules initially in the positive corner, and they do not move towards the negative side. Additionally, the GENCAN function increases in value rather than decreasing. I noticed the use of floor here, which might be the culprit (?): Line 18 in d236cb4
That should be fine for positive values, but for negative values, it would cause a wrong shift? I compiled it changing that for nint, and though it is slow, it goes "in the right direction" apparently (though still running). |
You're right, that is not correct, but the support for negative coordinates must be fixed in other places as well. I'll try to do it asap. |
Ok, thanks! Changing those 3 coordinates to nint is packing something sensical at least 👍 |
Reaching to the WAT section also caused the function value to increase, so I let you to it. BTW, noted the missing Line 187 in d236cb4
|
Indeed, I spotted that one now as well. Thanks. I don´t think you'll be able to pack with negative coordinates now. In the mean time, I would suggest just moving everything to the positive side. |
Even after shifting everything to positive coordinates, the packing behaves weirdly.
Here GENCAN value vs loop nr: And here how the "best packed" version looks for now: |
Can you test the version in this PR branch? (or alternatively, send me your input files)?
In parallel: In the meantime I verified that the |
Great. I will release this fix and probably work on improving the outside box definition. Thanks for the feedback. |
Hi Leandro,
I was testing the pbc implementation for packmol-memgen, and noted that the pbc function does not seem to play well with negative coordinates, or at least that is the impression I am getting from my tests, where all molecules end up in a small "positive corner". Did you play around with this?
The text was updated successfully, but these errors were encountered: