Skip to content
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

Flags containing Lennard-Jones parameters are left unchanged when two Amber PARM topologies are combined using + operator #756

Closed
gaborb91 opened this issue Sep 9, 2016 · 2 comments
Labels

Comments

@gaborb91
Copy link

gaborb91 commented Sep 9, 2016

If two Amber PARM structures are combined using the + operator like parm1 += parm2 in Python code, flags related to Lennard-Jones parameters (NONBONDED_PARM_INDEX, LENNARD_JONES_ACOEF, LENNARD_JONES_BCOEF) in parm2 are ignored. The topology will be incorrect if parm2 has extra atom types or the order of nonbonded parameters is different.

@swails swails added the bug label Sep 9, 2016
@swails
Copy link
Contributor

swails commented Sep 9, 2016

I think you're right. The simple fix is to not re-use Lennard-Jones types and live with duplicates in the tables. The better fix (since it will impact GPU performance potentially) is to make sure every L-J type is unique.

This will be hard to do in a way that preserves off-diagonal modifications to the L-J matrix, but easy to do otherwise. A reasonable compromise is to look for off-diagonal modifications and take the "easy" way (simply append the Lennard-Jones lists) if they exist and simply recompute the L-J tables if they don't (thereby eliminating duplicates).

I believe as a temporary (and clumsy) workaround you can convert everything to a GROMACS topology, do the addition there, and then convert back (if you need something before I can get to this bug).

@swails
Copy link
Contributor

swails commented Sep 9, 2016

Also, do you have a test case that demonstrates where this actually fails? That will help me implement a fix faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants