Update Colvars to version 2020-09-17

Small changes

Implement global map of components (@HanatoK)
https://github.com/Colvars/colvars/pull/363

Format code examples with colored background (@giacomofiorin)
https://github.com/Colvars/colvars/pull/361

replaced jacobi() with an open-source version (@jewettaij)
https://github.com/Colvars/colvars/pull/360
This commit is contained in:
Giacomo Fiorin
2020-09-18 16:54:32 -04:00
parent 34ba8ec83c
commit 7deb773440
10 changed files with 405 additions and 276 deletions

View File

@ -12,6 +12,11 @@
#include <iostream>
#if (__cplusplus >= 201103L)
#include <map>
#include <functional>
#endif
#include "colvarmodule.h"
#include "colvarvalue.h"
#include "colvarparse.h"
@ -114,6 +119,7 @@ public:
/// List of biases that depend on this colvar
std::vector<colvarbias *> biases;
protected:
@ -605,6 +611,14 @@ public:
// components that do not handle any atoms directly
class map_total;
/// getter of the global cvc map
#if (__cplusplus >= 201103L)
/// A global mapping of cvc names to the cvc constructors
static const std::map<std::string, std::function<colvar::cvc* (const std::string& subcv_conf)>>& get_global_cvc_map() {
return global_cvc_map;
}
#endif
protected:
/// \brief Array of \link colvar::cvc \endlink objects
@ -639,6 +653,11 @@ protected:
double dev_null;
#endif
#if (__cplusplus >= 201103L)
/// A global mapping of cvc names to the cvc constructors
static std::map<std::string, std::function<colvar::cvc* (const std::string& subcv_conf)>> global_cvc_map;
#endif
public:
/// \brief Sorted array of (zero-based) IDs for all atoms involved