add_subdirectory(analysisdata)
add_subdirectory(selection)
add_subdirectory(trajectoryanalysis)
+ add_subdirectory(tools)
endif ()
list(APPEND LIBGROMACS_SOURCES ${GMXLIB_SOURCES} ${MDLIB_SOURCES})
--- /dev/null
+#
+# This file is part of the GROMACS molecular simulation package.
+#
+# Copyright (c) 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.
+#
+# 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(GLOB TOOLS_SOURCES *.cpp *.c)
+set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${TOOLS_SOURCES} PARENT_SCOPE)
+
+set(TOOLS_PUBLIC_HEADERS
+ )
+gmx_install_headers(tools ${TOOLS_PUBLIC_HEADERS})
+
+if (BUILD_TESTING)
+# add_subdirectory(tests)
+endif (BUILD_TESTING)
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2013, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,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.
#include "main.h"
#include "macros.h"
#include <math.h>
-#include "gromacs/fileio/futil.h"
#include "gromacs/commandline/pargs.h"
#include "sysstuff.h"
#include "txtdump.h"
#include "gmx_fatal.h"
-#include "gromacs/fileio/gmxfio.h"
-#include "gromacs/fileio/trnio.h"
-#include "gromacs/fileio/xtcio.h"
#include "atomprop.h"
#include "vec.h"
#include "pbc.h"
#include "physics.h"
#include "index.h"
#include "smalloc.h"
+#include "names.h"
+#include "mtop_util.h"
+#include "gromacs/fileio/futil.h"
+#include "gromacs/fileio/gmxfio.h"
+#include "gromacs/fileio/trnio.h"
+#include "gromacs/fileio/xtcio.h"
#include "gromacs/fileio/confio.h"
#include "gromacs/fileio/enxio.h"
#include "gromacs/fileio/tpxio.h"
#include "gromacs/fileio/trxio.h"
-#include "names.h"
-#include "mtop_util.h"
-#include "tpbcmp.h"
+#include "compare.h"
typedef struct {
int bStep;
sfree(fr);
}
-int gmx_gmxcheck(int argc, char *argv[])
+int gmx_check(int argc, char *argv[])
{
const char *desc[] = {
"[THISMODULE] reads a trajectory ([TT].trj[tt], [TT].trr[tt] or ",
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 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.
+ *
+ * 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 GMX_TOOLS_CHECK_H
+#define GMX_TOOLS_CHECK_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+/*! \brief Implements gmx check
+ *
+ * \param[in] argc argc value passed to main().
+ * \param[in] argv argv array passed to main().
+ */
+int gmx_check(int argc, char *argv[]);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,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.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,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.
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifndef _tpbcmp_h
-#define _tpbcmp_h
+#ifndef GMX_TOOLS_COMPARE_H
+#define GMX_TOOLS_COMPARE_H
+
+/* Routines for comparing data structures from non-trajectory binary
+ file formats (e.g. as used by gmx check). */
void
comp_tpx(const char *fn1, const char *fn2, gmx_bool bRMSD, real ftol, real abstol);
-/* Compare two binary topology files */
+/* Compare two binary run input files */
void
comp_trx(const output_env_t oenv, const char *fn1, const char *fn2,
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2013, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,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.
#include <assert.h>
#include "main.h"
#include "macros.h"
-#include "gromacs/fileio/futil.h"
#include "gromacs/commandline/pargs.h"
#include "sysstuff.h"
#include "txtdump.h"
#include "gmx_fatal.h"
-#include "gromacs/fileio/xtcio.h"
-#include "gromacs/fileio/enxio.h"
#include "smalloc.h"
#include "names.h"
-#include "gromacs/fileio/gmxfio.h"
-#include "gromacs/fileio/tpxio.h"
-#include "gromacs/fileio/trnio.h"
#include "txtdump.h"
-#include "gmxcpp.h"
+#include "gromacs/gmxpreprocess/gmxcpp.h"
#include "checkpoint.h"
#include "mtop_util.h"
+#include "gromacs/fileio/xtcio.h"
+#include "gromacs/fileio/enxio.h"
+#include "gromacs/fileio/gmxfio.h"
+#include "gromacs/fileio/tpxio.h"
+#include "gromacs/fileio/trnio.h"
+#include "gromacs/fileio/futil.h"
#include "gromacs/linearalgebra/mtxio.h"
#include "gromacs/linearalgebra/sparsematrix.h"
sfree(full);
}
-int gmx_gmxdump(int argc, char *argv[])
+int gmx_dump(int argc, char *argv[])
{
const char *desc[] = {
"[THISMODULE] reads a run input file ([TT].tpa[tt]/[TT].tpr[tt]/[TT].tpb[tt]),",
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 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.
+ *
+ * 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 GMX_TOOLS_DUMP_H
+#define GMX_TOOLS_DUMP_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+/*! \brief Implements gmx dump
+ *
+ * \param[in] argc argc value passed to main().
+ * \param[in] argv argv array passed to main().
+ */
+int gmx_dump(int argc, char *argv[]);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,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.
#include "macros.h"
#include "names.h"
#include "typedefs.h"
-#include "gromacs/fileio/tpxio.h"
-#include "gromacs/fileio/trnio.h"
-#include "gromacs/fileio/enxio.h"
-#include "readir.h"
+#include "gromacs/gmxpreprocess/readir.h"
#include "gromacs/commandline/pargs.h"
-#include "gromacs/fileio/futil.h"
#include "vec.h"
#include "mtop_util.h"
#include "random.h"
#include "checkpoint.h"
+#include "gromacs/fileio/tpxio.h"
+#include "gromacs/fileio/trnio.h"
+#include "gromacs/fileio/enxio.h"
+#include "gromacs/fileio/futil.h"
#define RANGECHK(i, n) if ((i) >= (n)) gmx_fatal(FARGS, "Your index file contains atomnumbers (e.g. %d)\nthat are larger than the number of atoms in the tpr file (%d)", (i), (n))
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 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.
+ *
+ * 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 GMX_TOOLS_TPBCONV_H
+#define GMX_TOOLS_TPBCONV_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+}
+#endif
+
+/*! \brief Implements gmx tpbconv
+ *
+ * \param[in] argc argc value passed to main().
+ * \param[in] argv argv array passed to main().
+ */
+int gmx_tpbconv(int argc, char *argv[]);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,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.
extern "C"
{
-int gmx_gmxcheck(int argc, char *argv[]);
-int gmx_gmxdump(int argc, char *argv[]);
int gmx_grompp(int argc, char *argv[]);
int gmx_pdb2gmx(int argc, char *argv[]);
int gmx_protonate(int argc, char *argv[]);
-int gmx_tpbconv(int argc, char *argv[]);
int gmx_x2top(int argc, char *argv[]);
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,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.
#include "../view/view.h"
#include "../mdrun/mdrun_main.h"
+#include "gromacs/tools/check.h"
+#include "gromacs/tools/dump.h"
+#include "gromacs/tools/tpbconv.h"
-extern "C"
-{
-
-int gmx_gmxcheck(int argc, char *argv[]);
-int gmx_gmxdump(int argc, char *argv[]);
-int gmx_grompp(int argc, char *argv[]);
-int gmx_pdb2gmx(int argc, char *argv[]);
-int gmx_protonate(int argc, char *argv[]);
-int gmx_tpbconv(int argc, char *argv[]);
-int gmx_x2top(int argc, char *argv[]);
-
-}
+#include "legacycmainfunctions.h"
namespace
{
void registerLegacyModules(gmx::CommandLineModuleManager *manager)
{
// Modules from this directory (were in src/kernel/).
- registerModule(manager, &gmx_gmxcheck, "check",
+ registerModule(manager, &gmx_check, "check",
"Check and compare files");
- registerModule(manager, &gmx_gmxdump, "dump",
+ registerModule(manager, &gmx_dump, "dump",
"Make binary files human readable");
registerModule(manager, &gmx_grompp, "grompp",
"Make a run input file");
registerModule(manager, &gmx_pdb2gmx, "pdb2gmx",
"Convert coordinate files to topology and FF-compliant coordinate files");
registerModule(manager, &gmx_tpbconv, "tpbconv",
- "Make a run input file for restarting a crashed run");
+ "Make a modifed run-input file");
registerModule(manager, &gmx_protonate, "protonate",
"Protonate structures");
#include <gtest/gtest.h>
#include <string>
#include "gromacs/options/filenameoption.h"
-#include "programs/gmx/legacycmainfunctions.h"
+#include "gromacs/tools/check.h"
#include "testutils/cmdlinetest.h"
namespace
::gmx::test::CommandLine checkCaller;
checkCaller.append("check");
checkCaller.addOption("-f", xtcFileName);
- ASSERT_EQ(0, gmx_gmxcheck(checkCaller.argc(), checkCaller.argv()));
+ ASSERT_EQ(0, gmx_check(checkCaller.argc(), checkCaller.argv()));
}
#ifdef __INTEL_COMPILER