Added trjconv check for topology prescence, see bugzilla 526
authorErik Lindahl <lindahl@cbr.su.se>
Fri, 27 Aug 2010 18:44:04 +0000 (20:44 +0200)
committerErik Lindahl <lindahl@cbr.su.se>
Fri, 27 Aug 2010 18:44:04 +0000 (20:44 +0200)
src/tools/gmx_trjconv.c

index 9f0bed147144958857013843e8c92992af600eb5..4f30887a27faba10ca7b0b1e722ec57faa96004b 100644 (file)
@@ -858,6 +858,11 @@ int gmx_trjconv(int argc,char *argv[])
                      "results!");
        }
 
+    if (0 == top.mols.nr && (bCluster || bPBCcomMol))
+    {
+        gmx_fatal(FARGS,"Option -pbc %s requires a .tpr file for the -s option", bCluster ? "cluster" : "mol");
+    }
+        
         /* ndec is in nr of decimal places, prec is a multiplication factor: */
         prec = 1;
         for (i=0; i<ndec; i++)