[gmx-users] correct processing of #define statements by grompp in gromacs 4.0.2 requires exactly one space after #define

Chris Neale chris.neale at utoronto.ca
Tue Nov 25 22:32:57 CET 2008


When two spaces are included the #define KEYWORD is incompletely removed 
from the file.
In case my conclusion about the exact nature of the error is incorrect, 
here is more information.

I have a ffcharmbon.itp file that contains:

[ dihedraltypes ]
#define  improper_NC2_X_X_C_  180.00000  83.68000  2

And an .itp file that contains:

[ dihedrals ]
    1     2     5     8     1             improper_NC2_X_X_C_

where grompp -pp returns

[ dihedrals ]
    1     2     5     8     1             _  180.00000  83.68000  2

and the floating '_' character causes the error message:

ERROR 1 [file my.itp, line 77]:
  No default Proper Dih. types

I tried to fix this by removing the trailing underscore character from 
my defined string in both files,
but now I get a trailing 'C'

[ dihedrals ]
    1     2     5     8     1             C  180.00000  83.68000  2

So it appears that the define statement is simply not being entirely 
removed.

When I then replaced
#define  improper_NC2_X_X_C_  180.00000  83.68000  2
by
#define improper_NC2_X_X_C_  180.00000  83.68000  2
(only one space between '#define' and 'improper...')
it works correctly.

Note that cpp handled this original define statement properly in gromacs 
3.3.1.

Chris.








More information about the gromacs.org_gmx-users mailing list