Loading...
Searching...
No Matches
PLMD Namespace Reference

Namespaces

namespace  adjmat
 
namespace  bias
 
namespace  blas
 
namespace  cltools
 
namespace  clusters
 
namespace  colvar
 
namespace  config
 
namespace  contour
 
namespace  crystdistrib
 
namespace  dimred
 
namespace  drr
 
namespace  eds
 
namespace  enum_traits
 
namespace  envsim
 
namespace  fisst
 
namespace  fourier
 
namespace  function
 
namespace  funnel
 
namespace  gch
 
namespace  generic
 
namespace  gridtools
 
namespace  h36
 Tiny namespace for hybrid36 format.
 
namespace  helpers
 
namespace  isdb
 
namespace  landmarks
 
namespace  lapack
 
namespace  lepton
 
namespace  liquid_crystal
 
namespace  logmfd
 
namespace  mapping
 
namespace  matrixtools
 
namespace  maze
 
namespace  membranefusion
 
namespace  mergeVectorTools
 
namespace  metatomic
 
namespace  molfile
 
namespace  multicolvar
 
namespace  OpenACC
 
namespace  OpenMP
 
namespace  opes
 
namespace  pamm
 
namespace  piv
 
namespace  refdist
 
namespace  s2cm
 
namespace  sasa
 
namespace  secondarystructure
 
namespace  setup
 
namespace  sizeshape
 
namespace  sprint
 
namespace  switchContainers
 
namespace  symfunc
 
namespace  valtools
 
namespace  vatom
 
namespace  Versors
 
namespace  ves
 
namespace  volumes
 
namespace  wham
 
namespace  xdrfile
 

Classes

class  Accelerator
 
class  Action
 Base class for all the input Actions. More...
 
class  ActionAnyorder
 Action used to create a PLMD::Action that can go both before and after ActionSetup actions. More...
 
class  ActionAtomistic
 Action used to create objects that access the positions of the atoms from the MD code. More...
 
class  ActionForInterface
 
class  ActionOptions
 This class is used to bring the relevant information to the Action constructor. More...
 
class  ActionPilot
 This is used to create PLMD::Action objects that are run with some set frequency. More...
 
class  ActionRegister
 Register holding all the allowed keywords. More...
 
struct  ActionRegisterPointers
 
class  ActionRegistration
 Each instance of this specialized class represents an action that can be called with the specified directive. More...
 
class  ActionSet
 std::vector containing the sequence of Action to be done. More...
 
class  ActionSetup
 Action used to create a PLMD::Action that do something during setup only e.g. More...
 
class  ActionShortcut
 Action used to create a command that expands to multiple PLMD::Action commands when read in during input. More...
 
class  ActionToGetData
 Provides the keyword GET More...
 
class  ActionToPutData
 Provides the keyword PUT More...
 
class  ActionWithArguments
 
class  ActionWithMatrix
 
class  ActionWithValue
 Used to create a PLMD::Action that has some scalar or vectorial output that may or may not have some derivatives. More...
 
class  ActionWithVector
 
class  ActionWithVirtualAtom
 Inherit from here if you are calculating the position of a virtual atom (eg a center of mass) More...
 
class  Angle
 Class to compute angles. More...
 
struct  ArgumentBookeepingHolder
 
struct  ArgumentsBookkeeping
 
struct  AtomDistribution
 tested in regtest/tools/rt-make-AtomicDistribution Acts as a template for any distribution More...
 
class  AtomNumber
 Simple class to store the index of an atom. More...
 
class  BiasRepresentation
 this class implements a general purpose class that aims to provide a Grid/list transparently add gaussians to a bias More...
 
class  BiasWeight
 
class  Brent1DRootSearch
 A class for doing parabolic interpolation and minimisation of 1D functions using Brent's method. More...
 
class  CheckInRange
 
class  Citations
 Class taking care of bibliography. More...
 
class  CLTool
 This is the abstract base class to use for implementing new command line tool, within it there is information as to how to go about implemneting a new tool. More...
 
class  CLToolMain
 Class providing cmd() access to command line tools. More...
 
class  CLToolOptions
 
class  CLToolRegister
 Same as ActionRegister, but for CLTools. More...
 
struct  CLToolRegisterPointers
 
class  Colvar
 This is the abstract base class to use for implementing new collective variables, within it there is information as to how to go about implementing a new CV. More...
 
class  ColvarOutput
 
class  Communicator
 Class containing wrappers to MPI. More...
 
class  ConjugateGradient
 
class  DataPassingObject
 
class  DataPassingObjectTyped
 
class  DataPassingTools
 
class  DataPassingToolsTyped
 
class  DLLoader
 Class taking care of dynamic loading. More...
 
class  DomainDecomposition
 
class  ERMSD
 A class that implements ERMSD calculations. More...
 
class  Exception
 Class to deal with Plumed runtime errors. More...
 
class  ExceptionDebug
 Class representing a debug error (can only be thrown when using debug options) More...
 
class  ExceptionError
 Class representing a generic error. More...
 
class  ExceptionRegisterError
 Class representing an error in a register. More...
 
class  ExceptionTypeError
 Class representing a type error in the PLMD::Plumed interface. More...
 
class  ExchangePatterns
 
class  F1dim
 
class  FileBase
 Base class for dealing with files. More...
 
struct  fileDeleter
 
class  fileParser
 
class  fileTraj
 atomic distribution from a trajectory file More...
 
class  FlexibleBin
 
struct  ForceIndexHolder
 
class  ForceInput
 
struct  ForceOutput
 
class  ForwardDecl
 Utility class for forward declaration of references. More...
 
class  GenericMolInfo
 
class  GREX
 
class  Grid
 
class  GridBase
 
class  Group
 Provides the keyword GROUP More...
 
class  HistogramBead
 A class for calculating whether or not values are within a given range using : \( \sum_i \int_a^b G( s_i, \sigma*(b-a) ) \). More...
 
class  IFile
 Class for input files. More...
 
class  KernelFunctions
 
class  Keywords
 This class holds the keywords and their documentation. More...
 
class  LatticeReduction
 Class implementing algorithms for lattice reduction. More...
 
class  LeptonCall
 
class  LinkCells
 A class for doing link cells. More...
 
class  Log
 Class containing the log stream. More...
 
class  LoopUnroller
 Utiliy class for loop unrolling. More...
 
class  Matrix
 This class stores a full matrix and allows one to do some simple matrix operations. More...
 
class  MatrixElementOutput
 
class  MatrixSquareBracketsAccess
 Utility class to add [][] access. More...
 
class  Minimise1DBrent
 A class for doing parabolic interpolation and minimisation of 1D functions using Brent's method. More...
 
class  MinimiseBase
 
class  MolDataClass
 This class provides information on various kinds of molecules for instance the kinds of residues that are in a protein the atoms involved in the backbone of a particular residue etc. More...
 
class  MPI_Comm
 Surrogate of MPI_Comm when MPI library is not available. More...
 
class  MPI_Datatype
 Surrogate of MPI_Datatype when MPI library is not available. More...
 
class  MPI_Request
 Surrogate of MPI_Request when MPI library is not available. More...
 
class  MPI_Status
 Surrogate of MPI_Status when MPI library is not available. More...
 
class  NeighborList
 A class that implements neighbor lists from two lists or a single list of atoms. More...
 
class  OFile
 Class for output files. More...
 
struct  ParallelActionsInput
 
struct  ParallelActionsOutput
 
class  ParallelTaskManager
 
class  Pbc
 
class  PbcAction
 Provides the keyword PBC More...
 
class  PDB
 Minimalistic pdb parser. More...
 
class  PlumedHandle
 Tiny local class to load a PLUMED kernel. More...
 
class  PlumedMain
 Main plumed object. More...
 
class  ProbWeight
 
class  Random
 
class  Register
 Base class, with type independent information. More...
 
class  RegisterBase
 General register. More...
 
class  repliedTrajectory
 a decorator for replicate the atomic distribution More...
 
class  RequiredMatrixElements
 
class  RequiredMatrixElementsUpdater
 
class  RMSD
 A class that implements RMSD calculations This is a class that implements the various infrastructure to calculate the RMSD or MSD respect a given frame. More...
 
class  RMSDCoreData
 this is a class which is needed to share information across the various non-threadsafe routines so that the public function of rmsd are threadsafe while the inner core can safely share information More...
 
class  RootFindingBase
 
class  SparseGrid
 
class  Stopwatch
 
class  Subprocess
 Class managing a subprocess. More...
 
class  SubprocessPid
 Small utility class, used to avoid inclusion of unistd.h> in a header file. More...
 
class  SwitchingFunction
 Small class to compute switching functions. More...
 
class  SwitchingFunctionAccelerable
 Small class to compute switching functions. More...
 
class  TargetDist
 
struct  TensorGenericAux
 Small class to contain local utilities. More...
 
class  TensorTyped
 Class implementing fixed size matrices of doubles. More...
 
struct  theLine
 A wiggly line of atoms. More...
 
struct  tiledSimpleCubic
 
class  TokenizedLine
 This class abstracts the input line in tokens. More...
 
class  Tools
 Empty class which just contains several (static) tools. More...
 
class  Torsion
 Class to compute torsional angles. More...
 
class  TrajectoryParser
 
class  Tree
 
struct  twoGlobs
 Atom randomly distribuited between two not overlapping a spheres. More...
 
class  TypesafePtr
 Class to deal with propoagation of typesafe pointers. More...
 
struct  uniformCube
 
struct  uniformSphere
 Atom randomly distribuited in a sphere. More...
 
class  UniformSphericalVector
 
class  Units
 Small utility class that contains information about units. More...
 
class  Value
 A class for holding the value of a function together with its derivatives. More...
 
class  VectorTyped
 Class implementing fixed size vectors of doubles. More...
 
class  View
 A not-owning view for generic data. More...
 
class  View2D
 A not-owning view for accessing array witha 2D interface. More...
 
class  WeightBase
 
class  WithCmd
 Base for classes with cmd() method. More...
 

Typedefs

template<std::size_t N = helpers::dynamic_extent, std::size_t STRIDE = 3>
using mdMemoryView = View2D<double,N,STRIDE>
 
template<std::size_t N = 3>
using MemoryView = View<double,N>
 
typedef Tensor3d Tensor
 
typedef TensorGeneric< 1, 1 > Tensor1d
 
typedef TensorTyped< float, 1, 1 > Tensor1f
 
typedef TensorGeneric< 2, 2 > Tensor2d
 
typedef TensorTyped< float, 2, 2 > Tensor2f
 
typedef TensorGeneric< 3, 3 > Tensor3d
 
typedef TensorTyped< float, 3, 3 > Tensor3f
 
typedef TensorGeneric< 4, 4 > Tensor4d
 
typedef TensorTyped< float, 4, 4 > Tensor4f
 
typedef TensorGeneric< 5, 5 > Tensor5d
 
typedef TensorTyped< float, 5, 5 > Tensor5f
 
template<unsigned n, unsigned m>
using TensorGeneric = TensorTyped<double,n,m>
 
template<typename T>
using TensorT = TensorTyped<T,3,3>
 Alias for three by three Tensor of any type:
 
using unique_FILE = std::unique_ptr<FILE,fileDeleter>
 
typedef Vector3d Vector
 Alias for three dimensional vectors.
 
typedef VectorGeneric< 1 > Vector1d
 Alias for one dimensional vectors.
 
typedef VectorTyped< float, 1 > Vector1f
 Alias for one dimensional vectors.
 
typedef VectorGeneric< 2 > Vector2d
 Alias for two dimensional vectors.
 
typedef VectorTyped< float, 2 > Vector2f
 Alias for two dimensional vectors.
 
typedef VectorGeneric< 3 > Vector3d
 Alias for three dimensional vectors.
 
typedef VectorTyped< float, 3 > Vector3f
 Alias for three dimensional vectors.
 
typedef VectorGeneric< 4 > Vector4d
 Alias for four dimensional vectors.
 
typedef VectorTyped< float, 4 > Vector4f
 Alias for four dimensional vectors.
 
typedef VectorGeneric< 5 > Vector5d
 Alias for five dimensional vectors.
 
typedef VectorTyped< float, 5 > Vector5f
 Alias for five dimensional vectors.
 
template<unsigned n>
using VectorGeneric = VectorTyped<double, n>
 
template<typename T>
using VectorT = VectorTyped<T,3>
 Alias for three dimensional vectors of any type:
 
