[gmx-developers] FEP and dihedraltypes, ignoring B-topology parameters

Oliver Lange olange at gwdg.de
Tue May 16 19:52:18 CEST 2006


Hi all,

I think i found a small bug, in the toppush.c of gromacs-3.3.1. (release 
version from website)
I am not sure though, it might be deliberately programmed in the current 
way, which just wasn't doing what i wanted.

I wanted to include a B-topology of dihedraltypes to use the topology 
with the FEP-code.
To this end I edited in the section [dihedraltypes] (after writing out 
the full topol.top with the option -pp of grompp)
such that lines in the [dihedraltype]-section contained 12 parameters:
a1 a2 a3 a4 type c1A-c6A c1B-c6B
I checked that all parameters are read correctly by the routine 
push_dihedraltype().
However, when it comes to creating the actual dihedrals push_bond() 
calls the function default_params().
The latter function takes special care for dihedrals with an if-statment 
like
if( ftype==F_PDIHS || ftype == F_RBDIHS || ftype == F_IDIHS) {--
when it is checking if the dihedral is in the dihedral-type list.
However, when it comes to copying the parameters it uses the for-loop
for (j=0; (j < nrfpB); j++) {
   p->c[nrfp+j] = bFound ? pi->c[j] : 0.0;
(where nrfp = 6 // nrfp = interaction_function[ftype].nrfpA;)
This loop assigns the 6 B-topology parameters (7-12) in the created 
dihedral (p->c) with the A-topology parameters (1-6) from the dihedraltype.
I changed that line into
 if( ftype==F_PDIHS || ftype == F_RBDIHS || ftype == F_IDIHS)
          p->c[nrfp+j] = bFound ? pi->c[nrfp+j] : 0.0;
       else
          p->c[nrfp+j] = bFound ? pi->c[j] : 0.0;
and now i get the B-topology dihedrals also carried over into the 
topol.tpr. (as checked with gmxcheck -s1 -s2)

As this is what i wanted, it fixed the problem for me.
If this is not what the GROMACS crew wants, please ignore my email.

Regards
Oliver


--------------
Oliver Lange

MPI for biophysical Chemistry
olange at gwdg.de
Fax: +495512012302
Tel: +495512012305




More information about the gromacs.org_gmx-developers mailing list