When writing TNG the input must contain molecule data.
authorMagnus Lundborg <lundborg.magnus@gmail.com>
Fri, 24 Oct 2014 08:24:22 +0000 (10:24 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 24 Nov 2014 16:36:39 +0000 (17:36 +0100)
When using trjcat to write TNG the input must also be TNG since
no tpr file is used.

Fixes #1626

Change-Id: I060e0174f9a471e134a4a899f83afaf02f4fce00

src/gromacs/gmxana/gmx_trjcat.c

index 629f221d0b6dc4ad02fb2d560860845d9e0587a6..0e905041ce57f5456e80830e4bb506dcd1b7b29d 100644 (file)
@@ -651,6 +651,10 @@ int gmx_trjcat(int argc, char *argv[])
         {
             if (ftpout == efTNG)
             {
+                if (ftpout != ftpin)
+                {
+                    gmx_fatal(FARGS, "When writing TNG the input file format must also be TNG");
+                }
                 if (bIndex)
                 {
                     trjtools_gmx_prepare_tng_writing(out_file, 'w', NULL, &trxout,