using VectorView = mdMemoryView<helpers::dynamic_extent, 3>
 

Functions

ActionRegisteractionRegister ()
 
ActionRegisteractionRegister ()
 Function returning a reference to the ActionRegister.
 
template<typename T>
void chol_elsolve (const Matrix< T > &M, const std::vector< T > &b, std::vector< T > &y)
 
template<typename T>
void cholesky (const Matrix< T > &A, Matrix< T > &B)
 
CLToolRegistercltoolRegister ()
 
CLToolRegistercltoolRegister ()
 Function returning a reference to the CLToolRegister.
 
template<typename T>
constexpr VectorTyped< T, 3 > crossProduct (const VectorTyped< T, 3 > &v1, const VectorTyped< T, 3 > &v2)
 
template<typename T>
constexpr TensorTyped< T, 3, 3 > dcrossDv1 (const VectorTyped< T, 3 > &v1, const VectorTyped< T, 3 > &v2)
 
template<typename T>
constexpr TensorTyped< T, 3, 3 > dcrossDv2 (const VectorTyped< T, 3 > &v1, const VectorTyped< T, 3 > &v2)
 
template<typename T, unsigned n>
constexpr VectorTyped< T, n > delta (const VectorTyped< T, n > &v1, const VectorTyped< T, n > &v2)
 
template<typename T>
VectorTyped< std::remove_const_t< T >, 3 > delta (const View< T, 3 > v1, const View< T, 3 > v2) noexcept
 
template<typename T>
TensorTyped< T, 3, 3 > deriNorm (const VectorTyped< T, 3 > &v1, const TensorTyped< T, 3, 3 > &v2)
 
template<typename T>
constexpr T determinant (const TensorTyped< T, 3, 3 > &t)
 
template<typename T>
int diagMat (const Matrix< T > &A, std::vector< T > &eigenvals, Matrix< T > &eigenvecs)
 
template<typename precision, unsigned n, unsigned m>
void diagMatSym (const TensorTyped< precision, n, n > &mat, VectorTyped< precision, m > &evals, TensorTyped< precision, m, n > &evec)
 Diagonalize tensor.
 
template<typename T, unsigned n, unsigned m>
void diagMatSym (const TensorTyped< T, n, n > &, VectorTyped< T, m > &evals, TensorTyped< T, m, n > &evec)
 Diagonalize tensor.
 
template<typename T>
dotProduct (const std::vector< T > &A, const std::vector< T > &B)
 Calculate the dot product between two vectors.
 
template<typename T, unsigned n>
constexpr T dotProduct (const VectorTyped< T, n > &v1, const VectorTyped< T, n > &v2)
 
constexpr double dp2cutoff (6.25)
 
static bool dp2cutoffNoStretch ()
 
constexpr double epsilon (std::numeric_limits< double >::epsilon())
 Very small non-zero number.
 
template<typename T, unsigned n, unsigned m>
constexpr TensorTyped< T, n, m > extProduct (const VectorTyped< T, n > &v1, const VectorTyped< T, m > &v2)
 returns the transpose of a tensor (same as TensorGeneric(const VectorGeneric&,const VectorGeneric&))
 
template<typename T, unsigned n, unsigned m>
frobeniusNorm (const TensorTyped< T, m, n > &t)
 Compute the Frobenius norm 2.
 
const std::map< std::string, std::string > & getModuleMap ()
 
template<typename T>
static void getPointer (const TypesafePtr &p, const std::vector< std::size_t > &shape, const unsigned &start, const unsigned &stride, T *&pp)
 
void getWords_replicas (gch::small_vector< std::string_view > &words, std::string_view line, const std::string_view separators)
 
bool indexed_lt (std::pair< Grid::index_t, double > const &x, std::pair< Grid::index_t, double > const &y)
 
template<typename T>
constexpr TensorTyped< T, 3, 3 > inverse (const TensorTyped< T, 3, 3 > &t)
 
template<typename T>
int Invert (const Matrix< T > &A, Matrix< T > &inverse)
 
static bool isZero (const ExpressionTreeNode &node)
 
constexpr double kBoltzmann (0.0083144621)
 Boltzman constant in kj/K.
 
template<typename T>
int logdet (const Matrix< T > &M, T &ldet)
 
template<typename T, unsigned n>
lowestEigenpairSym (const TensorTyped< T, n, n > &K, VectorTyped< T, n > &eigenvector, unsigned niter=24)
 Compute lowest eigenvalue and eigenvector, using a branchless iterative implementation.
 
template<typename CT>
constexpr View< const typename CT::value_type > make_const_view (const CT &container)
 Returns a complete constant dynamic view of a container.
 
template<typename T>
View< T > make_view (const std::vector< T > &d)
 
template<typename CT>
constexpr View< typename CT::value_type > make_view (CT &container)
 Returns a complete dynamic view of a container.
 
template<typename IT>
auto mapCreator (IT k, IT const end)
 
template<typename T, unsigned n, unsigned m, unsigned l>
constexpr TensorTyped< T, n, l > matmul (const TensorTyped< T, n, m > &a, const TensorTyped< T, m, l > &b)
 matrix-matrix multiplication
 
template<typename T, unsigned n, unsigned m, unsigned l, unsigned i>
constexpr TensorTyped< T, n, i > matmul (const TensorTyped< T, n, m > &a, const TensorTyped< T, m, l > &b, const TensorTyped< T, l, i > &c)
 matrix-matrix-matrix multiplication
 
template<typename T, unsigned n, unsigned m, unsigned l>
constexpr VectorTyped< T, n > matmul (const TensorTyped< T, n, m > &a, const TensorTyped< T, m, l > &b, const VectorTyped< T, l > &c)
 matrix-matrix-vector multiplication
 
template<typename T, typename TT, unsigned n, unsigned m>
constexpr VectorTyped< T, n > matmul (const TensorTyped< T, n, m > &a, const VectorTyped< TT, m > &b)
 matrix-vector multiplicationi, the first argument determines the type of the result
 
template<typename T, typename TT, unsigned n, unsigned m>
constexpr VectorTyped< T, n > matmul (const VectorTyped< T, m > &a, const TensorTyped< TT, m, n > &b)
 vector-matrix multiplication, the first argument determines the type of the result
 
template<typename T, unsigned n, unsigned m, unsigned l>
constexpr VectorTyped< T, l > matmul (const VectorTyped< T, n > &a, const TensorTyped< T, n, m > &b, const TensorTyped< T, m, l > &c)
 vector-matrix-matrix multiplication
 
template<typename T, unsigned n, unsigned m>
constexpr T matmul (const VectorTyped< T, n > &a, const TensorTyped< T, n, m > &b, const VectorTyped< T, m > &c)
 vector-matrix-vector multiplication
 
template<typename T, unsigned n_>
constexpr T matmul (const VectorTyped< T, n_ > &a, const VectorTyped< T, n_ > &b)
 vector-vector multiplication (maps to dotProduct)
 
template<typename T>
void matrixOut (Log &ostr, const Matrix< T > &mat)
 
constexpr int max_cell (int celn, const int ncells, const bool usePBC)
 
constexpr int min_cell (int celn, const int ncells, const bool usePBC)
 
template<typename T, unsigned n>
constexpr T modulo (const VectorTyped< T, n > &v)
 
template<typename T, unsigned n>
constexpr T modulo2 (const VectorTyped< T, n > &v)
 
template<typename T>
void mult (const Matrix< T > &A, const Matrix< T > &B, Matrix< T > &C)
 
template<typename T>
void mult (const Matrix< T > &A, const std::vector< T > &B, std::vector< T > &C)
 
template<typename T>
void mult (const std::vector< T > &A, const Matrix< T > &B, std::vector< T > &C)
 
template<typename T>
norm (const std::vector< T > &A)
 Calculate the dot product between a vector and itself.
 
bool operator!= (const AtomNumber &a, const AtomNumber &b)
 
template<typename enumtype>
constexpr std::enable_if_t< enum_traits::BitmaskEnum< enumtype >::has_bit_and, enumtype > operator& (enumtype a, enumtype b)
 Perform a bitwise AND between two enum values.
 
template<typename T, typename J, unsigned n, unsigned m>
constexpr TensorTyped< T, n, m > operator* (const TensorTyped< T, n, m > &t1, J s)
 
template<typename T, typename J, unsigned n, unsigned m>
constexpr TensorTyped< T, n, m > operator* (J s, const TensorTyped< T, n, m > &t1)
 
template<typename T, typename J, unsigned n>
constexpr VectorTyped< T, n > operator* (J s, VectorTyped< T, n >v)
 
template<typename T>
Matrix< T > operator* (T &v, const Matrix< T > &m)
 Multiply matrix by scalar.
 
template<typename T, typename J, unsigned n>
constexpr VectorTyped< T, n > operator* (VectorTyped< T, n > v, J s)
 
template<typename T, unsigned n, unsigned m>
constexpr TensorTyped< T, n, m > operator+ (const TensorTyped< T, n, m > &t1, const TensorTyped< T, n, m > &t2)
 
template<typename T, unsigned n>
constexpr VectorTyped< T, n > operator+ (const VectorTyped< T, n > &v1, const VectorTyped< T, n > &v2)
 
template<typename T, unsigned n, unsigned m>
constexpr TensorTyped< T, n, m > operator- (const TensorTyped< T, n, m > &t1, const TensorTyped< T, n, m > &t2)
 
template<typename T, unsigned n>
constexpr VectorTyped< T, n > operator- (VectorTyped< T, n >v1, const VectorTyped< T, n > &v2)
 
template<typename T, typename J, unsigned n, unsigned m>
constexpr TensorTyped< T, n, m > operator/ (const TensorTyped< T, n, m > &t1, J s)
 
template<typename T, typename J, unsigned n>
constexpr VectorTyped< T, n > operator/ (const VectorTyped< T, n > &v, J s)
 
bool operator< (const AtomNumber &a, const AtomNumber &b)
 
template<typename T>
Logoperator<< (Log &ostr, const Matrix< T > &mat)
 
Logoperator<< (Log &ostr, const PDB &pdb)
 
template<class T>
OFileoperator<< (OFile &of, const T &t)
 Write using << syntax.
 
std::ostream & operator<< (std::ostream &log, const Citations &cit)
 
std::ostream & operator<< (std::ostream &log, const Register &reg)
 
std::ostream & operator<< (std::ostream &os, const Stopwatch &sw)
 
template<typename T, unsigned n, unsigned m>
std::ostream & operator<< (std::ostream &os, const TensorTyped< T, n, m > &t)
 
template<typename T, unsigned n>
std::ostream & operator<< (std::ostream &os, const VectorTyped< T, n > &v)
 
template<class T>
Subprocessoperator<< (Subprocess &ep, const T &t)
 
bool operator<= (const AtomNumber &a, const AtomNumber &b)
 
bool operator== (const AtomNumber &a, const AtomNumber &b)
 
bool operator> (const AtomNumber &a, const AtomNumber &b)
 
bool operator>= (const AtomNumber &a, const AtomNumber &b)
 
template<typename enumtype>
constexpr std::enable_if_t< enum_traits::BitmaskEnum< enumtype >::has_bit_or, enumtype > operator| (enumtype a, enumtype b)
 Perform a bitwise OR between two enum values.
 
constexpr double pi (3.141592653589793238462643383279502884197169399375105820974944592307)
 PI.
 
template<typename T>
int pseudoInvert (const Matrix< T > &A, Matrix< T > &pseudoinverse)
 
auto render (const TokenizedLine::line &l)
 
Keywords::argType stoat (std::string_view str)
 Converts a string to the corresponding Keywords::argType.
 
Keywords::componentType stoct (std::string_view str)
 Converts a string to the corresponding Keywords::componentType.
 
static const std::string & StopwatchEmptyString () noexcept
 Return an empty string.
 
static bool SubprocessPidGetenvSignals () noexcept
 Retrieve PLUMED_ENABLE_SIGNALS.
 
template<typename T, typename TT, unsigned n>
constexpr VectorTyped< T, n > sumT (const VectorTyped< T, n > &v1, const VectorTyped< TT, n > &v2)
 
static void testThrow (const char *what)
 Small utility just used in this file to throw arbitrary exceptions.
 
std::string toString (Keywords::argType at)
 
std::string toString (Keywords::componentType at)
 
template<typename T>
void transpose (const Matrix< T > &A, Matrix< T > &AT)
 
template<typename T, unsigned n, unsigned m>
constexpr TensorTyped< T, n, m > transpose (const TensorTyped< T, m, n > &t)
 returns the transpose of a tensor (same as TensorGeneric::transpose())
 
template<class T>
std::size_t typesafePtrSizeof ()
 
template<>
std::size_t typesafePtrSizeof< const void > ()
 
template<>
std::size_t typesafePtrSizeof< void > ()
 
static bool typesafePtrSkipCheck ()
 
template<typename enumtype>
constexpr std::enable_if_t< enum_traits::BitmaskEnum< enumtype >::has_valid, bool > valid (enumtype a)
 Test if an enum value is valid.
 
template<typename T>
TensorTyped< T, 3, 3 > VcrossTensor (const TensorTyped< T, 3, 3 > &v2, const VectorTyped< T, 3 > &v1)
 
template<typename T>
TensorTyped< T, 3, 3 > VcrossTensor (const VectorTyped< T, 3 > &v1, const TensorTyped< T, 3, 3 > &v2)
 
TokenizedLine::line wholeLineReplicas (const std::string &myLine)
 

Variables

static const Tools::FastStringUnorderedMap< std::string > doi_map
 
constexpr double DP2CUTOFF =6.25
 
constexpr double dp2cutoffA =1.00193418799744762399
 
constexpr double dp2cutoffB =-.00193418799744762399
 
const double epsilon =1e-14
 
constexpr double halfpi =PLMD::pi*0.5
 PI / 2.
 
template<typename T>
constexpr bool isActionType = std::is_base_of<Action, T>::value
 
constexpr double twopi =PLMD::pi*2.0
 PI * 2.
 

Typedef Documentation

◆ mdMemoryView

template<std::size_t N = helpers::dynamic_extent, std::size_t STRIDE = 3>
using PLMD::mdMemoryView = View2D<double,N,STRIDE>

◆ MemoryView

template<std::size_t N = 3>
using PLMD::MemoryView = View<double,N>

◆ TensorGeneric

template<unsigned n, unsigned m>
using PLMD::TensorGeneric = TensorTyped<double,n,m>

◆ unique_FILE

using PLMD::unique_FILE = std::unique_ptr<FILE,fileDeleter>

◆ VectorGeneric

template<unsigned n>
using PLMD::VectorGeneric = VectorTyped<double, n>

◆ VectorView

Function Documentation

◆ actionRegister() [1/2]

ActionRegister & PLMD::actionRegister ( )
related

◆ chol_elsolve()

template<typename T>
void PLMD::chol_elsolve ( const Matrix< T > & M,
const std::vector< T > & b,
std::vector< T > & y )

◆ cholesky()

template<typename T>
void PLMD::cholesky ( const Matrix< T > & A,
Matrix< T > & B )

◆ cltoolRegister() [1/2]

CLToolRegister & PLMD::cltoolRegister ( )
related

◆ crossProduct()

template<typename T>
VectorTyped< T, 3 > PLMD::crossProduct ( const VectorTyped< T, 3 > & v1,
const VectorTyped< T, 3 > & v2 )
inlineconstexpr

◆ dcrossDv1()

template<typename T>
TensorTyped< T, 3, 3 > PLMD::dcrossDv1 ( const VectorTyped< T, 3 > & v1,
const VectorTyped< T, 3 > & v2 )
inlineconstexpr

◆ dcrossDv2()

template<typename T>
TensorTyped< T, 3, 3 > PLMD::dcrossDv2 ( const VectorTyped< T, 3 > & v1,
const VectorTyped< T, 3 > & v2 )
inlineconstexpr

◆ delta() [1/2]

template<typename T, unsigned n>
VectorTyped< T, n > PLMD::delta ( const VectorTyped< T, n > & v1,
const VectorTyped< T, n > & v2 )
constexpr

◆ delta() [2/2]

template<typename T>
VectorTyped< std::remove_const_t< T >, 3 > PLMD::delta ( const View< T, 3 > v1,
const View< T, 3 > v2 )
noexcept

◆ deriNorm()

template<typename T>
TensorTyped< T, 3, 3 > PLMD::deriNorm ( const VectorTyped< T, 3 > & v1,
const TensorTyped< T, 3, 3 > & v2 )
inline

◆ determinant()

template<typename T>
T PLMD::determinant ( const TensorTyped< T, 3, 3 > & t)
inlineconstexpr

◆ diagMat()

template<typename T>
int PLMD::diagMat ( const Matrix< T > & A,
std::vector< T > & eigenvals,
Matrix< T > & eigenvecs )

◆ diagMatSym() [1/2]

template<typename precision, unsigned n, unsigned m>
void PLMD::diagMatSym ( const TensorTyped< precision, n, n > & mat,
VectorTyped< precision, m > & evals,
TensorTyped< precision, m, n > & evec )

Diagonalize tensor.

Syntax is the same as Matrix::diagMat. In addition, it is possible to call if with m_ smaller than n_. In this case, only the first (smaller) m_ eigenvalues and eigenvectors are retrieved. If case lapack fails (info!=0) it throws an exception. Notice that tensor is assumed to be symmetric!!!

◆ diagMatSym() [2/2]

template<typename T, unsigned n, unsigned m>
void PLMD::diagMatSym ( const TensorTyped< T, n, n > & ,
VectorTyped< T, m > & evals,
TensorTyped< T, m, n > & evec )

Diagonalize tensor.

Syntax is the same as Matrix::diagMat. In addition, it is possible to call if with m smaller than n. In this case, only the first (smaller) m eigenvalues and eigenvectors are retrieved. If case lapack fails (info!=0) it throws an exception. Notice that tensor is assumed to be symmetric!!!

◆ dotProduct() [1/2]

template<typename T>
T PLMD::dotProduct ( const std::vector< T > & A,
const std::vector< T > & B )

Calculate the dot product between two vectors.

◆ dotProduct() [2/2]

template<typename T, unsigned n>
T PLMD::dotProduct ( const VectorTyped< T, n > & v1,
const VectorTyped< T, n > & v2 )
constexpr

◆ dp2cutoff()

double PLMD::dp2cutoff ( 6. 25)
constexpr

◆ dp2cutoffNoStretch()

static bool PLMD::dp2cutoffNoStretch ( )
inlinestatic

