From 604cd696c0fe387f44745c6aa7152f36b9c6406c Mon Sep 17 00:00:00 2001 From: Teemu Murtola Date: Tue, 22 Apr 2014 07:14:58 +0300 Subject: [PATCH] Move physics.* to math/units.* - Remove some unnecessary #includes. - Remove the dummy tests; easy to rewrite as usable tests using GTest if someone needs those. They were anyways testing code that no one is still calling, even though it was introduced several years ago. Now gmxlib is free of *_test.c files. Now, only one file using atom_id is keeping math/ dependent on legacyheaders/. Part of #1415. Change-Id: I31312b92cf9f5d5129fbd90f31fcf27be2f7afaf --- src/contrib/ehanal.c | 2 +- src/contrib/ehdata.c | 1 - src/contrib/ehole.c | 2 +- src/contrib/g_anavel.c | 2 +- src/contrib/hexamer.c | 2 +- src/contrib/mkice.c | 2 +- src/contrib/test.c | 2 +- src/contrib/testlr.c | 2 +- src/gromacs/essentialdynamics/edsam.c | 1 - src/gromacs/fileio/pdbio.c | 2 +- src/gromacs/fileio/tngio.cpp | 2 +- src/gromacs/fileio/tngio_for_tools.cpp | 2 +- src/gromacs/gmxana/anadih.c | 2 +- src/gromacs/gmxana/autocorr.c | 1 - src/gromacs/gmxana/gmx_anaeig.c | 2 +- src/gromacs/gmxana/gmx_angle.c | 2 +- src/gromacs/gmxana/gmx_bar.c | 2 +- src/gromacs/gmxana/gmx_bundle.c | 2 +- src/gromacs/gmxana/gmx_chi.c | 2 +- src/gromacs/gmxana/gmx_clustsize.c | 2 +- src/gromacs/gmxana/gmx_covar.c | 1 - src/gromacs/gmxana/gmx_current.c | 2 +- src/gromacs/gmxana/gmx_density.c | 2 +- src/gromacs/gmxana/gmx_densorder.cpp | 2 +- src/gromacs/gmxana/gmx_dipoles.cpp | 2 +- src/gromacs/gmxana/gmx_dos.c | 2 +- src/gromacs/gmxana/gmx_dyndom.c | 2 +- src/gromacs/gmxana/gmx_editconf.c | 2 +- src/gromacs/gmxana/gmx_enemat.c | 2 +- src/gromacs/gmxana/gmx_energy.c | 2 +- src/gromacs/gmxana/gmx_hbond.c | 2 +- src/gromacs/gmxana/gmx_helix.c | 1 - src/gromacs/gmxana/gmx_nmeig.c | 2 +- src/gromacs/gmxana/gmx_nmens.c | 2 +- src/gromacs/gmxana/gmx_nmtraj.c | 2 +- src/gromacs/gmxana/gmx_pme_error.cpp | 2 +- src/gromacs/gmxana/gmx_polystat.c | 1 - src/gromacs/gmxana/gmx_rama.c | 2 +- src/gromacs/gmxana/gmx_rdf.c | 1 - src/gromacs/gmxana/gmx_rotacf.c | 1 - src/gromacs/gmxana/gmx_saxs.c | 1 - src/gromacs/gmxana/gmx_sham.c | 2 +- src/gromacs/gmxana/gmx_sigeps.c | 2 +- src/gromacs/gmxana/gmx_spol.c | 2 +- src/gromacs/gmxana/gmx_tcaf.c | 2 +- src/gromacs/gmxana/gmx_traj.c | 2 +- src/gromacs/gmxana/gmx_velacc.c | 2 +- src/gromacs/gmxana/gmx_wheel.c | 1 - src/gromacs/gmxana/hxprops.c | 2 +- src/gromacs/gmxana/pp2shift.c | 2 +- src/gromacs/gmxlib/CMakeLists.txt | 7 +-- src/gromacs/gmxlib/bondfree.c | 2 +- src/gromacs/gmxlib/calch.c | 2 +- src/gromacs/gmxlib/ewald_util.c | 2 +- src/gromacs/gmxlib/nonbonded/nonbonded.c | 1 - src/gromacs/gmxlib/physics_test.c | 51 ------------------- src/gromacs/gmxlib/restcbt.c | 2 +- src/gromacs/gmxpreprocess/calc_verletbuf.c | 2 +- src/gromacs/gmxpreprocess/convparm.c | 2 +- .../gmxpreprocess/gen_maxwell_velocities.c | 2 +- src/gromacs/gmxpreprocess/gen_vsite.c | 2 +- src/gromacs/gmxpreprocess/genhydro.c | 1 - src/gromacs/gmxpreprocess/hizzie.c | 2 +- src/gromacs/gmxpreprocess/nm2type.c | 1 - src/gromacs/gmxpreprocess/pdb2gmx.c | 1 - src/gromacs/gmxpreprocess/pdb2top.cpp | 1 - src/gromacs/gmxpreprocess/readir.c | 2 +- src/gromacs/gmxpreprocess/topio.c | 2 +- src/gromacs/gmxpreprocess/topshake.c | 2 +- src/gromacs/gmxpreprocess/vsite_parm.c | 8 +-- src/gromacs/gmxpreprocess/x2top.c | 2 +- src/gromacs/math/3dview.c | 2 +- src/gromacs/math/CMakeLists.txt | 1 + .../{gmxlib/physics.c => math/units.c} | 8 +-- .../{legacyheaders/physics.h => math/units.h} | 10 ++-- src/gromacs/math/vec.h | 3 +- src/gromacs/mdlib/calcmu.c | 2 +- src/gromacs/mdlib/clincs.c | 2 +- src/gromacs/mdlib/constr.c | 1 - src/gromacs/mdlib/coupling.c | 2 +- src/gromacs/mdlib/domdec_setup.c | 1 - src/gromacs/mdlib/ebin.c | 2 +- src/gromacs/mdlib/ewald.c | 2 +- src/gromacs/mdlib/expanded.c | 2 +- src/gromacs/mdlib/force.c | 2 - src/gromacs/mdlib/forcerec.c | 2 +- src/gromacs/mdlib/genborn.c | 2 +- src/gromacs/mdlib/genborn_allvsall.c | 2 +- .../mdlib/genborn_allvsall_sse2_double.c | 2 +- .../mdlib/genborn_allvsall_sse2_single.c | 2 +- src/gromacs/mdlib/genborn_sse2_double.c | 2 +- src/gromacs/mdlib/genborn_sse2_single.c | 2 +- src/gromacs/mdlib/mdebin.c | 2 +- src/gromacs/mdlib/perf_est.c | 1 - src/gromacs/mdlib/pme.c | 2 +- src/gromacs/mdlib/qm_gamess.c | 2 +- src/gromacs/mdlib/qm_gaussian.c | 2 +- src/gromacs/mdlib/qm_mopac.c | 2 +- src/gromacs/mdlib/qm_orca.c | 2 +- src/gromacs/mdlib/qmmm.c | 2 +- src/gromacs/mdlib/rf_util.c | 2 +- src/gromacs/mdlib/shellfc.c | 2 +- src/gromacs/mdlib/sim_util.c | 2 +- src/gromacs/mdlib/stat.c | 1 - src/gromacs/mdlib/tables.c | 2 +- src/gromacs/mdlib/tpi.c | 2 +- src/gromacs/mdlib/update.c | 2 +- src/gromacs/selection/sm_insolidangle.cpp | 2 +- src/gromacs/tools/check.c | 2 +- .../trajectoryanalysis/modules/sasa.cpp | 2 +- src/programs/mdrun/md.c | 1 - src/programs/mdrun/membed.c | 1 - src/programs/mdrun/repl_ex.c | 2 +- 113 files changed, 99 insertions(+), 180 deletions(-) delete mode 100644 src/gromacs/gmxlib/physics_test.c rename src/gromacs/{gmxlib/physics.c => math/units.c} (94%) rename src/gromacs/{legacyheaders/physics.h => math/units.h} (98%) diff --git a/src/contrib/ehanal.c b/src/contrib/ehanal.c index 7d488ce6e0..31c6870bb8 100644 --- a/src/contrib/ehanal.c +++ b/src/contrib/ehanal.c @@ -46,7 +46,7 @@ #include "random.h" #include "gromacs/fileio/pdbio.h" #include "gromacs/utility/futil.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/math/vec.h" #include "names.h" diff --git a/src/contrib/ehdata.c b/src/contrib/ehdata.c index 513a4a34d3..4bc06da790 100644 --- a/src/contrib/ehdata.c +++ b/src/contrib/ehdata.c @@ -45,7 +45,6 @@ #include "random.h" #include "gromacs/fileio/strdb.h" #include "gromacs/utility/futil.h" -#include "physics.h" #include "ehdata.h" typedef struct { diff --git a/src/contrib/ehole.c b/src/contrib/ehole.c index 36541aa6e4..1509e83088 100644 --- a/src/contrib/ehole.c +++ b/src/contrib/ehole.c @@ -48,7 +48,7 @@ #include "random.h" #include "gromacs/fileio/pdbio.h" #include "gromacs/utility/futil.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/math/vec.h" #include "names.h" #include "ehdata.h" diff --git a/src/contrib/g_anavel.c b/src/contrib/g_anavel.c index 0573d7c693..6cb062fe49 100644 --- a/src/contrib/g_anavel.c +++ b/src/contrib/g_anavel.c @@ -42,7 +42,7 @@ #include "random.h" #include "names.h" #include "gromacs/fileio/matio.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/math/vec.h" #include "gromacs/utility/futil.h" #include "copyrite.h" diff --git a/src/contrib/hexamer.c b/src/contrib/hexamer.c index 21ea976763..4470845988 100644 --- a/src/contrib/hexamer.c +++ b/src/contrib/hexamer.c @@ -51,7 +51,7 @@ #include "gromacs/math/vec.h" #include "typedefs.h" #include "gbutil.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "atomprop.h" void copy_atom(t_symtab *tab,t_atoms *a1,int i1,t_atoms *a2,int i2, diff --git a/src/contrib/mkice.c b/src/contrib/mkice.c index b0c5bb9a30..7ae0d04c84 100644 --- a/src/contrib/mkice.c +++ b/src/contrib/mkice.c @@ -47,7 +47,7 @@ #include "gromacs/utility/smalloc.h" #include "gromacs/math/vec.h" #include "pbc.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "names.h" #include "txtdump.h" #include "gromacs/fileio/trnio.h" diff --git a/src/contrib/test.c b/src/contrib/test.c index f41e6c0b4b..aecb327766 100644 --- a/src/contrib/test.c +++ b/src/contrib/test.c @@ -49,7 +49,7 @@ #include "gromacs/utility/smalloc.h" #include "gromacs/math/vec.h" #include "pbc.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "names.h" #include "txtdump.h" #include "gromacs/fileio/trnio.h" diff --git a/src/contrib/testlr.c b/src/contrib/testlr.c index b48a0c1b93..f2cc064d73 100644 --- a/src/contrib/testlr.c +++ b/src/contrib/testlr.c @@ -36,7 +36,7 @@ #include #include "typedefs.h" #include "gromacs/math/vec.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "macros.h" #include "names.h" #include "gromacs/utility/smalloc.h" diff --git a/src/gromacs/essentialdynamics/edsam.c b/src/gromacs/essentialdynamics/edsam.c index 1498500cce..317969e87e 100644 --- a/src/gromacs/essentialdynamics/edsam.c +++ b/src/gromacs/essentialdynamics/edsam.c @@ -53,7 +53,6 @@ #include "mshift.h" #include "mdrun.h" #include "update.h" -#include "physics.h" #include "mtop_util.h" #include "gromacs/essentialdynamics/edsam.h" #include "gromacs/fileio/gmxfio.h" diff --git a/src/gromacs/fileio/pdbio.c b/src/gromacs/fileio/pdbio.c index d1974d0f69..7b98fb13ae 100644 --- a/src/gromacs/fileio/pdbio.c +++ b/src/gromacs/fileio/pdbio.c @@ -48,7 +48,7 @@ #include "copyrite.h" #include "gromacs/utility/futil.h" #include "atomprop.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "pbc.h" #include "gmxfio.h" diff --git a/src/gromacs/fileio/tngio.cpp b/src/gromacs/fileio/tngio.cpp index 761b975019..a4b72f9dee 100644 --- a/src/gromacs/fileio/tngio.cpp +++ b/src/gromacs/fileio/tngio.cpp @@ -47,9 +47,9 @@ #endif #include "gromacs/legacyheaders/copyrite.h" -#include "gromacs/legacyheaders/physics.h" #include "gromacs/fileio/gmxfio.h" +#include "gromacs/math/units.h" #include "gromacs/math/utilities.h" #include "gromacs/utility/basenetwork.h" #include "gromacs/utility/common.h" diff --git a/src/gromacs/fileio/tngio_for_tools.cpp b/src/gromacs/fileio/tngio_for_tools.cpp index d6239afb1e..d81fef7fb2 100644 --- a/src/gromacs/fileio/tngio_for_tools.cpp +++ b/src/gromacs/fileio/tngio_for_tools.cpp @@ -48,8 +48,8 @@ #endif #include "gromacs/legacyheaders/types/atoms.h" -#include "gromacs/legacyheaders/physics.h" +#include "gromacs/math/units.h" #include "gromacs/utility/common.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/smalloc.h" diff --git a/src/gromacs/gmxana/anadih.c b/src/gromacs/gmxana/anadih.c index b83b1b88f1..18746d63ea 100644 --- a/src/gromacs/gmxana/anadih.c +++ b/src/gromacs/gmxana/anadih.c @@ -41,7 +41,7 @@ #include #include #include -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/utility/smalloc.h" #include "macros.h" #include "txtdump.h" diff --git a/src/gromacs/gmxana/autocorr.c b/src/gromacs/gmxana/autocorr.c index 755d330ba2..d7e3e52537 100644 --- a/src/gromacs/gmxana/autocorr.c +++ b/src/gromacs/gmxana/autocorr.c @@ -44,7 +44,6 @@ #include "macros.h" #include "typedefs.h" -#include "physics.h" #include "gromacs/utility/smalloc.h" #include "gromacs/fileio/xvgr.h" #include "gromacs/utility/futil.h" diff --git a/src/gromacs/gmxana/gmx_anaeig.c b/src/gromacs/gmxana/gmx_anaeig.c index 014a58c147..370f4dc76c 100644 --- a/src/gromacs/gmxana/gmx_anaeig.c +++ b/src/gromacs/gmxana/gmx_anaeig.c @@ -62,7 +62,7 @@ #include "rmpbc.h" #include "txtdump.h" #include "eigio.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gmx_ana.h" #include "gromacs/math/do_fit.h" diff --git a/src/gromacs/gmxana/gmx_angle.c b/src/gromacs/gmxana/gmx_angle.c index b4778fd6de..2795b3d2f7 100644 --- a/src/gromacs/gmxana/gmx_angle.c +++ b/src/gromacs/gmxana/gmx_angle.c @@ -40,7 +40,7 @@ #include #include -#include "physics.h" +#include "gromacs/math/units.h" #include "typedefs.h" #include "gromacs/utility/smalloc.h" #include "gromacs/utility/futil.h" diff --git a/src/gromacs/gmxana/gmx_bar.c b/src/gromacs/gmxana/gmx_bar.c index e71ec7e35e..b3edda4c58 100644 --- a/src/gromacs/gmxana/gmx_bar.c +++ b/src/gromacs/gmxana/gmx_bar.c @@ -48,7 +48,7 @@ #include "gromacs/commandline/pargs.h" #include "macros.h" #include "gromacs/fileio/enxio.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/fileio/xvgr.h" #include "viewit.h" diff --git a/src/gromacs/gmxana/gmx_bundle.c b/src/gromacs/gmxana/gmx_bundle.c index 18326cb0cf..dc9d7f1f27 100644 --- a/src/gromacs/gmxana/gmx_bundle.c +++ b/src/gromacs/gmxana/gmx_bundle.c @@ -51,7 +51,7 @@ #include "rmpbc.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gmx_ana.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/gmxana/gmx_chi.c b/src/gromacs/gmxana/gmx_chi.c index eaddaaca92..5cb3c68f89 100644 --- a/src/gromacs/gmxana/gmx_chi.c +++ b/src/gromacs/gmxana/gmx_chi.c @@ -49,7 +49,7 @@ #include "gstat.h" #include "macros.h" #include "gromacs/math/utilities.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "index.h" #include "gromacs/utility/smalloc.h" #include "gromacs/commandline/pargs.h" diff --git a/src/gromacs/gmxana/gmx_clustsize.c b/src/gromacs/gmxana/gmx_clustsize.c index 2168930c64..45b1b30e94 100644 --- a/src/gromacs/gmxana/gmx_clustsize.c +++ b/src/gromacs/gmxana/gmx_clustsize.c @@ -54,7 +54,7 @@ #include "gromacs/utility/smalloc.h" #include "calcgrid.h" #include "nrnb.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "coulomb.h" #include "pme.h" #include "gstat.h" diff --git a/src/gromacs/gmxana/gmx_covar.c b/src/gromacs/gmxana/gmx_covar.c index 93128a5a44..ca5b042074 100644 --- a/src/gromacs/gmxana/gmx_covar.c +++ b/src/gromacs/gmxana/gmx_covar.c @@ -62,7 +62,6 @@ #include "txtdump.h" #include "gromacs/fileio/matio.h" #include "eigio.h" -#include "physics.h" #include "gmx_ana.h" #include "gromacs/utility/cstringutil.h" #include "gromacs/fileio/trxio.h" diff --git a/src/gromacs/gmxana/gmx_current.c b/src/gromacs/gmxana/gmx_current.c index 5154ae2ece..938f3adc0f 100644 --- a/src/gromacs/gmxana/gmx_current.c +++ b/src/gromacs/gmxana/gmx_current.c @@ -48,7 +48,7 @@ #include "gromacs/fileio/xvgr.h" #include "rmpbc.h" #include "pbc.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "index.h" #include "gromacs/statistics/statistics.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_density.c b/src/gromacs/gmxana/gmx_density.c index a27ccbdef2..ee0544ad70 100644 --- a/src/gromacs/gmxana/gmx_density.c +++ b/src/gromacs/gmxana/gmx_density.c @@ -57,7 +57,7 @@ #include "index.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gmx_ana.h" #include "macros.h" diff --git a/src/gromacs/gmxana/gmx_densorder.cpp b/src/gromacs/gmxana/gmx_densorder.cpp index 4f79306923..6cb0300791 100644 --- a/src/gromacs/gmxana/gmx_densorder.cpp +++ b/src/gromacs/gmxana/gmx_densorder.cpp @@ -53,7 +53,7 @@ #include "index.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/fileio/matio.h" #include "dens_filter.h" #include "binsearch.h" diff --git a/src/gromacs/gmxana/gmx_dipoles.cpp b/src/gromacs/gmxana/gmx_dipoles.cpp index ab4b6639b8..adf6fc44c6 100644 --- a/src/gromacs/gmxana/gmx_dipoles.cpp +++ b/src/gromacs/gmxana/gmx_dipoles.cpp @@ -57,7 +57,7 @@ #include "index.h" #include "gromacs/random/random.h" #include "names.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "calcmu.h" #include "gromacs/fileio/enxio.h" #include "gromacs/fileio/matio.h" diff --git a/src/gromacs/gmxana/gmx_dos.c b/src/gromacs/gmxana/gmx_dos.c index 8024057a79..104e42260d 100644 --- a/src/gromacs/gmxana/gmx_dos.c +++ b/src/gromacs/gmxana/gmx_dos.c @@ -48,7 +48,7 @@ #include "gstat.h" #include "macros.h" #include "gromacs/math/utilities.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "index.h" #include "gromacs/utility/smalloc.h" #include "gromacs/commandline/pargs.h" diff --git a/src/gromacs/gmxana/gmx_dyndom.c b/src/gromacs/gmxana/gmx_dyndom.c index 0bf46e5f32..0ebab96ddc 100644 --- a/src/gromacs/gmxana/gmx_dyndom.c +++ b/src/gromacs/gmxana/gmx_dyndom.c @@ -45,7 +45,7 @@ #include "gromacs/fileio/confio.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/math/vec.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gmx_ana.h" #include "macros.h" #include "gromacs/fileio/trxio.h" diff --git a/src/gromacs/gmxana/gmx_editconf.c b/src/gromacs/gmxana/gmx_editconf.c index 2b3c5ab0c5..a85bacf9db 100644 --- a/src/gromacs/gmxana/gmx_editconf.c +++ b/src/gromacs/gmxana/gmx_editconf.c @@ -52,7 +52,7 @@ #include "gromacs/math/vec.h" #include "typedefs.h" #include "gromacs/gmxlib/conformation-utilities.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "atomprop.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" diff --git a/src/gromacs/gmxana/gmx_enemat.c b/src/gromacs/gmxana/gmx_enemat.c index 5d94bd078c..2089b90bb8 100644 --- a/src/gromacs/gmxana/gmx_enemat.c +++ b/src/gromacs/gmxana/gmx_enemat.c @@ -51,7 +51,7 @@ #include "macros.h" #include "gromacs/fileio/xvgr.h" #include "gstat.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/fileio/matio.h" #include "gromacs/fileio/strdb.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_energy.c b/src/gromacs/gmxana/gmx_energy.c index c73c06b561..4d3c9a3713 100644 --- a/src/gromacs/gmxana/gmx_energy.c +++ b/src/gromacs/gmxana/gmx_energy.c @@ -54,7 +54,7 @@ #include "macros.h" #include "gromacs/fileio/xvgr.h" #include "gstat.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "viewit.h" diff --git a/src/gromacs/gmxana/gmx_hbond.c b/src/gromacs/gmxana/gmx_hbond.c index 0a0b6d88e3..5e8d44e777 100644 --- a/src/gromacs/gmxana/gmx_hbond.c +++ b/src/gromacs/gmxana/gmx_hbond.c @@ -44,7 +44,7 @@ #include "gromacs/commandline/pargs.h" #include "copyrite.h" #include "txtdump.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "macros.h" #include "gromacs/utility/fatalerror.h" #include "index.h" diff --git a/src/gromacs/gmxana/gmx_helix.c b/src/gromacs/gmxana/gmx_helix.c index b72d04ea57..dc009e7826 100644 --- a/src/gromacs/gmxana/gmx_helix.c +++ b/src/gromacs/gmxana/gmx_helix.c @@ -52,7 +52,6 @@ #include "pbc.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" -#include "physics.h" #include "index.h" #include "gromacs/utility/smalloc.h" #include "gromacs/commandline/pargs.h" diff --git a/src/gromacs/gmxana/gmx_nmeig.c b/src/gromacs/gmxana/gmx_nmeig.c index c936ee4b0a..ee63c63004 100644 --- a/src/gromacs/gmxana/gmx_nmeig.c +++ b/src/gromacs/gmxana/gmx_nmeig.c @@ -52,7 +52,7 @@ #include "txtdump.h" #include "eigio.h" #include "mtop_util.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gmx_ana.h" #include "gromacs/commandline/pargs.h" diff --git a/src/gromacs/gmxana/gmx_nmens.c b/src/gromacs/gmxana/gmx_nmens.c index d8859cc635..4ddf1300ca 100644 --- a/src/gromacs/gmxana/gmx_nmens.c +++ b/src/gromacs/gmxana/gmx_nmens.c @@ -53,7 +53,7 @@ #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "txtdump.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/random/random.h" #include "eigio.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_nmtraj.c b/src/gromacs/gmxana/gmx_nmtraj.c index dd972a0251..b5edf8b564 100644 --- a/src/gromacs/gmxana/gmx_nmtraj.c +++ b/src/gromacs/gmxana/gmx_nmtraj.c @@ -54,7 +54,7 @@ #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "txtdump.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "eigio.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_pme_error.cpp b/src/gromacs/gmxana/gmx_pme_error.cpp index f67f4f9ddd..b0c5e9c104 100644 --- a/src/gromacs/gmxana/gmx_pme_error.cpp +++ b/src/gromacs/gmxana/gmx_pme_error.cpp @@ -46,7 +46,7 @@ #include "checkpoint.h" #include "gmx_ana.h" #include "gromacs/random/random.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "mdatoms.h" #include "coulomb.h" #include "mtop_util.h" diff --git a/src/gromacs/gmxana/gmx_polystat.c b/src/gromacs/gmxana/gmx_polystat.c index afbcf2353d..f219ff9c43 100644 --- a/src/gromacs/gmxana/gmx_polystat.c +++ b/src/gromacs/gmxana/gmx_polystat.c @@ -41,7 +41,6 @@ #include #include -#include "physics.h" #include "typedefs.h" #include "gromacs/utility/smalloc.h" #include "gromacs/utility/futil.h" diff --git a/src/gromacs/gmxana/gmx_rama.c b/src/gromacs/gmxana/gmx_rama.c index eed418d1f8..b3b2f9e889 100644 --- a/src/gromacs/gmxana/gmx_rama.c +++ b/src/gromacs/gmxana/gmx_rama.c @@ -47,7 +47,7 @@ #include "gromacs/math/vec.h" #include "gromacs/fileio/xvgr.h" #include "viewit.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "pbc.h" #include "gromacs/utility/futil.h" #include "gromacs/commandline/pargs.h" diff --git a/src/gromacs/gmxana/gmx_rdf.c b/src/gromacs/gmxana/gmx_rdf.c index c705891eae..02ec0ae7d0 100644 --- a/src/gromacs/gmxana/gmx_rdf.c +++ b/src/gromacs/gmxana/gmx_rdf.c @@ -51,7 +51,6 @@ #include "gromacs/commandline/pargs.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" -#include "physics.h" #include "index.h" #include "gromacs/utility/smalloc.h" #include "calcgrid.h" diff --git a/src/gromacs/gmxana/gmx_rotacf.c b/src/gromacs/gmxana/gmx_rotacf.c index 147122ddd4..50b8359523 100644 --- a/src/gromacs/gmxana/gmx_rotacf.c +++ b/src/gromacs/gmxana/gmx_rotacf.c @@ -41,7 +41,6 @@ #include #include -#include "physics.h" #include "typedefs.h" #include "gromacs/utility/smalloc.h" #include "gromacs/utility/futil.h" diff --git a/src/gromacs/gmxana/gmx_saxs.c b/src/gromacs/gmxana/gmx_saxs.c index 103f299e29..300dbf0136 100644 --- a/src/gromacs/gmxana/gmx_saxs.c +++ b/src/gromacs/gmxana/gmx_saxs.c @@ -49,7 +49,6 @@ #include "gromacs/utility/futil.h" #include "gromacs/commandline/pargs.h" #include "gromacs/fileio/tpxio.h" -#include "physics.h" #include "index.h" #include "gromacs/utility/smalloc.h" #include "calcgrid.h" diff --git a/src/gromacs/gmxana/gmx_sham.c b/src/gromacs/gmxana/gmx_sham.c index 2cf340f10b..c019399617 100644 --- a/src/gromacs/gmxana/gmx_sham.c +++ b/src/gromacs/gmxana/gmx_sham.c @@ -53,7 +53,7 @@ #include "txtdump.h" #include "gstat.h" #include "gromacs/fileio/xvgr.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/fileio/pdbio.h" #include "gromacs/fileio/matio.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_sigeps.c b/src/gromacs/gmxana/gmx_sigeps.c index 6241c25dc8..cd97f28714 100644 --- a/src/gromacs/gmxana/gmx_sigeps.c +++ b/src/gromacs/gmxana/gmx_sigeps.c @@ -50,7 +50,7 @@ #include "gromacs/utility/smalloc.h" #include "gromacs/math/vec.h" #include "pbc.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "names.h" #include "txtdump.h" #include "gromacs/fileio/trnio.h" diff --git a/src/gromacs/gmxana/gmx_spol.c b/src/gromacs/gmxana/gmx_spol.c index 280b19e715..edc791fa93 100644 --- a/src/gromacs/gmxana/gmx_spol.c +++ b/src/gromacs/gmxana/gmx_spol.c @@ -49,7 +49,7 @@ #include "index.h" #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gmx_ana.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/gmxana/gmx_tcaf.c b/src/gromacs/gmxana/gmx_tcaf.c index a7dfc8edba..c3427883c8 100644 --- a/src/gromacs/gmxana/gmx_tcaf.c +++ b/src/gromacs/gmxana/gmx_tcaf.c @@ -48,7 +48,7 @@ #include "gstat.h" #include "macros.h" #include "gromacs/math/utilities.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "index.h" #include "gromacs/utility/smalloc.h" #include "gromacs/commandline/pargs.h" diff --git a/src/gromacs/gmxana/gmx_traj.c b/src/gromacs/gmxana/gmx_traj.c index 92d6e85a02..66a2800d08 100644 --- a/src/gromacs/gmxana/gmx_traj.c +++ b/src/gromacs/gmxana/gmx_traj.c @@ -56,7 +56,7 @@ #include "gromacs/fileio/tpxio.h" #include "gromacs/fileio/trxio.h" #include "rmpbc.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/fileio/confio.h" #include "gmx_ana.h" diff --git a/src/gromacs/gmxana/gmx_velacc.c b/src/gromacs/gmxana/gmx_velacc.c index d951c01086..1a86e56b28 100644 --- a/src/gromacs/gmxana/gmx_velacc.c +++ b/src/gromacs/gmxana/gmx_velacc.c @@ -48,7 +48,7 @@ #include "gstat.h" #include "macros.h" #include "gromacs/math/utilities.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "index.h" #include "gromacs/utility/smalloc.h" #include "gromacs/commandline/pargs.h" diff --git a/src/gromacs/gmxana/gmx_wheel.c b/src/gromacs/gmxana/gmx_wheel.c index cf7477c18b..05e63a7c23 100644 --- a/src/gromacs/gmxana/gmx_wheel.c +++ b/src/gromacs/gmxana/gmx_wheel.c @@ -43,7 +43,6 @@ #include #include -#include "physics.h" #include "typedefs.h" #include "gromacs/utility/smalloc.h" #include "macros.h" diff --git a/src/gromacs/gmxana/hxprops.c b/src/gromacs/gmxana/hxprops.c index 6187738528..5a999cec66 100644 --- a/src/gromacs/gmxana/hxprops.c +++ b/src/gromacs/gmxana/hxprops.c @@ -43,7 +43,7 @@ #include "typedefs.h" #include "macros.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/math/vec.h" #include "index.h" #include "hxprops.h" diff --git a/src/gromacs/gmxana/pp2shift.c b/src/gromacs/gmxana/pp2shift.c index fea240e9e3..e95d80b2b7 100644 --- a/src/gromacs/gmxana/pp2shift.c +++ b/src/gromacs/gmxana/pp2shift.c @@ -43,7 +43,7 @@ #include "typedefs.h" #include "gromacs/utility/futil.h" #include "macros.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/utility/smalloc.h" #include "gstat.h" #include "gromacs/fileio/matio.h" diff --git a/src/gromacs/gmxlib/CMakeLists.txt b/src/gromacs/gmxlib/CMakeLists.txt index 204fb6a66a..c84bbcfcfc 100644 --- a/src/gromacs/gmxlib/CMakeLists.txt +++ b/src/gromacs/gmxlib/CMakeLists.txt @@ -40,16 +40,11 @@ add_subdirectory(nonbonded) # conditionally built, so we cannot use a GLOB_RECURSE here. file(GLOB GMXLIB_SOURCES *.c *.cpp) -# Files called xxx_test.c are test drivers with a main() function for module xxx.c, -# so they should not be included in the library -file(GLOB_RECURSE NOT_GMXLIB_SOURCES *_test.c *\#*) -list(REMOVE_ITEM GMXLIB_SOURCES ${NOT_GMXLIB_SOURCES}) - # gpu utils + cuda tools module if(GMX_GPU) # The log file output queries Cuda if GPU support is enabled add_subdirectory(cuda_tools) - add_subdirectory(gpu_utils) + add_subdirectory(gpu_utils) set(GMX_GPU_LIBRARIES ${GMX_GPU_LIBRARIES} gpu_utils cuda_tools PARENT_SCOPE) endif() diff --git a/src/gromacs/gmxlib/bondfree.c b/src/gromacs/gmxlib/bondfree.c index 538ee5c5fe..e4c0148ffb 100644 --- a/src/gromacs/gmxlib/bondfree.c +++ b/src/gromacs/gmxlib/bondfree.c @@ -40,7 +40,7 @@ #include #include -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/math/vec.h" #include "gromacs/math/utilities.h" #include "txtdump.h" diff --git a/src/gromacs/gmxlib/calch.c b/src/gromacs/gmxlib/calch.c index f7ac04760a..903fa888e3 100644 --- a/src/gromacs/gmxlib/calch.c +++ b/src/gromacs/gmxlib/calch.c @@ -42,7 +42,7 @@ #include "calch.h" #include "gromacs/math/utilities.h" #include "gromacs/math/vec.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/gmxlib/ewald_util.c b/src/gromacs/gmxlib/ewald_util.c index 013c2f9147..b1e0223b0b 100644 --- a/src/gromacs/gmxlib/ewald_util.c +++ b/src/gromacs/gmxlib/ewald_util.c @@ -46,7 +46,7 @@ #include "gromacs/math/vec.h" #include "coulomb.h" #include "gromacs/utility/smalloc.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "txtdump.h" #include "gromacs/utility/futil.h" #include "names.h" diff --git a/src/gromacs/gmxlib/nonbonded/nonbonded.c b/src/gromacs/gmxlib/nonbonded/nonbonded.c index be1c17b36e..2afb92f62f 100644 --- a/src/gromacs/gmxlib/nonbonded/nonbonded.c +++ b/src/gromacs/gmxlib/nonbonded/nonbonded.c @@ -54,7 +54,6 @@ #include "force.h" #include "names.h" #include "gromacs/utility/fatalerror.h" -#include "physics.h" #include "force.h" #include "bondf.h" #include "nrnb.h" diff --git a/src/gromacs/gmxlib/physics_test.c b/src/gromacs/gmxlib/physics_test.c deleted file mode 100644 index 7382cd2e71..0000000000 --- a/src/gromacs/gmxlib/physics_test.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This file is part of the GROMACS molecular simulation package. - * - * Copyright (c) 2010, 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. - */ -#include -#include "physics.h" - -int main(int argc, char *argv[]) -{ - int i; - double x, y, z; - - x = 3.25; - for (i = 0; (i < eg2cNR); i++) - { - y = gmx2convert(x, i); - z = convert2gmx(y, i); - printf("Converted %g [type %d] to %g and back to %g. Diff %g\n", - x, i, y, z, x-z); - } -} diff --git a/src/gromacs/gmxlib/restcbt.c b/src/gromacs/gmxlib/restcbt.c index 1309959efe..7db21850b7 100644 --- a/src/gromacs/gmxlib/restcbt.c +++ b/src/gromacs/gmxlib/restcbt.c @@ -37,7 +37,7 @@ #include #include -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/math/vec.h" #include "gromacs/math/utilities.h" #include "txtdump.h" diff --git a/src/gromacs/gmxpreprocess/calc_verletbuf.c b/src/gromacs/gmxpreprocess/calc_verletbuf.c index 0a668def8c..5e4349e6e1 100644 --- a/src/gromacs/gmxpreprocess/calc_verletbuf.c +++ b/src/gromacs/gmxpreprocess/calc_verletbuf.c @@ -43,7 +43,7 @@ #include #include "typedefs.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "macros.h" #include "gromacs/math/vec.h" #include "coulomb.h" diff --git a/src/gromacs/gmxpreprocess/convparm.c b/src/gromacs/gmxpreprocess/convparm.c index 0758399822..2e6c43636b 100644 --- a/src/gromacs/gmxpreprocess/convparm.c +++ b/src/gromacs/gmxpreprocess/convparm.c @@ -42,7 +42,7 @@ #include #include -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/math/vec.h" #include "gromacs/utility/smalloc.h" #include "typedefs.h" diff --git a/src/gromacs/gmxpreprocess/gen_maxwell_velocities.c b/src/gromacs/gmxpreprocess/gen_maxwell_velocities.c index 069402ca65..3e5f7ecd35 100644 --- a/src/gromacs/gmxpreprocess/gen_maxwell_velocities.c +++ b/src/gromacs/gmxpreprocess/gen_maxwell_velocities.c @@ -41,7 +41,7 @@ #include #include "gromacs/random/random.h" #include "gromacs/utility/smalloc.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "typedefs.h" #include "gromacs/math/vec.h" #include "gen_maxwell_velocities.h" diff --git a/src/gromacs/gmxpreprocess/gen_vsite.c b/src/gromacs/gmxpreprocess/gen_vsite.c index 26704fa3d2..6de806c8bd 100644 --- a/src/gromacs/gmxpreprocess/gen_vsite.c +++ b/src/gromacs/gmxpreprocess/gen_vsite.c @@ -48,7 +48,7 @@ #include "add_par.h" #include "gromacs/math/vec.h" #include "toputil.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "index.h" #include "names.h" #include "gromacs/utility/futil.h" diff --git a/src/gromacs/gmxpreprocess/genhydro.c b/src/gromacs/gmxpreprocess/genhydro.c index 34ff0fc82a..81f5613b54 100644 --- a/src/gromacs/gmxpreprocess/genhydro.c +++ b/src/gromacs/gmxpreprocess/genhydro.c @@ -48,7 +48,6 @@ #include "gromacs/math/vec.h" #include "gromacs/utility/futil.h" #include "gromacs/utility/fatalerror.h" -#include "physics.h" #include "calch.h" #include "genhydro.h" #include "h_db.h" diff --git a/src/gromacs/gmxpreprocess/hizzie.c b/src/gromacs/gmxpreprocess/hizzie.c index eb588fefa8..f623c842a8 100644 --- a/src/gromacs/gmxpreprocess/hizzie.c +++ b/src/gromacs/gmxpreprocess/hizzie.c @@ -45,7 +45,7 @@ #include "gromacs/fileio/pdbio.h" #include "gromacs/utility/smalloc.h" #include "gromacs/math/vec.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "toputil.h" #include "pdb2top.h" #include "gromacs/utility/cstringutil.h" diff --git a/src/gromacs/gmxpreprocess/nm2type.c b/src/gromacs/gmxpreprocess/nm2type.c index a382ec7b2a..7f1f21a797 100644 --- a/src/gromacs/gmxpreprocess/nm2type.c +++ b/src/gromacs/gmxpreprocess/nm2type.c @@ -47,7 +47,6 @@ #include "gromacs/utility/cstringutil.h" #include "gromacs/utility/smalloc.h" #include "gromacs/fileio/confio.h" -#include "physics.h" #include "gromacs/math/vec.h" #include "gromacs/math/3dview.h" #include "txtdump.h" diff --git a/src/gromacs/gmxpreprocess/pdb2gmx.c b/src/gromacs/gmxpreprocess/pdb2gmx.c index d0897d07cc..caaeaea118 100644 --- a/src/gromacs/gmxpreprocess/pdb2gmx.c +++ b/src/gromacs/gmxpreprocess/pdb2gmx.c @@ -59,7 +59,6 @@ #include "gromacs/fileio/pdbio.h" #include "toputil.h" #include "h_db.h" -#include "physics.h" #include "pgutil.h" #include "calch.h" #include "resall.h" diff --git a/src/gromacs/gmxpreprocess/pdb2top.cpp b/src/gromacs/gmxpreprocess/pdb2top.cpp index 50d2a7856e..fd4fee0cd1 100644 --- a/src/gromacs/gmxpreprocess/pdb2top.cpp +++ b/src/gromacs/gmxpreprocess/pdb2top.cpp @@ -57,7 +57,6 @@ #include "resall.h" #include "topio.h" #include "gromacs/utility/cstringutil.h" -#include "physics.h" #include "gromacs/fileio/pdbio.h" #include "gen_ad.h" #include "gromacs/fileio/filenm.h" diff --git a/src/gromacs/gmxpreprocess/readir.c b/src/gromacs/gmxpreprocess/readir.c index 8b1b8c8238..4b5de76c97 100644 --- a/src/gromacs/gmxpreprocess/readir.c +++ b/src/gromacs/gmxpreprocess/readir.c @@ -43,7 +43,7 @@ #include #include "gromacs/utility/smalloc.h" #include "typedefs.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "names.h" #include "gromacs/utility/fatalerror.h" #include "macros.h" diff --git a/src/gromacs/gmxpreprocess/topio.c b/src/gromacs/gmxpreprocess/topio.c index fd7d2e50e2..40dfb57220 100644 --- a/src/gromacs/gmxpreprocess/topio.c +++ b/src/gromacs/gmxpreprocess/topio.c @@ -54,7 +54,7 @@ #include "macros.h" #include "gromacs/fileio/gmxfio.h" #include "txtdump.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "macros.h" #include "names.h" #include "gromacs/utility/cstringutil.h" diff --git a/src/gromacs/gmxpreprocess/topshake.c b/src/gromacs/gmxpreprocess/topshake.c index b19f76e45f..459f011efb 100644 --- a/src/gromacs/gmxpreprocess/topshake.c +++ b/src/gromacs/gmxpreprocess/topshake.c @@ -42,7 +42,7 @@ #include #include -#include "physics.h" +#include "gromacs/math/units.h" #include "readir.h" #include "typedefs.h" #include "topshake.h" diff --git a/src/gromacs/gmxpreprocess/vsite_parm.c b/src/gromacs/gmxpreprocess/vsite_parm.c index 774bfa0ae8..773266ae92 100644 --- a/src/gromacs/gmxpreprocess/vsite_parm.c +++ b/src/gromacs/gmxpreprocess/vsite_parm.c @@ -38,22 +38,22 @@ #include #endif -#include -#include #include +#include +#include #include + #include "vsite_parm.h" #include "gromacs/utility/smalloc.h" #include "resall.h" #include "add_par.h" #include "gromacs/math/vec.h" #include "toputil.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "index.h" #include "names.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/cstringutil.h" -#include "physics.h" #include "macros.h" typedef struct { diff --git a/src/gromacs/gmxpreprocess/x2top.c b/src/gromacs/gmxpreprocess/x2top.c index 74014311d4..523510e4d9 100644 --- a/src/gromacs/gmxpreprocess/x2top.c +++ b/src/gromacs/gmxpreprocess/x2top.c @@ -48,7 +48,7 @@ #include "bondf.h" #include "gromacs/fileio/gmxfio.h" #include "gromacs/fileio/confio.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "txtdump.h" #include "readinp.h" #include "names.h" diff --git a/src/gromacs/math/3dview.c b/src/gromacs/math/3dview.c index add531074b..c2d0aaca30 100644 --- a/src/gromacs/math/3dview.c +++ b/src/gromacs/math/3dview.c @@ -43,7 +43,7 @@ #include #include "gromacs/utility/smalloc.h" #include "macros.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "pbc.h" #include "gromacs/math/vec.h" diff --git a/src/gromacs/math/CMakeLists.txt b/src/gromacs/math/CMakeLists.txt index 1185590953..ce5ab1e7eb 100644 --- a/src/gromacs/math/CMakeLists.txt +++ b/src/gromacs/math/CMakeLists.txt @@ -39,6 +39,7 @@ set(MATH_PUBLIC_HEADERS 3dview.h gmxcomplex.h do_fit.h + units.h utilities.h vec.h vectypes.h diff --git a/src/gromacs/gmxlib/physics.c b/src/gromacs/math/units.c similarity index 94% rename from src/gromacs/gmxlib/physics.c rename to src/gromacs/math/units.c index 529eee86d9..17ef79c286 100644 --- a/src/gromacs/gmxlib/physics.c +++ b/src/gromacs/math/units.c @@ -1,9 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 1991-2000, University of Groningen, The Netherlands. - * Copyright (c) 2001-2008, The GROMACS development team. - * Copyright (c) 2011,2014, by the GROMACS development team, led by + * Copyright (c) 2010,2011,2014, 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. @@ -34,9 +32,11 @@ * To help us fund GROMACS development, we humbly ask that you cite * the research papers on the package. Check out http://www.gromacs.org. */ +#include "units.h" + #include + #include "gromacs/utility/cstringutil.h" -#include "physics.h" double convert2gmx(double x, int unit) { diff --git a/src/gromacs/legacyheaders/physics.h b/src/gromacs/math/units.h similarity index 98% rename from src/gromacs/legacyheaders/physics.h rename to src/gromacs/math/units.h index 6134f954b5..4859f52e37 100644 --- a/src/gromacs/legacyheaders/physics.h +++ b/src/gromacs/math/units.h @@ -34,9 +34,8 @@ * 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 _physics_h -#define _physics_h +#ifndef GMX_MATH_UNITS_H +#define GMX_MATH_UNITS_H /* * Physical constants to be used in Gromacs. @@ -44,7 +43,7 @@ * be anywhere else in the code. */ -#include "../math/utilities.h" +#include "utilities.h" #ifdef __cplusplus extern "C" { @@ -156,5 +155,4 @@ extern const char *unit2string(int unit); } #endif - -#endif /* _physics_h */ +#endif diff --git a/src/gromacs/math/vec.h b/src/gromacs/math/vec.h index eb051e1b77..8c748c7383 100644 --- a/src/gromacs/math/vec.h +++ b/src/gromacs/math/vec.h @@ -115,8 +115,7 @@ #include -#include "../legacyheaders/physics.h" - +#include "units.h" #include "utilities.h" #include "vectypes.h" diff --git a/src/gromacs/mdlib/calcmu.c b/src/gromacs/mdlib/calcmu.c index c35a0e9529..870a96d270 100644 --- a/src/gromacs/mdlib/calcmu.c +++ b/src/gromacs/mdlib/calcmu.c @@ -45,7 +45,7 @@ #include "typedefs.h" #include "network.h" #include "gromacs/math/vec.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "calcmu.h" #include "gmx_omp_nthreads.h" diff --git a/src/gromacs/mdlib/clincs.c b/src/gromacs/mdlib/clincs.c index 7dc2df8422..140bcb2b71 100644 --- a/src/gromacs/mdlib/clincs.c +++ b/src/gromacs/mdlib/clincs.c @@ -45,7 +45,7 @@ #include "types/commrec.h" #include "constr.h" #include "copyrite.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/math/vec.h" #include "pbc.h" #include "mdrun.h" diff --git a/src/gromacs/mdlib/constr.c b/src/gromacs/mdlib/constr.c index 4cc9d4982b..f46f3adae0 100644 --- a/src/gromacs/mdlib/constr.c +++ b/src/gromacs/mdlib/constr.c @@ -49,7 +49,6 @@ #include "nrnb.h" #include "gromacs/utility/smalloc.h" #include "gromacs/math/vec.h" -#include "physics.h" #include "names.h" #include "txtdump.h" #include "domdec.h" diff --git a/src/gromacs/mdlib/coupling.c b/src/gromacs/mdlib/coupling.c index bfc6d636b9..fd8d11f053 100644 --- a/src/gromacs/mdlib/coupling.c +++ b/src/gromacs/mdlib/coupling.c @@ -45,7 +45,7 @@ #include "update.h" #include "gromacs/math/vec.h" #include "macros.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "names.h" #include "gromacs/utility/fatalerror.h" #include "txtdump.h" diff --git a/src/gromacs/mdlib/domdec_setup.c b/src/gromacs/mdlib/domdec_setup.c index df6bd8770f..d8de6ee8d5 100644 --- a/src/gromacs/mdlib/domdec_setup.c +++ b/src/gromacs/mdlib/domdec_setup.c @@ -43,7 +43,6 @@ #include "types/commrec.h" #include "network.h" #include "perf_est.h" -#include "physics.h" #include "gromacs/utility/smalloc.h" #include "typedefs.h" #include "gromacs/math/vec.h" diff --git a/src/gromacs/mdlib/ebin.c b/src/gromacs/mdlib/ebin.c index 7541827eeb..ddc6102c91 100644 --- a/src/gromacs/mdlib/ebin.c +++ b/src/gromacs/mdlib/ebin.c @@ -47,7 +47,7 @@ #include "ebin.h" #include "gromacs/math/utilities.h" #include "gromacs/math/vec.h" -#include "physics.h" +#include "gromacs/math/units.h" t_ebin *mk_ebin(void) { diff --git a/src/gromacs/mdlib/ewald.c b/src/gromacs/mdlib/ewald.c index 9c065b28a9..2134f4cc3b 100644 --- a/src/gromacs/mdlib/ewald.c +++ b/src/gromacs/mdlib/ewald.c @@ -47,7 +47,7 @@ #include "gromacs/math/vec.h" #include "gromacs/utility/smalloc.h" #include "gromacs/utility/fatalerror.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "coulomb.h" #include "macros.h" diff --git a/src/gromacs/mdlib/expanded.c b/src/gromacs/mdlib/expanded.c index 5d29f85ed9..d28a3a5066 100644 --- a/src/gromacs/mdlib/expanded.c +++ b/src/gromacs/mdlib/expanded.c @@ -50,7 +50,7 @@ #include "mshift.h" #include "mdrun.h" #include "update.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "mdatoms.h" #include "force.h" #include "bondf.h" diff --git a/src/gromacs/mdlib/force.c b/src/gromacs/mdlib/force.c index 73a0f565f8..4ea2208bc9 100644 --- a/src/gromacs/mdlib/force.c +++ b/src/gromacs/mdlib/force.c @@ -44,8 +44,6 @@ #include "typedefs.h" #include "macros.h" -#include "macros.h" -#include "physics.h" #include "force.h" #include "nonbonded.h" #include "names.h" diff --git a/src/gromacs/mdlib/forcerec.c b/src/gromacs/mdlib/forcerec.c index 2a5b7654e6..e0a059bb0f 100644 --- a/src/gromacs/mdlib/forcerec.c +++ b/src/gromacs/mdlib/forcerec.c @@ -49,7 +49,7 @@ #include "gromacs/utility/smalloc.h" #include "macros.h" #include "gromacs/utility/fatalerror.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "force.h" #include "tables.h" #include "nonbonded.h" diff --git a/src/gromacs/mdlib/genborn.c b/src/gromacs/mdlib/genborn.c index e29eb366f7..5058d568ed 100644 --- a/src/gromacs/mdlib/genborn.c +++ b/src/gromacs/mdlib/genborn.c @@ -49,7 +49,7 @@ #include "gromacs/math/vec.h" #include "gromacs/fileio/pdbio.h" #include "names.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "domdec.h" #include "network.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/mdlib/genborn_allvsall.c b/src/gromacs/mdlib/genborn_allvsall.c index 0af757ffe0..7b8cce51c2 100644 --- a/src/gromacs/mdlib/genborn_allvsall.c +++ b/src/gromacs/mdlib/genborn_allvsall.c @@ -45,7 +45,7 @@ #include "gromacs/utility/smalloc.h" #include "network.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "genborn.h" #include "genborn_allvsall.h" diff --git a/src/gromacs/mdlib/genborn_allvsall_sse2_double.c b/src/gromacs/mdlib/genborn_allvsall_sse2_double.c index 841869152e..57e304f2d0 100644 --- a/src/gromacs/mdlib/genborn_allvsall_sse2_double.c +++ b/src/gromacs/mdlib/genborn_allvsall_sse2_double.c @@ -45,7 +45,7 @@ #include "gromacs/utility/smalloc.h" #include "network.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "genborn.h" #include "genborn_allvsall.h" diff --git a/src/gromacs/mdlib/genborn_allvsall_sse2_single.c b/src/gromacs/mdlib/genborn_allvsall_sse2_single.c index 3a01a9b3ca..374a0ffcc1 100644 --- a/src/gromacs/mdlib/genborn_allvsall_sse2_single.c +++ b/src/gromacs/mdlib/genborn_allvsall_sse2_single.c @@ -45,7 +45,7 @@ #include "gromacs/utility/smalloc.h" #include "network.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "genborn.h" #include "genborn_allvsall.h" diff --git a/src/gromacs/mdlib/genborn_sse2_double.c b/src/gromacs/mdlib/genborn_sse2_double.c index a8f3675985..3e98b33881 100644 --- a/src/gromacs/mdlib/genborn_sse2_double.c +++ b/src/gromacs/mdlib/genborn_sse2_double.c @@ -47,7 +47,7 @@ #include "gromacs/math/vec.h" #include "gromacs/fileio/pdbio.h" #include "names.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "domdec.h" #include "network.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/mdlib/genborn_sse2_single.c b/src/gromacs/mdlib/genborn_sse2_single.c index 17aca7ee7c..f0cb36106e 100644 --- a/src/gromacs/mdlib/genborn_sse2_single.c +++ b/src/gromacs/mdlib/genborn_sse2_single.c @@ -47,7 +47,7 @@ #include "gromacs/math/vec.h" #include "gromacs/fileio/pdbio.h" #include "names.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "domdec.h" #include "network.h" #include "gromacs/utility/fatalerror.h" diff --git a/src/gromacs/mdlib/mdebin.c b/src/gromacs/mdlib/mdebin.c index f7cd4a3256..52618279a5 100644 --- a/src/gromacs/mdlib/mdebin.c +++ b/src/gromacs/mdlib/mdebin.c @@ -45,7 +45,7 @@ #include "typedefs.h" #include "mdebin.h" #include "gromacs/utility/smalloc.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/fileio/enxio.h" #include "gromacs/math/vec.h" #include "disre.h" diff --git a/src/gromacs/mdlib/perf_est.c b/src/gromacs/mdlib/perf_est.c index febdeb5d04..d74148f047 100644 --- a/src/gromacs/mdlib/perf_est.c +++ b/src/gromacs/mdlib/perf_est.c @@ -41,7 +41,6 @@ #include #include "perf_est.h" -#include "physics.h" #include "gromacs/math/vec.h" #include "mtop_util.h" #include "types/commrec.h" diff --git a/src/gromacs/mdlib/pme.c b/src/gromacs/mdlib/pme.c index 6c7f1b981a..aefee8dc93 100644 --- a/src/gromacs/mdlib/pme.c +++ b/src/gromacs/mdlib/pme.c @@ -75,7 +75,7 @@ #include "gromacs/utility/fatalerror.h" #include "pme.h" #include "network.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "nrnb.h" #include "macros.h" diff --git a/src/gromacs/mdlib/qm_gamess.c b/src/gromacs/mdlib/qm_gamess.c index de7bdf7adf..23f03fb3c3 100644 --- a/src/gromacs/mdlib/qm_gamess.c +++ b/src/gromacs/mdlib/qm_gamess.c @@ -44,7 +44,7 @@ #include "typedefs.h" #include "macros.h" #include "gromacs/utility/smalloc.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "macros.h" #include "gromacs/math/vec.h" #include "force.h" diff --git a/src/gromacs/mdlib/qm_gaussian.c b/src/gromacs/mdlib/qm_gaussian.c index f9259bf3fa..3c77505b64 100644 --- a/src/gromacs/mdlib/qm_gaussian.c +++ b/src/gromacs/mdlib/qm_gaussian.c @@ -44,7 +44,7 @@ #include "typedefs.h" #include "macros.h" #include "gromacs/utility/smalloc.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "macros.h" #include "gromacs/math/vec.h" #include "force.h" diff --git a/src/gromacs/mdlib/qm_mopac.c b/src/gromacs/mdlib/qm_mopac.c index 7abd612840..d14f877ad6 100644 --- a/src/gromacs/mdlib/qm_mopac.c +++ b/src/gromacs/mdlib/qm_mopac.c @@ -44,7 +44,7 @@ #include "typedefs.h" #include "macros.h" #include "gromacs/utility/smalloc.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "macros.h" #include "gromacs/math/vec.h" #include "force.h" diff --git a/src/gromacs/mdlib/qm_orca.c b/src/gromacs/mdlib/qm_orca.c index dd89a19ce4..ab20a1e0d1 100644 --- a/src/gromacs/mdlib/qm_orca.c +++ b/src/gromacs/mdlib/qm_orca.c @@ -42,7 +42,7 @@ #include "typedefs.h" #include "macros.h" #include "gromacs/utility/smalloc.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "macros.h" #include "gromacs/math/vec.h" #include "force.h" diff --git a/src/gromacs/mdlib/qmmm.c b/src/gromacs/mdlib/qmmm.c index 4e85721b9a..ed996265de 100644 --- a/src/gromacs/mdlib/qmmm.c +++ b/src/gromacs/mdlib/qmmm.c @@ -43,7 +43,7 @@ #include "types/commrec.h" #include "macros.h" #include "gromacs/utility/smalloc.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "macros.h" #include "gromacs/math/vec.h" #include "force.h" diff --git a/src/gromacs/mdlib/rf_util.c b/src/gromacs/mdlib/rf_util.c index a3e3eda0fc..6caeb816c0 100644 --- a/src/gromacs/mdlib/rf_util.c +++ b/src/gromacs/mdlib/rf_util.c @@ -42,7 +42,7 @@ #include "force.h" #include "names.h" #include "gromacs/math/vec.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "copyrite.h" #include "pbc.h" diff --git a/src/gromacs/mdlib/shellfc.c b/src/gromacs/mdlib/shellfc.c index 28e9982207..456f00cd5e 100644 --- a/src/gromacs/mdlib/shellfc.c +++ b/src/gromacs/mdlib/shellfc.c @@ -55,7 +55,7 @@ #include "names.h" #include "constr.h" #include "domdec.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "shellfc.h" #include "mtop_util.h" #include "chargegroup.h" diff --git a/src/gromacs/mdlib/sim_util.c b/src/gromacs/mdlib/sim_util.c index 5897b0d3cf..a817c1df00 100644 --- a/src/gromacs/mdlib/sim_util.c +++ b/src/gromacs/mdlib/sim_util.c @@ -59,7 +59,7 @@ #include "mdrun.h" #include "sim_util.h" #include "update.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "mdatoms.h" #include "force.h" #include "bondf.h" diff --git a/src/gromacs/mdlib/stat.c b/src/gromacs/mdlib/stat.c index 8ea8058a97..272271e31f 100644 --- a/src/gromacs/mdlib/stat.c +++ b/src/gromacs/mdlib/stat.c @@ -46,7 +46,6 @@ #include "network.h" #include "txtdump.h" #include "names.h" -#include "physics.h" #include "gromacs/math/vec.h" #include "gromacs/math/utilities.h" #include "force.h" diff --git a/src/gromacs/mdlib/tables.c b/src/gromacs/mdlib/tables.c index 6c96f379e4..05fddc5117 100644 --- a/src/gromacs/mdlib/tables.c +++ b/src/gromacs/mdlib/tables.c @@ -48,7 +48,7 @@ #include "gromacs/fileio/xvgr.h" #include "gromacs/math/vec.h" #include "network.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "force.h" #include "gromacs/fileio/gmxfio.h" #include "macros.h" diff --git a/src/gromacs/mdlib/tpi.c b/src/gromacs/mdlib/tpi.c index 976dc02d48..d6e4bd4593 100644 --- a/src/gromacs/mdlib/tpi.c +++ b/src/gromacs/mdlib/tpi.c @@ -63,7 +63,7 @@ #include "mdrun.h" #include "domdec.h" #include "gromacs/random/random.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "gromacs/fileio/xvgr.h" #include "mdatoms.h" #include "ns.h" diff --git a/src/gromacs/mdlib/update.c b/src/gromacs/mdlib/update.c index dddca371c4..238492db7a 100644 --- a/src/gromacs/mdlib/update.c +++ b/src/gromacs/mdlib/update.c @@ -46,7 +46,7 @@ #include "gromacs/utility/smalloc.h" #include "typedefs.h" #include "nrnb.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "macros.h" #include "gromacs/math/vec.h" #include "update.h" diff --git a/src/gromacs/selection/sm_insolidangle.cpp b/src/gromacs/selection/sm_insolidangle.cpp index 38766c99eb..8e8f4e0221 100644 --- a/src/gromacs/selection/sm_insolidangle.cpp +++ b/src/gromacs/selection/sm_insolidangle.cpp @@ -118,8 +118,8 @@ #include "gromacs/legacyheaders/macros.h" #include "gromacs/legacyheaders/pbc.h" -#include "gromacs/legacyheaders/physics.h" +#include "gromacs/math/units.h" #include "gromacs/math/utilities.h" #include "gromacs/math/vec.h" #include "gromacs/selection/indexutil.h" diff --git a/src/gromacs/tools/check.c b/src/gromacs/tools/check.c index 7857d1c7ba..4a2e01f559 100644 --- a/src/gromacs/tools/check.c +++ b/src/gromacs/tools/check.c @@ -49,7 +49,7 @@ #include "atomprop.h" #include "gromacs/math/vec.h" #include "pbc.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "index.h" #include "gromacs/utility/smalloc.h" #include "names.h" diff --git a/src/gromacs/trajectoryanalysis/modules/sasa.cpp b/src/gromacs/trajectoryanalysis/modules/sasa.cpp index e29d7a951d..bcc3dc6bd8 100644 --- a/src/gromacs/trajectoryanalysis/modules/sasa.cpp +++ b/src/gromacs/trajectoryanalysis/modules/sasa.cpp @@ -50,7 +50,6 @@ #include "gromacs/legacyheaders/atomprop.h" #include "gromacs/legacyheaders/copyrite.h" #include "gromacs/legacyheaders/pbc.h" -#include "gromacs/legacyheaders/physics.h" #include "gromacs/legacyheaders/symtab.h" #include "gromacs/analysisdata/analysisdata.h" @@ -58,6 +57,7 @@ #include "gromacs/analysisdata/modules/plot.h" #include "gromacs/fileio/confio.h" #include "gromacs/fileio/pdbio.h" +#include "gromacs/math/units.h" #include "gromacs/math/vec.h" #include "gromacs/options/basicoptions.h" #include "gromacs/options/filenameoption.h" diff --git a/src/programs/mdrun/md.c b/src/programs/mdrun/md.c index 453a6ae167..e92a32484d 100644 --- a/src/programs/mdrun/md.c +++ b/src/programs/mdrun/md.c @@ -55,7 +55,6 @@ #include "md_support.h" #include "md_logging.h" #include "network.h" -#include "physics.h" #include "names.h" #include "force.h" #include "disre.h" diff --git a/src/programs/mdrun/membed.c b/src/programs/mdrun/membed.c index 0ca22c6caf..583ca4906b 100644 --- a/src/programs/mdrun/membed.c +++ b/src/programs/mdrun/membed.c @@ -46,7 +46,6 @@ #include "gromacs/utility/futil.h" #include "gromacs/essentialdynamics/edsam.h" #include "index.h" -#include "physics.h" #include "names.h" #include "mtop_util.h" #include "gromacs/fileio/tpxio.h" diff --git a/src/programs/mdrun/repl_ex.c b/src/programs/mdrun/repl_ex.c index 5815207ea6..0777244ba0 100644 --- a/src/programs/mdrun/repl_ex.c +++ b/src/programs/mdrun/repl_ex.c @@ -43,7 +43,7 @@ #include "network.h" #include "gromacs/random/random.h" #include "gromacs/utility/smalloc.h" -#include "physics.h" +#include "gromacs/math/units.h" #include "copyrite.h" #include "macros.h" #include "gromacs/math/vec.h" -- 2.22.0