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

Tleap InterMol support #146

Merged
merged 13 commits into from
Oct 24, 2020
Merged

Tleap InterMol support #146

merged 13 commits into from
Oct 24, 2020

Conversation

jeff231li
Copy link
Collaborator

@jeff231li jeff231li commented Oct 20, 2020

A PR that enables the tleap module to convert AMBER files to GROMACS, CHARMM, LAMMPS, and DESMOND format using InterMol. For GROMACS and CHARMM, users have the option to convert the files using ParmEd.

@jeff231li jeff231li requested a review from slochower October 20, 2020 00:47
@@ -2,6 +2,7 @@ name: paprika-dev
channels:
- conda-forge
- omnia
- mwt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any thought about getting intermol onto conda-forge? I can't even find this channel after spending five minutes of Googling.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's just my "personal" channel where I dump stuff from time to time. It's not really intended to be used by others, although I didn't put anything in place to prevent that. I don't believe I advertised this build, but again there's nothing hidden about it.

Putting it on conda-forge is something that probably should be done at some point. It should be feasible - the deps are really light - but some of the package structure might need a refresh. I can take it on.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! I didn't even connect mwt with @mattwthompson. Ha.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I found the package by searching Intermol on the anaconda website. It's not urgent, but if you can get it to conda-forge then 😍

@slochower
Copy link
Member

@j-wags do you want to take a look at this one, too, based on your experience getting multi-package support with OpenFF?

paprika/tleap.py Outdated
Comment on lines 116 to 122
class ConversionToolkit(Enum):
"""
An enumeration of the different toolkits for converting AMBER files to other MD formats.
"""

ParmEd = "parmed"
InterMol = "intermol"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a strong opinion, but unless there's a compelling reason that each System should own a copy of this enum, it may be better to define it at the module level.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

@j-wags
Copy link
Collaborator

j-wags commented Oct 24, 2020

No specific comments, but this is super cool. Thanks for tagging me!

If you like, it should be possible to make a plugin registry for conversion packages like ParmEd and InterMol, so that it's easier to add more. I'm not sure it'd be worth the work (how many other conversion packages are there?), but it might allow some neat System format gymnastics.

FYI @mattwthompson @SimonBoothroyd

@mattwthompson
Copy link
Contributor

how many other conversion packages are there?

I'm not very familiar with this project, but if the goal is to convert AMBER files into other formats, the utility drops off quickly after these two packages.

Comment on lines +436 to +437
assert is_file_and_not_empty(top_file) is True
assert is_file_and_not_empty(gro_file) is True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally out of scope here, but if for any reason you find yourself needing to also compare the energies before and after conversion, InterMol does that pretty well. I'll be working on doing this independently elsewhere in the next month or two, so it could possibly be something you can get for free in the future.

Copy link
Collaborator Author

@jeff231li jeff231li Oct 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that would be a better way for testing, but you would need the MD executables to evaluate the energies?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but they're mostly/all conda installable (save Desmond, I think) so it's possible to do that in a separate CI build

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will (most) probably need help in configuring the CI build (sometime in the future). This will be useful to test the simulation wrappers as well.

@jeff231li
Copy link
Collaborator Author

how many other conversion packages are there?

I'm not very familiar with this project, but if the goal is to convert AMBER files into other formats, the utility drops off quickly after these two packages.

For now, yes, the goal is just to convert AMBER files to other formats. I do plan on creating a class analogous to the Tleap module for PSFGen and I want there to be an option to convert X-PLOR/PSF to other formats as well. I believe TopoTools from VMD can do this but I don't think it's as versatile as InterMol.

@codecov-io
Copy link

Codecov Report

Merging #146 into master will increase coverage by 0.68%.
The diff coverage is 82.01%.

@jeff231li jeff231li merged commit 6b767dc into master Oct 24, 2020
@jeff231li jeff231li deleted the tleap_intermol_support branch November 7, 2020 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants