Project

General

Profile

Bug #2392

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

Added by Mark Abraham 7 months ago. Updated 6 months ago.

Status:
Closed
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?

Associated revisions

Revision c5fe4494 (diff)
Added by Mark Abraham 6 months ago

Permit define .mdp field to assign values

It is intended that the "define" .mdp field can set preprocessor
variables to values, but this got broken in some clean up. Added a
test to cover it.

Fixes #2392

Change-Id: I16a3705a0d59a912a8eb7bfad0b472f12d2dc377

History

#1 Updated by Mark Abraham 7 months 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 6 months ago

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

#3 Updated by Gerrit Code Review Bot 6 months ago

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

#4 Updated by Mark Abraham 6 months ago

  • Status changed from New to Fix uploaded

#5 Updated by Mark Abraham 6 months ago

  • Status changed from Fix uploaded to Resolved

#6 Updated by Mark Abraham 6 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF