From 7b6aa340d0d88e84c08bf3c5072a0ea2a9605aac Mon Sep 17 00:00:00 2001 From: Kevin Boyd Date: Fri, 18 Jan 2019 09:11:47 -0500 Subject: [PATCH] Move more tools out of gmxana Moved some files to simulationdatabase and updated references to them refs #2727 Change-Id: Idf8375b672fbb6e4676fa22b9eb9c33d1b347166 --- src/gromacs/fileio/tests/tngio.cpp | 7 ++- src/gromacs/gmxana/gmx_ana.h | 21 -------- src/gromacs/gmxana/tests/CMakeLists.txt | 2 - src/gromacs/gmxana/tests/gmx_traj.cpp | 3 +- src/gromacs/gmxana/tests/spc2.gro | 9 ---- src/gromacs/gmxana/tests/spc2.ndx | 6 --- .../{gmxana/gmx_eneconv.cpp => tools/eneconv.cpp} | 3 +- .../{fileio/tests/tngio.cpp => tools/eneconv.h} | 54 ++++----------------- .../gmx_make_ndx.cpp => tools/make_ndx.cpp} | 3 +- .../{fileio/tests/tngio.cpp => tools/make_ndx.h} | 54 ++++----------------- .../gmx_mk_angndx.cpp => tools/mk_angndx.cpp} | 5 +- .../{fileio/tests/tngio.cpp => tools/mk_angndx.h} | 54 ++++----------------- .../gmx_pme_error.cpp => tools/pme_error.cpp} | 5 +- .../{fileio/tests/tngio.cpp => tools/pme_error.h} | 54 ++++----------------- src/gromacs/tools/tests/CMakeLists.txt | 3 +- .../gmx_trjconv.cpp => tools/tests/trjconv.cpp} | 7 +-- .../{gmxana/gmx_trjcat.cpp => tools/trjcat.cpp} | 3 +- .../{fileio/tests/tngio.cpp => tools/trjcat.h} | 54 ++++----------------- .../{gmxana/gmx_trjconv.cpp => tools/trjconv.cpp} | 3 +- .../{fileio/tests/tngio.cpp => tools/trjconv.h} | 54 ++++----------------- .../gmx_tune_pme.cpp => tools/tune_pme.cpp} | 3 +- .../{fileio/tests/tngio.cpp => tools/tune_pme.h} | 54 ++++----------------- src/programs/legacymodules.cpp | 7 +++ .../simulationdatabase}/spc2-traj.g96 | 0 .../simulationdatabase}/spc2-traj.gro | 0 .../simulationdatabase}/spc2-traj.pdb | 0 .../simulationdatabase}/spc2-traj.tng | Bin .../simulationdatabase}/spc2-traj.trr | Bin .../simulationdatabase}/spc2-traj.xtc | Bin 29 files changed, 97 insertions(+), 371 deletions(-) delete mode 100644 src/gromacs/gmxana/tests/spc2.gro delete mode 100644 src/gromacs/gmxana/tests/spc2.ndx rename src/gromacs/{gmxana/gmx_eneconv.cpp => tools/eneconv.cpp} (99%) copy src/gromacs/{fileio/tests/tngio.cpp => tools/eneconv.h} (64%) rename src/gromacs/{gmxana/gmx_make_ndx.cpp => tools/make_ndx.cpp} (99%) copy src/gromacs/{fileio/tests/tngio.cpp => tools/make_ndx.h} (64%) rename src/gromacs/{gmxana/gmx_mk_angndx.cpp => tools/mk_angndx.cpp} (98%) copy src/gromacs/{fileio/tests/tngio.cpp => tools/mk_angndx.h} (64%) rename src/gromacs/{gmxana/gmx_pme_error.cpp => tools/pme_error.cpp} (99%) copy src/gromacs/{fileio/tests/tngio.cpp => tools/pme_error.h} (64%) rename src/gromacs/{gmxana/tests/gmx_trjconv.cpp => tools/tests/trjconv.cpp} (96%) rename src/gromacs/{gmxana/gmx_trjcat.cpp => tools/trjcat.cpp} (99%) copy src/gromacs/{fileio/tests/tngio.cpp => tools/trjcat.h} (64%) rename src/gromacs/{gmxana/gmx_trjconv.cpp => tools/trjconv.cpp} (99%) copy src/gromacs/{fileio/tests/tngio.cpp => tools/trjconv.h} (64%) rename src/gromacs/{gmxana/gmx_tune_pme.cpp => tools/tune_pme.cpp} (99%) copy src/gromacs/{fileio/tests/tngio.cpp => tools/tune_pme.h} (64%) rename src/{gromacs/gmxana/tests => testutils/simulationdatabase}/spc2-traj.g96 (100%) rename src/{gromacs/gmxana/tests => testutils/simulationdatabase}/spc2-traj.gro (100%) rename src/{gromacs/gmxana/tests => testutils/simulationdatabase}/spc2-traj.pdb (100%) rename src/{gromacs/gmxana/tests => testutils/simulationdatabase}/spc2-traj.tng (100%) rename src/{gromacs/gmxana/tests => testutils/simulationdatabase}/spc2-traj.trr (100%) rename src/{gromacs/gmxana/tests => testutils/simulationdatabase}/spc2-traj.xtc (100%) diff --git a/src/gromacs/fileio/tests/tngio.cpp b/src/gromacs/fileio/tests/tngio.cpp index 77ca67b573..0ea66b1414 100644 --- a/src/gromacs/fileio/tests/tngio.cpp +++ b/src/gromacs/fileio/tests/tngio.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014,2016,2017,2018, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2016,2017,2018,2019, 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. @@ -49,6 +49,7 @@ #include "gromacs/utility/path.h" +#include "testutils/simulationdatabase.h" #include "testutils/testfilemanager.h" namespace @@ -66,9 +67,7 @@ class TngTest : public ::testing::Test TEST_F(TngTest, CanOpenTngFile) { gmx_tng_trajectory_t tng; - gmx_tng_open(gmx::test::TestFileManager::getInputFilePath("spc2-traj.tng").c_str(), - 'r', - &tng); + gmx_tng_open("spc2-traj.tng", 'r', &tng); gmx_tng_close(&tng); } diff --git a/src/gromacs/gmxana/gmx_ana.h b/src/gromacs/gmxana/gmx_ana.h index 756865dc5c..3e62f32d54 100644 --- a/src/gromacs/gmxana/gmx_ana.h +++ b/src/gromacs/gmxana/gmx_ana.h @@ -99,9 +99,6 @@ int gmx_dyecoupl(int argc, char *argv[]); int -gmx_eneconv(int argc, char *argv[]); - -int gmx_enemat(int argc, char *argv[]); int @@ -135,15 +132,9 @@ int gmx_make_edi(int argc, char *argv[]); int -gmx_make_ndx(int argc, char *argv[]); - -int gmx_mindist(int argc, char *argv[]); int -gmx_mk_angndx(int argc, char *argv[]); - -int gmx_msd(int argc, char *argv[]); int @@ -213,18 +204,9 @@ int gmx_traj(int argc, char *argv[]); int -gmx_trjcat(int argc, char *argv[]); - -int -gmx_trjconv(int argc, char *argv[]); - -int gmx_trjorder(int argc, char *argv[]); int -gmx_tune_pme(int argc, char *argv[]); - -int gmx_velacc(int argc, char *argv[]); int @@ -249,9 +231,6 @@ int gmx_membed(int argc, char *argv[]); int -gmx_pme_error(int argc, char *argv[]); - -int gmx_sans(int argc, char *argv[]); int diff --git a/src/gromacs/gmxana/tests/CMakeLists.txt b/src/gromacs/gmxana/tests/CMakeLists.txt index 846e6aeb55..47dfa35da9 100644 --- a/src/gromacs/gmxana/tests/CMakeLists.txt +++ b/src/gromacs/gmxana/tests/CMakeLists.txt @@ -38,8 +38,6 @@ gmx_add_gtest_executable( ${exename} entropy.cpp gmx_traj.cpp - gmx_trjconv.cpp - gmx_make_ndx.cpp gmx_mindist.cpp gmx_msd.cpp ) diff --git a/src/gromacs/gmxana/tests/gmx_traj.cpp b/src/gromacs/gmxana/tests/gmx_traj.cpp index 1f6c266913..9bf8b93a2a 100644 --- a/src/gromacs/gmxana/tests/gmx_traj.cpp +++ b/src/gromacs/gmxana/tests/gmx_traj.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014,2016,2017,2018, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2016,2017,2018,2019, 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. @@ -45,6 +45,7 @@ #include "gromacs/gmxana/gmx_ana.h" #include "testutils/cmdlinetest.h" +#include "testutils/simulationdatabase.h" #include "testutils/stdiohelper.h" #include "testutils/textblockmatchers.h" diff --git a/src/gromacs/gmxana/tests/spc2.gro b/src/gromacs/gmxana/tests/spc2.gro deleted file mode 100644 index 9ed61922bc..0000000000 --- a/src/gromacs/gmxana/tests/spc2.gro +++ /dev/null @@ -1,9 +0,0 @@ - - 6 - 1SOL OW 1 0.569 1.275 1.165 0.569 1.215 1.965 - 1SOL HW1 2 0.476 1.268 1.128 0.669 1.225 1.865 - 1SOL HW2 3 0.580 1.364 1.209 0.769 1.235 1.765 - 2SOL OW 4 1.555 1.511 0.703 0.869 1.245 1.665 - 2SOL HW1 5 1.498 1.495 0.784 0.169 0.275 1.565 - 2SOL HW2 6 1.496 1.521 0.623 0.269 2.275 1.465 - 3.01000 3.01000 3.01000 diff --git a/src/gromacs/gmxana/tests/spc2.ndx b/src/gromacs/gmxana/tests/spc2.ndx deleted file mode 100644 index 78e537a1f3..0000000000 --- a/src/gromacs/gmxana/tests/spc2.ndx +++ /dev/null @@ -1,6 +0,0 @@ -[ System ] - 1 2 3 4 5 6 -[ FirstWaterMolecule ] - 1 2 3 -[ SecondWaterMolecule ] - 4 5 6 diff --git a/src/gromacs/gmxana/gmx_eneconv.cpp b/src/gromacs/tools/eneconv.cpp similarity index 99% rename from src/gromacs/gmxana/gmx_eneconv.cpp rename to src/gromacs/tools/eneconv.cpp index 394c343fb9..c76e4b9eb2 100644 --- a/src/gromacs/gmxana/gmx_eneconv.cpp +++ b/src/gromacs/tools/eneconv.cpp @@ -36,6 +36,8 @@ */ #include "gmxpre.h" +#include "eneconv.h" + #include #include #include @@ -45,7 +47,6 @@ #include "gromacs/commandline/pargs.h" #include "gromacs/fileio/enxio.h" #include "gromacs/fileio/trxio.h" -#include "gromacs/gmxana/gmx_ana.h" #include "gromacs/listed_forces/disre.h" #include "gromacs/math/functions.h" #include "gromacs/math/vec.h" diff --git a/src/gromacs/fileio/tests/tngio.cpp b/src/gromacs/tools/eneconv.h similarity index 64% copy from src/gromacs/fileio/tests/tngio.cpp copy to src/gromacs/tools/eneconv.h index 77ca67b573..b0cbb9749d 100644 --- a/src/gromacs/fileio/tests/tngio.cpp +++ b/src/gromacs/tools/eneconv.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014,2016,2017,2018, by the GROMACS development team, led by + * Copyright (c) 2019, 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. @@ -32,50 +32,14 @@ * To help us fund GROMACS development, we humbly ask that you cite * the research papers on the package. Check out http://www.gromacs.org. */ -/*! \internal \file - * \brief - * Tests for file I/O routines +#ifndef GMX_TOOLS_ENECONV_H +#define GMX_TOOLS_ENECONV_H + +/*! \brief Implements gmx eneconv * - * \author Mark Abraham - * \ingroup module_fileio + * \param[in] argc argc value passed to main(). + * \param[in] argv argv array passed to main(). */ -#include "gmxpre.h" - -#include "gromacs/fileio/tngio.h" - -#include - -#include - -#include "gromacs/utility/path.h" - -#include "testutils/testfilemanager.h" - -namespace -{ - -class TngTest : public ::testing::Test -{ - public: - TngTest() - { - } - gmx::test::TestFileManager fileManager_; -}; - -TEST_F(TngTest, CanOpenTngFile) -{ - gmx_tng_trajectory_t tng; - gmx_tng_open(gmx::test::TestFileManager::getInputFilePath("spc2-traj.tng").c_str(), - 'r', - &tng); - gmx_tng_close(&tng); -} - -TEST_F(TngTest, CloseBeforeOpenIsNotFatal) -{ - gmx_tng_trajectory_t tng = nullptr; - gmx_tng_close(&tng); -} +int gmx_eneconv(int argc, char *argv[]); -} // namespace +#endif diff --git a/src/gromacs/gmxana/gmx_make_ndx.cpp b/src/gromacs/tools/make_ndx.cpp similarity index 99% rename from src/gromacs/gmxana/gmx_make_ndx.cpp rename to src/gromacs/tools/make_ndx.cpp index 12310fb330..a3758b259a 100644 --- a/src/gromacs/gmxana/gmx_make_ndx.cpp +++ b/src/gromacs/tools/make_ndx.cpp @@ -36,6 +36,8 @@ */ #include "gmxpre.h" +#include "make_ndx.h" + #include #include @@ -43,7 +45,6 @@ #include "gromacs/commandline/pargs.h" #include "gromacs/fileio/confio.h" -#include "gromacs/gmxana/gmx_ana.h" #include "gromacs/math/vec.h" #include "gromacs/topology/block.h" #include "gromacs/topology/index.h" diff --git a/src/gromacs/fileio/tests/tngio.cpp b/src/gromacs/tools/make_ndx.h similarity index 64% copy from src/gromacs/fileio/tests/tngio.cpp copy to src/gromacs/tools/make_ndx.h index 77ca67b573..7ae7c49a89 100644 --- a/src/gromacs/fileio/tests/tngio.cpp +++ b/src/gromacs/tools/make_ndx.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014,2016,2017,2018, by the GROMACS development team, led by + * Copyright (c) 2019, 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. @@ -32,50 +32,14 @@ * To help us fund GROMACS development, we humbly ask that you cite * the research papers on the package. Check out http://www.gromacs.org. */ -/*! \internal \file - * \brief - * Tests for file I/O routines +#ifndef GMX_TOOLS_MAKE_NDX_H +#define GMX_TOOLS_MAKE_NDX_H + +/*! \brief Implements gmx make_ndx * - * \author Mark Abraham - * \ingroup module_fileio + * \param[in] argc argc value passed to main(). + * \param[in] argv argv array passed to main(). */ -#include "gmxpre.h" - -#include "gromacs/fileio/tngio.h" - -#include - -#include - -#include "gromacs/utility/path.h" - -#include "testutils/testfilemanager.h" - -namespace -{ - -class TngTest : public ::testing::Test -{ - public: - TngTest() - { - } - gmx::test::TestFileManager fileManager_; -}; - -TEST_F(TngTest, CanOpenTngFile) -{ - gmx_tng_trajectory_t tng; - gmx_tng_open(gmx::test::TestFileManager::getInputFilePath("spc2-traj.tng").c_str(), - 'r', - &tng); - gmx_tng_close(&tng); -} - -TEST_F(TngTest, CloseBeforeOpenIsNotFatal) -{ - gmx_tng_trajectory_t tng = nullptr; - gmx_tng_close(&tng); -} +int gmx_make_ndx(int argc, char *argv[]); -} // namespace +#endif diff --git a/src/gromacs/gmxana/gmx_mk_angndx.cpp b/src/gromacs/tools/mk_angndx.cpp similarity index 98% rename from src/gromacs/gmxana/gmx_mk_angndx.cpp rename to src/gromacs/tools/mk_angndx.cpp index eee7ec8bbd..0f59fee73a 100644 --- a/src/gromacs/gmxana/gmx_mk_angndx.cpp +++ b/src/gromacs/tools/mk_angndx.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by + * Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, 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. @@ -36,11 +36,12 @@ */ #include "gmxpre.h" +#include "mk_angndx.h" + #include #include "gromacs/commandline/pargs.h" #include "gromacs/fileio/trxio.h" -#include "gromacs/gmxana/gmx_ana.h" #include "gromacs/topology/ifunc.h" #include "gromacs/topology/topology.h" #include "gromacs/utility/arraysize.h" diff --git a/src/gromacs/fileio/tests/tngio.cpp b/src/gromacs/tools/mk_angndx.h similarity index 64% copy from src/gromacs/fileio/tests/tngio.cpp copy to src/gromacs/tools/mk_angndx.h index 77ca67b573..86000dd685 100644 --- a/src/gromacs/fileio/tests/tngio.cpp +++ b/src/gromacs/tools/mk_angndx.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014,2016,2017,2018, by the GROMACS development team, led by + * Copyright (c) 2019, 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. @@ -32,50 +32,14 @@ * To help us fund GROMACS development, we humbly ask that you cite * the research papers on the package. Check out http://www.gromacs.org. */ -/*! \internal \file - * \brief - * Tests for file I/O routines +#ifndef GMX_TOOLS_MK_ANGNDX_H +#define GMX_TOOLS_MK_ANGNDX_H + +/*! \brief Implements gmx mk_angndx * - * \author Mark Abraham - * \ingroup module_fileio + * \param[in] argc argc value passed to main(). + * \param[in] argv argv array passed to main(). */ -#include "gmxpre.h" - -#include "gromacs/fileio/tngio.h" - -#include - -#include - -#include "gromacs/utility/path.h" - -#include "testutils/testfilemanager.h" - -namespace -{ - -class TngTest : public ::testing::Test -{ - public: - TngTest() - { - } - gmx::test::TestFileManager fileManager_; -}; - -TEST_F(TngTest, CanOpenTngFile) -{ - gmx_tng_trajectory_t tng; - gmx_tng_open(gmx::test::TestFileManager::getInputFilePath("spc2-traj.tng").c_str(), - 'r', - &tng); - gmx_tng_close(&tng); -} - -TEST_F(TngTest, CloseBeforeOpenIsNotFatal) -{ - gmx_tng_trajectory_t tng = nullptr; - gmx_tng_close(&tng); -} +int gmx_mk_angndx(int argc, char *argv[]); -} // namespace +#endif diff --git a/src/gromacs/gmxana/gmx_pme_error.cpp b/src/gromacs/tools/pme_error.cpp similarity index 99% rename from src/gromacs/gmxana/gmx_pme_error.cpp rename to src/gromacs/tools/pme_error.cpp index bc87405672..781b7b99cb 100644 --- a/src/gromacs/gmxana/gmx_pme_error.cpp +++ b/src/gromacs/tools/pme_error.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2019, 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,6 +34,8 @@ */ #include "gmxpre.h" +#include "pme_error.h" + #include "config.h" #include @@ -46,7 +48,6 @@ #include "gromacs/fft/calcgrid.h" #include "gromacs/fileio/checkpoint.h" #include "gromacs/fileio/tpxio.h" -#include "gromacs/gmxana/gmx_ana.h" #include "gromacs/gmxlib/network.h" #include "gromacs/math/functions.h" #include "gromacs/math/units.h" diff --git a/src/gromacs/fileio/tests/tngio.cpp b/src/gromacs/tools/pme_error.h similarity index 64% copy from src/gromacs/fileio/tests/tngio.cpp copy to src/gromacs/tools/pme_error.h index 77ca67b573..19a30d502b 100644 --- a/src/gromacs/fileio/tests/tngio.cpp +++ b/src/gromacs/tools/pme_error.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014,2016,2017,2018, by the GROMACS development team, led by + * Copyright (c) 2019, 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. @@ -32,50 +32,14 @@ * To help us fund GROMACS development, we humbly ask that you cite * the research papers on the package. Check out http://www.gromacs.org. */ -/*! \internal \file - * \brief - * Tests for file I/O routines +#ifndef GMX_TOOLS_PME_ERROR_H +#define GMX_TOOLS_PME_ERROR_H + +/*! \brief Implements gmx pme_error * - * \author Mark Abraham - * \ingroup module_fileio + * \param[in] argc argc value passed to main(). + * \param[in] argv argv array passed to main(). */ -#include "gmxpre.h" - -#include "gromacs/fileio/tngio.h" - -#include - -#include - -#include "gromacs/utility/path.h" - -#include "testutils/testfilemanager.h" - -namespace -{ - -class TngTest : public ::testing::Test -{ - public: - TngTest() - { - } - gmx::test::TestFileManager fileManager_; -}; - -TEST_F(TngTest, CanOpenTngFile) -{ - gmx_tng_trajectory_t tng; - gmx_tng_open(gmx::test::TestFileManager::getInputFilePath("spc2-traj.tng").c_str(), - 'r', - &tng); - gmx_tng_close(&tng); -} - -TEST_F(TngTest, CloseBeforeOpenIsNotFatal) -{ - gmx_tng_trajectory_t tng = nullptr; - gmx_tng_close(&tng); -} +int gmx_pme_error(int argc, char *argv[]); -} // namespace +#endif diff --git a/src/gromacs/tools/tests/CMakeLists.txt b/src/gromacs/tools/tests/CMakeLists.txt index db4d21b3d9..6796538f7c 100644 --- a/src/gromacs/tools/tests/CMakeLists.txt +++ b/src/gromacs/tools/tests/CMakeLists.txt @@ -34,5 +34,6 @@ gmx_add_unit_test(ToolUnitTests tool-test dump.cpp - report_methods.cpp) + report_methods.cpp + trjconv.cpp) diff --git a/src/gromacs/gmxana/tests/gmx_trjconv.cpp b/src/gromacs/tools/tests/trjconv.cpp similarity index 96% rename from src/gromacs/gmxana/tests/gmx_trjconv.cpp rename to src/gromacs/tools/tests/trjconv.cpp index 49a8a1dad6..b73c01f85d 100644 --- a/src/gromacs/gmxana/tests/gmx_trjconv.cpp +++ b/src/gromacs/tools/tests/trjconv.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014,2016,2017,2018, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2016,2017,2018,2019, 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. @@ -40,11 +40,12 @@ */ #include "gmxpre.h" -#include "config.h" +#include "gromacs/tools/trjconv.h" -#include "gromacs/gmxana/gmx_ana.h" +#include "config.h" #include "testutils/cmdlinetest.h" +#include "testutils/simulationdatabase.h" #include "testutils/stdiohelper.h" #include "testutils/textblockmatchers.h" diff --git a/src/gromacs/gmxana/gmx_trjcat.cpp b/src/gromacs/tools/trjcat.cpp similarity index 99% rename from src/gromacs/gmxana/gmx_trjcat.cpp rename to src/gromacs/tools/trjcat.cpp index 0b11af8b86..781608e3d7 100644 --- a/src/gromacs/gmxana/gmx_trjcat.cpp +++ b/src/gromacs/tools/trjcat.cpp @@ -36,6 +36,8 @@ */ #include "gmxpre.h" +#include "trjcat.h" + #include #include #include @@ -51,7 +53,6 @@ #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xtcio.h" #include "gromacs/fileio/xvgr.h" -#include "gromacs/gmxana/gmx_ana.h" #include "gromacs/math/vec.h" #include "gromacs/mdtypes/md_enums.h" #include "gromacs/topology/index.h" diff --git a/src/gromacs/fileio/tests/tngio.cpp b/src/gromacs/tools/trjcat.h similarity index 64% copy from src/gromacs/fileio/tests/tngio.cpp copy to src/gromacs/tools/trjcat.h index 77ca67b573..5cd756a6ad 100644 --- a/src/gromacs/fileio/tests/tngio.cpp +++ b/src/gromacs/tools/trjcat.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014,2016,2017,2018, by the GROMACS development team, led by + * Copyright (c) 2019, 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. @@ -32,50 +32,14 @@ * To help us fund GROMACS development, we humbly ask that you cite * the research papers on the package. Check out http://www.gromacs.org. */ -/*! \internal \file - * \brief - * Tests for file I/O routines +#ifndef GMX_TOOLS_TRJCAT_H +#define GMX_TOOLS_TRJCAT_H + +/*! \brief Implements gmx trjcat * - * \author Mark Abraham - * \ingroup module_fileio + * \param[in] argc argc value passed to main(). + * \param[in] argv argv array passed to main(). */ -#include "gmxpre.h" - -#include "gromacs/fileio/tngio.h" - -#include - -#include - -#include "gromacs/utility/path.h" - -#include "testutils/testfilemanager.h" - -namespace -{ - -class TngTest : public ::testing::Test -{ - public: - TngTest() - { - } - gmx::test::TestFileManager fileManager_; -}; - -TEST_F(TngTest, CanOpenTngFile) -{ - gmx_tng_trajectory_t tng; - gmx_tng_open(gmx::test::TestFileManager::getInputFilePath("spc2-traj.tng").c_str(), - 'r', - &tng); - gmx_tng_close(&tng); -} - -TEST_F(TngTest, CloseBeforeOpenIsNotFatal) -{ - gmx_tng_trajectory_t tng = nullptr; - gmx_tng_close(&tng); -} +int gmx_trjcat(int argc, char *argv[]); -} // namespace +#endif diff --git a/src/gromacs/gmxana/gmx_trjconv.cpp b/src/gromacs/tools/trjconv.cpp similarity index 99% rename from src/gromacs/gmxana/gmx_trjconv.cpp rename to src/gromacs/tools/trjconv.cpp index d18edaa98c..d21cdfabe6 100644 --- a/src/gromacs/gmxana/gmx_trjconv.cpp +++ b/src/gromacs/tools/trjconv.cpp @@ -36,6 +36,8 @@ */ #include "gmxpre.h" +#include "trjconv.h" + #include #include #include @@ -56,7 +58,6 @@ #include "gromacs/fileio/trxio.h" #include "gromacs/fileio/xtcio.h" #include "gromacs/fileio/xvgr.h" -#include "gromacs/gmxana/gmx_ana.h" #include "gromacs/math/do_fit.h" #include "gromacs/math/functions.h" #include "gromacs/math/vec.h" diff --git a/src/gromacs/fileio/tests/tngio.cpp b/src/gromacs/tools/trjconv.h similarity index 64% copy from src/gromacs/fileio/tests/tngio.cpp copy to src/gromacs/tools/trjconv.h index 77ca67b573..de74074845 100644 --- a/src/gromacs/fileio/tests/tngio.cpp +++ b/src/gromacs/tools/trjconv.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014,2016,2017,2018, by the GROMACS development team, led by + * Copyright (c) 2019, 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. @@ -32,50 +32,14 @@ * To help us fund GROMACS development, we humbly ask that you cite * the research papers on the package. Check out http://www.gromacs.org. */ -/*! \internal \file - * \brief - * Tests for file I/O routines +#ifndef GMX_TOOLS_TRJCONV_H +#define GMX_TOOLS_TRJCONV_H + +/*! \brief Implements gmx trjconv * - * \author Mark Abraham - * \ingroup module_fileio + * \param[in] argc argc value passed to main(). + * \param[in] argv argv array passed to main(). */ -#include "gmxpre.h" - -#include "gromacs/fileio/tngio.h" - -#include - -#include - -#include "gromacs/utility/path.h" - -#include "testutils/testfilemanager.h" - -namespace -{ - -class TngTest : public ::testing::Test -{ - public: - TngTest() - { - } - gmx::test::TestFileManager fileManager_; -}; - -TEST_F(TngTest, CanOpenTngFile) -{ - gmx_tng_trajectory_t tng; - gmx_tng_open(gmx::test::TestFileManager::getInputFilePath("spc2-traj.tng").c_str(), - 'r', - &tng); - gmx_tng_close(&tng); -} - -TEST_F(TngTest, CloseBeforeOpenIsNotFatal) -{ - gmx_tng_trajectory_t tng = nullptr; - gmx_tng_close(&tng); -} +int gmx_trjconv(int argc, char *argv[]); -} // namespace +#endif diff --git a/src/gromacs/gmxana/gmx_tune_pme.cpp b/src/gromacs/tools/tune_pme.cpp similarity index 99% rename from src/gromacs/gmxana/gmx_tune_pme.cpp rename to src/gromacs/tools/tune_pme.cpp index 0c6abc61da..4663f6f516 100644 --- a/src/gromacs/gmxana/gmx_tune_pme.cpp +++ b/src/gromacs/tools/tune_pme.cpp @@ -34,6 +34,8 @@ */ #include "gmxpre.h" +#include "tune_pme.h" + #include "config.h" #include @@ -53,7 +55,6 @@ #include "gromacs/fft/calcgrid.h" #include "gromacs/fileio/checkpoint.h" #include "gromacs/fileio/tpxio.h" -#include "gromacs/gmxana/gmx_ana.h" #include "gromacs/math/utilities.h" #include "gromacs/math/vec.h" #include "gromacs/mdlib/perf_est.h" diff --git a/src/gromacs/fileio/tests/tngio.cpp b/src/gromacs/tools/tune_pme.h similarity index 64% copy from src/gromacs/fileio/tests/tngio.cpp copy to src/gromacs/tools/tune_pme.h index 77ca67b573..ec4da7db4e 100644 --- a/src/gromacs/fileio/tests/tngio.cpp +++ b/src/gromacs/tools/tune_pme.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014,2016,2017,2018, by the GROMACS development team, led by + * Copyright (c) 2019, 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. @@ -32,50 +32,14 @@ * To help us fund GROMACS development, we humbly ask that you cite * the research papers on the package. Check out http://www.gromacs.org. */ -/*! \internal \file - * \brief - * Tests for file I/O routines +#ifndef GMX_TOOLS_TUNE_PME_H +#define GMX_TOOLS_TUNE_PME_H + +/*! \brief Implements gmx tune_pme * - * \author Mark Abraham - * \ingroup module_fileio + * \param[in] argc argc value passed to main(). + * \param[in] argv argv array passed to main(). */ -#include "gmxpre.h" - -#include "gromacs/fileio/tngio.h" - -#include - -#include - -#include "gromacs/utility/path.h" - -#include "testutils/testfilemanager.h" - -namespace -{ - -class TngTest : public ::testing::Test -{ - public: - TngTest() - { - } - gmx::test::TestFileManager fileManager_; -}; - -TEST_F(TngTest, CanOpenTngFile) -{ - gmx_tng_trajectory_t tng; - gmx_tng_open(gmx::test::TestFileManager::getInputFilePath("spc2-traj.tng").c_str(), - 'r', - &tng); - gmx_tng_close(&tng); -} - -TEST_F(TngTest, CloseBeforeOpenIsNotFatal) -{ - gmx_tng_trajectory_t tng = nullptr; - gmx_tng_close(&tng); -} +int gmx_tune_pme(int argc, char *argv[]); -} // namespace +#endif diff --git a/src/programs/legacymodules.cpp b/src/programs/legacymodules.cpp index 76dc0d98ee..b8ec65eaa0 100644 --- a/src/programs/legacymodules.cpp +++ b/src/programs/legacymodules.cpp @@ -59,7 +59,14 @@ #include "gromacs/tools/check.h" #include "gromacs/tools/convert_tpr.h" #include "gromacs/tools/dump.h" +#include "gromacs/tools/eneconv.h" +#include "gromacs/tools/make_ndx.h" +#include "gromacs/tools/mk_angndx.h" +#include "gromacs/tools/pme_error.h" #include "gromacs/tools/report_methods.h" +#include "gromacs/tools/trjcat.h" +#include "gromacs/tools/trjconv.h" +#include "gromacs/tools/tune_pme.h" #include "mdrun/mdrun_main.h" #include "view/view.h" diff --git a/src/gromacs/gmxana/tests/spc2-traj.g96 b/src/testutils/simulationdatabase/spc2-traj.g96 similarity index 100% rename from src/gromacs/gmxana/tests/spc2-traj.g96 rename to src/testutils/simulationdatabase/spc2-traj.g96 diff --git a/src/gromacs/gmxana/tests/spc2-traj.gro b/src/testutils/simulationdatabase/spc2-traj.gro similarity index 100% rename from src/gromacs/gmxana/tests/spc2-traj.gro rename to src/testutils/simulationdatabase/spc2-traj.gro diff --git a/src/gromacs/gmxana/tests/spc2-traj.pdb b/src/testutils/simulationdatabase/spc2-traj.pdb similarity index 100% rename from src/gromacs/gmxana/tests/spc2-traj.pdb rename to src/testutils/simulationdatabase/spc2-traj.pdb diff --git a/src/gromacs/gmxana/tests/spc2-traj.tng b/src/testutils/simulationdatabase/spc2-traj.tng similarity index 100% rename from src/gromacs/gmxana/tests/spc2-traj.tng rename to src/testutils/simulationdatabase/spc2-traj.tng diff --git a/src/gromacs/gmxana/tests/spc2-traj.trr b/src/testutils/simulationdatabase/spc2-traj.trr similarity index 100% rename from src/gromacs/gmxana/tests/spc2-traj.trr rename to src/testutils/simulationdatabase/spc2-traj.trr diff --git a/src/gromacs/gmxana/tests/spc2-traj.xtc b/src/testutils/simulationdatabase/spc2-traj.xtc similarity index 100% rename from src/gromacs/gmxana/tests/spc2-traj.xtc rename to src/testutils/simulationdatabase/spc2-traj.xtc -- 2.11.4.GIT