#include "gromacs/mdlib/perf_est.h"
#include "gromacs/mdlib/qmmm.h"
#include "gromacs/mdlib/vsite.h"
-#include "gromacs/mdrunutility/mdmodules.h"
+#include "gromacs/mdrun/mdmodules.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/nblist.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/calc_verletbuf.h"
-#include "gromacs/mdrunutility/mdmodules.h"
+#include "gromacs/mdrun/mdmodules.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/pull_params.h"
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 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.
#include <gtest/gtest.h>
#include "gromacs/fileio/warninp.h"
-#include "gromacs/mdrunutility/mdmodules.h"
+#include "gromacs/mdrun/mdmodules.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/stringutil.h"
#include "gromacs/mdlib/sighandler.h"
#include "gromacs/mdlib/stat.h"
#include "gromacs/mdtypes/enerdata.h"
+#include "gromacs/mdtypes/imdmodule.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdrunoptions.h"
/*! \brief IMD Protocol Version. */
constexpr int c_protocolVersion = 2;
-
/*! \internal
* \brief
* IMD (interactive molecular dynamics) energy record.
gmx_enerdata_t *enerd = nullptr;
};
+/*! \internal
+ * \brief Implement interactive molecular dynamics.
+ *
+ * \todo Some aspects of this module provides forces (when the user
+ * pulls on things in VMD), so in future it should have a class that
+ * models IForceProvider and is contributed to the collection of such
+ * things.
+ */
+class InteractiveMolecularDynamics final : public IMDModule
+{
+ // From IMDModule
+ IMdpOptionProvider *mdpOptionProvider() override { return nullptr; }
+ IMDOutputProvider *outputProvider() override { return nullptr; }
+ void initForceProviders(ForceProviders * /* forceProviders */) override {}
+};
+
+std::unique_ptr<IMDModule> createInteractiveMolecularDynamicsModule()
+{
+ return std::make_unique<InteractiveMolecularDynamics>();
+}
+
/*! \brief Enum for types of IMD messages.
*
* We use the same records as the NAMD/VMD IMD implementation.
namespace gmx
{
+class IMDModule;
class ImdSession;
+class InteractiveMolecularDynamics;
class MDLogger;
struct MdrunOptions;
-static const char IMDstr[] = "IMD:"; /**< Tag output from the IMD module with this string. */
+/*! \brief
+ * Creates a module for interactive molecular dynamics.
+ */
+std::unique_ptr<IMDModule> createInteractiveMolecularDynamicsModule();
+
+static const char IMDstr[] = "IMD:"; /**< Tag output from the IMD module with this string. */
/*! \brief Writes out the group of atoms selected for interactive manipulation.
*
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2018, by the GROMACS development team, led by
+# Copyright (c) 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.
legacymdrunoptions.cpp
logging.cpp
md.cpp
+ mdmodules.cpp
minimize.cpp
multisim.cpp
replicaexchange.cpp
#include <memory>
#include "gromacs/applied_forces/electricfield.h"
+#include "gromacs/imd/imd.h"
#include "gromacs/mdtypes/iforceprovider.h"
#include "gromacs/mdtypes/imdmodule.h"
#include "gromacs/mdtypes/imdoutputprovider.h"
#include "gromacs/options/options.h"
#include "gromacs/options/optionsection.h"
#include "gromacs/options/treesupport.h"
+#include "gromacs/swap/swapcoords.h"
#include "gromacs/utility/keyvaluetree.h"
#include "gromacs/utility/keyvaluetreebuilder.h"
#include "gromacs/utility/keyvaluetreetransform.h"
public:
Impl()
- : field_(createElectricFieldModule())
+ : field_(createElectricFieldModule()),
+ imd_(createInteractiveMolecularDynamicsModule()),
+ swapCoordinates_(createSwapCoordinatesModule())
{
}
std::unique_ptr<IMDModule> field_;
std::unique_ptr<ForceProviders> forceProviders_;
+ std::unique_ptr<IMDModule> imd_;
+ std::unique_ptr<IMDModule> swapCoordinates_;
/*! \brief List of registered MDModules
*
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 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.
*
* \author Teemu Murtola <teemu.murtola@gmail.com>
* \inlibraryapi
- * \ingroup module_mdrunutility
+ * \ingroup module_mdrun
*/
-#ifndef GMX_MDRUNUTILITY_MDMODULES_H
-#define GMX_MDRUNUTILITY_MDMODULES_H
+#ifndef GMX_MDRUN_MDMODULES_H
+#define GMX_MDRUN_MDMODULES_H
#include "gromacs/utility/classhelpers.h"
#include "gromacs/mdlib/sighandler.h"
#include "gromacs/mdlib/stophandler.h"
#include "gromacs/mdrun/logging.h"
+#include "gromacs/mdrun/mdmodules.h"
#include "gromacs/mdrun/multisim.h"
#include "gromacs/mdrun/simulationcontext.h"
-#include "gromacs/mdrunutility/mdmodules.h"
#include "gromacs/mdrunutility/printtime.h"
#include "gromacs/mdrunutility/threadaffinity.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/domdec/options.h"
#include "gromacs/hardware/hw_info.h"
#include "gromacs/math/vec.h"
-#include "gromacs/mdrunutility/mdmodules.h"
+#include "gromacs/mdrun/mdmodules.h"
#include "gromacs/mdtypes/mdrunoptions.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
gmx_add_libgromacs_sources(
handlerestart.cpp
- mdmodules.cpp
printtime.cpp
threadaffinity.cpp
)
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/groupcoord.h"
#include "gromacs/mdtypes/commrec.h"
+#include "gromacs/mdtypes/imdmodule.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdrunoptions.h"
};
static const char* DomainString[eDomainNr] = { "not_assigned", "Domain_A", "Domain_B" }; /**< Name for the domains */
+namespace gmx
+{
+
+/*! \internal
+ * \brief Implement Computational Electrophysiology swapping.
+ */
+class SwapCoordinates final : public IMDModule
+{
+ // From IMDModule
+ IMdpOptionProvider *mdpOptionProvider() override { return nullptr; }
+ IMDOutputProvider *outputProvider() override { return nullptr; }
+ void initForceProviders(ForceProviders * /* forceProviders */) override {}
+};
+
+std::unique_ptr<IMDModule> createSwapCoordinatesModule()
+{
+ return std::make_unique<SwapCoordinates>();
+}
+
+} // namespace gmx
/*! \internal \brief
* Structure containing compartment-specific data.
#include <cstdio>
+#include <memory>
+
#include "gromacs/math/vectypes.h"
#include "gromacs/utility/basedefinitions.h"
namespace gmx
{
+class IMDModule;
class LocalAtomSetManager;
struct MdrunOptions;
-}
+
+/*! \brief
+ * Creates a module for Computational Electrophysiology swapping.
+ */
+std::unique_ptr<IMDModule> createSwapCoordinatesModule();
+
+} // namespace gmx
/*! \brief Initialize ion / water position swapping ("Computational Electrophysiology").
*
#include "gromacs/math/functions.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
-#include "gromacs/mdrunutility/mdmodules.h"
+#include "gromacs/mdrun/mdmodules.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/fileio/xtcio.h"
#include "gromacs/gmxpreprocess/gmxcpp.h"
#include "gromacs/math/vecdump.h"
-#include "gromacs/mdrunutility/mdmodules.h"
+#include "gromacs/mdrun/mdmodules.h"
#include "gromacs/mdtypes/forcerec.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"