Problems with test computations in Gromacs 2020

Automatic force field optimization. Given a force field and a set of reference data (e.g. energies and forces from QM calculations, experimental measurements), we tune the force field parameters such that it accurately reproduces the reference data.
POST REPLY
User avatar
Bartłomiej Gostyński
Posts: 2
Joined: Tue Jul 28, 2020 9:13 am

Problems with test computations in Gromacs 2020

Post by Bartłomiej Gostyński » Wed Jul 29, 2020 6:48 am

Hello, everyone!

I had freshly installed Force Balance, so I decided to run several test computations included with this program in order to get aquainted with the software.

Unfortunately, it turns out that already the first tutorial (001_water_tutorial) contains obsolete keywords that are removed from Gromacs in version at least 2020.1 onwards.

When running Force Balance, Gromacs communicates (and even it's outlined in its Manual) that in the .mdp file options like "ns_type" are deprecated and "cutoff-scheme = group" are no longer supported and Verlett scheme is required.

I tried to modify the shot.mdp data in hope that it may be of some help but to no avail. An attempt to insert

cutoff-scheme = Verlet

option requires simultaneously

pbc = xy or xyz

option. When run even so (i.e. with only Verlet option added), Force Balance communicates that
GROMACS: gmx grompp, version 2020
Executable: /usr/local/gromacs/bin/gmx
Data prefix: /usr/local/gromacs
Working dir: /home/spmk/forcebalance-1.7.3/studies/001_water_tutorial/very_simple.tmp/cluster-06
Command line:
gmx grompp -c gmx.gro -p gmx.top -f gmx.mdp -o gmx.tpr -maxwarn 0

Ignoring obsolete mdp entry 'ns_type'
Replacing old mdp entry 'nstxtcout' by 'nstxout-compressed'
Replacing old mdp entry 'xtc_grps' by 'compressed-x-grps'

ERROR 1 [file gmx.mdp]:
With Verlet lists only full pbc or pbc=xy with walls is supported


ERROR 2 [file gmx.mdp]:
With Verlet lists nstlist should be larger than 0


NOTE 1 [file gmx.mdp]:
With Verlet lists the optimal nstlist is >= 10, with GPUs >= 20. Note
that with the Verlet scheme, nstlist has no effect on the accuracy of
your simulation.


ERROR 3 [file gmx.mdp]:
The box volume is required for calculating rlist from the energy drift
with verlet-buffer-tolerance > 0. You are using at least one unbounded
dimension, so no volume can be computed. Either use a finite box, or set
rlist yourself together with verlet-buffer-tolerance = -1.


NOTE 2 [file gmx.mdp]:
Setting nstcalcenergy (100) equal to nstenergy (1)


NOTE 3 [file gmx.mdp]:
Tumbling and flying ice-cubes: We are not removing rotation around center
of mass in a non-periodic system. You should probably set comm_mode =
ANGULAR or use integrator = sd.

Setting the LD random seed to 955929541
Generated 6 of the 6 non-bonded parameter combinations
Generating 1-4 interactions: fudge = 0.5
Generated 6 of the 6 1-4 parameter combinations
Excluding 2 bonded neighbours molecule type 'SOL'
Cleaning up constraints and constant bonded interactions with virtual sites

There were 3 notes
and replies traceback:
[====] End o'Message [====]
gmx grompp -c gmx.gro -p gmx.top -f gmx.mdp -o gmx.tpr -maxwarn 0 gave a return code of 1 (it may have crashed)

Traceback (most recent call last):
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/EGG-INFO/scripts/ForceBalance.py", line 41, in Run_ForceBalance
objective = Objective(options, tgt_opts, forcefield)
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/forcebalance/objective.py", line 174, in __init__
else: Tgt = Implemented_Targets[opts['type']](options,opts,forcefield)
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/forcebalance/gmxio.py", line 1604, in __init__
super(AbInitio_GMX,self).__init__(options,tgt_opts,forcefield)
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/forcebalance/abinitio.py", line 198, in __init__
self.engine = self.engine_(target=self, mol=self.mol, **engine_args)
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/forcebalance/gmxio.py", line 532, in __init__
super(GMX,self).__init__(name=name, **kwargs)
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/forcebalance/engine.py", line 80, in __init__
self.prepare(**kwargs)
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/forcebalance/gmxio.py", line 720, in prepare
o = self.warngmx("grompp -c %s.gro -p %s.top -f %s.mdp -o %s.tpr" % (self.name, self.name, self.name, self.name), warnings=warnings)
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/forcebalance/gmxio.py", line 835, in warngmx
o = self.callgmx(command, **kwargs)
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/forcebalance/gmxio.py", line 800, in callgmx
return _exec(' '.join(csplit), stdin=stdin, print_to_screen=print_to_screen, print_command=print_command, **kwargs)
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/forcebalance/nifty.py", line 1553, in _exec
raise RuntimeError
RuntimeError
When one tries to insert pbc = xyz or pbc = xy it gets better, but one still obtains:
edit_mdp tried to set pbc = no but its original value was pbc = xyz
Traceback (most recent call last):
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/EGG-INFO/scripts/ForceBalance.py", line 41, in Run_ForceBalance
objective = Objective(options, tgt_opts, forcefield)
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/forcebalance/objective.py", line 174, in __init__
else: Tgt = Implemented_Targets[opts['type']](options,opts,forcefield)
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/forcebalance/gmxio.py", line 1604, in __init__
super(AbInitio_GMX,self).__init__(options,tgt_opts,forcefield)
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/forcebalance/abinitio.py", line 198, in __init__
self.engine = self.engine_(target=self, mol=self.mol, **engine_args)
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/forcebalance/gmxio.py", line 532, in __init__
super(GMX,self).__init__(name=name, **kwargs)
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/forcebalance/engine.py", line 80, in __init__
self.prepare(**kwargs)
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/forcebalance/gmxio.py", line 717, in prepare
edit_mdp(fin=self.mdp, fout="%s.mdp" % self.name, options=gmx_opts, defaults=self.gmx_defs)
File "/home/spmk/miniconda3/lib/python3.7/site-packages/forcebalance-1.7.3-py3.7-linux-x86_64.egg/forcebalance/gmxio.py", line 102, in edit_mdp
raise RuntimeError
RuntimeError

As far as I understood, I should in principle somehow modify the edit_mdp function definition in the gmxio.py python file in order to prevent it from overwriting the set-by-me parameters with "pbc = no" options.

But I don't know how to. As I can see, the edit_mdp function uses a dictionary (probably imported form 'connections') in which the values of its keys are stored. Should I be able to modify the values? But at the moment I'm confused - I dont want to "rummage under the hood" without any assistance.

I get by to a some degree with Python, but your help would be invaluable.

Thanks in advance!

Bartlomiej

User avatar
Lee-Ping Wang
Posts: 102
Joined: Sun Jun 19, 2011 5:14 pm

Re: Problems with test computations in Gromacs 2020

Post by Lee-Ping Wang » Wed Jul 29, 2020 8:28 am

Hello there,

ForceBalance is only compatible with GROMACS 5.1.4 and older versions. It will take some significant developments to understand all of the changes to the input format in later versions of GROMACS in order to bring compatibility up to more modern versions.

Would you be willing to use the older version of GROMACS to generate the force field, or does the new version have an essential feature that makes that impossible?

Thanks,

- Lee-Ping

User avatar
Bartłomiej Gostyński
Posts: 2
Joined: Tue Jul 28, 2020 9:13 am

Re: Problems with test computations in Gromacs 2020

Post by Bartłomiej Gostyński » Thu Jul 30, 2020 2:54 am

Theoretically, there's no obstacle in using an older version of Gromacs, but in reality it all depends on whether my CUDA 11.0 will properly support such an oldish program (CUDA 4.0 required). As far as I remember, there were some changes between versions that might affect its reverse compatibility and (indirectly) the compatibility with older versions od Gromacs.

Therefore, I'd want to avoid installing unnecessary older versions of both CUDA (especially) and Gromacs (not a big deal), however, if it's the only way of running FB, it might be necessary. Seems that some 'reconnaissance in force' will have to be applied.

How's it then with the versions of other programs (Amber, Tinker, etc.)? Does FB support e.g. Amber20 or Amber18?

Thanks,

B.

User avatar
Lee-Ping Wang
Posts: 102
Joined: Sun Jun 19, 2011 5:14 pm

Re: Problems with test computations in Gromacs 2020

Post by Lee-Ping Wang » Fri Jul 31, 2020 1:13 pm

Hello Bartlomiej,

CUDA should only be necessary if you are planning to run MD simulations to estimate thermodynamic properties. Is that what you're doing? If you are fitting parameters to reproduce single-point properties (such as energies and forces), then the CPU version of Gromacs should be fine.

ForceBalance should work with newer versions of AMBER, Tinker and OpenMM because they are rather stable in their input file formats.

Thanks,

- lee-Ping

POST REPLY