Merge branch release-2020 into master
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_disre.cpp
index 608677f69fdc572f32c9b7009f0c0c681f5cb47c..046573194a9db863758e58dddac12a85bb5fd3f1 100644 (file)
@@ -3,7 +3,8 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017 The GROMACS development team.
+ * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -62,6 +63,7 @@
 #include "gromacs/mdtypes/fcdata.h"
 #include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/mdtypes/mdatom.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/pbcutil/mshift.h"
 #include "gromacs/pbcutil/pbc.h"
@@ -774,7 +776,7 @@ int gmx_disre(int argc, char* argv[])
 
     g        = nullptr;
     pbc_null = nullptr;
-    if (ir->ePBC != epbcNONE)
+    if (ir->pbcType != PbcType::No)
     {
         if (ir->bPeriodicMols)
         {
@@ -834,19 +836,19 @@ int gmx_disre(int argc, char* argv[])
     auto mdAtoms = gmx::makeMDAtoms(fplog, *topInfo.mtop(), *ir, false);
     atoms2md(topInfo.mtop(), ir, -1, nullptr, ntopatoms, mdAtoms.get());
     update_mdatoms(mdAtoms->mdatoms(), ir->fepvals->init_lambda);
-    if (ir->ePBC != epbcNONE)
+    if (ir->pbcType != PbcType::No)
     {
-        gpbc = gmx_rmpbc_init(&top.idef, ir->ePBC, natoms);
+        gpbc = gmx_rmpbc_init(&top.idef, ir->pbcType, natoms);
     }
 
     j = 0;
     do
     {
-        if (ir->ePBC != epbcNONE)
+        if (ir->pbcType != PbcType::No)
         {
             if (ir->bPeriodicMols)
             {
-                set_pbc(&pbc, ir->ePBC, box);
+                set_pbc(&pbc, ir->pbcType, box);
             }
             else
             {
@@ -907,7 +909,7 @@ int gmx_disre(int argc, char* argv[])
         j++;
     } while (read_next_x(oenv, status, &t, x, box));
     close_trx(status);
-    if (ir->ePBC != epbcNONE)
+    if (ir->pbcType != PbcType::No)
     {
         gmx_rmpbc_done(gpbc);
     }
@@ -924,7 +926,7 @@ int gmx_disre(int argc, char* argv[])
         if (bPDB)
         {
             write_sto_conf(opt2fn("-q", NFILE, fnm), "Coloured by average violation in Angstrom",
-                           atoms.get(), xav, nullptr, ir->ePBC, box);
+                           atoms.get(), xav, nullptr, ir->pbcType, box);
         }
         dump_disre_matrix(opt2fn_null("-x", NFILE, fnm), &dr, fcd.disres.nres, j, &top.idef,
                           topInfo.mtop(), max_dr, nlevels, bThird);