-
Notifications
You must be signed in to change notification settings - Fork 55
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
Converting from Amber to LAMMPS with flexible water #364
Comments
That's a good question. That doesn't quite make sense. Can you upload a minimal file that causes the problem, and I can try to debug. |
Thanks - the most minimal version of this I can come up with is to create a single water molecule from a pdb then use antechamber to parameterise it (ie treat it as an unknown organic molecule, bypassing any cleverness in Amber related to water) then Intermol to convert to LAMMPS via GROMACS. This script does all of that (paths will need tweaking on the python command at the end) and I attach the output I get from it from Intermol comparing energies. No agreement at all, for fairly obvious reasons when you look at the lammps output: it has applied SHAKE constraints (which I did not intentionally request) to the water. I am running AmberTools 16 and the most recent versions of LAMMPS and Intermol. |
I discovered a way to hack it to produce a LAMMPS input that looks mostly correct, namely by using the preprocessor to do "cpp -DFLEXIBLE" on the intermediate gromacs outputs and then reconverting from gromacs to lammps. Unfortunately then I can't do a side-by-side comparison, which is one of the nicest features of Intermol. I imagine there must be a canonical way of requesting the intermol gromacs module to apply the "flexible" #define, but I can't see from the code how it should work. Even then, with water I see discrepancies in the nonbonded terms that don't occur for systems containing other solvents. These are very small for a single water molecule but become enormous for a large box full of water (~9000 atoms): Energy group summary
|
Can you post the actual amber input files? That will help ensure replicatability. Somehow, it's using a TIP3P file that includes an #ifdef statement, which is likely one from the GROMACS installation, or that ParmEd is generating. This may actually be an issue with ParmEd, since InterMol uses ParmEd to convert from AMBER to GROMACS - you might look at the instructions there as well. |
The file "script.txt" in the post above generates an amber input file for water (the script writes the pdb then the tleap file). The primary issue is that the GROMACS output hedges its bets as to whether you want rigid water or flexible water, but when doing a Amber -> Gromacs -> LAMMPS conversion you have no option to choose and the final LAMMPS output doesn't have the option. However, the issue with the nonbonded terms is different, and more alarming as it still occurs even when the rigid/flexible issue is fixed by the method I mentioned above. Here are some amber inputs which show that up. I converted them just now by hard-wiring defines={'FLEXIBLE': True} into the Intermol gromacs module (but that is obviously a hack!). |
Yeah, I wanted to avoid any potential issues with differences there.
Right, the question is whether this is something ParmEd hardcodes or not. It shouldn't be making assumptions about what the GROMACS .mdp may or may not have . . . but one might still have to work around that.
The most likely issue is that the exclusions are not being set correctly in either AMBER or LAMMPS. PROBABLY the AMBER energy isn't being calculated correctly, since a TIP3P or SPC/E water box should not have positive potential energy, and including H-H interactions would create big positive energies. I'll see what I can look at in terms of actual debugging, but in the middle of COVID-19 class preparation, so debugging time limited. |
I am trying to use Intermol's convert.py to convert sets of GAFF parameters for organic molecules in solvent into inputs for LAMMPS. This appears to be mostly working, in terms of outputs from Amber and LAMMPS agreeing, apart from the small discrepancies associated with Coulomb parameters noted in your 2016 paper.
However, I run into a sudden problem when the solvent is water, and the numbers do not remotely agree between Amber and LAMMPS. I believe I can identify the cause: the water is being treated as rigid in LAMMPS, and thus not including any bonded terms, whereas it is flexible (ntf=1, ntc=1) in Amber.
I can see from the code that there is a #ifdef FLEXIBLE inside the intermediate GROMACS file which is meant to switch between flexible and rigid water, but I can't figure out how it is meant to be used/activated and it does not seem to be mentioned in the documentation. Can anyone advise on how to ensure the end result in LAMMPS comes out flexible?
The text was updated successfully, but these errors were encountered: