Project

General

Profile

Bug #2144

Dihedral_restraints options is broken for 5.X versions in GROMPP

Added by Marcelo Depolo Poleto over 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Category:
preprocessing (pdb2gmx,grompp)
Target version:
Affected version - extra info:
5.X versions
Affected version:
Difficulty:
uncategorized
Close

Description

Hi,

When applying the dihedral_restraints option in my topology file, it yields a grompp fatal error.

Topology insertion (after [dihedrals] ):

; Include forcefield parameters
#include "./chalc.ff/forcefield.itp" 

[ moleculetype ]
; Name            nrexcl
1PE                   3

[ atoms ]
...
[ bonds ]
...
[ dihedral_restraints ]
; ai   aj    ak    al   phi dphi  kfac
  5    1      2    3     90    0      1

Error:

Fatal error:
Incorrect number of parameters - found 2, expected 3 or 6 for Dih. Rest..


I have also tried the insertion with 6 parameters, but grompp just finds 5.

Associated revisions

Revision fb11d6cb (diff)
Added by Mark Abraham over 2 years ago

Fix parameter description for dihedral_restraints

The force-constant parameter for dihedral_restraints was not
documented in the table of interaction types.

Refs #2144

Change-Id: Iac28e88e966f1c2b7a8fe533e97abe94173470eb

Revision 73f57758 (diff)
Added by Mark Abraham almost 2 years ago

Improve grompp missing-parameters error message

If an interaction entry had parameters but not the function type, then
the error message has been confusing. Note that even when only one
function type is implemented, the field is still required, which makes
for ready extensibility.

Refs #2144

Change-Id: I356e14541d4aaffad054d5ecfb8a9e3cb04cd25f

History

#1 Updated by Marcelo Depolo Poleto over 2 years ago

The right insertion is below:

[ dihedral_restraints ]
; ai aj ak al phi dphi kfac
5 1 2 3 90 0 1

#2 Updated by Mark Abraham over 2 years ago

  • Description updated (diff)

#3 Updated by Mark Abraham over 2 years ago

  • Status changed from New to Feedback wanted
  • Target version set to 2016.4

I think this input is ill-formed. The following snippet from our regression tests works:

[ dihedral_restraints ]
;  i    j    k    l type phiA dphiA  kfacA  phiB  dphiB   kfacB
1410 1393 1391 2610    1    38    0    0.00    38     0    41.84      
1393 1391 2610 2604    1   111    0    0.00   111     0    41.84        
1391 2610 2604 2606    1   -39    0    0.00   -39     0    41.84 

The type column is required, even though only one function type is currently implemented. With your input, grompp is interpreting 90 as the function type and then being unable to find all 3 of phi, dphi and kfac, nor two such sets of 3 for a dual-topology setup.

Table 5.5 of http://manual.gromacs.org/documentation/5.1.4/manual-5.1.4.pdf doesn't correctly document kfac, so I will fix that.

#4 Updated by Gerrit Code Review Bot over 2 years ago

Gerrit received a related patchset '1' for Issue #2144.
Uploader: Mark Abraham ()
Change-Id: gromacs~release-2016~Iac28e88e966f1c2b7a8fe533e97abe94173470eb
Gerrit URL: https://gerrit.gromacs.org/6534

#5 Updated by Marcelo Depolo Poleto over 2 years ago

What is the use for two dihedral restraints (A and B)?

The error message is also confusing: it says it expects 3 or 6 parameters, but with TYPE required, they become 4 or 7 respectively.

#6 Updated by Mark Abraham over 2 years ago

Marcelo Depolo Poleto wrote:

What is the use for two dihedral restraints (A and B)?

As I hinted, in a dual-topology setup used for free-energy calculations, the same .mdp describes two topologies for the same system. Even if the configurations don't change, you can simply change parameters (or e.g. morph one halide to another, etc.)

The error message is also confusing: it says it expects 3 or 6 parameters, but with TYPE required, they become 4 or 7 respectively.

Yeah I see how that could be confusing. The parameters are specific to the function type, though, which is consistent with the organization of Table 5.5 in the manual. I'll think about what might be improved in the error message

#7 Updated by Mark Abraham about 2 years ago

  • Target version changed from 2016.4 to 2016.5

#8 Updated by Gerrit Code Review Bot almost 2 years ago

Gerrit received a related patchset '1' for Issue #2144.
Uploader: Mark Abraham ()
Change-Id: gromacs~release-2018~I356e14541d4aaffad054d5ecfb8a9e3cb04cd25f
Gerrit URL: https://gerrit.gromacs.org/7334

#9 Updated by Mark Abraham almost 2 years ago

  • Status changed from Feedback wanted to Fix uploaded
  • Target version changed from 2016.5 to 2018-beta3

I improved the error message

#10 Updated by Erik Lindahl almost 2 years ago

  • Status changed from Fix uploaded to Resolved

#11 Updated by Erik Lindahl almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF