mosdef-hub / mosdef-workflows

Sample molecular simulation workflows using a MoSDeF and community tools
14 stars 23 forks source link

TrappeUA + Gromacs #16

Closed ahy3nz closed 4 years ago

ahy3nz commented 4 years ago

Examples on using the TraPPE website, mBuild, foyer, and Gromacs to simulate propane under the TraPPE force field.

Some things I observed: having to download molecules and parameters from the TraPPE website, additional modification to the PDB files/mBuild compounds, and additional modification to the foyer XML.

This is a work in progress (I still need to do some "real" analysis, but the simulation ran). Comments and input appreciated

mattwthompson commented 4 years ago

Not sure where best to put this but I happened to come across this: https://github.com/wesbarnett/trappeua

mattwthompson commented 4 years ago

This runs fine out of the box for me. I'm not sure what exactly to do for analysis; if we wanted to get some fluid properties (RDF, density, idk) we'd need to properly equilibrate and sample a system of sufficient size. So I just increased the system size and simulation length a little bit and did some basic energy analysis. This is what I get when running it:

image

uppittu11 commented 4 years ago

I think this is good to go. I got the same results as @mattwthompson. image

This could use a requirements.txt though. These are the only packages that are needed. Everything is in conda-forge except for gromacs which is in bioconda.

gromacs
matplotlib
mbuild
foyer
panedr
uppittu11 commented 4 years ago

Also, I think the initial box size is 8 times what it should be at equilibrium (14.86 nm^3 or 2.459 nm on each edge of a cubic box). If we ever want to extend this to an NPT simulations, it might converge faster if the box dims are closer to the eqb value.

chrisiacovella commented 4 years ago

A few small issues.

(1) The TraPPE website is down and will be for the foreseeable future. It would be good to note this in the notebook and additionally provide reference to the parameter original source (as listed in the XML, 10.1021/jp972543+ https://pubs.acs.org/doi/10.1021/jp972543%2B).

(2) we should probably state which version of gromacs this mdp file has been tested to be compatible with. I just did a quick test and it works with 2018, 2019 and 2020 versions.

(3) should we give an approximate timing? Even on my older dual core macbook, it ran in under 1 minute. Took about 20 seconds on the rahman headnode (cpu only). So like just a line "This simulation will complete in ~1 minute of wall time."

ahy3nz commented 4 years ago

Also, I think the initial box size is 8 times what it should be at equilibrium (14.86 nm^3 or 2.459 nm on each edge of a cubic box). If we ever want to extend this to an NPT simulations, it might converge faster if the box dims are closer to the eqb value.

Yeah sure anyone is welcome to tweak the simulation parameters to make it as realistic as desirable.

(1) The TraPPE website is down and will be for the foreseeable future. It would be good to note this in the notebook and additionally provide reference to the parameter original source (as listed in the XML, 10.1021/jp972543+ https://pubs.acs.org/doi/10.1021/jp972543%2B).

Yeah I thought the DOI in the XML was sufficient, but more citation could be useful. I think the gomc example has citations in it:

[1] M.G. Martin, and J.I. Siepmann, Transferable potentials for phase equilibria. 1. United-atom description of n-alkanes J. Phys. Chem. B 102, 2569-2577 (1998).

[2] M.S. Shah, M. Tsapatsis, and J.I. Siepmann, Transferable potentials for phase equilibria. Improved united-atom description of ethane and ethylene AIChE J. 63, 5098-5110 (2017).

(2) we should probably state which version of gromacs this mdp file has been tested to be compatible with. I just did a quick test and it works with 2018, 2019 and 2020 versions.

Regarding gromacs versions, I don't think there's anything new here that prevents older versions of gromacs - most of the recent gromacs updates seem to deal with parallelization or non-vanilla MD methods, and this example makes no attempt at parallelization or non-canonical MD. Someone is certainly welcome to try this on older versions to ensure consistency though.

(3) should we give an approximate timing? Even on my older dual core macbook, it ran in under 1 minute. Took about 20 seconds on the rahman headnode (cpu only). So like just a line "This simulation will complete in ~1 minute of wall time."

That could be helpful. Feel free to modify this PR as such. I think all of workflows I contributed here were intended to be a quick dry run of a simulation workflow, not trying to run things "long enough"

mattwthompson commented 4 years ago

I think this is good to go if one person runs through it and doesn't find anything new or major