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

Unify files used in force field validation #309

Open
mattwthompson opened this issue Jan 30, 2020 · 2 comments
Open

Unify files used in force field validation #309

mattwthompson opened this issue Jan 30, 2020 · 2 comments

Comments

@mattwthompson
Copy link
Member

Describe the behavior you would like added to Foyer
Right now, in test_opls.py, the script crawls through a directory and tries to find either a combination of TOP & GRO files or a MOL2 file for each molecule. The latter, I believe, are there for legacy reasons; I'm pretty sure the files that Christoph started building this test suite out of were GROMACS files. But MOL2 files contain all the information we need (atom data, including atom types, and bonded connectivity) for atom-typing tests. I don't think a strictly enforced standard for reference files in atom-typing tests is necessary, but I think some commonality is useful.

Describe the solution you'd like
In this folder, convert every TOP/GRO pair to a MOL2 file. NOTE: we can write a little script to use ParmEd or other glue to automate this in a few seconds, but my trust in the conversion is close to 99.99%, so I believe it is appropriate to do this semi-manually. At very least, I believe it is necessary to check most of the details of the MOL2 file by hand (type, element, and bonded information at minimum).

Describe alternatives you've considered
As noted above, we could automate this, but it's plausibly incorrect for a small number of molecules.

Additional context
It is still my opinion that this testing should happen in other repos, but I am raising the issue here since we can have a discussion about how to standardize these tests.

@rmatsum836
Copy link
Contributor

I just tried using a MOL2 file for the OPLS testing. I first ran python test_opls.py to add newly implemented molecules into implemented_opls_tests.txt which ran successfully for benzonitrile. However, when I ran pytest test_opls.py, test_atomtyping for benzonitrile failed due to inconsistent atom types.

Next I tried this process with gro and top files I generated for benzonitrile and used these to run the tests, which passed.

Point is we will want to check and make sure these tests will pass with mol2 files.

@rmatsum836
Copy link
Contributor

I discussed this in #308 but I think as long as we use ParmEd to load in mol2 files, we should stick with the Gromacs files, since ParmEd determines element type from mol2 files by name. This causes issues when we have atoms with 2 letter symbols (Cl, Mg).

On the other hand, the Gromacs Top reader in ParmEd reads in elements by mass.

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

No branches or pull requests

2 participants