[gmx-developers] Single letter residue types in rtp files

Ranjit Vijayan ranjit.vijayan at bioch.ox.ac.uk
Fri Nov 17 19:27:49 CET 2006


Hello Gromacs developers,

I am trying to use 4 halides in a set of simulations using Gromacs 
3.3 and OPLS-AA/L. What I found is that pdb2gmx is happy with CL and BR 
in a PDB file, but produces a "Residue 'F' not found in residue topology 
database" with F (same error with I), though it is defined in 
ffoplsaa.rtp. It appeared as if internal comparisons do not accept 
single letter residue types, which was confirmed when I tried replacing the atom with 
a K. I searched the mailing lists and othr people have had problems with 
using K  and the suggested workaround was to replace K with K+ or something else.

Digging into the code, it does appear as if the checks will not match 
single letter residue types in a .rtp file.

>From src/kernel/resall.c :
---------------------------------------------------------------------
t_restp *search_rtp(char *key,int nrtp,t_restp rtp[])
{
   int i,n,best,besti;`

   besti=-1;
   best=1;
   for(i=0; (i<nrtp); i++) {
     n=neq_str(key,rtp[i].resname);
     if (n > best) {
       besti=i;
       best=n;
     }
   }
   if (besti == -1)
     gmx_fatal(FARGS,"Residue '%s' not found in residue topology 
database\n",key);
   if (strlen(rtp[besti].resname) != strlen(key))
     fprintf(stderr,"Warning: '%s' not found in residue topology 
database, "
             "trying to use '%s'\n", key, rtp[besti].resname);

   return &rtp[besti];
}
-----------------------------------------------------------------------------

If "best" is initialized to 1 and the condition is "n>best", it will 
naturally skip all single letter residue types. There probably is a 
reason why single letter comparisons are excluded (Isoleucine vs. Iodide 
for I?).

Of course, it is pretty straightforward for me to change the single 
letter residue types to two letters. But, would it not be 
better if the .rtp files released is set up to take care of the code's 
inability to handle single letter residue types or modify the above check to allow 
single letter residue types?


Best wishes
Ranjit

--
Ranjit Vijayan

Structural Bioinformatics & Computational Biochemistry Unit
Department of Biochemistry
University of Oxford
Oxford OX1 3QU

e: ranjit.vijayan[AT]bioch.ox.ac.uk
w: http://www.ranjitvijayan.net
a: New College, Oxford OX1 3BN
p: (+44)/(0) 1865 275 380
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
"We can easily forgive a child who is afraid of the dark;
the real tragedy is when men are afraid of the light." -- Plato
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-



More information about the gromacs.org_gmx-developers mailing list