[gmx-users] c preprocessor
lindahl at stanford.edu
Wed May 22 21:53:05 CEST 2002
Valentin Gogonea wrote:
> Dear Gromacs users,
> I want to added a new atom type to ffgmxnb.itp and it will help me if
> I can use variables (with #define) for the vdW parameters instead of
> their values.
> In "ffgmxnb.itp" I have:
> #define S3c6 0.99844E-02 ; c6 (vdW)
> #define S3c12 0.13078E-04 ; c12 (vdW)
> S 32.06000 0.000 A 0.99844E-02 0.13078E-04
> S3 32.06000 0.000 A S3c6 S3c12
> FE 55.84700 0.000 A 0.00000E+00 0.00000E+00
> But I got and error. It sees that cpp doesn't make the substitution.
> Can anybody suggest me what I should do? The C preprocessor should
> parse the "ffgmxnb.itp" file isn't it?
I think the problem is that your S3 line will be preprocessed into:
S3 32.06000 0.000 A 0.99844E-02 ; c6 (vdW)
0.13078E-04 ; c12 (vdW)
And everything after the first ";" is (correctly) ignored by grompp.
Try putting the comments on a separate line if you are using defines, i.e:
; c6 (vdW)
#define S3c6 0.99844E-02
More information about the gromacs.org_gmx-users