Combine enums.h and names*.
authorDavid van der Spoel <spoel@xray.bmc.uu.se>
Wed, 11 Nov 2015 21:13:22 +0000 (22:13 +0100)
committerDavid van der Spoel <spoel@xray.bmc.uu.se>
Fri, 20 Nov 2015 14:44:43 +0000 (15:44 +0100)
Combined enums.h and names* to mdtypes/md_enums.cpp/h.
Added doxygen comments to md_enums.h
Removed macros in inputrec.h to reduce cyclic dependencies.

Clean up of legacyheaders. By removing some unnecessary includes
from the files names.h and enums.h (now md_enums.h)
a lot of 'freeriders' showed up, therefore had to include
topology.h in many files.

Part of #1415

Change-Id: I12b8ef4f82b7aec806aea2eee7d77604e86dc576

133 files changed:
docs/doxygen/cycle-suppressions.txt
src/gromacs/correlationfunctions/autocorr.cpp
src/gromacs/domdec/domdec.cpp
src/gromacs/domdec/domdec_setup.cpp
src/gromacs/domdec/domdec_topology.cpp
src/gromacs/essentialdynamics/edsam.cpp
src/gromacs/ewald/ewald.cpp
src/gromacs/ewald/long-range-correction.cpp
src/gromacs/ewald/pme-load-balancing.cpp
src/gromacs/ewald/pme-pp.cpp
src/gromacs/ewald/pme.cpp
src/gromacs/fileio/checkpoint.cpp
src/gromacs/fileio/enxio.cpp
src/gromacs/fileio/tpxio.cpp
src/gromacs/fileio/trrio.cpp
src/gromacs/fileio/trxio.cpp
src/gromacs/fileio/txtdump.cpp
src/gromacs/gmxana/gmx_bar.cpp
src/gromacs/gmxana/gmx_dipoles.cpp
src/gromacs/gmxana/gmx_disre.cpp
src/gromacs/gmxana/gmx_eneconv.cpp
src/gromacs/gmxana/gmx_enemat.cpp
src/gromacs/gmxana/gmx_energy.cpp
src/gromacs/gmxana/gmx_mindist.cpp
src/gromacs/gmxana/gmx_pme_error.cpp
src/gromacs/gmxana/gmx_rmsdist.cpp
src/gromacs/gmxana/gmx_sigeps.cpp
src/gromacs/gmxana/gmx_traj.cpp
src/gromacs/gmxana/gmx_trjcat.cpp
src/gromacs/gmxana/gmx_trjconv.cpp
src/gromacs/gmxana/gmx_tune_pme.cpp
src/gromacs/gmxana/gmx_wham.cpp
src/gromacs/gmxana/sfactor.cpp
src/gromacs/gmxlib/disre.cpp
src/gromacs/gmxlib/gmx_detect_hardware.cpp
src/gromacs/gmxlib/gpu_utils/gpu_utils_ocl.cpp
src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp
src/gromacs/gmxlib/nonbonded/nb_generic.cpp
src/gromacs/gmxlib/nonbonded/nonbonded.cpp
src/gromacs/gmxlib/nrnb.cpp
src/gromacs/gmxlib/readinp.cpp
src/gromacs/gmxpreprocess/convparm.cpp
src/gromacs/gmxpreprocess/gen_vsite.cpp
src/gromacs/gmxpreprocess/genconf.cpp
src/gromacs/gmxpreprocess/grompp.cpp
src/gromacs/gmxpreprocess/hackblock.cpp
src/gromacs/gmxpreprocess/nm2type.cpp
src/gromacs/gmxpreprocess/readir.cpp
src/gromacs/gmxpreprocess/readpull.cpp
src/gromacs/gmxpreprocess/readrot.cpp
src/gromacs/gmxpreprocess/topio.cpp
src/gromacs/gmxpreprocess/toppush.cpp
src/gromacs/gmxpreprocess/vsite_parm.cpp
src/gromacs/gmxpreprocess/x2top.cpp
src/gromacs/imd/imd.cpp
src/gromacs/legacyheaders/names.h [deleted file]
src/gromacs/legacyheaders/types/enums.h [deleted file]
src/gromacs/legacyheaders/types/forcerec.h
src/gromacs/listed-forces/listed-forces.cpp
src/gromacs/listed-forces/pairs.cpp
src/gromacs/listed-forces/position-restraints.cpp
src/gromacs/mdlib/broadcaststructs.cpp
src/gromacs/mdlib/calc_verletbuf.cpp
src/gromacs/mdlib/clincs.cpp
src/gromacs/mdlib/compute_io.cpp
src/gromacs/mdlib/constr.cpp
src/gromacs/mdlib/coupling.cpp
src/gromacs/mdlib/expanded.cpp
src/gromacs/mdlib/force.cpp
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/genborn.cpp
src/gromacs/mdlib/genborn_allvsall.cpp
src/gromacs/mdlib/md_support.cpp
src/gromacs/mdlib/mdatoms.cpp
src/gromacs/mdlib/mdebin.cpp
src/gromacs/mdlib/mdebin_bar.cpp
src/gromacs/mdlib/mdoutf.cpp
src/gromacs/mdlib/minimize.cpp
src/gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.cu
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_file_generator/nbnxn_kernel_simd_template.cpp.pre
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_gpu_ref.cpp
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.cpp
src/gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.cpp
src/gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.cpp
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl_data_mgmt.cpp
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl_jit_support.cpp
src/gromacs/mdlib/nbnxn_search.cpp
src/gromacs/mdlib/ns.cpp
src/gromacs/mdlib/perf_est.cpp
src/gromacs/mdlib/qm_gamess.cpp
src/gromacs/mdlib/qm_gaussian.cpp
src/gromacs/mdlib/qm_mopac.cpp
src/gromacs/mdlib/qm_orca.cpp
src/gromacs/mdlib/qmmm.cpp
src/gromacs/mdlib/rf_util.cpp
src/gromacs/mdlib/shakef.cpp
src/gromacs/mdlib/shellfc.cpp
src/gromacs/mdlib/sim_util.cpp
src/gromacs/mdlib/stat.cpp
src/gromacs/mdlib/tpi.cpp
src/gromacs/mdlib/update.cpp
src/gromacs/mdlib/vcm.cpp
src/gromacs/mdlib/wall.cpp
src/gromacs/mdlib/wnblist.cpp
src/gromacs/mdtypes/CMakeLists.txt
src/gromacs/mdtypes/inputrec.cpp
src/gromacs/mdtypes/inputrec.h
src/gromacs/mdtypes/md_enums.cpp [moved from src/gromacs/gmxlib/names.cpp with 72% similarity]
src/gromacs/mdtypes/md_enums.h [new file with mode: 0644]
src/gromacs/mdtypes/state.cpp
src/gromacs/mdtypes/state.h
src/gromacs/pbcutil/boxutilities.cpp
src/gromacs/pulling/pull.cpp
src/gromacs/pulling/pull_rotation.cpp
src/gromacs/pulling/pullutil.cpp
src/gromacs/swap/swapcoords.cpp
src/gromacs/tables/forcetable.cpp
src/gromacs/tools/check.cpp
src/gromacs/tools/compare.cpp
src/gromacs/tools/convert_tpr.cpp
src/gromacs/tools/dump.cpp
src/gromacs/topology/atoms.cpp
src/gromacs/topology/atoms.h
src/gromacs/topology/mtop_util.cpp
src/gromacs/topology/topology.cpp
src/gromacs/topology/topology.h
src/programs/mdrun/md.cpp
src/programs/mdrun/membed.cpp
src/programs/mdrun/repl_ex.cpp
src/programs/mdrun/resource-division.cpp
src/programs/mdrun/runner.cpp
src/programs/view/dialogs.cpp
src/programs/view/manager.cpp

index 8693e43d1124374e8f34d222bbb226c6555cc2a8..82fb67c2b90991d92e56d2505173e651ee608465 100644 (file)
@@ -12,7 +12,6 @@ mdlib -> essentialdynamics
 mdlib -> imd
 mdlib -> ewald
 mdlib -> pulling
-mdtypes -> legacyheaders
 timing -> legacyheaders
 timing -> gmxlib
 topology -> fileio
index ddbfd54fc5d0d917ed5641110c1ea707a6b70882..52134d5b26447ff6b1ff135524e4f61b3a8c5142 100644 (file)
@@ -57,8 +57,8 @@
 #include "gromacs/correlationfunctions/manyautocorrelation.h"
 #include "gromacs/correlationfunctions/polynomials.h"
 #include "gromacs/fileio/xvgr.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
index 8184c1a08371b0623523952f3ab072672f5cdba4..9f2f6669e0ccc29879e3e7e773319b286d7a9de4 100644 (file)
@@ -59,9 +59,7 @@
 #include "gromacs/gmxlib/nrnb.h"
 #include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
 #include "gromacs/imd/imd.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/legacyheaders/types/forcerec.h"
 #include "gromacs/legacyheaders/types/hw_info.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
@@ -82,6 +80,7 @@
 #include "gromacs/mdlib/vsite.h"
 #include "gromacs/mdtypes/df_history.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/mdatom.h"
 #include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/ishift.h"
@@ -234,7 +233,7 @@ static int ddcoord2ddnodeid(gmx_domdec_t *dd, ivec c)
 
 static gmx_bool dynamic_dd_box(gmx_ddbox_t *ddbox, t_inputrec *ir)
 {
-    return (ddbox->nboundeddim < DIM || DYNAMIC_BOX(*ir));
+    return (ddbox->nboundeddim < DIM || inputrecDynamicBox(ir));
 }
 
 int ddglatnr(gmx_domdec_t *dd, int i)
