Project

General

Profile

Bug #1913

tabulated bonded interaction files cannot be read

Added by Mark Abraham over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
mdrun
Target version:
Affected version - extra info:
5.1, 5.1.1 only
Affected version:
Difficulty:
uncategorized
Close

Description

gmx mdrun -rerun butane1.gro -tableb butane depends on being able to find files such as butane_d0.xvg if there is a tabulated dihedral, but (probably) the improved checks for valid command-line arguments in 5.1 are too vigilant, stopping mdrun when butane.xvg cannot be found:

GROMACS:      gmx mdrun, VERSION 5.1.2
Executable:   /opt/gromacs/5.1.2/bin/gmx
Data prefix:  /opt/gromacs/5.1.2
Command line:
  gmx mdrun -rerun butane1.gro -tableb butane

-------------------------------------------------------
Program:     gmx mdrun, VERSION 5.1.2
Source file: ../src/gromacs/commandline/cmdlineparser.cpp (line 234)
Function:    void gmx::CommandLineParser::parse(int*, char**)

Error in user input:
Invalid command-line options
  In command-line option -tableb
    File 'butane' does not exist or is not accessible.
    The following extensions were tried to complete the file name:
      .xvg

5.0 and earlier releases are OK. Possible solutions
  1. stop checking options like -tableb, instead handling them after the topology is known and the full range of possible suffixes is known
  2. parse the topology and amend the list of filenames automatically before checking anything for -tableb
  3. require -tableb to list all filenames up front, so that the normal checks for existence work (but preferably we would have later checks that the set provided is exactly what files are required)

If we will anyway move to topologies like

[ defaults ]
; nbfunc        comb-rule       gen-pairs       fudgeLJ fudgeQQ
  1             1               no              1.0     1.0

[ atomtypes ]
;name        mass      charge   ptype            c6           c12
  CH2    14.02700       0.000       A   0.90975E-02   0.35333E-04
  CH3    15.03500       0.000       A   0.88765E-02   0.26150E-04

[ pairtypes ]
; i   j  k    func
 OW  OW  1000 table_for_special_O_O_interactions.xvg

[ moleculetype ]
;             name    nrexcl
            butane   3

[ atoms ]
;   nr    type   resnr  residu    atom    cgnr
     1     CH3       1     BUT      C1       1
     2     CH2       1     BUT      C2       2
     3     CH2       1     BUT      C3       3
     4     CH3       1     BUT      C4       4

[ dihedrals ]
;  ai    aj    ak    al  k    funct
    1     2     3     4  1000 my-butane-dihedral.xvg

#include "tip3p.itp" 

[ system ]
; The name of the system to be simulated
Butane in water

[ molecules ]
; Molname             Number
Butane                   1
SOL            200

then the requirement at that time will be for the user has to name all the required files, but they will not do so on any command line. Option 3 seems like the least work for us now, and is consistent with a possible future in which the user will be required to explicitly name all the table files.


Related issues

Related to GROMACS - Feature #1347: future of tablesNew

Associated revisions

Revision 1e8dec80 (diff)
Added by Mark Abraham over 3 years ago

Fix reading of bonded tables

The old approach specified only a filename prefix, and init_forcerec
would expect to be able to append _b0 to generate the filename for the
zeroth bonded table, etc. This failed a check in early command-line
parsing when no file that matched just the prefix could be found.
Pairs are unaffected because there's only one table. Short-ranged
energy-group tables are not affected because they require that the
file with default name exists.

Command-line parsing now requires -tableb to name all tabulated bonded
interaction table files explicitly, and does the normal check that
they exist. init_forcerec will find any name in that list that matches
the required pattern. The concept of a default filename prefix for
tabulated bonded interactions no longer applies, but the old
'table_b0.xvg' naming still works. Added some comments and Doxygen to
explain what the old code was doing. Amended the user documentation
suitably.

One could add further checks e.g. that there are no table filenames
provided that are unused by the topology, but it is likely the need
for such checks will go away when the topology will name the files
directly.

Add some integration tests to show the functionality no longer
produces an error. Infrastructure to actually verify energies and
forces is waiting for review in Gerrit.

Expanded some string- and filename-handling infrastructure to meet
the new needs.

Improved the robustness of the check that the derivative column is
approximately the negative of the numerical derivative of the value
column.

Fixes #1913

Change-Id: If0a7cd69a40eb95fbda20eaaf4c3002782772f0e

History

#1 Updated by Mark Abraham over 3 years ago

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

Gerrit received a related patchset '1' for Issue #1913.
Uploader: Mark Abraham ()
Change-Id: If0a7cd69a40eb95fbda20eaaf4c3002782772f0e
Gerrit URL: https://gerrit.gromacs.org/5697

#3 Updated by Mark Abraham over 3 years ago

  • Target version set to 5.1.3

#4 Updated by Mark Abraham over 3 years ago

  • Status changed from New to Resolved

#5 Updated by Erik Lindahl over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF