Project

General

Profile

Bug #2392

mdp field 'define' does not correctly handle inputs that used to work

Added by Mark Abraham 29 days ago. Updated 1 day ago.

Status:
New
Priority:
Normal
Assignee:
Category:
preprocessing (pdb2gmx,grompp)
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

As reported by Joshua Mitchell on gmx-users:

It seems that
preprocessor variables can no longer be given values in the MDP as of
GROMACS 2018? So in 2016 I could do

define = -DPOSRES -DPOSRESFC=500.0

and then in the posres ITP:

#ifndef POSRESFC
#define POSRESFC 1000.0
#endif

[ position_restraints ]
; atom type fx fy fz
1 1 POSRESFC POSRESFC POSRESFC
4 1 POSRESFC POSRESFC POSRESFC
7 1 POSRESFC POSRESFC POSRESFC
....

And this would let me set the position restraint force constants from the
MDP, which was very convenient. I'm pretty sure I got this trick from
MARTINI so I'm not the only person who uses it. Frustratingly, in 2018 that
little equal sign causes the whole MDP define line to be ignored, causing
position restraints to fail silently. So I've spent all day trying to
figure out why it looked like my position restraints aren't working!

I think this could trick a lot of people, especially newer users trying out
MARTINI. Is the old behaviour coming back?

History

#1 Updated by Mark Abraham 29 days ago

I suspect this is related to whether the string intended to be passed to the preprocessor contains any '=' symbol. I did do some clean-up here since 2016 branch. There are some TODO items in the test converage, IIRC.

#2 Updated by Mark Abraham 1 day ago

I'll try to work on this for 2018.1, but i have other things to tackle this week, first.

Also available in: Atom PDF