◆ extProduct()

template<typename T, unsigned n, unsigned m>
TensorTyped< T, n, m > PLMD::extProduct ( const VectorTyped< T, n > & v1,
const VectorTyped< T, m > & v2 )
constexpr

returns the transpose of a tensor (same as TensorGeneric(const VectorGeneric&,const VectorGeneric&))

◆ frobeniusNorm()

template<typename T, unsigned n, unsigned m>
T PLMD::frobeniusNorm ( const TensorTyped< T, m, n > & t)

Compute the Frobenius norm 2.

◆ getModuleMap()

const std::map< std::string, std::string > & PLMD::getModuleMap ( )

◆ getPointer()

template<typename T>
static void PLMD::getPointer ( const TypesafePtr & p,
const std::vector< std::size_t > & shape,
const unsigned & start,
const unsigned & stride,
T *& pp )
static

◆ getWords_replicas()

void PLMD::getWords_replicas ( gch::small_vector< std::string_view > & words,
std::string_view line,
const std::string_view separators )

◆ indexed_lt()

bool PLMD::indexed_lt ( std::pair< Grid::index_t, double > const & x,
std::pair< Grid::index_t, double > const & y )

◆ inverse()

template<typename T>
TensorTyped< T, 3, 3 > PLMD::inverse ( const TensorTyped< T, 3, 3 > & t)
inlineconstexpr

◆ Invert()

template<typename T>
int PLMD::Invert ( const Matrix< T > & A,
Matrix< T > & inverse )

◆ isZero()

static bool PLMD::isZero ( const ExpressionTreeNode & node)
static

◆ logdet()

template<typename T>
int PLMD::logdet ( const Matrix< T > & M,
T & ldet )

◆ lowestEigenpairSym()

template<typename T, unsigned n>
T PLMD::lowestEigenpairSym ( const TensorTyped< T, n, n > & K,
VectorTyped< T, n > & eigenvector,
unsigned niter = 24 )

Compute lowest eigenvalue and eigenvector, using a branchless iterative implementation.

This function is amenable for running on openACC. The accuracy could be controlled increasing the number of iterations. The default value (24) seems sufficient for most applications. In principle, it could be extended to compute m eigenvalues by:

  • computing the lowest
  • compute the proper projector and reduce the matrix to <n-1,n-1>
  • proceed iteratively The interface should then be likely the same as diagMatSym

◆ make_const_view()

template<typename CT>
View< const typename CT::value_type > PLMD::make_const_view ( const CT & container)
constexpr

Returns a complete constant dynamic view of a container.

The container must have defined the methods data() and size() Also the container must have defined a public type value_type For example a std::vector is compatible

◆ make_view() [1/2]

template<typename T>
View< T > PLMD::make_view ( const std::vector< T > & d)

◆ make_view() [2/2]

template<typename CT>
View< typename CT::value_type > PLMD::make_view ( CT & container)
constexpr

Returns a complete dynamic view of a container.

The container must have defined the methods data() and size() Also the container must have defined a public type value_type For example a std::vector is compatible A const std::vector is not compatible with this signature, to avoid confusion

◆ mapCreator()

template<typename IT>
auto PLMD::mapCreator ( IT k,
IT const end )

◆ matmul() [1/8]

template<typename T, unsigned n, unsigned m, unsigned l>
TensorTyped< T, n, l > PLMD::matmul ( const TensorTyped< T, n, m > & a,
const TensorTyped< T, m, l > & b )
constexpr

matrix-matrix multiplication

◆ matmul() [2/8]

template<typename T, unsigned n, unsigned m, unsigned l, unsigned i>
TensorTyped< T, n, i > PLMD::matmul ( const TensorTyped< T, n, m > & a,
const TensorTyped< T, m, l > & b,
const TensorTyped< T, l, i > & c )
constexpr

matrix-matrix-matrix multiplication

◆ matmul() [3/8]

template<typename T, unsigned n, unsigned m, unsigned l>
VectorTyped< T, n > PLMD::matmul ( const TensorTyped< T, n, m > & a,
const TensorTyped< T, m, l > & b,
const VectorTyped< T, l > & c )
constexpr

matrix-matrix-vector multiplication

◆ matmul() [4/8]

template<typename T, typename TT, unsigned n, unsigned m>
VectorTyped< T, n > PLMD::matmul ( const TensorTyped< T, n, m > & a,
const VectorTyped< TT, m > & b )
constexpr

matrix-vector multiplicationi, the first argument determines the type of the result

◆ matmul() [5/8]

template<typename T, typename TT, unsigned n, unsigned m>
VectorTyped< T, n > PLMD::matmul ( const VectorTyped< T, m > & a,
const TensorTyped< TT, m, n > & b )
constexpr

vector-matrix multiplication, the first argument determines the type of the result

◆ matmul() [6/8]

template<typename T, unsigned n, unsigned m, unsigned l>
VectorTyped< T, l > PLMD::matmul ( const VectorTyped< T, n > & a,
const TensorTyped< T, n, m > & b,
const TensorTyped< T, m, l > & c )
constexpr

vector-matrix-matrix multiplication

◆ matmul() [7/8]

template<typename T, unsigned n, unsigned m>
T PLMD::matmul ( const VectorTyped< T, n > & a,
const TensorTyped< T, n, m > & b,
const VectorTyped< T, m > & c )
constexpr

vector-matrix-vector multiplication

◆ matmul() [8/8]

template<typename T, unsigned n_>
T PLMD::matmul ( const VectorTyped< T, n_ > & a,
const VectorTyped< T, n_ > & b )
constexpr

vector-vector multiplication (maps to dotProduct)

◆ matrixOut()

template<typename T>
void PLMD::matrixOut ( Log & ostr,
const Matrix< T > & mat )

◆ max_cell()

int PLMD::max_cell ( int celn,
const int ncells,
const bool usePBC )
inlineconstexpr

◆ min_cell()

int PLMD::min_cell ( int celn,
const int ncells,
const bool usePBC )
inlineconstexpr

◆ modulo()

template<typename T, unsigned n>
T PLMD::modulo ( const VectorTyped< T, n > & v)
constexpr

◆ modulo2()

template<typename T, unsigned n>
T PLMD::modulo2 ( const VectorTyped< T, n > & v)
constexpr

