23 #include "tools/Torsion.h"
24 #include "core/ActionRegister.h"
32 namespace multicolvar{
80 static void registerKeywords(
Keywords& keys );
82 virtual double compute(
const unsigned& j );
87 PLUMED_REGISTER_ACTION(AlphaBeta,
"ALPHABETA")
90 MultiColvar::registerKeywords( keys );
92 keys.add(
"numbered",
"REFERENCE",
"the reference values for each of the torsional angles. If you use a single REFERENCE value the "
93 "same reference value is used for all torsions");
94 keys.reset_style(
"REFERENCE",
"compulsory");
107 for(
unsigned i=0;i<
target.size();++i){
114 }
else if( ntarget!=
target.size() ){
115 error(
"found wrong number of REFERENCE values");
121 std::string fake_input;
138 double value = t.
compute(d0,d1,d2,dd0,dd1,dd2);
140 double cvalue = 1.+cos(value-
target[current]);
Class to compute torsional angles.
bool parseNumbered(const std::string &key, const int no, T &t)
Parse one numbered keyword as generic type.
unsigned current
The numerical index of the task we are curently performing.
std::vector< double > target
double compute(const Vector &v1, const Vector &v2, const Vector &v3) const
Compute the angle between the projections of v1 and v3 on the plane orthogonal to v2...
void readAtoms(int &natoms)
Read in all the keywords that can be used to define atoms.
Vector getSeparation(const Vector &vec1, const Vector &vec2) const
Get the separation between a pair of vectors.
Class implementing fixed size vectors of doubles.
void error(const std::string &msg) const
Crash calculation and print documentation.
void checkRead()
Check if Action was properly read.
void addVessel(const std::string &name, const std::string &input, const int numlab=0, const std::string thislab="")
Add a vessel to the list of vessels.
void readVesselKeywords()
Complete the setup of this object (this routine must be called after construction of ActionWithValue)...
void addCentralAtomDerivatives(const unsigned &iatom, const Tensor &der)
Add derivatives to the central atom position.
bool isPeriodic()
Are the base quantities periodic.
static TensorGeneric< n, n > identity()
return an identity tensor
void parse(const std::string &key, T &t)
Parse one keyword as generic type.
This class holds the keywords and their documentation.
#define PLUMED_MULTICOLVAR_INIT(ao)
void addBoxDerivatives(const Tensor &)
Add some derivatives to the virial.
This class is used to bring the relevant information to the Action constructor.
Provides the keyword ALPHABETA
Vector getCentralAtom()
Get the position of the central atom.
virtual double compute(const unsigned &j)
Actually compute the colvar.
DynamicList< unsigned > taskList
The list of tasks we have to perform.
void addAtomsDerivatives(const int &, const Vector &)
Add some derivatives for an atom.
unsigned getNumberOfVessels() const
Get the number of vessels.
const Vector & getPosition(unsigned) const
Get the position of atom iatom.
TensorGeneric< n, m > extProduct(const VectorGeneric< n > &v1, const VectorGeneric< m > &v2)
This is the abstract base class to use for creating distributions of colvars and functions thereof...
unsigned fullSize() const
Return the total number of elements in the list.