@@ -9146,7 +9145,7 @@ void dd_partition_system(FILE                *fplog,
     dd   = cr->dd;
     comm = dd->comm;
 
-    bBoxChanged = (bMasterState || DEFORM(*ir));
+    bBoxChanged = (bMasterState || inputrecDeform(ir));
     if (ir->epc != epcNO)
     {
         /* With nstpcouple > 1 pressure coupling happens.
index 1755e18ddfb735c8d02658c8f33b62046d2ad660..0e1b7a1bb17a1f242faa5262b9f576d126284880 100644 (file)
 
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/perf_est.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
@@ -625,7 +626,7 @@ static real optimize_ncells(FILE *fplog,
     {
         /* For Ewald exclusions pbc_dx is not called */
         bExcl_pbcdx =
-            (IR_EXCL_FORCES(*ir) && !EEL_FULL(ir->coulombtype));
+            (inputrecExclForces(ir) && !EEL_FULL(ir->coulombtype));
         pbcdxr = (double)n_bonded_dx(mtop, bExcl_pbcdx)/(double)mtop->natoms;
     }
     else
index 9909ba4bf6d2c35f60a83c997edcebfa7cb2a6e4..e1babcdd782aa5d8fc45369283d68b167e43030e 100644 (file)
 #include "gromacs/gmxlib/chargegroup.h"
 #include "gromacs/gmxlib/gmx_omp_nthreads.h"
 #include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/forcerec.h"
 #include "gromacs/mdlib/vsite.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/mshift.h"
 #include "gromacs/pbcutil/pbc.h"
@@ -815,7 +816,7 @@ void dd_make_reverse_top(FILE *fplog,
      * excluded pair should appear exactly once.
      */
     rt->bExclRequired = (ir->cutoff_scheme == ecutsGROUP &&
-                         IR_EXCL_FORCES(*ir));
+                         inputrecExclForces(ir));
 
     int nexcl, mb;
 
@@ -2716,7 +2717,7 @@ void dd_bonded_cg_distance(FILE *fplog,
     bonded_distance_t  bd_2b = { 0, -1, -1, -1 };
     bonded_distance_t  bd_mb = { 0, -1, -1, -1 };
 
-    bExclRequired = IR_EXCL_FORCES(*ir);
+    bExclRequired = inputrecExclForces(ir);
 
     vsite = init_vsite(mtop, NULL, TRUE);
 
index 7197782ecdba987cd87ba0723919ccce0c60ac0e..09b6532101af9f6b3410fc6d21f4e4db65bb2d75 100644 (file)
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/linearalgebra/nrjac.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/math/vectypes.h"
 #include "gromacs/mdlib/groupcoord.h"
 #include "gromacs/mdlib/mdrun.h"
 #include "gromacs/mdlib/sim_util.h"
+#include "gromacs/mdlib/update.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/gmxassert.h"
index 000f6719af0c5674fa8d71c41e79fc1df7399b08..085de8c22d9264a41e20e512624f6c4615dbd4ee 100644 (file)
@@ -61,6 +61,7 @@
 #include "gromacs/math/vec.h"
 #include "gromacs/math/vectypes.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
index 214c070429ef54824ef239853b6725c85c446c8a..0a635e71b577df0bcb3f337b40a8b7b38ae86f1e 100644 (file)
 
 #include <cmath>
 
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/legacyheaders/types/forcerec.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/fatalerror.h"
 
 /* There's nothing special to do here if just masses are perturbed,
index 8deb7eae198dab1f7c4da8d2151c3e545fdb444b..01f8aafca27ee365f44f93c17f9b1a33d0b74a2d 100644 (file)
@@ -63,6 +63,7 @@
 #include "gromacs/mdlib/forcerec.h"
 #include "gromacs/mdlib/nbnxn_gpu_data_mgmt.h"
 #include "gromacs/mdlib/sim_util.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/utility/cstringutil.h"
index 1330a87f69b16ea440b161f7d7af08ae0d458794..62a3573cc1b1fbbd2e233ea54501787b0dbdd4c5 100644 (file)
@@ -58,6 +58,7 @@
 #include "gromacs/gmxlib/sighandler.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/gmxmpi.h"
 #include "gromacs/utility/smalloc.h"
index a0b81100a46a632807b0f6d84043a7c22e514ac7..84179ab69ab56b2d22a6a8736744a85bc829c090 100644 (file)
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
 #include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/legacyheaders/types/forcerec.h"
 #include "gromacs/math/gmxcomplex.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/math/vectypes.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/timing/cyclecounter.h"
 #include "gromacs/timing/wallcycle.h"
index 10ef97fc80d03cf15f7e607786ff8c874b73f054..2fd941f7af85f9e5437a8ad27ca47d97b01156f3 100644 (file)
 #include "gromacs/fileio/xdr_datatype.h"
 #include "gromacs/fileio/xdrf.h"
 #include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdtypes/df_history.h"
 #include "gromacs/mdtypes/energyhistory.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/state.h"
 #include "gromacs/utility/baseversion.h"
 #include "gromacs/utility/cstringutil.h"
index e904f80995ea38539b4988c04db38893679ef982..143a581268d78f21b8b22ac60be8608d56b3dd13 100644 (file)
@@ -47,6 +47,8 @@
 #include "gromacs/fileio/gmxfio-xdr.h"
 #include "gromacs/fileio/xdrf.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/fatalerror.h"
@@ -1196,7 +1198,7 @@ void get_enx_state(const char *fn, real t, gmx_groups_t *groups, t_inputrec *ir,
             bufi = *(groups->grpname[ni]);
             for (j = 0; (j < state->nhchainlength); j++)
             {
-                if (IR_NVT_TROTTER(ir))
+                if (inputrecNvtTrotter(ir))
                 {
                     sprintf(cns, "-%d", j);
                 }
@@ -1209,7 +1211,7 @@ void get_enx_state(const char *fn, real t, gmx_groups_t *groups, t_inputrec *ir,
         }
         fprintf(stderr, "\nREAD %d NOSE-HOOVER Xi chains FROM %s\n\n", state->ngtc, fn);
 
-        if (IR_NPT_TROTTER(ir) || IR_NPH_TROTTER(ir))
+        if (inputrecNptTrotter(ir) || inputrecNphTrotter(ir))
         {
             for (i = 0; i < state->nnhpres; i++)
             {
index 14e0cb3f18adfc6b415d8d1fadd734efa371accf..64554d1abe3794105dae218aec9ce5b8298f8261 100644 (file)
 #include "gromacs/fileio/filenm.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/gmxfio-xdr.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/boxutilities.h"
 #include "gromacs/pbcutil/pbc.h"
index 35f532ea9067eabdbf168730ba780471b57e70fb..ee4145bae3ab2d829586d3ed1b569ef164c5676b 100644 (file)
@@ -43,7 +43,7 @@
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/gmxfio-xdr.h"
 #include "gromacs/fileio/txtdump.h"
-#include "gromacs/legacyheaders/names.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/smalloc.h"
index 2e980c3516a80aae8a436a6e5e2071e403f3ef75..ec780f853950027d6ada2687358f07a43489ebd2 100644 (file)
 #include "gromacs/fileio/trx.h"
 #include "gromacs/fileio/xdrf.h"
 #include "gromacs/fileio/xtcio.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/topology/atoms.h"
+#include "gromacs/topology/symtab.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/gmxassert.h"
index e803f7a2a70c160707b943723a67330365f37ad1..da4962aa6ba967627bf42d4d7d12cdf171a3de9b 100644 (file)
 #include <algorithm>
 
 #include "gromacs/fileio/tpxio.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/cstringutil.h"
index 5ac6f3ec6d8b8078f74de43bbc19e48a16981004..14a7895856d706471aec70e708369c289412e712 100644 (file)
 #include "gromacs/fileio/enxio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/mdlib/mdebin.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/dir_separator.h"
index b7572a16834250cb54a02e30de1e62a911f6a09a..6981c200acbfeedf6d64601780736f4c9884dc07 100644 (file)
 #include "gromacs/fileio/txtdump.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/linearalgebra/nrjac.h"
 #include "gromacs/listed-forces/bonded.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pbcutil/rmpbc.h"
 #include "gromacs/random/random.h"
 #include "gromacs/statistics/statistics.h"
 #include "gromacs/topology/index.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/exceptions.h"
index d31708549ce93c3536da9acf83b48bb62c93d560..8eaae8412e98c8bd6e48d9f332717274108b6d29 100644 (file)
 #include "gromacs/gmxlib/disre.h"
 #include "gromacs/gmxlib/main.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/fcdata.h"
 #include "gromacs/math/do_fit.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/mdatoms.h"
 #include "gromacs/mdlib/mdrun.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/pbcutil/mshift.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pbcutil/rmpbc.h"
 #include "gromacs/topology/index.h"
 #include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
index 36961239558d16d5e6b59d28db3a5ba28b9787a3..3b151381cd31675ae9ee5f2616f9b1649313901a 100644 (file)
@@ -47,8 +47,8 @@
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/gmxlib/disre.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
index 049277679c421c233fb8e50a189814dc90061113..178461db28a01db87e958c48efecb575bc1ccfb6 100644 (file)
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/gmxana/gstat.h"
-#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/types/forcerec.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
index db1a5be12ca25b68d959907a50e6e9e4233b082b..a4344cc81021f3c68d5af86c2596ebf1718caee3 100644 (file)
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/gmxana/gstat.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/mdebin.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
index 071593346f571659ce232a4f7c9813927417528c..1c3f8ddb665b40de5f7880a766d43cec31a28e9b 100644 (file)
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pbcutil/rmpbc.h"
 #include "gromacs/topology/index.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
index 3e6a9cb205dfcfad9cafd83d7726d0f4e3f771fd..95355fd576521f4254c6109add33f47270abcaad 100644 (file)
@@ -53,6 +53,7 @@
 #include "gromacs/math/calculate-ewald-splitting-coefficient.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/random/random.h"
 #include "gromacs/topology/mtop_util.h"
 #include "gromacs/topology/topology.h"
index c1e81401140e9e0f97cb593c89d4416651962cb5..e74c0a766b09e71a94e954314d15a39ac1b983b0 100644 (file)
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/index.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
index 629c09c554d7c79d17d2c836c621d558cc589a01..35ff26694c92dc7197696ed4801d6cd619cd2162 100644 (file)
@@ -44,9 +44,9 @@
 #include "gromacs/fileio/txtdump.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/smalloc.h"
 
index d7e93070b612e09cb700440bd504e4afeceea679..4876a86af941aaeb6c8e6aaceeaa8b8f32a9539e 100644 (file)
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/linearalgebra/nrjac.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pbcutil/rmpbc.h"
 #include "gromacs/topology/index.h"
index 0ce3ca9c65669393b4ce7e9eb8f7e99039b169f7..69ffd8b9894b8cf843877de632d74af54d8c9d2e 100644 (file)
@@ -53,8 +53,8 @@
 #include "gromacs/fileio/xtcio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/topology/index.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/fatalerror.h"
index e8ee35d186f7d96d1b165f25df6a6ff91e16ab9b..643ca6eaac689f2156892b94987912af3b062d10 100644 (file)
@@ -58,9 +58,9 @@
 #include "gromacs/fileio/xtcio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/do_fit.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pbcutil/rmpbc.h"
 #include "gromacs/topology/index.h"
index c60b6010c54854210aa4080c1b07a67a3badeeed..d1f29558ddca21b89cfb5abe5fd9864a98a18d41 100644 (file)
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/gmxlib/calcgrid.h"
 #include "gromacs/gmxlib/readinp.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/perf_est.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/timing/walltime_accounting.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/baseversion.h"
 #include "gromacs/utility/cstringutil.h"
index b715d9c98ac19fd7737c2014a5fcf1d9a6a0d1f8..8de466db69fcabd280b00d1d728cdfbe7fb33b6a 100644 (file)
@@ -58,9 +58,9 @@
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/random/random.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/cstringutil.h"
index f897f24ba5b88370a678d3fcd76a5b2f1b7d9b6b..a0856f1c7a4686d2e731cf26127d93c8b137793a 100644 (file)
 #include "gromacs/fileio/trx.h"
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/fileio/xvgr.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/topology/index.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
index 8b3e0f55ff83194d69c191968ae85e061969ae47..55cb80f681c7309411f178cb40b2e5e28d891064 100644 (file)
@@ -53,6 +53,7 @@
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/legacyheaders/types/fcdata.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/pbcutil/mshift.h"
index 71dd7eb6a1753833292d9a9497d1db9b7321c1b2..3a88126ab417e747d75977d3509b1a316055bfd7 100644 (file)
@@ -61,8 +61,8 @@
 #include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
 #include "gromacs/legacyheaders/gmx_cpuid.h"
 #include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/legacyheaders/types/hw_info.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/arrayref.h"
 #include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/basenetwork.h"
index f5060be75bc39be610473c9f90f9d4abf86ce693..ad83f34c3d874fe4ee3efc38080e16401f0f9be4 100644 (file)
@@ -55,8 +55,8 @@
 #include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
 #include "gromacs/gmxlib/gpu_utils/ocl_compiler.h"
 #include "gromacs/gmxlib/ocl_tools/oclutils.h"
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/legacyheaders/types/hw_info.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
index 91d03a48fab9bc52993e915db998d3f287d323b7..6e60df0db37f70c6902a33c4cc13255009ae91f4 100644 (file)
@@ -47,6 +47,7 @@
 #include "gromacs/gmxlib/nonbonded/nonbonded.h"
 #include "gromacs/legacyheaders/types/forcerec.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/fatalerror.h"
 
 void
index bcdf5cc5b0fd1bff517c2a08504d03c0f9e78fac..807c4ee0f43b7cfaa31a11cbc5434f62344bf7e8 100644 (file)
@@ -44,6 +44,7 @@
 #include "gromacs/gmxlib/nonbonded/nb_kernel.h"
 #include "gromacs/gmxlib/nonbonded/nonbonded.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/fatalerror.h"
 
 void
index 64160aa000020dec01395ffddde3cf57250a2beb..c0fb66726debf7e55a3ee80c6270c63406cb047a 100644 (file)
 #include "gromacs/gmxlib/nonbonded/nb_generic.h"
 #include "gromacs/gmxlib/nonbonded/nb_generic_cg.h"
 #include "gromacs/gmxlib/nonbonded/nb_kernel.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/forcerec.h"
 #include "gromacs/legacyheaders/types/nblist.h"
 #include "gromacs/listed-forces/bonded.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/mdatom.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/pbcutil/mshift.h"
index 8eb6fdca126c6ea224ea149cf800bbce03ecb27f..7c7d008ad32f98c3069948cb019354de69e0de5c 100644 (file)
@@ -43,8 +43,8 @@
 
 #include <algorithm>
 
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/smalloc.h"
 
index 7e89f8f9a6bb4d2741c2d5fa736355c0a09f473b..900de550a30007783ea9f88e51a92a824860ba85 100644 (file)
@@ -47,7 +47,7 @@
 #include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/gmxlib/warninp.h"
-#include "gromacs/legacyheaders/names.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/fatalerror.h"
index 543864f88b70de2c6373c432c13a5a10383305d7..5fcbfadcfcadcd9960c356db80e5d7ff2df481a9 100644 (file)
 #include "gromacs/gmxpreprocess/gpp_atomtype.h"
 #include "gromacs/gmxpreprocess/topio.h"
 #include "gromacs/gmxpreprocess/toputil.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
index d7164b6b715ec90064580fed85c02d2b956dc6a9..d862b53685bad1574c29a2b7a5ceb0daea3395dd 100644 (file)
 #include "gromacs/gmxpreprocess/notset.h"
 #include "gromacs/gmxpreprocess/resall.h"
 #include "gromacs/gmxpreprocess/toputil.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/topology/residuetypes.h"
 #include "gromacs/topology/symtab.h"
 #include "gromacs/utility/basedefinitions.h"
index c2fe60dc22613103c23a28ba32e8e21512c8285d..3f6636519cb6c1089145a2f4132e851e0794ae37 100644 (file)
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/fileio/txtdump.h"
 #include "gromacs/gmxlib/readinp.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/3dtransforms.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/random/random.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
index 0ae343698d503c84470a4aadacac6e072b9a2511..212bc919d30f696cb684a7ddc8457000dacf5808 100644 (file)
 #include "gromacs/gmxpreprocess/toputil.h"
 #include "gromacs/gmxpreprocess/vsite_parm.h"
 #include "gromacs/imd/imd.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
+#include "gromacs/legacyheaders/types/nblist.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/calc_verletbuf.h"
 #include "gromacs/mdlib/compute_io.h"
 #include "gromacs/mdlib/genborn.h"
 #include "gromacs/mdlib/perf_est.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/boxutilities.h"
 #include "gromacs/pbcutil/pbc.h"
@@ -391,7 +393,7 @@ static void check_shells_inputrec(gmx_mtop_t *mtop,
             nshells++;
         }
     }
-    if (IR_TWINRANGE(*ir) && (nshells > 0))
+    if (inputrecTwinRange(ir) && (nshells > 0))
     {
         snprintf(warn_buf, STRLEN,
                  "The combination of using shells and a twin-range cut-off is not supported");
index cca6fe70a407c67396220a0cd3628ed0200e3444..6e8026e922630e83641ecfa8e5dc8f65d4528847 100644 (file)
@@ -42,8 +42,8 @@
 #include <string.h>
 
 #include "gromacs/gmxpreprocess/notset.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
index 91f6fa6c538a02ca680e0bc49920b0cd96312698..9c69c9f2ce2e78f02d659330eb58235b09515299 100644 (file)
@@ -52,9 +52,9 @@
 #include "gromacs/gmxpreprocess/notset.h"
 #include "gromacs/gmxpreprocess/pdb2top.h"
 #include "gromacs/gmxpreprocess/toppush.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
index be7d381694c0c84babb532d31d230c9949b58fb7..af39b831018fc3f5c3a8ee3ec79ab39db9fb96f4 100644 (file)
 #include "gromacs/gmxlib/readinp.h"
 #include "gromacs/gmxlib/warninp.h"
 #include "gromacs/gmxpreprocess/toputil.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/calc_verletbuf.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/block.h"
 #include "gromacs/topology/index.h"
 #include "gromacs/topology/mtop_util.h"
 #include "gromacs/topology/symtab.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
@@ -313,11 +314,11 @@ void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
         {
             warning_error(wi, "rlistlong can not be shorter than rlist");
         }
-        if (IR_TWINRANGE(*ir) && ir->nstlist == 0)
+        if (inputrecTwinRange(ir) && ir->nstlist == 0)
         {
             warning_error(wi, "Can not have nstlist == 0 with twin-range interactions");
         }
-        if (IR_TWINRANGE(*ir) && EI_VV(ir->eI))
+        if (inputrecTwinRange(ir) && EI_VV(ir->eI))
         {
             sprintf(warn_buf, "Twin-range interactions are not supported with integrator %s.", ei_names[ir->eI]);
             warning_error(wi, warn_buf);
@@ -555,7 +556,7 @@ void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
                 ir->nstpcouple = ir_optimal_nstpcouple(ir);
             }
         }
-        if (IR_TWINRANGE(*ir))
+        if (inputrecTwinRange(ir))
         {
             check_nst("nstcalclr", ir->nstcalclr,
                       "nstcalcenergy", &ir->nstcalcenergy, wi);
@@ -785,7 +786,7 @@ void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
             }
         }
 
-        if (IR_TWINRANGE(*ir))
+        if (inputrecTwinRange(ir))
         {
             sprintf(err_buf, "nstdhdl must be divisible by nstcalclr");
             CHECK(ir->fepvals->nstdhdl > 0 &&
@@ -1341,13 +1342,13 @@ void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
         if (ir_coulomb_is_zero_at_cutoff(ir) && ir->rlistlong <= ir->rcoulomb)
         {
             sprintf(warn_buf, "For energy conservation with switch/shift potentials, %s should be 0.1 to 0.3 nm larger than rcoulomb.",
-                    IR_TWINRANGE(*ir) ? "rlistlong" : "rlist");
+                    inputrecTwinRange(ir) ? "rlistlong" : "rlist");
             warning_note(wi, warn_buf);
         }
         if (ir_vdw_switched(ir) && (ir->rlistlong <= ir->rvdw))
         {
             sprintf(warn_buf, "For energy conservation with switch/shift potentials, %s should be 0.1 to 0.3 nm larger than rvdw.",
-                    IR_TWINRANGE(*ir) ? "rlistlong" : "rlist");
+                    inputrecTwinRange(ir) ? "rlistlong" : "rlist");
             warning_note(wi, warn_buf);
         }
     }
@@ -4372,7 +4373,7 @@ void double_check(t_inputrec *ir, matrix box,
             warning_error(wi, warn_buf);
         }
 
-        if (IR_TWINRANGE(*ir) && ir->nstlist > 1)
+        if (inputrecTwinRange(ir) && ir->nstlist > 1)
         {
             sprintf(warn_buf, "With twin-range cut-off's and SHAKE the virial and the pressure are incorrect.");
             if (ir->epc == epcNO)
index 9fb8e49470b867138f9e1af9883e1c59f344f146..f88285ff9a396538e5712376a12807610b6af99a 100644 (file)
 
 #include "gromacs/gmxlib/readinp.h"
 #include "gromacs/gmxpreprocess/readir.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/mdatoms.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pulling/pull.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
index b3ab2b1518f64bafb1d6eff0fc0e7154dfd712ff..e347123e4d5365a0511d658db2b0576742fa84a3 100644 (file)
@@ -39,9 +39,9 @@
 #include "gromacs/fileio/trrio.h"
 #include "gromacs/fileio/txtdump.h"
 #include "gromacs/gmxpreprocess/readir.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
index 00f34ba3dd47ac0eee95e301a4e2b9cd44cfb26c..21d6d53db8b6bcc802501ad7f497bb8789367f84 100644 (file)
 #include "gromacs/gmxpreprocess/topshake.h"
 #include "gromacs/gmxpreprocess/toputil.h"
 #include "gromacs/gmxpreprocess/vsite_parm.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/mdlib/genborn.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/topology/block.h"
 #include "gromacs/topology/symtab.h"
 #include "gromacs/topology/topology.h"
index 79d08a8c867d7718ba12e6af4daa713934916341..a177fcd2a207eb4696fe929208b70e419110b63a 100644 (file)
@@ -52,8 +52,8 @@
 #include "gromacs/gmxpreprocess/readir.h"
 #include "gromacs/gmxpreprocess/topdirs.h"
 #include "gromacs/gmxpreprocess/toputil.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/topology/symtab.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
index 496309e1faf52b7160ee3a3511f23af5bde00781..7f588d0b8a5fe13a2a057c26330a599b6cc6e746 100644 (file)
 #include "gromacs/gmxpreprocess/notset.h"
 #include "gromacs/gmxpreprocess/resall.h"
 #include "gromacs/gmxpreprocess/toputil.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/gmxassert.h"
index 2ee7e8db3d637259eb2e15fd358e9f6ecb65dcf8..98fa0e2b35f40b3e2a1c08cbb4dad20c00f407ee 100644 (file)
 #include "gromacs/gmxpreprocess/notset.h"
 #include "gromacs/gmxpreprocess/pdb2top.h"
 #include "gromacs/gmxpreprocess/toppush.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/listed-forces/bonded.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/symtab.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
index 8f06c75f409c388385849fb50a198ee294d21684..40e1e90efa6554abc1daf0973231bbc2cd67c0e3 100644 (file)
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/sighandler.h"
 #include "gromacs/imd/imdsocket.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/groupcoord.h"
 #include "gromacs/mdlib/mdrun.h"
 #include "gromacs/mdlib/sim_util.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
@@ -994,7 +995,7 @@ static void imd_readcommand(t_gmx_IMD_setup *IMDsetup)
 
             /* Catch all rule for the remaining IMD types which we don't expect */
             default:
-                fprintf(stderr, " %s Received unexpected %s.\n", IMDstr, ENUM_NAME((int)itype, IMD_NR, eIMDType_names));
+                fprintf(stderr, " %s Received unexpected %s.\n", IMDstr, enum_name((int)itype, IMD_NR, eIMDType_names));
                 imd_fatal(IMDsetup, "Terminating connection\n");
                 break;
         } /* end switch */
diff --git a/src/gromacs/legacyheaders/names.h b/src/gromacs/legacyheaders/names.h
deleted file mode 100644 (file)
index 67801d8..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, 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.
- *
- * GROMACS is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * GROMACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with GROMACS; if not, see
- * http://www.gnu.org/licenses, or write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
- *
- * If you want to redistribute modifications to GROMACS, please
- * consider that scientific software is very special. Version
- * control is crucial - bugs must be traceable. We will be happy to
- * consider code for inclusion in the official distribution, but
- * derived work must not be called official GROMACS. Details are found
- * in the README & COPYING files - if they are missing, get the
- * official version at http://www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the research papers on the package. Check out http://www.gromacs.org.
- */
-
-#ifndef _names_h
-#define _names_h
-
-#include "gromacs/legacyheaders/types/forcerec.h"
-#include "gromacs/topology/atoms.h"
-#include "gromacs/topology/topology.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* All string arrays are NULL terminated, and therefore have an
- * extra argument (the +1)
- * these should correspond to names.c and include/types/enums.h
- */
-extern const char *etcoupl_names[etcNR+1];
-extern const char *epcoupl_names[epcNR+1];
-extern const char *epcoupltype_names[epctNR+1];
-extern const char *erefscaling_names[erscNR+1];
-extern const char *ecutscheme_names[ecutsNR+1];
-extern const char *ens_names[ensNR+1];
-extern const char *ei_names[eiNR+1];
-extern const char *yesno_names[BOOL_NR+1];
-extern const char *bool_names[BOOL_NR+1];
-extern const char *eintmod_names[eintmodNR+1];
-extern const char *eel_names[eelNR+1];
-extern const char *eewg_names[eewgNR+1];
-extern const char *evdw_names[evdwNR+1];
-extern const char *eljpme_names[eljpmeNR+1];
-extern const char *econstr_names[econtNR+1];
-extern const char *ptype_str[eptNR+1];
-extern const char *egrp_nm[egNR+1];
-extern const char *edisre_names[edrNR+1];
-extern const char *edisreweighting_names[edrwNR+1];
-extern const char *enbf_names[eNBF_NR+1];
-extern const char *ecomb_names[eCOMB_NR+1];
-extern const char *gtypes[egcNR+1];
-extern const char *esimtemp_names[esimtempNR+1];
-extern const char *efep_names[efepNR+1];
-extern const char *efpt_names[efptNR+1];
-extern const char *efpt_singular_names[efptNR+1];
-extern const char *edHdLPrintEnergy_names[edHdLPrintEnergyNR+1];
-extern const char *elamstats_names[elamstatsNR+1];
-extern const char *elmcmove_names[elmcmoveNR+1];
-extern const char *elmceq_names[elmceqNR+1];
-extern const char *separate_dhdl_file_names[esepdhdlfileNR+1];
-extern const char *dhdl_derivatives_names[edhdlderivativesNR+1];
-extern const char *esol_names[esolNR+1];
-extern const char *edispc_names[edispcNR+1];
-extern const char *ecm_names[ecmNR+1];
-extern const char *eann_names[eannNR+1];
-extern const char *egb_names[egbNR+1];
-extern const char *eis_names[eisNR+1];
-extern const char *esa_names[esaNR+1];
-extern const char *ewt_names[ewtNR+1];
-extern const char *epull_names[epullNR+1];
-extern const char *epullg_names[epullgNR+1];
-extern const char *erotg_names[erotgNR+1];
-extern const char *erotg_originnames[erotgNR+1];
-extern const char *erotg_fitnames[erotgFitNR+1];
-extern const char *eSwapTypes_names[eSwapTypesNR+1];
-extern const char *eSwapFixedGrp_names[eSwapFixedGrpNR+1];
-
-extern const char *eQMmethod_names[eQMmethodNR+1];
-extern const char *eQMbasis_names[eQMbasisNR+1];
-extern const char *eQMMMscheme_names[eQMMMschemeNR+1];
-extern const char *eMultentOpt_names[eMultentOptNR+1];
-extern const char *gmx_nblist_geometry_names[GMX_NBLIST_GEOMETRY_NR+1];
-extern const char *gmx_nblist_interaction_names[GMX_NBLIST_INTERACTION_NR+1];
-extern const char *gmx_nbkernel_elec_names[GMX_NBKERNEL_ELEC_NR+1];
-extern const char *gmx_nbkernel_vdw_names[GMX_NBKERNEL_VDW_NR+1];
-
-#define UNDEFINED       "UNDEFINED"
-#define ENUM_NAME(e, max, names)  ((((e) < 0) || ((e) >= (max))) ? UNDEFINED : (names)[e])
-
-#define EBOOL(e)       ENUM_NAME(e, BOOL_NR, bool_names)
-#define ECUTSCHEME(e)  ENUM_NAME(e, ecutsNR, ecutscheme_names)
-#define ENS(e)         ENUM_NAME(e, ensNR, ens_names)
-#define EI(e)          ENUM_NAME(e, eiNR, ei_names)
-#define ETCOUPLTYPE(e) ENUM_NAME(e, etcNR, etcoupl_names)
-#define EPCOUPLTYPE(e) ENUM_NAME(e, epcNR, epcoupl_names)
-#define EPCOUPLTYPETYPE(e) ENUM_NAME(e, epctNR, epcoupltype_names)
-#define EREFSCALINGTYPE(e) ENUM_NAME(e, erscNR, erefscaling_names)
-#define EBLOCKS(e)     ENUM_NAME(e, ebNR, eblock_names)
-#define EPARAM(e)      ENUM_NAME(e, epNR, eparam_names)
-#define INTMODIFIER(e) ENUM_NAME(e, eintmodNR, eintmod_names)
-#define EELTYPE(e)     ENUM_NAME(e, eelNR, eel_names)
-#define EVDWTYPE(e)    ENUM_NAME(e, evdwNR, evdw_names)
-#define ECONSTRTYPE(e) ENUM_NAME(e, econtNR, econstr_names)
-#define EDISRETYPE(e)  ENUM_NAME(e, edrNR, edisre_names)
-#define EDISREWEIGHTING(e)  ENUM_NAME(e, edrwNR, edisreweighting_names)
-#define ENBFNAME(e)    ENUM_NAME(e, eNBF_NR, enbf_names)
-#define ECOMBNAME(e)   ENUM_NAME(e, eCOMB_NR, ecomb_names)
-#define ESIMTEMP(e)    ENUM_NAME(e, esimtempNR, esimtemp_names)
-#define EFEPTYPE(e)    ENUM_NAME(e, efepNR, efep_names)
-#define SEPDHDLFILETYPE(e) ENUM_NAME(e, esepdhdlfileNR, separate_dhdl_file_names)
-#define DHDLDERIVATIVESTYPE(e) ENUM_NAME(e, edhdlderivativesNR, dhdl_derivatives_names)
-#define ESOLTYPE(e)    ENUM_NAME(e, esolNR, esol_names)
-#define ENLISTTYPE(e)  ENUM_NAME(e, enlistNR, enlist_names)
-#define EDISPCORR(e)   ENUM_NAME(e, edispcNR, edispc_names)
-#define ECOM(e)        ENUM_NAME(e, ecmNR, ecm_names)
-#define EANNEAL(e)      ENUM_NAME(e, eannNR, eann_names)
-#define EGBALGORITHM(e) ENUM_NAME(e, egbNR, egb_names)
-#define ESAALGORITHM(e) ENUM_NAME(e, esaNR, esa_names)
-#define EIMPLICITSOL(e) ENUM_NAME(e, eisNR, eis_names)
-#define EWALLTYPE(e)   ENUM_NAME(e, ewtNR, ewt_names)
-#define EPULLTYPE(e)   ENUM_NAME(e, epullNR, epull_names)
-#define EPULLGEOM(e)   ENUM_NAME(e, epullgNR, epullg_names)
-#define EROTGEOM(e)    ENUM_NAME(e, erotgNR, erotg_names)
-#define EROTORIGIN(e)  ENUM_NAME(e, erotgOriginNR, erotg_originnames)
-#define EROTFIT(e)     ENUM_NAME(e, erotgFitNR, erotg_fitnames)
-#define ESWAPTYPE(e)   ENUM_NAME(e, eSwapTypesNR, eSwapTypes_names)
-#define EQMMETHOD(e)   ENUM_NAME(e, eQMmethodNR, eQMmethod_names)
-#define EQMBASIS(e)    ENUM_NAME(e, eQMbasisNR, eQMbasis_names)
-#define EQMMMSCHEME(e) ENUM_NAME(e, eQMMMschemeNR, eQMMMscheme_names)
-#define EMULTENTOPT(e) ENUM_NAME(e, eMultentOptNR, eMultentOpt_names)
-#define ELJPMECOMBNAMES(e) ENUM_NAME(e, eljpmeNR, eljpme_names)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  /* _names_h */
diff --git a/src/gromacs/legacyheaders/types/enums.h b/src/gromacs/legacyheaders/types/enums.h
deleted file mode 100644 (file)
index 9a4e5e8..0000000
+++ /dev/null
@@ -1,447 +0,0 @@
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, 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.
- *
- * GROMACS is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * GROMACS is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with GROMACS; if not, see
- * http://www.gnu.org/licenses, or write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
- *
- * If you want to redistribute modifications to GROMACS, please
- * consider that scientific software is very special. Version
- * control is crucial - bugs must be traceable. We will be happy to
- * consider code for inclusion in the official distribution, but
- * derived work must not be called official GROMACS. Details are found
- * in the README & COPYING files - if they are missing, get the
- * official version at http://www.gromacs.org.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the research papers on the package. Check out http://www.gromacs.org.
- */
-
-#ifndef ENUMS_H_
-#define ENUMS_H_
-
-/* note: these enums should correspond to the names in gmxlib/names.c */
-
-/*! \brief The two compartments for CompEL setups. */
-enum eCompartment {
-    eCompA, eCompB, eCompNR
-};
-
-/*! \brief The channels that define with their COM the compartment boundaries in CompEL setups.
- *
- * In principle one could also use modified setups with more than two channels.
- */
-enum eChannel {
-    eChan0, eChan1, eChanNR
-};
-
-enum {
-    etcNO, etcBERENDSEN, etcNOSEHOOVER, etcYES, etcANDERSEN, etcANDERSENMASSIVE, etcVRESCALE, etcNR
-}; /* yes is an alias for berendsen */
-
-#define ETC_ANDERSEN(e) (((e) == etcANDERSENMASSIVE) || ((e) == etcANDERSEN))
-
-enum {
-    epcNO, epcBERENDSEN, epcPARRINELLORAHMAN, epcISOTROPIC, epcMTTK, epcNR
-}; /* isotropic is an alias for berendsen */
-
-/* trotter decomposition extended variable parts */
-enum {
-    etrtNONE, etrtNHC, etrtBAROV, etrtBARONHC, etrtNHC2, etrtBAROV2, etrtBARONHC2,
-    etrtVELOCITY1, etrtVELOCITY2, etrtPOSITION, etrtSKIPALL, etrtNR
-};
-
-/* sequenced parts of the trotter decomposition */
-enum {
-    ettTSEQ0,  ettTSEQ1,  ettTSEQ2,  ettTSEQ3,  ettTSEQ4, ettTSEQMAX
-};
-
-enum {
-    epctISOTROPIC, epctSEMIISOTROPIC, epctANISOTROPIC,
-    epctSURFACETENSION, epctNR
-};
-
-enum {
-    erscNO, erscALL, erscCOM, erscNR
-};
-
-enum {
-    ecutsVERLET, ecutsGROUP, ecutsNR
-};
-
-/* Coulomb / VdW interaction modifiers.
- * grompp replaces eintmodPOTSHIFT_VERLET by eintmodPOTSHIFT or eintmodNONE.
- * Exactcutoff is only used by Reaction-field-zero, and is not user-selectable.
- */
-enum eintmod {
-    eintmodPOTSHIFT_VERLET, eintmodPOTSHIFT, eintmodNONE, eintmodPOTSWITCH, eintmodEXACTCUTOFF, eintmodFORCESWITCH, eintmodNR
-};
-
-/*
- * eelNOTUSED1 used to be GB, but to enable generalized born with different
- * forms of electrostatics (RF, switch, etc.) in the future it is now selected
- * separately (through the implicit_solvent option).
- */
-enum {
-    eelCUT,     eelRF,     eelGRF,   eelPME,  eelEWALD,  eelP3M_AD,
-    eelPOISSON, eelSWITCH, eelSHIFT, eelUSER, eelGB_NOTUSED, eelRF_NEC_UNSUPPORTED, eelENCADSHIFT,
-    eelPMEUSER, eelPMESWITCH, eelPMEUSERSWITCH, eelRF_ZERO, eelNR
-};
-
-/* Ewald geometry */
-enum {
-    eewg3D, eewg3DC, eewgNR
-};
-
-#define EEL_RF(e) ((e) == eelRF || (e) == eelGRF || (e) == eelRF_NEC_UNSUPPORTED || (e) == eelRF_ZERO )
-
-#define EEL_PME(e)  ((e) == eelPME || (e) == eelPMESWITCH || (e) == eelPMEUSER || (e) == eelPMEUSERSWITCH || (e) == eelP3M_AD)
-#define EEL_PME_EWALD(e) (EEL_PME(e) || (e) == eelEWALD)
-#define EEL_FULL(e) (EEL_PME_EWALD(e) || (e) == eelPOISSON)
-
-#define EEL_USER(e) ((e) == eelUSER || (e) == eelPMEUSER || (e) == (eelPMEUSERSWITCH))
-
-enum {
-    evdwCUT, evdwSWITCH, evdwSHIFT, evdwUSER, evdwENCADSHIFT,
-    evdwPME, evdwNR
-};
-
-enum {
-    eljpmeGEOM, eljpmeLB, eljpmeNR
-};
-
-#define EVDW_PME(e) ((e) == evdwPME)
-
-enum {
-    ensGRID, ensSIMPLE, ensNR
-};
-
-/* eiVV is normal velocity verlet -- eiVVAK uses 1/2*(KE(t-dt/2)+KE(t+dt/2)) as the kinetic energy, and the half step kinetic
-   energy for temperature control */
-
-enum {
-    eiMD, eiSteep, eiCG, eiBD, eiSD2, eiNM, eiLBFGS, eiTPI, eiTPIC, eiSD1, eiVV, eiVVAK, eiNR
-};
-#define EI_VV(e) ((e) == eiVV || (e) == eiVVAK)
-#define EI_MD(e) ((e) == eiMD || EI_VV(e))
-#define EI_SD(e) ((e) == eiSD1 || (e) == eiSD2)
-#define EI_RANDOM(e) (EI_SD(e) || (e) == eiBD)
-/*above integrators may not conserve momenta*/
-#define EI_DYNAMICS(e) (EI_MD(e) || EI_RANDOM(e))
-#define EI_ENERGY_MINIMIZATION(e) ((e) == eiSteep || (e) == eiCG || (e) == eiLBFGS)
-#define EI_TPI(e) ((e) == eiTPI || (e) == eiTPIC)
-
-#define EI_STATE_VELOCITY(e) (EI_MD(e) || EI_SD(e))
-
-enum {
-    econtLINCS, econtSHAKE, econtNR
-};
-
-enum {
-    edrNone, edrSimple, edrEnsemble, edrNR
-};
-
-enum {
-    edrwConservative, edrwEqual, edrwNR
-};
-
-/* Combination rule things */
-enum {
-    eCOMB_NONE, eCOMB_GEOMETRIC, eCOMB_ARITHMETIC, eCOMB_GEOM_SIG_EPS, eCOMB_NR
-};
-
-/* NBF selection */
-enum {
-    eNBF_NONE, eNBF_LJ, eNBF_BHAM, eNBF_NR
-};
-
-/* simulated tempering methods */
-enum {
-    esimtempGEOMETRIC, esimtempEXPONENTIAL, esimtempLINEAR, esimtempNR
-};
-/* FEP selection */
-enum {
-    efepNO, efepYES, efepSTATIC, efepSLOWGROWTH, efepEXPANDED, efepNR
-};
-/* if efepNO, there are no evaluations at other states.
-   if efepYES, treated equivalently to efepSTATIC.
-   if efepSTATIC, then lambdas do not change during the simulation.
-   if efepSLOWGROWTH, then the states change monotonically throughout the simulation.
-   if efepEXPANDED, then expanded ensemble simulations are occuring.
- */
-
-/* FEP coupling types */
-enum {
-    efptFEP, efptMASS, efptCOUL, efptVDW, efptBONDED, efptRESTRAINT, efptTEMPERATURE, efptNR
-};
-
-/* Printing the energy to the free energy dhdl file. YES is an alias to TOTAL, and
- * will be converted in readir, so we never have to account for it in code.
- */
-enum {
-    edHdLPrintEnergyNO, edHdLPrintEnergyTOTAL, edHdLPrintEnergyPOTENTIAL, edHdLPrintEnergyYES, edHdLPrintEnergyNR
-};
-
-/* How the lambda weights are calculated:
-   elamstatsMETROPOLIS = using the metropolis criteria
-   elamstatsBARKER = using the Barker critera for transition weights - also called unoptimized Bennett
-   elamstatsMINVAR = using Barker + minimum variance for weights
-   elamstatsWL = Wang-Landu (using visitation counts)
-   elamstatsWWL = Weighted Wang-Landau (using optimized gibbs weighted visitation counts)
- */
-enum {
-    elamstatsNO, elamstatsMETROPOLIS, elamstatsBARKER, elamstatsMINVAR, elamstatsWL, elamstatsWWL, elamstatsNR
-};
-
-#define ELAMSTATS_EXPANDED(e) ((e) > elamstatsNO)
-
-#define EWL(e) ((e) == elamstatsWL || (e) == elamstatsWWL)
-
-/* How moves in lambda are calculated:
-   elmovemcMETROPOLIS - using the Metropolis criteria, and 50% up and down
-   elmovemcBARKER - using the Barker criteria, and 50% up and down
-   elmovemcGIBBS - computing the transition using the marginalized probabilities of the lambdas
-   elmovemcMETGIBBS - computing the transition using the metropolized version of Gibbs (Monte Carlo Strategies in Scientific computing, Liu, p. 134)
- */
-enum {
-    elmcmoveNO, elmcmoveMETROPOLIS, elmcmoveBARKER, elmcmoveGIBBS, elmcmoveMETGIBBS, elmcmoveNR
-};
-
-/* how we decide whether weights have reached equilibrium
-   elmceqNO - never stop, weights keep going
-   elmceqYES - fix the weights from the beginning; no movement
-   elmceqWLDELTA - stop when the WL-delta falls below a certain level
-   elmceqNUMATLAM - stop when we have a certain number of samples at every step
-   elmceqSTEPS - stop when we've run a certain total number of steps
-   elmceqSAMPLES - stop when we've run a certain total number of samples
-   elmceqRATIO - stop when the ratio of samples (lowest to highest) is sufficiently large
- */
-enum {
-    elmceqNO, elmceqYES, elmceqWLDELTA, elmceqNUMATLAM, elmceqSTEPS, elmceqSAMPLES, elmceqRATIO, elmceqNR
-};
-
-/* separate_dhdl_file selection */
-enum
-{
-    /* NOTE: YES is the first one. Do NOT interpret this one as a gmx_bool */
-    esepdhdlfileYES, esepdhdlfileNO, esepdhdlfileNR
-};
-
-/* dhdl_derivatives selection */
-enum
-{
-    /* NOTE: YES is the first one. Do NOT interpret this one as a gmx_bool */
-    edhdlderivativesYES, edhdlderivativesNO, edhdlderivativesNR
-};
-
-/* Solvent model */
-enum {
-    esolNO, esolSPC, esolTIP4P, esolNR
-};
-
-/* Dispersion correction */
-enum {
-    edispcNO, edispcEnerPres, edispcEner, edispcAllEnerPres, edispcAllEner, edispcNR
-};
-
-/* Center of mass motion selection */
-enum {
-    ecmLINEAR, ecmANGULAR, ecmNO, ecmNR
-};
-
-/* New version of simulated annealing */
-enum {
-    eannNO, eannSINGLE, eannPERIODIC, eannNR
-};
-
-/* Implicit solvent algorithms */
-enum {
-    eisNO, eisGBSA, eisNR
-};
-
-/* Algorithms for calculating GB radii */
-enum {
-    egbSTILL, egbHCT, egbOBC, egbNR
-};
-
-enum {
-    esaAPPROX, esaNO, esaSTILL, esaNR
-};
-
-/* Wall types */
-enum {
-    ewt93, ewt104, ewtTABLE, ewt126, ewtNR
-};
-
-/* Pull stuff */
-enum {
-    epullUMBRELLA, epullCONSTRAINT, epullCONST_F, epullFLATBOTTOM, epullNR
-};
-
-enum {
-    epullgDIST, epullgDIR, epullgCYL, epullgDIRPBC, epullgDIRRELATIVE, epullgNR
-};
-
-/* Enforced rotation groups */
-enum {
-    erotgISO, erotgISOPF,
-    erotgPM, erotgPMPF,
-    erotgRM, erotgRMPF,
-    erotgRM2, erotgRM2PF,
-    erotgFLEX, erotgFLEXT,
-    erotgFLEX2, erotgFLEX2T,
-    erotgNR
-};
-
-enum {
-    erotgFitRMSD, erotgFitNORM, erotgFitPOT, erotgFitNR
-};
-
-/* Direction along which ion/water swaps happen in "Computational
- * Electrophysiology" (CompEL) setups */
-enum eSwaptype {
-    eswapNO, eswapX, eswapY, eswapZ, eSwapTypesNR
-};
-
-/* These are just the fixed groups we need for any setup. In t_swap's grp
- * entry after that follows the variable number of swap groups.
- */
-enum {
-    eGrpSplit0, eGrpSplit1, eGrpSolvent, eSwapFixedGrpNR
-};
-
-
-/* QMMM */
-enum {
-    eQMmethodAM1, eQMmethodPM3, eQMmethodRHF,
-    eQMmethodUHF, eQMmethodDFT, eQMmethodB3LYP, eQMmethodMP2, eQMmethodCASSCF, eQMmethodB3LYPLAN,
-    eQMmethodDIRECT, eQMmethodNR
-};
-
-enum {
-    eQMbasisSTO3G, eQMbasisSTO3G2, eQMbasis321G,
-    eQMbasis321Gp, eQMbasis321dGp, eQMbasis621G,
-    eQMbasis631G, eQMbasis631Gp, eQMbasis631dGp,
-    eQMbasis6311G, eQMbasisNR
-};
-
-enum {
-    eQMMMschemenormal, eQMMMschemeoniom, eQMMMschemeNR
-};
-
-enum {
-    eMultentOptName, eMultentOptNo, eMultentOptLast, eMultentOptNR
-};
-
-/* flat-bottom posres geometries */
-enum {
-    efbposresZERO, efbposresSPHERE, efbposresCYLINDER, efbposresX, efbposresY, efbposresZ,
-    efbposresCYLINDERX, efbposresCYLINDERY, efbposresCYLINDERZ, efbposresNR
-};
-
-
-/* The interactions contained in a (possibly merged) table
- * for computing electrostatic, VDW repulsion and/or VDW dispersion
- * contributions.
- */
-enum gmx_table_interaction
-{
-    GMX_TABLE_INTERACTION_ELEC,
-    GMX_TABLE_INTERACTION_VDWREP_VDWDISP,
-    GMX_TABLE_INTERACTION_VDWEXPREP_VDWDISP,
-    GMX_TABLE_INTERACTION_VDWDISP,
-    GMX_TABLE_INTERACTION_ELEC_VDWREP_VDWDISP,
-    GMX_TABLE_INTERACTION_ELEC_VDWEXPREP_VDWDISP,
-    GMX_TABLE_INTERACTION_ELEC_VDWDISP,
-    GMX_TABLE_INTERACTION_NR
-};
-
-/* Different formats for table data. Cubic spline tables are typically stored
- * with the four Y,F,G,H intermediate values (check tables.c for format), which
- * makes it easy to load with a single 4-way SIMD instruction too.
- * Linear tables only need one value per table point, or two if both V and F
- * are calculated. However, with SIMD instructions this makes the loads unaligned,
- * and in that case we store the data as F, D=F(i+1)-F(i), V, and then a blank value,
- * which again makes it possible to load as a single instruction.
- */
-enum gmx_table_format
-{
-    GMX_TABLE_FORMAT_CUBICSPLINE_YFGH,
-    GMX_TABLE_FORMAT_LINEAR_VF,
-    GMX_TABLE_FORMAT_LINEAR_V,
-    GMX_TABLE_FORMAT_LINEAR_F,
-    GMX_TABLE_FORMAT_LINEAR_FDV0,
-    GMX_TABLE_FORMAT_NR
-};
-
-/* Neighborlist geometry type.
- * Kernels will compute interactions between two particles,
- * 3-center water, 4-center water or coarse-grained beads.
- */
-enum gmx_nblist_kernel_geometry
-{
-    GMX_NBLIST_GEOMETRY_PARTICLE_PARTICLE,
-    GMX_NBLIST_GEOMETRY_WATER3_PARTICLE,
-    GMX_NBLIST_GEOMETRY_WATER3_WATER3,
-    GMX_NBLIST_GEOMETRY_WATER4_PARTICLE,
-    GMX_NBLIST_GEOMETRY_WATER4_WATER4,
-    GMX_NBLIST_GEOMETRY_CG_CG,
-    GMX_NBLIST_GEOMETRY_NR
-};
-
-/* Types of electrostatics calculations available inside nonbonded kernels.
- * Note that these do NOT necessarily correspond to the user selections in the MDP file;
- * many interactions for instance map to tabulated kernels.
- */
-enum gmx_nbkernel_elec
-{
-    GMX_NBKERNEL_ELEC_NONE,
-    GMX_NBKERNEL_ELEC_COULOMB,
-    GMX_NBKERNEL_ELEC_REACTIONFIELD,
-    GMX_NBKERNEL_ELEC_CUBICSPLINETABLE,
-    GMX_NBKERNEL_ELEC_GENERALIZEDBORN,
-    GMX_NBKERNEL_ELEC_EWALD,
-    GMX_NBKERNEL_ELEC_NR
-};
-
-/* Types of vdw calculations available inside nonbonded kernels.
- * Note that these do NOT necessarily correspond to the user selections in the MDP file;
- * many interactions for instance map to tabulated kernels.
- */
-enum gmx_nbkernel_vdw
-{
-    GMX_NBKERNEL_VDW_NONE,
-    GMX_NBKERNEL_VDW_LENNARDJONES,
-    GMX_NBKERNEL_VDW_BUCKINGHAM,
-    GMX_NBKERNEL_VDW_CUBICSPLINETABLE,
-    GMX_NBKERNEL_VDW_LJEWALD,
-    GMX_NBKERNEL_VDW_NR
-};
-/* Types of interactions inside the neighborlist
- */
-enum gmx_nblist_interaction_type
-{
-    GMX_NBLIST_INTERACTION_STANDARD,
-    GMX_NBLIST_INTERACTION_FREE_ENERGY,
-    GMX_NBLIST_INTERACTION_NR
-};
-
-#endif /* ENUMS_H_ */
index 147a54b7b9aa3feab7eb36058ebeb89b7b0820b9..ad77299783a804902a055b0338cc583374ce0661 100644 (file)
@@ -38,7 +38,6 @@
 #ifndef GMX_LEGACYHEADERS_TYPES_FORCEREC_H
 #define GMX_LEGACYHEADERS_TYPES_FORCEREC_H
 
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/legacyheaders/types/genborn.h"
 #include "gromacs/legacyheaders/types/hw_info.h"
 #include "gromacs/legacyheaders/types/interaction_const.h"
@@ -46,6 +45,7 @@
 #include "gromacs/legacyheaders/types/ns.h"
 #include "gromacs/legacyheaders/types/qmmmrec.h"
 #include "gromacs/math/vectypes.h"
+#include "gromacs/mdtypes/inputrec.h"
 #include "gromacs/topology/idef.h"
 #include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/real.h"
@@ -63,6 +63,41 @@ struct nonbonded_verlet_t;
 struct bonded_threading_t;
 struct t_nblist;
 
+/* The interactions contained in a (possibly merged) table
+ * for computing electrostatic, VDW repulsion and/or VDW dispersion
+ * contributions.
+ */
+enum gmx_table_interaction
+{
+    GMX_TABLE_INTERACTION_ELEC,
+    GMX_TABLE_INTERACTION_VDWREP_VDWDISP,
+    GMX_TABLE_INTERACTION_VDWEXPREP_VDWDISP,
+    GMX_TABLE_INTERACTION_VDWDISP,
+    GMX_TABLE_INTERACTION_ELEC_VDWREP_VDWDISP,
+    GMX_TABLE_INTERACTION_ELEC_VDWEXPREP_VDWDISP,
+    GMX_TABLE_INTERACTION_ELEC_VDWDISP,
+    GMX_TABLE_INTERACTION_NR
+};
+
+/* Different formats for table data. Cubic spline tables are typically stored
+ * with the four Y,F,G,H intermediate values (check tables.c for format), which
+ * makes it easy to load with a single 4-way SIMD instruction too.
+ * Linear tables only need one value per table point, or two if both V and F
+ * are calculated. However, with SIMD instructions this makes the loads unaligned,
+ * and in that case we store the data as F, D=F(i+1)-F(i), V, and then a blank value,
+ * which again makes it possible to load as a single instruction.
+ */
+enum gmx_table_format
+{
+    GMX_TABLE_FORMAT_CUBICSPLINE_YFGH,
+    GMX_TABLE_FORMAT_LINEAR_VF,
+    GMX_TABLE_FORMAT_LINEAR_V,
+    GMX_TABLE_FORMAT_LINEAR_F,
+    GMX_TABLE_FORMAT_LINEAR_FDV0,
+    GMX_TABLE_FORMAT_NR
+};
+
+
 /* Structure describing the data in a single table */
 typedef struct
 {
@@ -152,6 +187,7 @@ enum {
     egCOULSR, egLJSR, egBHAMSR, egCOULLR, egLJLR, egBHAMLR,
     egCOUL14, egLJ14, egGB, egNR
 };
+extern const char *egrp_nm[egNR+1];
 
 typedef struct gmx_grppairener_t {
     int   nener;      /* The number of energy group pairs     */
index 6d2ca6e5648588c2f354c0e81530a9be7363ef89..1b382e9c6a73bdc125577d78546fdf862d84e5b1 100644 (file)
@@ -63,6 +63,7 @@
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/force.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/simd/simd.h"
index 1e1a54d99e53485a677dd9471637f587e066b411..437327d19afe07603ad4aeac793d8a0d137ed0ba 100644 (file)
@@ -49,6 +49,7 @@
 
 #include "gromacs/legacyheaders/types/group.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/pbcutil/mshift.h"
 #include "gromacs/pbcutil/pbc.h"
index aa5b83aab6c52080b63bdb3bef88dfb2e792d605..06601a0a3577983385ca909406bf525b0ea7ed6f 100644 (file)
@@ -53,6 +53,7 @@
 #include "gromacs/gmxlib/nrnb.h"
 #include "gromacs/legacyheaders/types/forcerec.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/topology/idef.h"
index fdad4de3814cc9724d90d1180e122779e07f4479..a5eb27f3fb1d0ea20ec637f8ef192b2bfee0d2e2 100644 (file)
 #include "gromacs/gmxlib/main.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/mdrun.h"
 #include "gromacs/mdlib/tgroup.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/state.h"
 #include "gromacs/topology/symtab.h"
 #include "gromacs/topology/topology.h"
index 6ab90d11523f8cfa18f8c17970b1eac3287d8b7d..99706658b549a981d0c1432032a8f45b0adbbdc3 100644 (file)
@@ -51,6 +51,7 @@
 #include "gromacs/mdlib/nbnxn_simd.h"
 #include "gromacs/mdlib/nbnxn_util.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
index 2aadadaa5d1c359fb9b068994c65393dc4e63cfe..7aafbdaecad5ffeb4f5adf5ec11b6b3cfc826431 100644 (file)
@@ -55,6 +55,7 @@
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/constr.h"
 #include "gromacs/mdlib/mdrun.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pbcutil/pbc-simd.h"
 #include "gromacs/simd/simd.h"
index c9550d6b1741e88f798e740f89834fbaa381fef0..5c89bb9396932414bff534340bc3c3a66ecf9074 100644 (file)
@@ -42,6 +42,7 @@
 #include <stdlib.h>
 
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/topology/topology.h"
 
 static int div_nsteps(int nsteps, int nst)
index de70ac41944eccc5ee1894b5b76063e70a433f71..67a858acc7b99f2741c6fa117fd77193ef1fa817 100644 (file)
 #include "gromacs/gmxlib/gmx_omp_nthreads.h"
 #include "gromacs/gmxlib/nrnb.h"
 #include "gromacs/gmxlib/splitter.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/mdrun.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pulling/pull.h"
 #include "gromacs/topology/block.h"
index b216191fca5c3762c84cd214971e726f8fafe4ad..68f63a60b581d5f6f38fb821ebb00b953ba1fded 100644 (file)
@@ -43,7 +43,6 @@
 #include "gromacs/fileio/txtdump.h"
 #include "gromacs/gmxlib/gmx_omp_nthreads.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/legacyheaders/types/group.h"
 #include "gromacs/math/units.h"
@@ -52,6 +51,8 @@
 #include "gromacs/mdlib/sim_util.h"
 #include "gromacs/mdlib/update.h"
 #include "gromacs/mdtypes/energy.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/boxutilities.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/random/random.h"
@@ -1102,7 +1103,7 @@ int **init_npt_vars(t_inputrec *ir, t_state *state, t_extmass *MassQ, gmx_bool b
 
     if (ir->eI == eiVV)
     {
-        if (IR_NPT_TROTTER(ir))
+        if (inputrecNptTrotter(ir))
         {
             /* This is the complicated version - there are 4 possible calls, depending on ordering.
                We start with the initial one. */
@@ -1124,14 +1125,14 @@ int **init_npt_vars(t_inputrec *ir, t_state *state, t_extmass *MassQ, gmx_bool b
             /* trotter_seq[4] is etrtNHC for second 1/2 step velocities - leave zero */
 
         }
-        else if (IR_NVT_TROTTER(ir))
+        else if (inputrecNvtTrotter(ir))
         {
             /* This is the easy version - there are only two calls, both the same.
                Otherwise, even easier -- no calls  */
             trotter_seq[2][0] = etrtNHC;
             trotter_seq[3][0] = etrtNHC;
         }
-        else if (IR_NPH_TROTTER(ir))
+        else if (inputrecNphTrotter(ir))
         {
             /* This is the complicated version - there are 4 possible calls, depending on ordering.
                We start with the initial one. */
@@ -1153,7 +1154,7 @@ int **init_npt_vars(t_inputrec *ir, t_state *state, t_extmass *MassQ, gmx_bool b
     }
     else if (ir->eI == eiVVAK)
     {
-        if (IR_NPT_TROTTER(ir))
+        if (inputrecNptTrotter(ir))
         {
             /* This is the complicated version - there are 4 possible calls, depending on ordering.
                We start with the initial one. */
@@ -1174,14 +1175,14 @@ int **init_npt_vars(t_inputrec *ir, t_state *state, t_extmass *MassQ, gmx_bool b
             /* The second half trotter update */
             trotter_seq[4][0] = etrtNHC;
         }
-        else if (IR_NVT_TROTTER(ir))
+        else if (inputrecNvtTrotter(ir))
         {
             /* This is the easy version - there is only one call, both the same.
                Otherwise, even easier -- no calls  */
             trotter_seq[1][0] = etrtNHC;
             trotter_seq[4][0] = etrtNHC;
         }
-        else if (IR_NPH_TROTTER(ir))
+        else if (inputrecNphTrotter(ir))
         {
             /* This is the complicated version - there are 4 possible calls, depending on ordering.
                We start with the initial one. */
@@ -1291,7 +1292,7 @@ real NPT_energy(t_inputrec *ir, t_state *state, t_extmass *MassQ)
         }
     }
 
-    if (IR_NPT_TROTTER(ir) || IR_NPH_TROTTER(ir))
+    if (inputrecNptTrotter(ir) || inputrecNphTrotter(ir))
     {
         /* add the energy from the barostat thermostat chain */
         for (i = 0; i < state->nnhpres; i++)
@@ -1334,7 +1335,7 @@ real NPT_energy(t_inputrec *ir, t_state *state, t_extmass *MassQ)
 
             if (nd > 0.0)
             {
-                if (IR_NVT_TROTTER(ir))
+                if (inputrecNvtTrotter(ir))
                 {
                     /* contribution from the thermal momenta of the NH chain */
                     for (j = 0; j < nh; j++)
index c132a356d32a88924943a720c9d13a7c2ec69a67..4ba5d93ff0a0eacb6389a3a6777239b76745acba 100644 (file)
@@ -50,7 +50,6 @@
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
 #include "gromacs/gmxlib/orires.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/calcmu.h"
@@ -58,6 +57,8 @@
 #include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/mdrun.h"
 #include "gromacs/mdlib/update.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/random/random.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/utility/fatalerror.h"
@@ -1338,7 +1339,7 @@ extern int ExpandedEnsembleDynamics(FILE *log, t_inputrec *ir, gmx_enerdata_t *e
             }
         }
 
-        if (IR_NPT_TROTTER(ir) || IR_NPH_TROTTER(ir) || IR_NVT_TROTTER(ir))
+        if (inputrecNptTrotter(ir) || inputrecNphTrotter(ir) || inputrecNvtTrotter(ir))
         {
             /* we need to recalculate the masses if the temperature has changed */
             init_npt_masses(ir, state, MassQ, FALSE);
index dbb8ec22a61ef06c604a787e1e381a0a71d9164a..f11fb4faea3355bbbd19bb6a0fb2711d742bc2c1 100644 (file)
@@ -53,7 +53,6 @@
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
 #include "gromacs/gmxlib/nonbonded/nonbonded.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/listed-forces/listed-forces.h"
 #include "gromacs/math/vec.h"
@@ -62,6 +61,7 @@
 #include "gromacs/mdlib/mdrun.h"
 #include "gromacs/mdlib/ns.h"
 #include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/pbcutil/mshift.h"
 #include "gromacs/pbcutil/pbc.h"
index 5b13fe5915eec0f1a6ee08ccea52fef5a3cdf158..2b81d1c82a45b0a3afe2397ca63af0dfb039dc49 100644 (file)
@@ -59,7 +59,6 @@
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
 #include "gromacs/gmxlib/nonbonded/nonbonded.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/legacyheaders/types/fcdata.h"
 #include "gromacs/legacyheaders/types/group.h"
@@ -80,6 +79,7 @@
 #include "gromacs/mdlib/ns.h"
 #include "gromacs/mdlib/qmmm.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/simd/simd.h"
 
 #include "nbnxn_gpu_jit_support.h"
 
+const char *egrp_nm[egNR+1] = {
+    "Coul-SR", "LJ-SR", "Buck-SR", "Coul-LR", "LJ-LR", "Buck-LR",
+    "Coul-14", "LJ-14", NULL
+};
+
 t_forcerec *mk_forcerec(void)
 {
     t_forcerec *fr;
@@ -2777,7 +2782,7 @@ void init_forcerec(FILE              *fp,
     fr->bF_NoVirSum = (EEL_FULL(fr->eeltype) || EVDW_PME(fr->vdwtype) ||
                        gmx_mtop_ftype_count(mtop, F_POSRES) > 0 ||
                        gmx_mtop_ftype_count(mtop, F_FBPOSRES) > 0 ||
-                       IR_ELEC_FIELD(*ir)
+                       inputrecElecField(ir)
                        );
 
     if (fr->cutoff_scheme == ecutsGROUP &&
index 35378a4599fd969a177cba30c0f955841e765b13..39ea3cd7e6972bf768dfdda15ccd1196b5d173c5 100644 (file)
 #include "gromacs/fileio/pdbio.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/genborn_allvsall.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/pbcutil/mshift.h"
 #include "gromacs/pbcutil/pbc.h"
index 5fab4ff5b2e787ff87dd17e123b25b06f9bb83df..8d5d22a001313fd08cfe26fe2973c4c5d9eaa2f7 100644 (file)
@@ -47,6 +47,7 @@
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/genborn.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/mdatom.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/smalloc.h"
index a4a28fbb202098e76544ff30bccbf1f9db866671..85682842efc801577a79d3d35e8710bb9cb1d1f9 100644 (file)
@@ -46,7 +46,6 @@
 #include "gromacs/gmxlib/md_logging.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/legacyheaders/types/group.h"
 #include "gromacs/math/vec.h"
@@ -56,6 +55,8 @@
 #include "gromacs/mdlib/vcm.h"
 #include "gromacs/mdtypes/df_history.h"
 #include "gromacs/mdtypes/energyhistory.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/timing/wallcycle.h"
@@ -379,7 +380,7 @@ void compute_globals(FILE *fplog, gmx_global_stat_t gstat, t_commrec *cr, t_inpu
     if (bTemp)
     {
         /* Sum the kinetic energies of the groups & calc temp */
-        /* compute full step kinetic energies if vv, or if vv-avek and we are computing the pressure with IR_NPT_TROTTER */
+        /* compute full step kinetic energies if vv, or if vv-avek and we are computing the pressure with inputrecNptTrotter */
         /* three maincase:  VV with AveVel (md-vv), vv with AveEkin (md-vv-avek), leap with AveEkin (md).
            Leap with AveVel is not supported; it's not clear that it will actually work.
            bEkinAveVel: If TRUE, we simply multiply ekin by ekinscale to get a full step kinetic energy.
@@ -644,7 +645,7 @@ void check_ir_old_tpx_versions(t_commrec *cr, FILE *fplog,
                                t_inputrec *ir, gmx_mtop_t *mtop)
 {
     /* Check required for old tpx files */
-    if (IR_TWINRANGE(*ir) && ir->nstlist > 1 &&
+    if (inputrecTwinRange(ir) && ir->nstlist > 1 &&
         ir->nstcalcenergy % ir->nstlist != 0)
     {
         md_print_warn(cr, fplog, "Old tpr file with twin-range settings: modifying energy calculation and/or T/P-coupling frequencies\n");
@@ -677,7 +678,7 @@ void check_ir_old_tpx_versions(t_commrec *cr, FILE *fplog,
         }
     }
 
-    if (EI_VV(ir->eI) && IR_TWINRANGE(*ir) && ir->nstlist > 1)
+    if (EI_VV(ir->eI) && inputrecTwinRange(ir) && ir->nstlist > 1)
     {
         gmx_fatal(FARGS, "Twin-range multiple time stepping does not work with integrator %s.", ei_names[ir->eI]);
     }
@@ -753,7 +754,7 @@ void set_state_entries(t_state *state, const t_inputrec *ir)
     if (ir->ePBC != epbcNONE)
     {
         state->flags |= (1<<estBOX);
-        if (PRESERVE_SHAPE(*ir))
+        if (inputrecPreserveShape(ir))
         {
             state->flags |= (1<<estBOX_REL);
         }
@@ -763,7 +764,7 @@ void set_state_entries(t_state *state, const t_inputrec *ir)
         }
         if (ir->epc != epcNO)
         {
-            if (IR_NPT_TROTTER(ir) || (IR_NPH_TROTTER(ir)))
+            if (inputrecNptTrotter(ir) || (inputrecNphTrotter(ir)))
             {
                 state->nnhpres = 1;
                 state->flags  |= (1<<estNHPRES_XI);
index f2992cf46c67669a2768da003fce7fbe24e44c98..6eea20bb2f9a54e3cdc7ada08172984ffe40c704 100644 (file)
@@ -42,6 +42,7 @@
 
 #include "gromacs/gmxlib/gmx_omp_nthreads.h"
 #include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/topology/mtop_util.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/exceptions.h"
index 1f1eecc66b8c25968edd47054e504c15ee6be984..0c83b72d01f62cdb86cf6b5f179f34d85e27ec3d 100644 (file)
@@ -48,7 +48,6 @@
 #include "gromacs/gmxlib/disre.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/orires.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/fcdata.h"
 #include "gromacs/legacyheaders/types/group.h"
 #include "gromacs/math/units.h"
@@ -57,6 +56,8 @@
 #include "gromacs/mdlib/mdebin_bar.h"
 #include "gromacs/mdlib/mdrun.h"
 #include "gromacs/mdtypes/energyhistory.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pulling/pull.h"
 #include "gromacs/topology/mtop_util.h"
@@ -317,12 +318,12 @@ t_mdebin *init_mdebin(ener_file_t       fp_ene,
     md->bDiagPres      = !TRICLINIC(ir->ref_p);
     md->ref_p          = (ir->ref_p[XX][XX]+ir->ref_p[YY][YY]+ir->ref_p[ZZ][ZZ])/DIM;
     md->bTricl         = TRICLINIC(ir->compress) || TRICLINIC(ir->deform);
-    md->bDynBox        = DYNAMIC_BOX(*ir);
+    md->bDynBox        = inputrecDynamicBox(ir);
     md->etc            = ir->etc;
-    md->bNHC_trotter   = IR_NVT_TROTTER(ir);
+    md->bNHC_trotter   = inputrecNvtTrotter(ir);
     md->bPrintNHChains = ir->bPrintNHChains;
-    md->bMTTK          = (IR_NPT_TROTTER(ir) || IR_NPH_TROTTER(ir));
-    md->bMu            = NEED_MUTOT(*ir);
+    md->bMTTK          = (inputrecNptTrotter(ir) || inputrecNphTrotter(ir));
+    md->bMu            = inputrecNeedMutot(ir);
 
     md->ebin  = mk_ebin();
     /* Pass NULL for unit to let get_ebin_space determine the units
index 4f83ab970eb1d1fbdff970de378623bf18c1bf48..03576a6858b7f2f963afb997623d6067db6d45d6 100644 (file)
@@ -45,6 +45,7 @@
 #include "gromacs/fileio/enxio.h"
 #include "gromacs/mdlib/mdebin.h"
 #include "gromacs/mdtypes/energyhistory.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
index 19ef8f4660c9da39460bf8f327eccb9e353a490d..0bc2389d6841a8b26728b52bafc7d60a2b81b90a 100644 (file)
@@ -48,6 +48,7 @@
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/mdrun.h"
 #include "gromacs/mdlib/trajectory_writing.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
index 7383fcebbd84b7c0a8f1ff49b8e2652c003d7221..49aa5c5d7dc82fb4d77ab5727682469e249ff1bc 100644 (file)
@@ -64,7 +64,6 @@
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
 #include "gromacs/imd/imd.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/linearalgebra/sparsematrix.h"
 #include "gromacs/listed-forces/manage-threading.h"
@@ -83,6 +82,7 @@
 #include "gromacs/mdlib/update.h"
 #include "gromacs/mdlib/vsite.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/mshift.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/timing/wallcycle.h"
index 16fa6dc97e91353e8c9d9e8ed63d28d9ff2e7183..8252e9027cf4787d3a1323f4b0ddac755d2b8162 100644 (file)
 #include "gromacs/gmxlib/cuda_tools/cudautils.cuh"
 #include "gromacs/gmxlib/cuda_tools/pmalloc_cuda.h"
 #include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/legacyheaders/types/force_flags.h"
 #include "gromacs/legacyheaders/types/interaction_const.h"
 #include "gromacs/math/vectypes.h"
 #include "gromacs/mdlib/nb_verlet.h"
 #include "gromacs/mdlib/nbnxn_consts.h"
 #include "gromacs/mdlib/nbnxn_gpu_data_mgmt.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/timing/gpu_timing.h"
 #include "gromacs/utility/basedefinitions.h"
index 1127b25ac22ea42ce73ed5063f1044eb8323ccd9..a455b2a45329b613ae0cd086b188fee1f998457f 100644 (file)
 
 #include "config.h"
 
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/legacyheaders/types/interaction_const.h"
 #include "gromacs/math/vectypes.h"
 #include "gromacs/mdlib/nb_verlet.h"
 #include "gromacs/mdlib/nbnxn_simd.h"
+#include "gromacs/mdtypes/md_enums.h"
 
 #ifdef {0}
 
index 3156b0f22aa8d697e6e1b0ae73f6983c70d82751..2213ebe970b63013f15677945376a5e844992a7b 100644 (file)
@@ -46,6 +46,7 @@
 #include "gromacs/mdlib/nb_verlet.h"
 #include "gromacs/mdlib/nbnxn_consts.h"
 #include "gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_common.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/utility/fatalerror.h"
 
index 39584f62f81c1862029cb6909cc4b7ab1c73fab6..bf7ab218241a5504bc4ea37a8cb743fd5bd4faec 100644 (file)
@@ -48,6 +48,7 @@
 #include "gromacs/mdlib/nb_verlet.h"
 #include "gromacs/mdlib/nbnxn_consts.h"
 #include "gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_common.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
index 76abd67847d6add8771c383a51ebefd203026652..de8cf20dfa53f16008b5b3a3fd968761b44d6003 100644 (file)
 
 #include "config.h"
 
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/legacyheaders/types/interaction_const.h"
 #include "gromacs/math/vectypes.h"
 #include "gromacs/mdlib/nb_verlet.h"
 #include "gromacs/mdlib/nbnxn_simd.h"
+#include "gromacs/mdtypes/md_enums.h"
 
 #ifdef GMX_NBNXN_SIMD_2XNN
 
index f88064588a8c59351a9886e9a65bde9219d19b43..f23cbe5f166470e9a0a9e7d639335df7bf6b6f3d 100644 (file)
 
 #include "config.h"
 
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/legacyheaders/types/interaction_const.h"
 #include "gromacs/math/vectypes.h"
 #include "gromacs/mdlib/nb_verlet.h"
 #include "gromacs/mdlib/nbnxn_simd.h"
+#include "gromacs/mdtypes/md_enums.h"
 
 #ifdef GMX_NBNXN_SIMD_4XN
 
index 197b4cb50a94dff5d9030dde0ed747e82a7e9bde..fd96d28060959e7796e99fad12f23b92617aa70d 100644 (file)
@@ -51,7 +51,6 @@
 #include "gromacs/gmxlib/gmx_detect_hardware.h"
 #include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
 #include "gromacs/gmxlib/ocl_tools/oclutils.h"
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/legacyheaders/types/force_flags.h"
 #include "gromacs/legacyheaders/types/interaction_const.h"
 #include "gromacs/math/vectypes.h"
@@ -60,6 +59,7 @@
 #include "gromacs/mdlib/nbnxn_gpu.h"
 #include "gromacs/mdlib/nbnxn_gpu_data_mgmt.h"
 #include "gromacs/mdlib/nbnxn_gpu_jit_support.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/timing/gpu_timing.h"
 #include "gromacs/utility/cstringutil.h"
index 60f29a945384552f2ef47c447b6b145126da584d..0639f2f2b01d4919cadd8cd4d4dbf1518d496a02 100644 (file)
 
 #include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
 #include "gromacs/gmxlib/gpu_utils/ocl_compiler.h"
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/legacyheaders/types/interaction_const.h"
 #include "gromacs/mdlib/nbnxn_consts.h"
 #include "gromacs/mdlib/nbnxn_gpu.h"
 #include "gromacs/mdlib/nbnxn_gpu_jit_support.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/exceptions.h"
index a16be6598e624723b3a22cd0cf10974397db2eee..8ee3bfecbf94ac3b4e93de737a262e4a8b8b1122 100644 (file)
@@ -60,6 +60,7 @@
 #include "gromacs/mdlib/nbnxn_simd.h"
 #include "gromacs/mdlib/nbnxn_util.h"
 #include "gromacs/mdlib/ns.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/simd/simd.h"
index 625ac8a283752eb111272b04b1d4c581ce78c883..b5610d8785cb03daf5746d3f42949b24f08ea54d 100644 (file)
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
 #include "gromacs/gmxlib/nonbonded/nonbonded.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/legacyheaders/types/group.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/nsgrid.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/mtop_util.h"
index 8e5ba771cfb98255425fd38db20a41a1a3ee808d..1ce5b1679391929401a5953e98c4c433af5800f5 100644 (file)
@@ -45,6 +45,7 @@
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/nbnxn_consts.h"
 #include "gromacs/mdlib/nbnxn_search.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/fatalerror.h"
 
index fe402995ffc9bdb9145fa9a799beceb358a987c2..566536a131a93fb0b6ac471249a7648427ac075a 100644 (file)
 #include "gromacs/fileio/txtdump.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/ns.h"
 #include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
index c981134ff1c822f436b7161a015cd4f0c86f072f..ede5fb8da40e39ff7b56211813b351cefa9d89ac 100644 (file)
 #include "gromacs/fileio/txtdump.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/ns.h"
 #include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
index 2d73140a30fdaf89f9c15bdf81a2ca0221a67db1..74fdfada88a85aa2fb7c7b9b5b00dbd53e5dc1da 100644 (file)
 #include "gromacs/fileio/txtdump.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/ns.h"
 #include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
index 031cbb21653a7a7c1aaa05bc3192bed6685751fd..5293f90c9cf49ad6666d98a8d4a77975eb09a248 100644 (file)
 #include "gromacs/fileio/txtdump.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/ns.h"
 #include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
index f75591e719ea231a9fd8ff56a7c21f7d7f7487a5..364be043ce1b85c74f6ead2a4ed46f90eeadd2a6 100644 (file)
 #include "gromacs/fileio/txtdump.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/ns.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/mdatom.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
index 589215d2caf5f059dc59cdbdb852189d8e11b9dc..c579dd770e88076cb2bec82c0bbf6e284cfeb24b 100644 (file)
 #include <cmath>
 
 #include "gromacs/fileio/copyrite.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/force.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"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/fatalerror.h"
 
 real RF_excl_correction(const t_forcerec *fr, t_graph *g,
index c71170257336e6586276099447ce46760c33eda5..c84fe5ced7e3e943a666b6197868da17925d2b45 100644 (file)
@@ -42,6 +42,7 @@
 #include "gromacs/gmxlib/nrnb.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/constr.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/smalloc.h"
 
 typedef struct gmx_shakedata
index 86cc2156b9dafe217e016bc72c1d4d3959c4475b..b04c21d46106b0dd8fd5ef4941e155e0cccc89af 100644 (file)
@@ -47,7 +47,6 @@
 #include "gromacs/fileio/txtdump.h"
 #include "gromacs/gmxlib/chargegroup.h"
 #include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
@@ -55,6 +54,7 @@
 #include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/mdrun.h"
 #include "gromacs/mdlib/vsite.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/mshift.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/mtop_util.h"
index df50fefff2f5b62cdf9f3f98e861c36bc51ddae2..f66d4e18aae00eb0c16131cff66a1c5504ea7bcc 100644 (file)
@@ -62,7 +62,6 @@
 #include "gromacs/gmxlib/nonbonded/nb_kernel.h"
 #include "gromacs/gmxlib/nonbonded/nonbonded.h"
 #include "gromacs/imd/imd.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/listed-forces/bonded.h"
 #include "gromacs/math/units.h"
@@ -84,6 +83,8 @@
 #include "gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.h"
 #include "gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.h"
 #include "gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/ishift.h"
 #include "gromacs/pbcutil/mshift.h"
 #include "gromacs/pbcutil/pbc.h"
@@ -814,7 +815,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
     {
         update_forcerec(fr, box);
 
-        if (NEED_MUTOT(*inputrec))
+        if (inputrecNeedMutot(inputrec))
         {
             /* Calculate total (local) dipole moment in a temporary common array.
              * This makes it possible to sum them over nodes faster.
@@ -1059,7 +1060,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
             dd_move_x(cr->dd, box, x);
 
             /* When we don't need the total dipole we sum it in global_stat */
-            if (bStateChanged && NEED_MUTOT(*inputrec))
+            if (bStateChanged && inputrecNeedMutot(inputrec))
             {
                 gmx_sumd(2*DIM, mu, cr);
             }
@@ -1097,7 +1098,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
         cycles_force += wallcycle_stop(wcycle, ewcLAUNCH_GPU_NB);
     }
 
-    if (bStateChanged && NEED_MUTOT(*inputrec))
+    if (bStateChanged && inputrecNeedMutot(inputrec))
     {
         if (PAR(cr))
         {
@@ -1463,7 +1464,7 @@ void do_force_cutsVERLET(FILE *fplog, t_commrec *cr,
 
     if (bDoForces)
     {
-        if (IR_ELEC_FIELD(*inputrec))
+        if (inputrecElecField(inputrec))
         {
             /* Compute forces due to electric field */
             calc_f_el(MASTER(cr) ? field : NULL,
@@ -1596,7 +1597,7 @@ void do_force_cutsGROUP(FILE *fplog, t_commrec *cr,
     {
         update_forcerec(fr, box);
 
-        if (NEED_MUTOT(*inputrec))
+        if (inputrecNeedMutot(inputrec))
         {
             /* Calculate total (local) dipole moment in a temporary common array.
              * This makes it possible to sum them over nodes faster.
@@ -1690,9 +1691,8 @@ void do_force_cutsGROUP(FILE *fplog, t_commrec *cr,
         wallcycle_stop(wcycle, ewcMOVEX);
     }
 
-    if (NEED_MUTOT(*inputrec))
+    if (inputrecNeedMutot(inputrec))
     {
-
         if (bStateChanged)
         {
             if (PAR(cr))
@@ -1861,7 +1861,7 @@ void do_force_cutsGROUP(FILE *fplog, t_commrec *cr,
 
     if (bDoForces)
     {
-        if (IR_ELEC_FIELD(*inputrec))
+        if (inputrecElecField(inputrec))
         {
             /* Compute forces due to electric field */
             calc_f_el(MASTER(cr) ? field : NULL,
index 8205b3bc5865ee89268158c6460b5c36ff9266b1..5d4c63d0c8db75b1f44340eea54b6faaca37ec8a 100644 (file)
@@ -44,7 +44,6 @@
 #include "gromacs/fileio/txtdump.h"
 #include "gromacs/fileio/xtcio.h"
 #include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/legacyheaders/types/group.h"
 #include "gromacs/math/utilities.h"
@@ -57,6 +56,8 @@
 #include "gromacs/mdlib/sim_util.h"
 #include "gromacs/mdlib/tgroup.h"
 #include "gromacs/mdlib/vcm.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/smalloc.h"
@@ -241,7 +242,7 @@ void global_stat(FILE *fplog, gmx_global_stat_t gs,
                 irmsd = add_binr(rb, inputrec->eI == eiSD2 ? 3 : 2, rmsd_data);
             }
         }
-        if (!NEED_MUTOT(*inputrec))
+        if (!inputrecNeedMutot(inputrec))
         {
             imu = add_binr(rb, DIM, mu_tot);
             where();
@@ -343,7 +344,7 @@ void global_stat(FILE *fplog, gmx_global_stat_t gs,
         {
             extract_binr(rb, irmsd, inputrec->eI == eiSD2 ? 3 : 2, rmsd_data);
         }
-        if (!NEED_MUTOT(*inputrec))
+        if (!inputrecNeedMutot(inputrec))
         {
             extract_binr(rb, imu, DIM, mu_tot);
         }
index 03dcb9b8855aa36760bbedaa8105c8e81f405573..cfb7cc983ce3b88ef1bf487b30b65c6380c0ea49 100644 (file)
@@ -63,7 +63,6 @@
 #include "gromacs/gmxlib/conformation-utilities.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/legacyheaders/types/group.h"
 #include "gromacs/math/units.h"
@@ -78,6 +77,7 @@
 #include "gromacs/mdlib/tgroup.h"
 #include "gromacs/mdlib/update.h"
 #include "gromacs/mdlib/vsite.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/random/random.h"
 #include "gromacs/timing/wallcycle.h"
index 873ca68f94260d4952322430eada2edec14cff4e..e40162a2b4f97c6d602152935b90b6e263e1e791 100644 (file)
@@ -50,7 +50,6 @@
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/nrnb.h"
 #include "gromacs/gmxlib/orires.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/legacyheaders/types/group.h"
 #include "gromacs/math/units.h"
@@ -60,6 +59,8 @@
 #include "gromacs/mdlib/mdrun.h"
 #include "gromacs/mdlib/sim_util.h"
 #include "gromacs/mdlib/tgroup.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/boxutilities.h"
 #include "gromacs/pbcutil/mshift.h"
 #include "gromacs/pbcutil/pbc.h"
@@ -1315,7 +1316,7 @@ void update_tcouple(gmx_int64_t       step,
 
     /* if using vv with trotter decomposition methods, we do this elsewhere in the code */
     if (inputrec->etc != etcNO &&
-        !(IR_NVT_TROTTER(inputrec) || IR_NPT_TROTTER(inputrec) || IR_NPH_TROTTER(inputrec)))
+        !(inputrecNvtTrotter(inputrec) || inputrecNptTrotter(inputrec) || inputrecNphTrotter(inputrec)))
     {
         /* We should only couple after a step where energies were determined (for leapfrog versions)
            or the step energies are determined, for velocity verlet versions */
@@ -1382,7 +1383,7 @@ void update_pcouple(FILE             *fplog,
     int        i;
 
     /* if using Trotter pressure, we do this in coupling.c, so we leave it false. */
-    if (inputrec->epc != epcNO && (!(IR_NPT_TROTTER(inputrec) || IR_NPH_TROTTER(inputrec))))
+    if (inputrec->epc != epcNO && (!(inputrecNptTrotter(inputrec) || inputrecNphTrotter(inputrec))))
     {
         /* We should only couple after a step where energies were determined */
         bPCouple = (inputrec->nstpcouple == 1 ||
@@ -1861,7 +1862,7 @@ void update_box(FILE             *fplog,
             break;
     }
 
-    if (DEFORM(*inputrec))
+    if (inputrecDeform(inputrec))
     {
         deform(upd, start, homenr, state->x, state->box, inputrec, step);
     }
index c371abff9bb258fa0a0d673d5718fc1dd93375a4..3256fea90272f92369745d4f1eb66b99358c0c58 100644 (file)
 
 #include "gromacs/fileio/txtdump.h"
 #include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
index 5892cdc4c880ca956d48e38991cfea1bf4b1ede7..61a68a9cec3508cdd2b012247cdf744408364c47 100644 (file)
@@ -47,6 +47,7 @@
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/force.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/mdatom.h"
 #include "gromacs/tables/forcetable.h"
 #include "gromacs/topology/topology.h"
index de09b6845b9e3e39186897dcd9d7deb0e565f777..b901576c0a508752eca7708e1aa0fa2c92c2b640 100644 (file)
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/mdlib/force.h"
 #include "gromacs/mdlib/ns.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/smalloc.h"
index fec10a38a5dc4564fd3c2fd84f64dbe796e21059..bef99f1d40482ea298568b80c2026aa308e44c19 100644 (file)
@@ -39,5 +39,6 @@ gmx_install_headers(
     energy.h
     inputrec.h
     mdatom.h
+    md_enums.h
     state.h
 )
index 1e454ad661c06d3e440659b0ea0a42513af1502e..3ac5e4459471bf06aff6fe6b8c0222978f3c0b7e 100644 (file)
@@ -42,6 +42,7 @@
 
 #include <algorithm>
 
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
@@ -321,3 +322,60 @@ void done_inputrec(t_inputrec *ir)
         sfree(ir->pull);
     }
 }
+
+gmx_bool inputrecDeform(const t_inputrec *ir)
+{
+    return (ir->deform[XX][XX] != 0 || ir->deform[YY][YY] != 0 || ir->deform[ZZ][ZZ] != 0 ||
+            ir->deform[YY][XX] != 0 || ir->deform[ZZ][XX] != 0 || ir->deform[ZZ][YY] != 0);
+}
+
+gmx_bool inputrecDynamicBox(const t_inputrec *ir)
+{
+    return (ir->epc != epcNO || ir->eI == eiTPI || inputrecDeform(ir));
+}
+
+gmx_bool inputrecPreserveShape(const t_inputrec *ir)
+{
+    return  (ir->epc != epcNO && ir->deform[XX][XX] == 0 &&
+             (ir->epct == epctISOTROPIC || ir->epct == epctSEMIISOTROPIC));
+}
+
+gmx_bool inputrecNeedMutot(const t_inputrec *ir)
+{
+    return ((ir->coulombtype == eelEWALD || EEL_PME(ir->coulombtype)) &&
+            (ir->ewald_geometry == eewg3DC || ir->epsilon_surface != 0));
+}
+
+gmx_bool inputrecTwinRange(const t_inputrec *ir)
+{
+    return (ir->rlist > 0 && (ir->rlistlong == 0 || ir->rlistlong > ir->rlist));
+}
+
+gmx_bool inputrecElecField(const t_inputrec *ir)
+{
+    return (ir->ex[XX].n > 0 || ir->ex[YY].n > 0 || ir->ex[ZZ].n > 0);
+}
+
+gmx_bool inputrecExclForces(const t_inputrec *ir)
+{
+    return (EEL_FULL(ir->coulombtype) || (EEL_RF(ir->coulombtype)) ||
+            ir->implicit_solvent != eisNO);
+}
+
+gmx_bool inputrecNptTrotter(const t_inputrec *ir)
+{
+    return ( ( (ir->eI == eiVV) || (ir->eI == eiVVAK) ) &&
+             (ir->epc == epcMTTK) && (ir->etc == etcNOSEHOOVER) );
+}
+
+gmx_bool inputrecNvtTrotter(const t_inputrec *ir)
+{
+    return ( ( (ir->eI == eiVV) || (ir->eI == eiVVAK) ) &&
+             (ir->epc != epcMTTK) && (ir->etc == etcNOSEHOOVER) );
+}
+
+gmx_bool inputrecNphTrotter(const t_inputrec *ir)
+{
+    return ( ( (ir->eI == eiVV) || (ir->eI == eiVVAK) ) &&
+             (ir->epc == epcMTTK) && (ir->etc != etcNOSEHOOVER) );
+}
index 4d5844615041651bd734927e6fd3bd3b254189b1..c22735691b76dfdb240a6603b9a79eadc3e94221 100644 (file)
 #ifndef GMX_MDTYPES_INPUTREC_H
 #define GMX_MDTYPES_INPUTREC_H
 
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/math/vectypes.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/real.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct {
     //! Number of terms
     int   n;
@@ -438,26 +434,6 @@ typedef struct t_inputrec {
     gmx_bool        bAdress;
 } t_inputrec;
 
-#define DEFORM(ir) ((ir).deform[XX][XX] != 0 || (ir).deform[YY][YY] != 0 || (ir).deform[ZZ][ZZ] != 0 || (ir).deform[YY][XX] != 0 || (ir).deform[ZZ][XX] != 0 || (ir).deform[ZZ][YY] != 0)
-
-#define DYNAMIC_BOX(ir) ((ir).epc != epcNO || (ir).eI == eiTPI || DEFORM(ir))
-
-#define PRESERVE_SHAPE(ir) ((ir).epc != epcNO && (ir).deform[XX][XX] == 0 && ((ir).epct == epctISOTROPIC || (ir).epct == epctSEMIISOTROPIC))
-
-#define NEED_MUTOT(ir) (((ir).coulombtype == eelEWALD || EEL_PME((ir).coulombtype)) && ((ir).ewald_geometry == eewg3DC || (ir).epsilon_surface != 0))
-
-#define IR_TWINRANGE(ir) ((ir).rlist > 0 && ((ir).rlistlong == 0 || (ir).rlistlong > (ir).rlist))
-
-#define IR_ELEC_FIELD(ir) ((ir).ex[XX].n > 0 || (ir).ex[YY].n > 0 || (ir).ex[ZZ].n > 0)
-
-#define IR_EXCL_FORCES(ir) (EEL_FULL((ir).coulombtype) || EEL_RF((ir).coulombtype) || (ir).implicit_solvent != eisNO)
-/* use pointer definitions of ir here, since that's what's usually used in the code */
-#define IR_NPT_TROTTER(ir) ((((ir)->eI == eiVV) || ((ir)->eI == eiVVAK)) && (((ir)->epc == epcMTTK) && ((ir)->etc == etcNOSEHOOVER)))
-
-#define IR_NVT_TROTTER(ir) ((((ir)->eI == eiVV) || ((ir)->eI == eiVVAK)) && ((!((ir)->epc == epcMTTK)) && ((ir)->etc == etcNOSEHOOVER)))
-
-#define IR_NPH_TROTTER(ir) ((((ir)->eI == eiVV) || ((ir)->eI == eiVVAK)) && (((ir)->epc == epcMTTK) && (!(((ir)->etc == etcNOSEHOOVER)))))
-
 int ir_optimal_nstcalcenergy(const t_inputrec *ir);
 
 int tcouple_min_integration_steps(int etc);
@@ -510,8 +486,24 @@ void init_inputrec(t_inputrec *ir);
  */
 void done_inputrec(t_inputrec *ir);
 
-#ifdef __cplusplus
-}
-#endif
+gmx_bool inputrecDeform(const t_inputrec *ir);
+
+gmx_bool inputrecDynamicBox(const t_inputrec *ir);
+
+gmx_bool inputrecPreserveShape(const t_inputrec *ir);
+
+gmx_bool inputrecNeedMutot(const t_inputrec *ir);
+
+gmx_bool inputrecTwinRange(const t_inputrec *ir);
+
+gmx_bool inputrecElecField(const t_inputrec *ir);
+
+gmx_bool inputrecExclForces(const t_inputrec *ir);
+
+gmx_bool inputrecNptTrotter(const t_inputrec *ir);
+
+gmx_bool inputrecNvtTrotter(const t_inputrec *ir);
+
+gmx_bool inputrecNphTrotter(const t_inputrec *ir);
 
 #endif /* GMX_MDTYPES_INPUTREC_H */
similarity index 72%
rename from src/gromacs/gmxlib/names.cpp
rename to src/gromacs/mdtypes/md_enums.cpp
index 7ad72663e54411d4090de787fb59ebe0c3a6f99b..02b8c7424eccede4d020a2d1520297e24f4a02a4 100644 (file)
  */
 #include "gmxpre.h"
 
-#include "gromacs/legacyheaders/names.h"
+#include "md_enums.h"
 
+const char *enum_name(int index, int max_index, const char *names[])
+{
+    if (index < 0 || index >= max_index)
+    {
+        static const char *undef = "UNDEFINED";
+        return undef;
+    }
+    else
+    {
+        return names[index];
+    }
+}
 
-/* note: these arrays should correspond to enums in include/types/enums.h */
-
-const char *ens_names[ensNR+1] =
+const char *bool_names[BOOL_NR+1] =
 {
-    "Grid", "Simple", NULL
+    "FALSE", "TRUE", nullptr
 };
 
-const char *ei_names[eiNR+1] =
+const char *yesno_names[BOOL_NR+1] =
 {
-    "md", "steep", "cg", "bd", "sd2", "nm", "l-bfgs", "tpi", "tpic", "sd", "md-vv", "md-vv-avek", NULL
+    "no", "yes", nullptr
 };
 
-const char *bool_names[BOOL_NR+1] =
+
+
+const char *ens_names[ensNR+1] =
 {
-    "FALSE", "TRUE", NULL
+    "Grid", "Simple", nullptr
 };
 
-const char *yesno_names[BOOL_NR+1] =
+const char *ei_names[eiNR+1] =
 {
-    "no", "yes", NULL
+    "md", "steep", "cg", "bd", "sd2", "nm", "l-bfgs", "tpi", "tpic", "sd", "md-vv", "md-vv-avek", nullptr
 };
 
-const char *ptype_str[eptNR+1] = {
-    "Atom", "Nucleus", "Shell", "Bond", "VSite", NULL
+const char *ecutscheme_names[ecutsNR+1] = {
+    "Verlet", "Group", nullptr
 };
 
-const char *ecutscheme_names[ecutsNR+1] = {
-    "Verlet", "Group", NULL
+const char *erefscaling_names[erscNR+1] = {
+    "No", "All", "COM", nullptr
 };
 
 const char *eel_names[eelNR+1] = {
@@ -74,204 +86,190 @@ const char *eel_names[eelNR+1] = {
     "PME", "Ewald", "P3M-AD", "Poisson", "Switch", "Shift", "User",
     "Generalized-Born", "Reaction-Field-nec", "Encad-shift",
     "PME-User", "PME-Switch", "PME-User-Switch",
-    "Reaction-Field-zero", NULL
+    "Reaction-Field-zero", nullptr
 };
 
 const char *eewg_names[eewgNR+1] = {
-    "3d", "3dc", NULL
+    "3d", "3dc", nullptr
 };
 
 const char *eljpme_names[eljpmeNR+1] = {
-    "Geometric", "Lorentz-Berthelot", NULL
+    "Geometric", "Lorentz-Berthelot", nullptr
 };
 
 const char *evdw_names[evdwNR+1] = {
     "Cut-off", "Switch", "Shift", "User", "Encad-shift",
-    "PME", NULL
+    "PME", nullptr
 };
 
 const char *econstr_names[econtNR+1] = {
-    "Lincs", "Shake", NULL
+    "Lincs", "Shake", nullptr
 };
 
 const char *eintmod_names[eintmodNR+1] = {
-    "Potential-shift-Verlet", "Potential-shift", "None", "Potential-switch", "Exact-cutoff", "Force-switch", NULL
-};
-
-const char *egrp_nm[egNR+1] = {
-    "Coul-SR", "LJ-SR", "Buck-SR", "Coul-LR", "LJ-LR", "Buck-LR",
-    "Coul-14", "LJ-14", NULL
+    "Potential-shift-Verlet", "Potential-shift", "None", "Potential-switch", "Exact-cutoff", "Force-switch", nullptr
 };
 
 const char *etcoupl_names[etcNR+1] = {
-    "No", "Berendsen", "Nose-Hoover", "yes", "Andersen", "Andersen-massive", "V-rescale", NULL
+    "No", "Berendsen", "Nose-Hoover", "yes", "Andersen", "Andersen-massive", "V-rescale", nullptr
 }; /* yes is alias for berendsen */
 
 const char *epcoupl_names[epcNR+1] = {
-    "No", "Berendsen", "Parrinello-Rahman", "Isotropic", "MTTK", NULL
+    "No", "Berendsen", "Parrinello-Rahman", "Isotropic", "MTTK", nullptr
 }; /* isotropic is alias for berendsen */
 
 const char *epcoupltype_names[epctNR+1] = {
-    "Isotropic", "Semiisotropic", "Anisotropic", "Surface-Tension", NULL
-};
-
-const char *erefscaling_names[erscNR+1] = {
-    "No", "All", "COM", NULL
+    "Isotropic", "Semiisotropic", "Anisotropic", "Surface-Tension", nullptr
 };
 
 const char *edisre_names[edrNR+1] = {
-    "No", "Simple", "Ensemble", NULL
+    "No", "Simple", "Ensemble", nullptr
 };
 
 const char *edisreweighting_names[edrwNR+1] = {
-    "Conservative", "Equal", NULL
+    "Conservative", "Equal", nullptr
 };
 
 const char *enbf_names[eNBF_NR+1] = {
-    "", "LJ", "Buckingham", NULL
+    "", "LJ", "Buckingham", nullptr
 };
 
 const char *ecomb_names[eCOMB_NR+1] = {
-    "", "Geometric", "Arithmetic", "GeomSigEps", NULL
-};
-
-const char *gtypes[egcNR+1] = {
-    "T-Coupling", "Energy Mon.", "Acceleration", "Freeze",
-    "User1", "User2", "VCM", "Compressed X", "Or. Res. Fit", "QMMM", NULL
+    "", "Geometric", "Arithmetic", "GeomSigEps", nullptr
 };
 
 const char *esimtemp_names[esimtempNR+1] = {
-    "geometric", "exponential", "linear", NULL
+    "geometric", "exponential", "linear", nullptr
 };
 
 const char *efep_names[efepNR+1] = {
-    "no", "yes", "static", "slow-growth", "expanded", NULL
+    "no", "yes", "static", "slow-growth", "expanded", nullptr
 };
 
 const char *efpt_names[efptNR+1] = {
-    "fep-lambdas", "mass-lambdas", "coul-lambdas", "vdw-lambdas", "bonded-lambdas", "restraint-lambdas", "temperature-lambdas", NULL
+    "fep-lambdas", "mass-lambdas", "coul-lambdas", "vdw-lambdas", "bonded-lambdas", "restraint-lambdas", "temperature-lambdas", nullptr
 };
 
 const char *efpt_singular_names[efptNR+1] = {
-    "fep-lambda", "mass-lambda", "coul-lambda", "vdw-lambda", "bonded-lambda", "restraint-lambda", "temperature-lambda", NULL
+    "fep-lambda", "mass-lambda", "coul-lambda", "vdw-lambda", "bonded-lambda", "restraint-lambda", "temperature-lambda", nullptr
 };
 
 const char *edHdLPrintEnergy_names[edHdLPrintEnergyNR+1] = {
-    "no", "total", "potential", "yes", NULL
+    "no", "total", "potential", "yes", nullptr
 };
 
 const char *elamstats_names[elamstatsNR+1] = {
-    "no", "metropolis-transition", "barker-transition", "minvar", "wang-landau", "weighted-wang-landau", NULL
+    "no", "metropolis-transition", "barker-transition", "minvar", "wang-landau", "weighted-wang-landau", nullptr
 };
 
 const char *elmcmove_names[elmcmoveNR+1] = {
-    "no", "metropolis", "barker", "gibbs", "metropolized-gibbs", NULL
+    "no", "metropolis", "barker", "gibbs", "metropolized-gibbs", nullptr
 };
 
 const char *elmceq_names[elmceqNR+1] = {
-    "no", "yes", "wl-delta", "number-all-lambda", "number-steps", "number-samples", "count-ratio", NULL
+    "no", "yes", "wl-delta", "number-all-lambda", "number-steps", "number-samples", "count-ratio", nullptr
 };
 
 const char *separate_dhdl_file_names[esepdhdlfileNR+1] = {
-    "yes", "no", NULL
+    "yes", "no", nullptr
 };
 
 const char *dhdl_derivatives_names[edhdlderivativesNR+1] = {
-    "yes", "no", NULL
+    "yes", "no", nullptr
 };
 
 const char *esol_names[esolNR+1] = {
-    "No", "SPC", "TIP4p", NULL
+    "No", "SPC", "TIP4p", nullptr
 };
 
 const char *edispc_names[edispcNR+1] = {
-    "No", "EnerPres", "Ener", "AllEnerPres", "AllEner", NULL
+    "No", "EnerPres", "Ener", "AllEnerPres", "AllEner", nullptr
 };
 
 const char *ecm_names[ecmNR+1] = {
-    "Linear", "Angular", "None", NULL
+    "Linear", "Angular", "None", nullptr
 };
 
 const char *eann_names[eannNR+1] = {
-    "No", "Single", "Periodic", NULL
+    "No", "Single", "Periodic", nullptr
 };
 
 const char *eis_names[eisNR+1] = {
-    "No", "GBSA", NULL
+    "No", "GBSA", nullptr
 };
 
 const char *egb_names[egbNR+1] = {
-    "Still", "HCT", "OBC", NULL
+    "Still", "HCT", "OBC", nullptr
 };
 
 const char *esa_names[esaNR+1] = {
-    "Ace-approximation", "None", "Still", NULL
+    "Ace-approximation", "None", "Still", nullptr
 };
 
 const char *ewt_names[ewtNR+1] = {
-    "9-3", "10-4", "table", "12-6", NULL
+    "9-3", "10-4", "table", "12-6", nullptr
 };
 
 const char *epull_names[epullNR+1] = {
-    "umbrella", "constraint", "constant-force", "flat-bottom", NULL
+    "umbrella", "constraint", "constant-force", "flat-bottom", nullptr
 };
 
 const char *epullg_names[epullgNR+1] = {
-    "distance", "direction", "cylinder", "direction-periodic", "direction-relative", NULL
+    "distance", "direction", "cylinder", "direction-periodic", "direction-relative", nullptr
 };
 
 const char *erotg_names[erotgNR+1] = {
-    "iso", "iso-pf", "pm", "pm-pf", "rm", "rm-pf", "rm2", "rm2-pf", "flex", "flex-t", "flex2", "flex2-t", NULL
+    "iso", "iso-pf", "pm", "pm-pf", "rm", "rm-pf", "rm2", "rm2-pf", "flex", "flex-t", "flex2", "flex2-t", nullptr
 };
 
 const char *erotg_fitnames[erotgFitNR+1] = {
-    "rmsd", "norm", "potential", NULL
+    "rmsd", "norm", "potential", nullptr
 };
 
 const char *eSwapTypes_names[eSwapTypesNR+1] = {
-    "no", "X", "Y", "Z", NULL
+    "no", "X", "Y", "Z", nullptr
 };
 
 const char *eSwapFixedGrp_names[eSwapFixedGrpNR+1] = {
-    "Split0", "Split1", "Solvent", NULL
+    "Split0", "Split1", "Solvent", nullptr
 };
 
 
 const char *eQMmethod_names[eQMmethodNR+1] = {
     "AM1", "PM3", "RHF",
     "UHF", "DFT", "B3LYP", "MP2", "CASSCF", "B3LYPLAN",
-    "DIRECT", NULL
+    "DIRECT", nullptr
 };
 
 const char *eQMbasis_names[eQMbasisNR+1] = {
     "STO3G", "STO-3G", "3-21G",
     "3-21G*", "3-21+G*", "6-21G",
     "6-31G", "6-31G*", "6-31+G*",
-    "6-311G", NULL
+    "6-311G", nullptr
 };
 
 const char *eQMMMscheme_names[eQMMMschemeNR+1] = {
-    "normal", "ONIOM", NULL
+    "normal", "ONIOM", nullptr
 };
 
 const char *eMultentOpt_names[eMultentOptNR+1] = {
-    "multiple_entries", "no", "use_last", NULL
+    "multiple_entries", "no", "use_last", nullptr
 };
 
 const char *gmx_nblist_geometry_names[GMX_NBLIST_GEOMETRY_NR+1] = {
-    "Particle-Particle", "Water3-Particle", "Water3-Water3", "Water4-Particle", "Water4-Water4", "CG-CG", NULL
+    "Particle-Particle", "Water3-Particle", "Water3-Water3", "Water4-Particle", "Water4-Water4", "CG-CG", nullptr
 };
 
 const char *gmx_nblist_interaction_names[GMX_NBLIST_INTERACTION_NR+1] = {
-    "Standard", "Free_Energy", NULL
+    "Standard", "Free_Energy", nullptr
 };
 
 const char *gmx_nbkernel_elec_names[GMX_NBKERNEL_ELEC_NR+1] =
 {
-    "None", "Coulomb", "Reaction-Field", "Cubic-Spline-Table", "Generalized-Born", "Ewald", NULL
+    "None", "Coulomb", "Reaction-Field", "Cubic-Spline-Table", "Generalized-Born", "Ewald", nullptr
 };
 
 const char *gmx_nbkernel_vdw_names[GMX_NBKERNEL_VDW_NR+1] =
 {
-    "None", "Lennard-Jones", "Buckingham", "Cubic-Spline-Table", "LJEwald", NULL
+    "None", "Lennard-Jones", "Buckingham", "Cubic-Spline-Table", "LJEwald", nullptr
 };
diff --git a/src/gromacs/mdtypes/md_enums.h b/src/gromacs/mdtypes/md_enums.h
new file mode 100644 (file)
index 0000000..377c16c
--- /dev/null
@@ -0,0 +1,684 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014,2015, 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.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*! \file
+ * \brief
+ * Declares enumerated types used throughout the code.
+ *
+ * \author David van der Spoel <david.vanderspoel@icm.uu.se>
+ * \inpublicapi
+ * \ingroup module_mdtypes
+ */
+#ifndef GMX_MDTYPES_MD_ENUMS_H
+#define GMX_MDTYPES_MD_ENUMS_H
+
+#include "gromacs/utility/basedefinitions.h"
+
+/*! \brief Return a string from a list of strings
+ *
+ * If index if within 0 .. max_index-1 returns the corresponding string
+ * or UNDEFINED otherwise, in other words this is a range-check that does
+ * not crash.
+ * \param[in] index     The index in the array
+ * \param[in] max_index The length of the array
+ * \param[in] names     The array
+ * \return the correct string or UNDEFINED
+ */
+const char *enum_name(int index, int max_index, const char *names[]);
+
+//! Boolean strings no or yes
+extern const char *yesno_names[BOOL_NR+1];
+//! Boolean strings false or true
+extern const char *bool_names[BOOL_NR+1];
+//! Macro to select a bool name
+#define EBOOL(e)       enum_name(e, BOOL_NR, bool_names)
+
+
+//! \brief The two compartments for CompEL setups.
+enum eCompartment {
+    eCompA, eCompB, eCompNR
+};
+
+/*! \brief The channels that define with their COM the compartment boundaries in CompEL setups.
+ *
+ * In principle one could also use modified setups with more than two channels.
+ */
+enum eChannel {
+    eChan0, eChan1, eChanNR
+};
+
+/*! \brief Temperature coupling type
+ *
+ * yes is an alias for berendsen
+ */
+enum {
+    etcNO, etcBERENDSEN, etcNOSEHOOVER, etcYES, etcANDERSEN, etcANDERSENMASSIVE, etcVRESCALE, etcNR
+};
+//! Strings corresponding to temperatyre coupling types
+extern const char *etcoupl_names[etcNR+1];
+//! Macro for selecting t coupling string
+#define ETCOUPLTYPE(e) enum_name(e, etcNR, etcoupl_names)
+//! Return whether this is andersen coupling
+#define ETC_ANDERSEN(e) (((e) == etcANDERSENMASSIVE) || ((e) == etcANDERSEN))
+
+/*! \brief Pressure coupling types
+ *
+ * isotropic is an alias for berendsen
+ */
+enum {
+    epcNO, epcBERENDSEN, epcPARRINELLORAHMAN, epcISOTROPIC, epcMTTK, epcNR
+};
+//! String corresponding to pressure coupling algorithm
+extern const char *epcoupl_names[epcNR+1];
+//! Macro to return the correct pcoupling string
+#define EPCOUPLTYPE(e) enum_name(e, epcNR, epcoupl_names)
+
+//! Flat-bottom posres geometries
+enum {
+    efbposresZERO, efbposresSPHERE, efbposresCYLINDER, efbposresX, efbposresY, efbposresZ,
+    efbposresCYLINDERX, efbposresCYLINDERY, efbposresCYLINDERZ, efbposresNR
+};
+
+//! Relative coordinate scaling type for position restraints.
+enum {
+    erscNO, erscALL, erscCOM, erscNR
+};
+//! String corresponding to relativ coordinate scaling.
+extern const char *erefscaling_names[erscNR+1];
+//! Macro to select correct coordinate scaling string.
+#define EREFSCALINGTYPE(e) enum_name(e, erscNR, erefscaling_names)
+
+//! Trotter decomposition extended variable parts.
+enum {
+    etrtNONE, etrtNHC, etrtBAROV, etrtBARONHC, etrtNHC2, etrtBAROV2, etrtBARONHC2,
+    etrtVELOCITY1, etrtVELOCITY2, etrtPOSITION, etrtSKIPALL, etrtNR
+};
+
+//! Sequenced parts of the trotter decomposition.
+enum {
+    ettTSEQ0,  ettTSEQ1,  ettTSEQ2,  ettTSEQ3,  ettTSEQ4, ettTSEQMAX
+};
+
+//! Pressure coupling type
+enum {
+    epctISOTROPIC, epctSEMIISOTROPIC, epctANISOTROPIC,
+    epctSURFACETENSION, epctNR
+};
+//! String corresponding to pressure coupling type
+extern const char *epcoupltype_names[epctNR+1];
+//! Macro to select the right string for pcoupl type
+#define EPCOUPLTYPETYPE(e) enum_name(e, epctNR, epcoupltype_names)
+
+//! \\brief Cutoff scheme
+enum {
+    ecutsVERLET, ecutsGROUP, ecutsNR
+};
+//! String corresponding to cutoff scheme
+extern const char *ecutscheme_names[ecutsNR+1];
+//! Macro to select the right string for cutoff scheme
+#define ECUTSCHEME(e)  enum_name(e, ecutsNR, ecutscheme_names)
+
+/*! \brief Coulomb / VdW interaction modifiers.
+ *
+ * grompp replaces eintmodPOTSHIFT_VERLET by eintmodPOTSHIFT or eintmodNONE.
+ * Exactcutoff is only used by Reaction-field-zero, and is not user-selectable.
+ */
+enum eintmod {
+    eintmodPOTSHIFT_VERLET, eintmodPOTSHIFT, eintmodNONE, eintmodPOTSWITCH, eintmodEXACTCUTOFF, eintmodFORCESWITCH, eintmodNR
+};
+//! String corresponding to interaction modifiers
+extern const char *eintmod_names[eintmodNR+1];
+//! Macro to select the correct string for modifiers
+#define INTMODIFIER(e) enum_name(e, eintmodNR, eintmod_names)
+
+/*! \brief Cut-off treatment for Coulomb
+ *
+ * eelNOTUSED1 used to be GB, but to enable generalized born with different
+ * forms of electrostatics (RF, switch, etc.) in the future it is now selected
+ * separately (through the implicit_solvent option).
+ */
+enum {
+    eelCUT,     eelRF,     eelGRF,   eelPME,  eelEWALD,  eelP3M_AD,
+    eelPOISSON, eelSWITCH, eelSHIFT, eelUSER, eelGB_NOTUSED, eelRF_NEC_UNSUPPORTED, eelENCADSHIFT,
+    eelPMEUSER, eelPMESWITCH, eelPMEUSERSWITCH, eelRF_ZERO, eelNR
+};
+//! String corresponding to Coulomb treatment
+extern const char *eel_names[eelNR+1];
+//! Macro for correct string for Coulomb treatment
+#define EELTYPE(e)     enum_name(e, eelNR, eel_names)
+
+//! Ewald geometry.
+enum {
+    eewg3D, eewg3DC, eewgNR
+};
+//! String corresponding to Ewald geometry
+extern const char *eewg_names[eewgNR+1];
+
+//! Macro telling us whether we use reaction field
+#define EEL_RF(e) ((e) == eelRF || (e) == eelGRF || (e) == eelRF_NEC_UNSUPPORTED || (e) == eelRF_ZERO )
+
+//! Macro telling us whether we use PME
+#define EEL_PME(e)  ((e) == eelPME || (e) == eelPMESWITCH || (e) == eelPMEUSER || (e) == eelPMEUSERSWITCH || (e) == eelP3M_AD)
+//! Macro telling us whether we use PME or full Ewald
+#define EEL_PME_EWALD(e) (EEL_PME(e) || (e) == eelEWALD)
+//! Macro telling us whether we use full electrostatics of any sort
+#define EEL_FULL(e) (EEL_PME_EWALD(e) || (e) == eelPOISSON)
+//! Macro telling us whether we use user defined electrostatics
+#define EEL_USER(e) ((e) == eelUSER || (e) == eelPMEUSER || (e) == (eelPMEUSERSWITCH))
+
+//! Van der Waals interaction treatment
+enum {
+    evdwCUT, evdwSWITCH, evdwSHIFT, evdwUSER, evdwENCADSHIFT,
+    evdwPME, evdwNR
+};
+//! String corresponding to Van der Waals treatment
+extern const char *evdw_names[evdwNR+1];
+//! Macro for selecting correct string for VdW treatment
+#define EVDWTYPE(e)    enum_name(e, evdwNR, evdw_names)
+
+//! Type of long-range VdW treatment of combination rules
+enum {
+    eljpmeGEOM, eljpmeLB, eljpmeNR
+};
+//! String for LJPME combination rule treatment
+extern const char *eljpme_names[eljpmeNR+1];
+//! Macro for correct LJPME comb rule name
+#define ELJPMECOMBNAMES(e) enum_name(e, eljpmeNR, eljpme_names)
+
+//! Macro to tell us whether we use LJPME
+#define EVDW_PME(e) ((e) == evdwPME)
+
+//! Neighborsearching algorithm
+enum {
+    ensGRID, ensSIMPLE, ensNR
+};
+//! String corresponding to neighborsearching
+extern const char *ens_names[ensNR+1];
+//! Macro for correct NS algorithm
+#define ENS(e)         enum_name(e, ensNR, ens_names)
+
+/*! \brief Integrator algorithm
+ *
+ * eiVV is normal velocity verlet
+ * eiVVAK uses 1/2*(KE(t-dt/2)+KE(t+dt/2)) as the kinetic energy,
+ * and the half step kinetic energy for temperature control
+ */
+enum {
+    eiMD, eiSteep, eiCG, eiBD, eiSD2, eiNM, eiLBFGS, eiTPI, eiTPIC, eiSD1, eiVV, eiVVAK, eiNR
+};
+//! Name of the integrator algorithm
+extern const char *ei_names[eiNR+1];
+//! Macro returning integrator string
+#define EI(e)          enum_name(e, eiNR, ei_names)
+//! Do we use velocity Verlet
+#define EI_VV(e) ((e) == eiVV || (e) == eiVVAK)
+//! Do we use molecular dynamics
+#define EI_MD(e) ((e) == eiMD || EI_VV(e))
+//! Do we use stochastic dynamics
+#define EI_SD(e) ((e) == eiSD1 || (e) == eiSD2)
+//! Do we use any stochastic integrator
+#define EI_RANDOM(e) (EI_SD(e) || (e) == eiBD)
+/*above integrators may not conserve momenta*/
+//! Do we use any type of dynamics
+#define EI_DYNAMICS(e) (EI_MD(e) || EI_RANDOM(e))
+//! Or do we use minimization
+#define EI_ENERGY_MINIMIZATION(e) ((e) == eiSteep || (e) == eiCG || (e) == eiLBFGS)
+//! Do we apply test particle insertion
+#define EI_TPI(e) ((e) == eiTPI || (e) == eiTPIC)
+//! Do we deal with particle velocities
+#define EI_STATE_VELOCITY(e) (EI_MD(e) || EI_SD(e))
+
+//! Constraint algorithm
+enum {
+    econtLINCS, econtSHAKE, econtNR
+};
+//! String corresponding to constraint algorithm
+extern const char *econstr_names[econtNR+1];
+//! Macro to select the correct string
+#define ECONSTRTYPE(e) enum_name(e, econtNR, econstr_names)
+
+//! Distance restraint refinement algorithm
+enum {
+    edrNone, edrSimple, edrEnsemble, edrNR
+};
+//! String corresponding to distance restraint algorithm
+extern const char *edisre_names[edrNR+1];
+//! Macro to select the right disre algorithm string
+#define EDISRETYPE(e)  enum_name(e, edrNR, edisre_names)
+
+//! Distance restraints weighting type
+enum {
+    edrwConservative, edrwEqual, edrwNR
+};
+//! String corresponding to distance restraint weighting
+extern const char *edisreweighting_names[edrwNR+1];
+//! Macro corresponding to dr weighting
+#define EDISREWEIGHTING(e)  enum_name(e, edrwNR, edisreweighting_names)
+
+//! Combination rule algorithm.
+enum {
+    eCOMB_NONE, eCOMB_GEOMETRIC, eCOMB_ARITHMETIC, eCOMB_GEOM_SIG_EPS, eCOMB_NR
+};
+//! String for combination rule algorithm
+extern const char *ecomb_names[eCOMB_NR+1];
+//! Macro to select the comb rule string
+#define ECOMBNAME(e)   enum_name(e, eCOMB_NR, ecomb_names)
+
+//! Van der Waals potential.
+enum {
+    eNBF_NONE, eNBF_LJ, eNBF_BHAM, eNBF_NR
+};
+//! String corresponding to Van der Waals potential
+extern const char *enbf_names[eNBF_NR+1];
+//! Macro for correct VdW potential string
+#define ENBFNAME(e)    enum_name(e, eNBF_NR, enbf_names)
+
+//! Simulated tempering methods.
+enum {
+    esimtempGEOMETRIC, esimtempEXPONENTIAL, esimtempLINEAR, esimtempNR
+};
+//! String corresponding to simulated tempering
+extern const char *esimtemp_names[esimtempNR+1];
+//! Macro for correct tempering string
+#define ESIMTEMP(e)    enum_name(e, esimtempNR, esimtemp_names)
+
+/*! \brief Free energy perturbation type
+ *
+ * efepNO, there are no evaluations at other states.
+ * efepYES, treated equivalently to efepSTATIC.
+ * efepSTATIC, then lambdas do not change during the simulation.
+ * efepSLOWGROWTH, then the states change monotonically
+ * throughout the simulation.
+ * efepEXPANDED, then expanded ensemble simulations are occuring.
+ */
+enum {
+    efepNO, efepYES, efepSTATIC, efepSLOWGROWTH, efepEXPANDED, efepNR
+};
+//! String corresponding to FEP type.
+extern const char *efep_names[efepNR+1];
+//! Macro corresponding to FEP string.
+#define EFEPTYPE(e)    enum_name(e, efepNR, efep_names)
+
+//! Free energy pertubation coupling types.
+enum {
+    efptFEP, efptMASS, efptCOUL, efptVDW, efptBONDED, efptRESTRAINT, efptTEMPERATURE, efptNR
+};
+//! String for FEP coupling type
+extern const char *efpt_names[efptNR+1];
+//! Long names for FEP coupling type
+extern const char *efpt_singular_names[efptNR+1];
+
+/*! \brief What to print for free energy calculations
+ *
+ * Printing the energy to the free energy dhdl file.
+ * YES is an alias to TOTAL, and
+ * will be converted in readir, so we never have to account for it in code.
+ */
+enum {
+    edHdLPrintEnergyNO, edHdLPrintEnergyTOTAL, edHdLPrintEnergyPOTENTIAL, edHdLPrintEnergyYES, edHdLPrintEnergyNR
+};
+//! String corresponding to printing of free energy
+extern const char *edHdLPrintEnergy_names[edHdLPrintEnergyNR+1];
+
+/*! \brief How the lambda weights are calculated
+ *
+ * elamstatsMETROPOLIS - using the metropolis criteria
+ * elamstatsBARKER     - using the Barker critera for transition weights,
+ *                       also called unoptimized Bennett
+ * elamstatsMINVAR     - using Barker + minimum variance for weights
+ * elamstatsWL         - Wang-Landu (using visitation counts)
+ * elamstatsWWL        - Weighted Wang-Landau (using optimized Gibbs
+ *                       weighted visitation counts)
+ */
+enum {
+    elamstatsNO, elamstatsMETROPOLIS, elamstatsBARKER, elamstatsMINVAR, elamstatsWL, elamstatsWWL, elamstatsNR
+};
+//! String corresponding to lambda weights
+extern const char *elamstats_names[elamstatsNR+1];
+//! Macro telling us whether we use expanded ensemble
+#define ELAMSTATS_EXPANDED(e) ((e) > elamstatsNO)
+//! Macro telling us whether we use some kind of Wang-Landau
+#define EWL(e) ((e) == elamstatsWL || (e) == elamstatsWWL)
+
+/*! \brief How moves in lambda are calculated
+ *
+ * elmovemcMETROPOLIS - using the Metropolis criteria, and 50% up and down
+ * elmovemcBARKER     - using the Barker criteria, and 50% up and down
+ * elmovemcGIBBS      - computing the transition using the marginalized
+ *                      probabilities of the lambdas
+ * elmovemcMETGIBBS   - computing the transition using the metropolized
+ *                      version of Gibbs (Monte Carlo Strategies in
+ *                      Scientific computing, Liu, p. 134)
+ */
+enum {
+    elmcmoveNO, elmcmoveMETROPOLIS, elmcmoveBARKER, elmcmoveGIBBS, elmcmoveMETGIBBS, elmcmoveNR
+};
+//! String corresponding to lambda moves
+extern const char *elmcmove_names[elmcmoveNR+1];
+
+/*! \brief How we decide whether weights have reached equilibrium
+ *
+ * elmceqNO       - never stop, weights keep going
+ * elmceqYES      - fix the weights from the beginning; no movement
+ * elmceqWLDELTA  - stop when the WL-delta falls below a certain level
+ * elmceqNUMATLAM - stop when we have a certain number of samples at
+ *                  every step
+ * elmceqSTEPS    - stop when we've run a certain total number of steps
+ * elmceqSAMPLES  - stop when we've run a certain total number of samples
+ * elmceqRATIO    - stop when the ratio of samples (lowest to highest)
+ *                  is sufficiently large
+ */
+enum {
+    elmceqNO, elmceqYES, elmceqWLDELTA, elmceqNUMATLAM, elmceqSTEPS, elmceqSAMPLES, elmceqRATIO, elmceqNR
+};
+//! String corresponding to equilibrium algorithm
+extern const char *elmceq_names[elmceqNR+1];
+
+/*! \brief separate_dhdl_file selection
+ *
+ * NOTE: YES is the first one. Do NOT interpret this one as a gmx_bool
+ */
+enum
+{
+    esepdhdlfileYES, esepdhdlfileNO, esepdhdlfileNR
+};
+//! String corresponding to separate DHDL file selection
+extern const char *separate_dhdl_file_names[esepdhdlfileNR+1];
+//! Monster macro for DHDL file selection
+#define SEPDHDLFILETYPE(e) enum_name(e, esepdhdlfileNR, separate_dhdl_file_names)
+
+/*! \brief dhdl_derivatives selection \
+ *
+ * NOTE: YES is the first one. Do NOT interpret this one as a gmx_bool
+ */
+enum
+{
+    edhdlderivativesYES, edhdlderivativesNO, edhdlderivativesNR
+};
+//! String for DHDL derivatives
+extern const char *dhdl_derivatives_names[edhdlderivativesNR+1];
+//! YAMM (Yet another monster macro)
+#define DHDLDERIVATIVESTYPE(e) enum_name(e, edhdlderivativesNR, dhdl_derivatives_names)
+
+/*! \brief Solvent model
+ *
+ * Distinguishes classical water types with 3 or 4 particles
+ */
+enum {
+    esolNO, esolSPC, esolTIP4P, esolNR
+};
+//! String corresponding to solvent type
+extern const char *esol_names[esolNR+1];
+//! Macro lest we print the wrong solvent model string
+#define ESOLTYPE(e)    enum_name(e, esolNR, esol_names)
+
+//! Dispersion correction.
+enum {
+    edispcNO, edispcEnerPres, edispcEner, edispcAllEnerPres, edispcAllEner, edispcNR
+};
+//! String corresponding to dispersion corrections
+extern const char *edispc_names[edispcNR+1];
+//! Macro for dispcorr string
+#define EDISPCORR(e)   enum_name(e, edispcNR, edispc_names)
+
+//! Center of mass motion removal algorithm.
+enum {
+    ecmLINEAR, ecmANGULAR, ecmNO, ecmNR
+};
+//! String corresponding to COM removal
+extern const char *ecm_names[ecmNR+1];
+//! Macro for COM removal string
+#define ECOM(e)        enum_name(e, ecmNR, ecm_names)
+
+//! Algorithm for simulated annealing.
+enum {
+    eannNO, eannSINGLE, eannPERIODIC, eannNR
+};
+//! String for simulated annealing
+extern const char *eann_names[eannNR+1];
+//! And macro for simulated annealing string
+#define EANNEAL(e)      enum_name(e, eannNR, eann_names)
+
+//! Implicit solvent algorithms.
+enum {
+    eisNO, eisGBSA, eisNR
+};
+//! String corresponding to implicit solvent.
+extern const char *eis_names[eisNR+1];
+//! Macro for implicit solvent string.
+#define EIMPLICITSOL(e) enum_name(e, eisNR, eis_names)
+
+//! Algorithms for calculating GB radii.
+enum {
+    egbSTILL, egbHCT, egbOBC, egbNR
+};
+//! String for GB algorithm name.
+extern const char *egb_names[egbNR+1];
+//! Macro for GB string.
+#define EGBALGORITHM(e) enum_name(e, egbNR, egb_names)
+
+//! Surface area algorithm for implicit solvent.
+enum {
+    esaAPPROX, esaNO, esaSTILL, esaNR
+};
+//! String corresponding to surface area algorithm.
+extern const char *esa_names[esaNR+1];
+//! brief Macro for SA algorithm string.
+#define ESAALGORITHM(e) enum_name(e, esaNR, esa_names)
+
+//! Wall types.
+enum {
+    ewt93, ewt104, ewtTABLE, ewt126, ewtNR
+};
+//! String corresponding to wall type
+extern const char *ewt_names[ewtNR+1];
+//! Macro for wall type string
+#define EWALLTYPE(e)   enum_name(e, ewtNR, ewt_names)
+
+//! Pulling algorithm.
+enum {
+    epullUMBRELLA, epullCONSTRAINT, epullCONST_F, epullFLATBOTTOM, epullNR
+};
+//! String for pulling algorithm
+extern const char *epull_names[epullNR+1];
+//! Macro for pulling string
+#define EPULLTYPE(e)   enum_name(e, epullNR, epull_names)
+
+//! Control of pull groups
+enum {
+    epullgDIST, epullgDIR, epullgCYL, epullgDIRPBC, epullgDIRRELATIVE, epullgNR
+};
+//! String for pull groups
+extern const char *epullg_names[epullgNR+1];
+//! Macro for pull group string
+#define EPULLGEOM(e)   enum_name(e, epullgNR, epullg_names)
+
+//! Enforced rotation groups.
+enum {
+    erotgISO, erotgISOPF,
+    erotgPM, erotgPMPF,
+    erotgRM, erotgRMPF,
+    erotgRM2, erotgRM2PF,
+    erotgFLEX, erotgFLEXT,
+    erotgFLEX2, erotgFLEX2T,
+    erotgNR
+};
+//! Rotation group names
+extern const char *erotg_names[erotgNR+1];
+//! Macro for rot group names
+#define EROTGEOM(e)    enum_name(e, erotgNR, erotg_names)
+//! String for rotation group origin names
+extern const char *erotg_originnames[erotgNR+1];
+//! Macro for rot group origin names
+#define EROTORIGIN(e)  enum_name(e, erotgOriginNR, erotg_originnames)
+
+//! Rotation group fitting type
+enum {
+    erotgFitRMSD, erotgFitNORM, erotgFitPOT, erotgFitNR
+};
+//! String corresponding to rotation group fitting
+extern const char *erotg_fitnames[erotgFitNR+1];
+//! Macro for rot group fit names
+#define EROTFIT(e)     enum_name(e, erotgFitNR, erotg_fitnames)
+
+/*! \brief Direction along which ion/water swaps happen
+ *
+ * Part of "Computational Electrophysiology" (CompEL) setups
+ */
+enum eSwaptype {
+    eswapNO, eswapX, eswapY, eswapZ, eSwapTypesNR
+};
+//! Names for swapping
+extern const char *eSwapTypes_names[eSwapTypesNR+1];
+//! Macro for swapping string
+#define ESWAPTYPE(e)   enum_name(e, eSwapTypesNR, eSwapTypes_names)
+
+/*! \brief Swap group splitting type
+ *
+ * These are just the fixed groups we need for any setup. In t_swap's grp
+ * entry after that follows the variable number of swap groups.
+ */
+enum {
+    eGrpSplit0, eGrpSplit1, eGrpSolvent, eSwapFixedGrpNR
+};
+//! String for swap group splitting
+extern const char *eSwapFixedGrp_names[eSwapFixedGrpNR+1];
+
+//! QMMM methods.
+enum {
+    eQMmethodAM1, eQMmethodPM3, eQMmethodRHF,
+    eQMmethodUHF, eQMmethodDFT, eQMmethodB3LYP, eQMmethodMP2, eQMmethodCASSCF, eQMmethodB3LYPLAN,
+    eQMmethodDIRECT, eQMmethodNR
+};
+//! String corresponding to QMMM methods
+extern const char *eQMmethod_names[eQMmethodNR+1];
+//! Macro to pick QMMM method name
+#define EQMMETHOD(e)   enum_name(e, eQMmethodNR, eQMmethod_names)
+
+//! QMMM basis function for QM part
+enum {
+    eQMbasisSTO3G, eQMbasisSTO3G2, eQMbasis321G,
+    eQMbasis321Gp, eQMbasis321dGp, eQMbasis621G,
+    eQMbasis631G, eQMbasis631Gp, eQMbasis631dGp,
+    eQMbasis6311G, eQMbasisNR
+};
+//! Name for QMMM basis function
+extern const char *eQMbasis_names[eQMbasisNR+1];
+//! Macro to pick right basis function string
+#define EQMBASIS(e)    enum_name(e, eQMbasisNR, eQMbasis_names)
+
+//! QMMM scheme
+enum {
+    eQMMMschemenormal, eQMMMschemeoniom, eQMMMschemeNR
+};
+//! QMMMM scheme names
+extern const char *eQMMMscheme_names[eQMMMschemeNR+1];
+//! Macro to pick QMMMM scheme name
+#define EQMMMSCHEME(e) enum_name(e, eQMMMschemeNR, eQMMMscheme_names)
+
+//! Internal stuff for multiple value options in mdp files
+enum {
+    eMultentOptName, eMultentOptNo, eMultentOptLast, eMultentOptNR
+};
+//! Multiple value option names
+extern const char *eMultentOpt_names[eMultentOptNR+1];
+
+/*! \brief Neighborlist geometry type.
+ *
+ * Kernels will compute interactions between two particles,
+ * 3-center water, 4-center water or coarse-grained beads.
+ */
+enum gmx_nblist_kernel_geometry
+{
+    GMX_NBLIST_GEOMETRY_PARTICLE_PARTICLE,
+    GMX_NBLIST_GEOMETRY_WATER3_PARTICLE,
+    GMX_NBLIST_GEOMETRY_WATER3_WATER3,
+    GMX_NBLIST_GEOMETRY_WATER4_PARTICLE,
+    GMX_NBLIST_GEOMETRY_WATER4_WATER4,
+    GMX_NBLIST_GEOMETRY_CG_CG,
+    GMX_NBLIST_GEOMETRY_NR
+};
+//! String corresponding to nblist geometry names
+extern const char *gmx_nblist_geometry_names[GMX_NBLIST_GEOMETRY_NR+1];
+
+/*! \brief Types of electrostatics calculations
+ *
+ * Types of electrostatics calculations available inside nonbonded kernels.
+ * Note that these do NOT necessarily correspond to the user selections
+ * in the MDP file; many interactions for instance map to tabulated kernels.
+ */
+enum gmx_nbkernel_elec
+{
+    GMX_NBKERNEL_ELEC_NONE,
+    GMX_NBKERNEL_ELEC_COULOMB,
+    GMX_NBKERNEL_ELEC_REACTIONFIELD,
+    GMX_NBKERNEL_ELEC_CUBICSPLINETABLE,
+    GMX_NBKERNEL_ELEC_GENERALIZEDBORN,
+    GMX_NBKERNEL_ELEC_EWALD,
+    GMX_NBKERNEL_ELEC_NR
+};
+//! String corresponding to electrostatics kernels
+extern const char *gmx_nbkernel_elec_names[GMX_NBKERNEL_ELEC_NR+1];
+
+/*! \brief Types of vdw calculations available
+ *
+ * Types of vdw calculations available inside nonbonded kernels.
+ * Note that these do NOT necessarily correspond to the user selections
+ * in the MDP file; many interactions for instance map to tabulated kernels.
+ */
+enum gmx_nbkernel_vdw
+{
+    GMX_NBKERNEL_VDW_NONE,
+    GMX_NBKERNEL_VDW_LENNARDJONES,
+    GMX_NBKERNEL_VDW_BUCKINGHAM,
+    GMX_NBKERNEL_VDW_CUBICSPLINETABLE,
+    GMX_NBKERNEL_VDW_LJEWALD,
+    GMX_NBKERNEL_VDW_NR
+};
+//! String corresponding to VdW kernels
+extern const char *gmx_nbkernel_vdw_names[GMX_NBKERNEL_VDW_NR+1];
+
+//! \brief Types of interactions inside the neighborlist
+enum gmx_nblist_interaction_type
+{
+    GMX_NBLIST_INTERACTION_STANDARD,
+    GMX_NBLIST_INTERACTION_FREE_ENERGY,
+    GMX_NBLIST_INTERACTION_NR
+};
+//! String corresponding to interactions in neighborlist code
+extern const char *gmx_nblist_interaction_names[GMX_NBLIST_INTERACTION_NR+1];
+
+#endif /* GMX_MDTYPES_MD_ENUMS_H */
index 69e93af3d77ba9ab97f3e3a614fef32470c43c74..15cba4afe179d3c7a465a702194a49ab150de878 100644 (file)
 
 #include <algorithm>
 
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdtypes/df_history.h"
 #include "gromacs/mdtypes/energyhistory.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/smalloc.h"
 
 /* The source code in this file should be thread-safe.
index 908e20f4026ad0d2976514f65cbeb0a0a1720bd8..5899da87e75cefddc1d6b1fae006d6b6babaa792 100644 (file)
@@ -37,8 +37,8 @@
 #ifndef GMX_MDTYPES_STATE_H
 #define GMX_MDTYPES_STATE_H
 
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/math/vectypes.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/real.h"
 
index 1f6d3ea2ef4d7fffbcc68e8fe92192dab5065767..7662589f6bcd548627afd61b1ca83e2f38610737 100644 (file)
@@ -49,6 +49,7 @@
 #include "gromacs/math/vec.h"
 #include "gromacs/math/vectypes.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/utility/basedefinitions.h"
@@ -89,7 +90,7 @@ static void do_box_rel(t_inputrec *ir, matrix box_rel, matrix b, gmx_bool bInit)
 
 void preserve_box_shape(t_inputrec *ir, matrix box_rel, matrix b)
 {
-    if (PRESERVE_SHAPE(*ir))
+    if (inputrecPreserveShape(ir))
     {
         do_box_rel(ir, box_rel, b, FALSE);
     }
@@ -102,7 +103,7 @@ void set_box_rel(t_inputrec *ir, t_state *state)
 
     clear_mat(state->box_rel);
 
-    if (PRESERVE_SHAPE(*ir))
+    if (inputrecPreserveShape(ir))
     {
         do_box_rel(ir, state->box_rel, state->box, TRUE);
     }
index 2a382909e3a265d6734a53ed967788661c2d7b32..ed2a6001652045a38f129bf7c28227102177e21f 100644 (file)
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/math/vectypes.h"
 #include "gromacs/mdlib/mdrun.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/mdatom.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pulling/pull_internal.h"
 #include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
index 8460a2ee809eda4dc80beb3285d33d659dbd3c20..44355971db57f3ee1c6e521e4f38b8d741e35383 100644 (file)
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/linearalgebra/nrjac.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/groupcoord.h"
 #include "gromacs/mdlib/mdrun.h"
 #include "gromacs/mdlib/sim_util.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/timing/cyclecounter.h"
 #include "gromacs/timing/wallcycle.h"
index 4ea120122057ff949c122558269ac608777117a4..380d04b9051bcd374cd9d940ddd06bcb196df1bb 100644 (file)
@@ -44,9 +44,9 @@
 #include "gromacs/domdec/ga2la.h"
 #include "gromacs/fileio/confio.h"
 #include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/mdatom.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pulling/pull.h"
index bb3ce612ebdba1eea53679599a80bfc8a0ed1de3..a2cf891789606680e03890aeb3ebda40416b7c1b 100644 (file)
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/groupcoord.h"
 #include "gromacs/mdlib/mdrun.h"
 #include "gromacs/mdlib/sim_util.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
index bc32f8ac17a17c210fec3fa776176fdc987d4ff2..611169994fd7d585835001276812df7b2ab0a248 100644 (file)
 #include <algorithm>
 
 #include "gromacs/fileio/xvgr.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/fcdata.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
index 3b951d0afe71dffa21bbc7f3170e6934a99873ed..4d5ff1ce0540773dc282989f624b81b5faeb07b6 100644 (file)
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/fileio/txtdump.h"
 #include "gromacs/fileio/xtcio.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/tools/compare.h"
 #include "gromacs/topology/atomprop.h"
 #include "gromacs/topology/block.h"
 #include "gromacs/topology/index.h"
 #include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
index b31756de1de977969e7f6a90886e0be9cc8be0c8..e63ffa1ac35da9546ffe954ec4c8b65a9ce5f058 100644 (file)
 #include "gromacs/fileio/trx.h"
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/fileio/txtdump.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
index a8867c71e65006853d7d6e3b3749fa7fc20c712a..d1b64e09ee11340949b2a766d040d898314c324f 100644 (file)
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/trrio.h"
 #include "gromacs/gmxpreprocess/readir.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/state.h"
 #include "gromacs/random/random.h"
 #include "gromacs/topology/index.h"
index 32bf87f349afe27b02fb7884cd27e1421d02ab19..86858efafa4e983fda6cb6fbb9995cd97d119485 100644 (file)
 #include "gromacs/fileio/txtdump.h"
 #include "gromacs/fileio/xtcio.h"
 #include "gromacs/gmxpreprocess/gmxcpp.h"
-#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/types/forcerec.h"
 #include "gromacs/linearalgebra/sparsematrix.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/state.h"
 #include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/arraysize.h"
+#include "gromacs/utility/basedefinitions.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/smalloc.h"
index a8e9d137c1f5080b855c7773d4df9243e38c9575..f252ffde6612bb9531057e50c34ed4370d26c582 100644 (file)
 #include "gromacs/topology/symtab.h"
 #include "gromacs/utility/smalloc.h"
 
+const char *ptype_str[eptNR+1] = {
+    "Atom", "Nucleus", "Shell", "Bond", "VSite", NULL
+};
+
 void init_atom(t_atoms *at)
 {
     at->nr        = 0;
index 9280d09fe03a6ab8a5d7cd23d50e65c15efe9792..764acf5f502b5d55436fa73e29d093db3d703479 100644 (file)
@@ -46,10 +46,13 @@ extern "C" {
 
 struct t_symtab;
 
+/* The particle type */
 enum {
     eptAtom, eptNucleus, eptShell, eptBond, eptVSite, eptNR
 };
-/* The particle type */
+
+/* The particle type names */
+extern const char *ptype_str[eptNR+1];
 
 typedef struct t_atom
 {
index 58b219d1fc1c317860e61310883ffd98a540be0a..3a9ff8760ce5f58e134cc8dcfc01ca0de1973d84 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
 #include "gromacs/math/vectypes.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/topology/atoms.h"
 #include "gromacs/topology/block.h"
 #include "gromacs/topology/idef.h"
index e5ff05371d40f97d7c97d4871b02bc97f7470727..f9d2ff5b36be6da353be037379f25e12ea3c780b 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, 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.
 #include "gromacs/topology/symtab.h"
 #include "gromacs/utility/smalloc.h"
 
+const char *gtypes[egcNR+1] = {
+    "T-Coupling", "Energy Mon.", "Acceleration", "Freeze",
+    "User1", "User2", "VCM", "Compressed X", "Or. Res. Fit", "QMMM", NULL
+};
+
 static void init_groups(gmx_groups_t *groups)
 {
     groups->ngrpname = 0;
index 85d32c5cd112c090c307c48e3964e6d2d9939df7..3504763dea15dae085afaac34b8d73f82eefc740 100644 (file)
@@ -53,6 +53,8 @@ enum {
     egcORFIT, egcQMMM,
     egcNR
 };
+/* Names corresponding to groups */
+extern const char *gtypes[egcNR+1];
 
 typedef struct gmx_moltype_t
 {
index 8ad91bf1d9befcd344de9d13ac9a39e5ac96b3f6..0efbe77c1faa19a13441b6b72fa75cd0354faa41 100644 (file)
@@ -59,7 +59,6 @@
 #include "gromacs/gmxlib/sighandler.h"
 #include "gromacs/imd/imd.h"
 #include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/types/enums.h"
 #include "gromacs/legacyheaders/types/fcdata.h"
 #include "gromacs/legacyheaders/types/force_flags.h"
 #include "gromacs/legacyheaders/types/forcerec.h"
@@ -93,6 +92,7 @@
 #include "gromacs/mdtypes/df_history.h"
 #include "gromacs/mdtypes/energyhistory.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/mdatom.h"
 #include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/mshift.h"
@@ -277,7 +277,7 @@ double gmx::do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
     /* md-vv uses averaged full step velocities for T-control
        md-vv-avek uses averaged half step velocities for T-control (but full step ekin for P control)
        md uses averaged half step kinetic energies to determine temperature unless defined otherwise by GMX_EKIN_AVE_VEL; */
-    bTrotter = (EI_VV(ir->eI) && (IR_NPT_TROTTER(ir) || IR_NPH_TROTTER(ir) || IR_NVT_TROTTER(ir)));
+    bTrotter = (EI_VV(ir->eI) && (inputrecNptTrotter(ir) || inputrecNphTrotter(ir) || inputrecNvtTrotter(ir)));
 
     if (bRerunMD)
     {
@@ -356,7 +356,7 @@ double gmx::do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
         gmx_fatal(FARGS, "Normal Mode analysis is not supported with virtual sites.\nIf you'd like to help with adding support, we have an open discussion at http://redmine.gromacs.org/issues/879\n");
     }
 
-    if (DEFORM(*ir))
+    if (inputrecDeform(ir))
     {
         tMPI_Thread_mutex_lock(&deform_init_box_mutex);
         set_deform_reference_box(upd,
@@ -518,7 +518,7 @@ double gmx::do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
         }
     }
 
-    if (IR_TWINRANGE(*ir) && repl_ex_nst % ir->nstcalclr != 0)
+    if (inputrecTwinRange(ir) && repl_ex_nst % ir->nstcalclr != 0)
     {
         /* We should exchange at nstcalclr steps to get correct integration */
         gmx_fatal(FARGS, "The replica exchange period (%d) is not divisible by nstcalclr (%d)", repl_ex_nst, ir->nstcalclr);
@@ -534,7 +534,7 @@ double gmx::do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
         nstfep = ir->fepvals->nstdhdl;
         if (ir->bExpanded)
         {
-            if (IR_TWINRANGE(*ir) &&
+            if (inputrecTwinRange(ir) &&
                 ir->expandedvals->nstexpanded % ir->nstcalclr != 0)
             {
                 gmx_fatal(FARGS, "nstexpanded should be divisible by nstcalclr");
@@ -546,7 +546,7 @@ double gmx::do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
             nstfep = gmx_greatest_common_divisor(repl_ex_nst, nstfep);
         }
         /* We checked divisibility of repl_ex_nst and nstcalclr above */
-        if (IR_TWINRANGE(*ir) && nstfep % ir->nstcalclr != 0)
+        if (inputrecTwinRange(ir) && nstfep % ir->nstcalclr != 0)
         {
             gmx_incons("nstfep not divisible by nstcalclr");
         }
@@ -935,7 +935,7 @@ double gmx::do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
             {
                 bMasterState = FALSE;
                 /* Correct the new box if it is too skewed */
-                if (DYNAMIC_BOX(*ir))
+                if (inputrecDynamicBox(ir))
                 {
                     if (correct_box(fplog, step, state->box, graph))
                     {
@@ -1022,7 +1022,7 @@ double gmx::do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
         /* Do we need global communication ? */
         bGStat = (bCalcVir || bCalcEner || bStopCM ||
                   do_per_step(step, nstglobalcomm) ||
-                  (EI_VV(ir->eI) && IR_NVT_TROTTER(ir) && do_per_step(step-1, nstglobalcomm)));
+                  (EI_VV(ir->eI) && inputrecNvtTrotter(ir) && do_per_step(step-1, nstglobalcomm)));
 
         do_ene = (do_per_step(step, ir->nstenergy) || bLastStep);
 
@@ -1034,7 +1034,7 @@ double gmx::do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
         }
 
         force_flags = (GMX_FORCE_STATECHANGED |
-                       ((DYNAMIC_BOX(*ir) || bRerunMD) ? GMX_FORCE_DYNAMICBOX : 0) |
+                       ((inputrecDynamicBox(ir) || bRerunMD) ? GMX_FORCE_DYNAMICBOX : 0) |
                        GMX_FORCE_ALLFORCES |
                        GMX_FORCE_SEPLRF |
                        (bCalcVir ? GMX_FORCE_VIRIAL : 0) |
@@ -1135,8 +1135,8 @@ double gmx::do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
              * Think about ways around this in the future?
              * For now, keep this choice in comments.
              */
-            /*bPres = (ir->eI==eiVV || IR_NPT_TROTTER(ir)); */
-            /*bTemp = ((ir->eI==eiVV &&(!bInitStep)) || (ir->eI==eiVVAK && IR_NPT_TROTTER(ir)));*/
+            /*bPres = (ir->eI==eiVV || inputrecNptTrotter(ir)); */
+            /*bTemp = ((ir->eI==eiVV &&(!bInitStep)) || (ir->eI==eiVVAK && inputrecNptTrotter(ir)));*/
             bPres = TRUE;
             bTemp = ((ir->eI == eiVV && (!bInitStep)) || (ir->eI == eiVVAK));
             if (bCalcEner && ir->eI == eiVVAK)
@@ -1179,7 +1179,7 @@ double gmx::do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
 
                     copy_mat(shake_vir, state->svir_prev);
                     copy_mat(force_vir, state->fvir_prev);
-                    if (IR_NVT_TROTTER(ir) && ir->eI == eiVV)
+                    if (inputrecNvtTrotter(ir) && ir->eI == eiVV)
                     {
                         /* update temperature and kinetic energy now that step is over - this is the v(t+dt) point */
                         enerd->term[F_TEMP] = sum_ekin(&(ir->opts), ekind, NULL, (ir->eI == eiVV), FALSE);
index bae93fb040fbfcc87e6be8a65f7e898118ca5eef..c47374d2bf9726488e9f4ec36496b87764624a08 100644 (file)
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/gmxlib/readinp.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/index.h"
 #include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
index 898451f21cf90481659fd029af0a3549c19d67ed..e9d3047f67df2f5f1e9b4e76aeda7c628d8393b9 100644 (file)
 #include "gromacs/fileio/copyrite.h"
 #include "gromacs/gmxlib/main.h"
 #include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/commrec.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/random/random.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
index 85b1cc0904892b59c6c7f97cf4f573612de7db48..73561692e7635bfa622f217d307fe6ae2806e8c6 100644 (file)
 #include "gromacs/gmxlib/gmx_detect_hardware.h"
 #include "gromacs/gmxlib/gmx_omp_nthreads.h"
 #include "gromacs/gmxlib/md_logging.h"
-#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/gmx_cpuid.h"
 #include "gromacs/legacyheaders/types/commrec.h"
+#include "gromacs/legacyheaders/types/hw_info.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/topology/topology.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/gmxassert.h"
 
index f8340be77c683a37267ba6a3a6f9c39b251212bf..f92f9f2663afec9c2c9813744eee3d7d5d4db5c5 100644 (file)
@@ -73,7 +73,6 @@
 #include "gromacs/gmxlib/sighandler.h"
 #include "gromacs/gmxlib/thread_affinity.h"
 #include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/math/calculate-ewald-splitting-coefficient.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/calc_verletbuf.h"
@@ -89,6 +88,7 @@
 #include "gromacs/mdlib/qmmm.h"
 #include "gromacs/mdlib/tpi.h"
 #include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/mdtypes/state.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/pulling/pull.h"
@@ -954,7 +954,7 @@ int mdrunner(gmx_hw_opt_t *hw_opt,
     init_orires(fplog, mtop, state->x, inputrec, cr, &(fcd->orires),
                 state);
 
-    if (DEFORM(*inputrec))
+    if (inputrecDeform(inputrec))
     {
         /* Store the deform reference box before reading the checkpoint */
         if (SIMMASTER(cr))
index 2027cab9d16a66721a353b5a97a20e085ce6578a..050394cad21d1414062371d17d23364f1cbd6a1d 100644 (file)
@@ -48,7 +48,7 @@
 #include <unistd.h> // for fork()
 #endif
 
-#include "gromacs/legacyheaders/names.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/dir_separator.h"
index cafc8925a23843180966b343efe2991548f6d205..8474a4974043cd9e2553b4010239041d8d4949ed 100644 (file)
 #endif
 
 #include "gromacs/fileio/tpxio.h"
-#include "gromacs/legacyheaders/names.h"
 #include "gromacs/legacyheaders/types/ifunc.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/atomprop.h"
 #include "gromacs/utility/coolstuff.h"