Hi, It looks like somebody is missing a factor of 2; either you, or the check in the table code, or maybe also in the evaluation kernel. I suggest you set up a three-particle system, and make some coordinate files with those particles at carefully chosen angles and see what energy and force is returned by
mdrun -s your.tpr -table yourtable.xvg -rerun your.gro Halve the values in the force column if you have to in order to get a force output and understand what the issue really is. Mark On Tue, Feb 20, 2018 at 10:37 AM Douwe Pollmann <douwepollm...@gmail.com> wrote: > Dear Gromacs users, > > I am currently trying to implement a user-defined dihedral into a coarse > grained model (in version 5.1.4), but I get the following error: > > 'For the 35988 non-zero entries for table 0 in tables/table_d4.xvg the > forces deviate on average 196% from minus the numerical derivative of the > potential'. > > The three columns in table_d4 are the angle [-180, 180], the potential > energy (in kJ/mol) and minus the derivative (first I had +derivative, which > resulted in an error or 204%). If I am correct, Gromacs interpolates its > own function through the data points given in table_d4, but the result is > far from correct in this case. > > I have tried to use -debug during mdrun to get the interpolated values of > Gromacs, but I only get the values (ctab.xvg, dtab.xvg and rtab.xvg) of the > non-bonded potentials, while this dihedral is of course a bonded potential. > > In section 6.10.1 of the manual (version 5.1.4) it is mentioned that > 'Gromacs stores A0, A1, A2 and A3', the parameters of the interpolated > cubic spline. My question is if any of you knows if it is possible to get > these parameters, or if it is possible to get the functions interpolated by > Gromacs, to check where the mistakes are made. > If this is not possible at all, do you have any ideas how I can decrease > the deviation of the forces? 0% deviation is not needed, but 200% is a bit > too much.. > > Thank you very much in advance! > > Kind regards, > Douwe Pollmann > -- > Gromacs Users mailing list > > * Please search the archive at > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before > posting! > > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists > > * For (un)subscribe requests visit > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or > send a mail to gmx-users-requ...@gromacs.org. > -- Gromacs Users mailing list * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting! * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists * For (un)subscribe requests visit https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-requ...@gromacs.org.