◆ mult() [1/3]

template<typename T>
void PLMD::mult ( const Matrix< T > & A,
const Matrix< T > & B,
Matrix< T > & C )

◆ mult() [2/3]

template<typename T>
void PLMD::mult ( const Matrix< T > & A,
const std::vector< T > & B,
std::vector< T > & C )

◆ mult() [3/3]

template<typename T>
void PLMD::mult ( const std::vector< T > & A,
const Matrix< T > & B,
std::vector< T > & C )

◆ norm()

template<typename T>
T PLMD::norm ( const std::vector< T > & A)

Calculate the dot product between a vector and itself.

◆ operator!=()

bool PLMD::operator!= ( const AtomNumber & a,
const AtomNumber & b )
inline

◆ operator&()

template<typename enumtype>
std::enable_if_t< enum_traits::BitmaskEnum< enumtype >::has_bit_and, enumtype > PLMD::operator& ( enumtype a,
enumtype b )
constexpr

Perform a bitwise AND between two enum values.

Parameters
aThe first enum value.
bThe second enum value.
Returns
The result of performing a bitwise AND between the two values.

This operator is only available for enum types that have a specialization of enum_traits::BitmaskEnum with the has_bit_and trait enabled.

Useful for checking composed values agains masks.

Note that the value may be a 0, and if you do not have defined the 0 as a named value you should use valid(enumtype) to check it.

See also
valid(enumtype) for a complete example
operator|(enumtype, enumtype)

◆ operator*() [1/5]

template<typename T, typename J, unsigned n, unsigned m>
TensorTyped< T, n, m > PLMD::operator* ( const TensorTyped< T, n, m > & t1,
J s )
constexpr

◆ operator*() [2/5]

template<typename T, typename J, unsigned n, unsigned m>
TensorTyped< T, n, m > PLMD::operator* ( J s,
const TensorTyped< T, n, m > & t1 )
constexpr

◆ operator*() [3/5]

template<typename T, typename J, unsigned n>
VectorTyped< T, n > PLMD::operator* ( J s,
VectorTyped< T, n > v )
constexpr

◆ operator*() [4/5]

template<typename T>
Matrix< T > PLMD::operator* ( T & v,
const Matrix< T > & m )

Multiply matrix by scalar.

◆ operator*() [5/5]

template<typename T, typename J, unsigned n>
VectorTyped< T, n > PLMD::operator* ( VectorTyped< T, n > v,
J s )
constexpr

◆ operator+() [1/2]

template<typename T, unsigned n, unsigned m>
TensorTyped< T, n, m > PLMD::operator+ ( const TensorTyped< T, n, m > & t1,
const TensorTyped< T, n, m > & t2 )
constexpr

◆ operator+() [2/2]

template<typename T, unsigned n>
VectorTyped< T, n > PLMD::operator+ ( const VectorTyped< T, n > & v1,
const VectorTyped< T, n > & v2 )
constexpr

◆ operator-() [1/2]

template<typename T, unsigned n, unsigned m>
TensorTyped< T, n, m > PLMD::operator- ( const TensorTyped< T, n, m > & t1,
const TensorTyped< T, n, m > & t2 )
constexpr

◆ operator-() [2/2]

template<typename T, unsigned n>
VectorTyped< T, n > PLMD::operator- ( VectorTyped< T, n > v1,
const VectorTyped< T, n > & v2 )
constexpr

◆ operator/() [1/2]

template<typename T, typename J, unsigned n, unsigned m>
TensorTyped< T, n, m > PLMD::operator/ ( const TensorTyped< T, n, m > & t1,
J s )
constexpr

◆ operator/() [2/2]

template<typename T, typename J, unsigned n>
VectorTyped< T, n > PLMD::operator/ ( const VectorTyped< T, n > & v,
J s )
constexpr

◆ operator<()

bool PLMD::operator< ( const AtomNumber & a,
const AtomNumber & b )
inline

◆ operator<<() [1/9]

template<typename T>
Log & PLMD::operator<< ( Log & ostr,
const Matrix< T > & mat )

◆ operator<<() [2/9]

Log & PLMD::operator<< ( Log & ostr,
const PDB & pdb )

◆ operator<<() [3/9]

template<class T>
OFile & PLMD::operator<< ( OFile & of,
const T & t )

Write using << syntax.

Formatted output with << operator.

◆ operator<<() [4/9]

std::ostream & PLMD::operator<< ( std::ostream & log,
const Citations & cit )

It writes on the ostream the list of all the bibliographic items prefixed with their reference number

◆ operator<<() [5/9]

std::ostream & PLMD::operator<< ( std::ostream & log,
const Register & reg )

◆ operator<<() [6/9]

std::ostream & PLMD::operator<< ( std::ostream & os,
const Stopwatch & sw )

◆ operator<<() [7/9]

template<typename T, unsigned n, unsigned m>
std::ostream & PLMD::operator<< ( std::ostream & os,
const TensorTyped< T, n, m > & t )

Allows printing tensor t with std::cout<<t;

◆ operator<<() [8/9]

template<typename T, unsigned n>
std::ostream & PLMD::operator<< ( std::ostream & os,
const VectorTyped< T, n > & v )

Allows printing vector v with std::cout<<v;

◆ operator<<() [9/9]

template<class T>
Subprocess & PLMD::operator<< ( Subprocess & ep,
const T & t )

◆ operator<=()

bool PLMD::operator<= ( const AtomNumber & a,
const AtomNumber & b )
inline

◆ operator==()

bool PLMD::operator== ( const AtomNumber & a,
const AtomNumber & b )
inline

◆ operator>()

bool PLMD::operator> ( const AtomNumber & a,
const AtomNumber & b )
inline

◆ operator>=()

bool PLMD::operator>= ( const AtomNumber & a,
const AtomNumber & b )
inline

◆ operator|()

template<typename enumtype>
std::enable_if_t< enum_traits::BitmaskEnum< enumtype >::has_bit_or, enumtype > PLMD::operator| ( enumtype a,
enumtype b )
constexpr

Perform a bitwise OR between two enum values.

Parameters
aThe first enum value.
bThe second enum value.
Returns
The result of performing a bitwise OR between the two values.

This operator is only available for enum types that have a specialization of enum_traits::BitmaskEnum with the has_bit_or trait enabled.

