Hi, I also encoutered a strange behaviour of gmxcpp when using B-states. When I set up up a free energy simulation (gromacs 4.0.2) with amber03 (ffamber from Sorin & Pande), I define a dihedral angle, e.g. like
[ dihedrals ] . 511 515 517 513 3 aromatic_prop_5a aromatic_prop_5 . If I process this topology with grompp it claims that there is no B-state defined. In the original ffamber03bon.itp there were comments in the define lines, e.g. #define aromatic_prop_5 41.84000 0.00000 -41.84000 0.00000 0.00000 0.00000 ; X-CR-NB-X (HIX) These were already removed since this causes grompp to cut the line after the first ";" and, hence it ignores the B-values. Now the strange thing: This works for all defined dihedrals except for those that end with an "a". So: 1 2 3 4 aromatic_prop_4 aromatic_prop_5 works fine, but 1 2 3 4 aromatic_prop_5a aromatic_prop_5 doesn't work. If I look into the processed topology, grompp has converted the first define, but not the second one. If I exchange the two dihedrals, like 1 2 3 4 aromatic_prop_5 aromatic_prop_5a it works again. I get the error only when these dihedrals are in the A-state: aromatic_prop_4a aromatic_prop_5a aromatic_prop_6a If I preprocess my topology with cpp -traditional all defines are nicely converted, so I guess there must go sth. wrong in gmxcpp. I also tried the fixed version from Berk as pointed out before, but this didn't do the job. Thanks, Daniel On Tuesday 25 November 2008 23:34:24 Berk Hess wrote: > Hi, > > That is an annoying bug. > I fixed it for 4.0.3. > If you want it fixed now, the diff is below. > > Berk > > > RCS file: /home/gmx/cvs/gmx/src/kernel/gmxcpp.c,v > retrieving revision 1.9 > diff -r1.9 gmxcpp.c > 121,122c121,122 > < sscanf(define,"%s",name); > < ptr = define + strlen(name); > --- > > > sscanf(define,"%s%n",name,&i); > > ptr = define + i; > > > > > > Date: Tue, 25 Nov 2008 16:32:57 -0500 > > From: [EMAIL PROTECTED] > > To: gmx-users@gromacs.org > > Subject: [gmx-users] correct processing of #define statements by grompp > > in gromacs 4.0.2 requires exactly one space after #define > > > > 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. > > > > > > > > > > > > _______________________________________________ > > gmx-users mailing list gmx-users@gromacs.org > > http://www.gromacs.org/mailman/listinfo/gmx-users > > Please search the archive at http://www.gromacs.org/search before > > posting! Please don't post (un)subscribe requests to the list. Use the > > www interface or send it to [EMAIL PROTECTED] > > Can't post? Read http://www.gromacs.org/mailing_lists/users.php > > _________________________________________________________________ > Express yourself instantly with MSN Messenger! Download today it's FREE! > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ -- Dr. Daniel Seeliger Computational Biomolecular Dynamics Group Max-Planck-Institute for Biophysical Chemistry Am Fassberg 11 37077 Goettingen, Germany Tel: +49 551 201 2310 Fax: +49 551 201 2302 email: [EMAIL PROTECTED] www.mpibpc.mpg.de/groups/de_groot/dseelig/index.html _______________________________________________ gmx-users mailing list gmx-users@gromacs.org http://www.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to [EMAIL PROTECTED] Can't post? Read http://www.gromacs.org/mailing_lists/users.php