Various minor nblib updates
authorejjordan <ejjordan@kth.se>
Tue, 21 Sep 2021 13:49:30 +0000 (15:49 +0200)
committerAndrey Alekseenko <al42and@gmail.com>
Wed, 22 Sep 2021 14:26:27 +0000 (14:26 +0000)
A small selection of miscellaneous changes that don't fit in as part
of any larger MR.

api/nblib/CMakeLists.txt
api/nblib/exception.h
api/nblib/kerneloptions.h
api/nblib/samples/CMakeLists.txt
api/nblib/samples/argon-forces-integration.cpp
api/nblib/samples/methane-water-integration.cpp
api/nblib/tests/topology.cpp
api/nblib/util/CMakeLists.txt
api/nblib/util/traits.hpp

index be3cfb6e18fdadc6ab76a9dc8013a3fc305485d7..2b1b0b70fb6bba4f1e13f7e84257f015b2db222e 100644 (file)
@@ -138,10 +138,12 @@ if(GMX_INSTALL_NBLIB_API)
             molecules.h
             kerneloptions.h
             nblib.h
+            nbnxmsetuphelpers.h
             particlesequencer.h
             particletype.h
             simulationstate.h
             topology.h
+            vector.h
             DESTINATION include/nblib)
 endif()
 
index e99dad8d577ccca375aa4b5d822c105d3c091ae0..ebe46a17d81afd589a460cb5283e146534bd94ae 100644 (file)
@@ -77,7 +77,7 @@ private:
  *
  * The message should give users some hint as to how to remedy the error.
  */
-class InputException final : NbLibException
+class InputException final : public NbLibException
 {
 public:
     using NbLibException::NbLibException;
index 86ee4325c7790c2af3ad19e44e633fd063db2a41..3ec6b605b7c0878062f1e45af349f7af08474528 100644 (file)
@@ -93,20 +93,14 @@ struct NBKernelOptions final
     SimdKernels nbnxmSimd = SimdKernels::SimdAuto;
     //! The LJ combination rule
     CombinationRule ljCombinationRule = CombinationRule::Geometric;
-    //! Use i-cluster half-LJ optimization for clusters with <= half LJ
-    bool useHalfLJOptimization = false;
     //! The pairlist and interaction cut-off
     real pairlistCutoff = 1.0;
-    //! Whether to compute energies (shift forces for virial are always computed on CPU)
-    bool computeVirialAndEnergy = false;
     //! The Coulomb interaction function
     CoulombType coulombType = CoulombType::Pme;
     //! Whether to use tabulated PME grid correction instead of analytical, not applicable with simd=no
     bool useTabulatedEwaldCorr = false;
     //! The number of iterations for each kernel
     int numIterations = 100;
-    //! Print cycles/pair instead of pairs/cycle
-    bool cyclesPerPair = false;
     //! The time step
     real timestep = 0.001;
 };
index 610571b1a4176a81b0dbc0588aeefba8955b1acd..42a44a1e5ad77bc89986f25386e219fb170a8c3f 100644 (file)
 #
 
 set(argon "argon-forces-integration")
-add_executable(${argon} "")
-
-target_sources(${argon}
-        PRIVATE
-        argon-forces-integration.cpp
-        )
+add_executable(${argon} argon-forces-integration.cpp)
 
 target_link_libraries(${argon} PRIVATE nblib)
 
 set(methane "methane-water-integration")
-add_executable(${methane} "")
-
-target_sources(${methane}
-        PRIVATE
-        methane-water-integration.cpp
-        )
+add_executable(${methane} methane-water-integration.cpp)
 
 target_link_libraries(${methane} PRIVATE nblib)
 
index 75416ea5df2a53a71950168cace5b1952346077d..47895d33daaba41005dd2751d2c0207676ab2cd9 100644 (file)
@@ -50,9 +50,6 @@
 // can be included via their respective headers.
 #include "nblib/nblib.h"
 
-// Main function to write the MD program.
-int main(); // Keep the compiler happy
-
 int main()
 {
     // Create an argon particle with a name and a mass.
index 127433d232f245d51194e76a69ab27ddcd92c5bd..a5a02c325d05dd93bd26deb46e6de22d9e075023 100644 (file)
@@ -52,9 +52,6 @@
 
 using namespace nblib;
 
-// Main function to write the MD program.
-int main(); // Keep the compiler happy
-
 int main()
 {
     // Create the particles
index 3e8d73e1162c11103ac18df78c8b6faddbfefc8a..08ac421eafb9042526c14abac649baa191943465 100644 (file)
@@ -64,9 +64,7 @@ namespace
 using ::testing::Eq;
 using ::testing::Pointwise;
 
-//! Compares all element between two lists of lists
-//! Todo: unify this with the identical function in nbkernelsystem test make this a method
-//!       of ListOfLists<>
+//! \brief Compares all element between two lists of lists
 template<typename T>
 void compareLists(const gmx::ListOfLists<T>& list, const std::vector<std::vector<T>>& v)
 {
@@ -354,8 +352,6 @@ TEST(NBlibTest, TopologyListedInteractions)
 
 TEST(NBlibTest, TopologyListedInteractionsMultipleTypes)
 {
-    // Todo: add an angle type here
-
     Molecule water    = WaterMoleculeBuilder{}.waterMolecule();
     Molecule methanol = MethanolMoleculeBuilder{}.methanolMolecule();
 
index 933dc5a31739aa0f6c74e0a08d1578759cf6ddd0..fe58e0af7aa817e0bdb4f7c396fa6beed774d6c1 100644 (file)
@@ -47,6 +47,8 @@ target_sources(nblib
 if(GMX_INSTALL_NBLIB_API)
     install(FILES
             setup.h
+            traits.hpp
+            util.hpp
             DESTINATION include/nblib/util)
 endif()
 
index d77c219f0c24dc0e76178e4566ab2b823e4109d6..d736ccca328d5f1738dcf12b4da21790ba5acbf1 100644 (file)
@@ -292,9 +292,9 @@ struct Contains
 
 /*! \brief implementation of the Contains trait to look for T in TL
  *
- * @tparam T   type to look for in TL
- * @tparam TL  a variadic type, such as std::tuple or TypeList
- * @tparam Ts  the template parameters of TL
+ * \tparam T   type to look for in TL
+ * \tparam TL  a variadic type, such as std::tuple or TypeList
+ * \tparam Ts  the template parameters of TL
  *
  * Note that this clang-format enforced formatting is unfortunate, it should be:
  * struct Contains<T, TL<Ts...>> : std::bool_constant<FindIndex<T, TL<Ts...>>{} < sizeof...(Ts)>