Fixed error message for zwitterion residues
authorErik Lindahl <erik@kth.se>
Thu, 27 Dec 2012 11:42:21 +0000 (12:42 +0100)
committerErik Lindahl <erik@kth.se>
Thu, 27 Dec 2012 11:42:21 +0000 (12:42 +0100)
Previously, pdb2gmx complained that the residue was
not available as a 'starting' terminus for isolated
residues (usually zwitterions). This is really confusing
when starting terminus residuetypes ARE available. Now
we properly explain there is no type to use the residue
isolated.

Change-Id: I0c9c8328f12e75a5a7ffaa8ea894ff46f8fdfe75

src/kernel/pdb2gmx.c

index ad1e79cb398e567fcf7a00194dabcef0a3c8fa90..687080c3d1387e4b92bc2094ba49b4f0ceb1ddfb 100644 (file)
@@ -268,9 +268,10 @@ static char *search_resrename(int nrr,rtprename_t *rr,
         {
             nn = rr[i].main;
         }
+        
         if (nn[0] == '-')
         {
-            gmx_fatal(FARGS,"In the chosen force field there is no residue type for '%s'%s",name,bStart ? " as a starting terminus" : (bEnd ? " as an ending terminus" : ""));
+            gmx_fatal(FARGS,"In the chosen force field there is no residue type for '%s'%s",name,bStart ? ( bEnd ? " as a standalone (starting & ending) residue" : " as a starting terminus") : (bEnd ? " as an ending terminus" : ""));
         }
     }