The principal use is to compose named enum values into masks or combined options.

See also
valid(enumtype) for a complete example
operator&(enumtype, enumtype)

◆ pseudoInvert()

template<typename T>
int PLMD::pseudoInvert ( const Matrix< T > & A,
Matrix< T > & pseudoinverse )

◆ render()

auto PLMD::render ( const TokenizedLine::line & l)
inline

◆ stoat()

Keywords::argType PLMD::stoat ( std::string_view str)

Converts a string to the corresponding Keywords::argType.

Parameters
strThe string to convert.
Returns
The Keywords::argType corresponding to the string.
Exceptions
std::invalid_argumentIf the string does not match any enum value.

◆ stoct()

Keywords::componentType PLMD::stoct ( std::string_view str)
inline

Converts a string to the corresponding Keywords::componentType.

Parameters
strThe string to convert.
Returns
The Keywords::componentType corresponding to the string.
Exceptions
std::invalid_argumentif the string does not match any enum value.

◆ StopwatchEmptyString()

static const std::string & PLMD::StopwatchEmptyString ( )
inlinestaticnoexcept

Return an empty string.

Inline static so that it can store a static variable (for quicker access) without adding a unique global symbol to a library including this header file.

◆ SubprocessPidGetenvSignals()

static bool PLMD::SubprocessPidGetenvSignals ( )
inlinestaticnoexcept

Retrieve PLUMED_ENABLE_SIGNALS.

Inline static so that it can store a static variable (for quicker access) without adding a unique global symbol to a library including this header file.

◆ sumT()

template<typename T, typename TT, unsigned n>
VectorTyped< T, n > PLMD::sumT ( const VectorTyped< T, n > & v1,
const VectorTyped< TT, n > & v2 )
constexpr

◆ testThrow()

static void PLMD::testThrow ( const char * what)
static

Small utility just used in this file to throw arbitrary exceptions.

◆ toString() [1/2]

std::string PLMD::toString ( Keywords::argType at)

◆ toString() [2/2]

std::string PLMD::toString ( Keywords::componentType at)

◆ transpose() [1/2]

template<typename T>
void PLMD::transpose ( const Matrix< T > & A,
Matrix< T > & AT )

◆ transpose() [2/2]

template<typename T, unsigned n, unsigned m>
TensorTyped< T, n, m > PLMD::transpose ( const TensorTyped< T, m, n > & t)
constexpr

returns the transpose of a tensor (same as TensorGeneric::transpose())

◆ typesafePtrSizeof()

template<class T>
std::size_t PLMD::typesafePtrSizeof ( )

◆ typesafePtrSizeof< const void >()

template<>
std::size_t PLMD::typesafePtrSizeof< const void > ( )
inline

◆ typesafePtrSizeof< void >()

template<>
std::size_t PLMD::typesafePtrSizeof< void > ( )
inline

◆ typesafePtrSkipCheck()

static bool PLMD::typesafePtrSkipCheck ( )
inlinestatic

◆ valid()

template<typename enumtype>
std::enable_if_t< enum_traits::BitmaskEnum< enumtype >::has_valid, bool > PLMD::valid ( enumtype a)
constexpr

Test if an enum value is valid.

Parameters
aThe enum value to test.
Returns
true if the enum value is not equal to zero, false otherwise.

This operator is only available for enum types that have a specialization of enum_traits::BitmaskEnum with the has_valid trait enabled.

// Note: explicit declarations of the values, and
enum class myenum { A=1,B=1<<1,C=1<<2 };
//then activate the functions `&`, `|` and `valid`
template<>
struct BitmaskEnum< myenum > {
static constexpr bool has_valid = true;
static constexpr bool has_bit_or = true;
static constexpr bool has_bit_and = true;
};
//...code...
myenum val = myenum::A | myenum::C;
std::cout <<"val is "<< int(val) << "\n";
if(PLMD::valid( val & myenum::A)) {
std::cout << "val has A\n";
}
if(PLMD::valid(val & myenum::B)) {
std::cout << "val has B\n";
}
if(PLMD::valid(val & myenum::C)) {
std::cout << "val has C\n";
}
if(PLMD::valid(val & (myenum::A | myenum::C))) {
std::cout << "val has C and A\n";
}
//will produce:
///>val is 5
///>val has A
///>val has C
///>val has C and A
double val
Definition lapack.cpp:3556
constexpr std::enable_if_t< enum_traits::BitmaskEnum< enumtype >::has_valid, bool > valid(enumtype a)
Test if an enum value is valid.
Definition BitmaskEnum.h:162
See also
operator|(enumtype, enumtype)
operator&(enumtype, enumtype)

◆ VcrossTensor() [1/2]

template<typename T>
TensorTyped< T, 3, 3 > PLMD::VcrossTensor ( const TensorTyped< T, 3, 3 > & v2,
const VectorTyped< T, 3 > & v1 )
inline

◆ VcrossTensor() [2/2]

template<typename T>
TensorTyped< T, 3, 3 > PLMD::VcrossTensor ( const VectorTyped< T, 3 > & v1,
const TensorTyped< T, 3, 3 > & v2 )
inline

◆ wholeLineReplicas()

TokenizedLine::line PLMD::wholeLineReplicas ( const std::string & myLine)

Variable Documentation

◆ doi_map

const Tools::FastStringUnorderedMap<std::string> PLMD::doi_map
static
Initial value:
= {
{"10.1021/acs.jctc.6b01073","G. A. Tribello, F. Giberti, G. C. Sosso, M. Salvalaglio, M. Parrinello, Analyzing and Driving Cluster Formation in Atomistic Simulations. Journal of Chemical Theory and Computation. 13, 1317–1327 (2017)"}# 30 "/home/runner/work/plumed2/plumed2/src/tools/Citations.cpp" 2
}

◆ DP2CUTOFF

double PLMD::DP2CUTOFF =6.25
constexpr

◆ dp2cutoffA

double PLMD::dp2cutoffA =1.00193418799744762399
constexpr

◆ dp2cutoffB

double PLMD::dp2cutoffB =-.00193418799744762399
constexpr

◆ epsilon

const double PLMD::epsilon =1e-14

◆ isActionType

template<typename T>
bool PLMD::isActionType = std::is_base_of<Action, T>::value
inlineconstexpr