All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
StoreCentralAtomsVessel.h
Go to the documentation of this file.
1 /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2  Copyright (c) 2013 The plumed team
3  (see the PEOPLE file at the root of the distribution for a list of names)
4 
5  See http://www.plumed-code.org for more information.
6 
7  This file is part of plumed, version 2.0.
8 
9  plumed is free software: you can redistribute it and/or modify
10  it under the terms of the GNU Lesser General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  plumed is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public License
20  along with plumed. If not, see <http://www.gnu.org/licenses/>.
21 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
22 #ifndef __PLUMED_multicolvar_StoreCentralAtomsVessel_h
23 #define __PLUMED_multicolvar_StoreCentralAtomsVessel_h
24 
25 #include "tools/DynamicList.h"
26 #include "vesselbase/Vessel.h"
27 
28 namespace PLMD {
29 namespace multicolvar {
30 
31 class MultiColvarBase;
32 class MultiColvarFunction;
33 
35 private:
37  std::vector<unsigned> start;
38  unsigned nspace;
39  std::vector< DynamicList<unsigned> > active_atoms;
40 public:
41 /// Constructor
43 /// Return the number of terms
44  unsigned getNumberOfTerms(){ return 2; }
45 /// This does the resizing of the buffer
46  void resize();
47 /// This does nothing
48  std::string description(){ return ""; }
49 /// This should mpi gather the active atoms
50  void finish();
51 /// This does nothing
52  bool applyForce(std::vector<double>&){ return false; }
53 /// This makes sure all vectors are stored
54  bool calculate();
55 /// Get the orientation of the ith vector
56  Vector getPosition( const unsigned& ) const ;
57 /// Add derivatives to central atom position
58  void addAtomsDerivatives( const unsigned& iatom, const Vector& df, MultiColvarFunction* funcout ) const ;
59 /// Add derivatives of the weight wrt to the central atom position
60  void addAtomsDerivativeOfWeight( const unsigned& iatom, const Vector& df, MultiColvarFunction* funcout ) const ;
61 /// Add derivative to the central atom position
62  void addDerivativeOfCentralAtomPos( const unsigned& iatom, const Tensor& df, MultiColvarFunction* funcout ) const ;
63 };
64 
65 }
66 }
67 #endif
68 
void addAtomsDerivativeOfWeight(const unsigned &iatom, const Vector &df, MultiColvarFunction *funcout) const
Add derivatives of the weight wrt to the central atom position.
std::string description()
This does nothing.
bool calculate()
This makes sure all vectors are stored.
void resize()
This does the resizing of the buffer.
Class implementing fixed size matrices of doubles.
Definition: Tensor.h:70
Class implementing fixed size vectors of doubles.
Definition: Vector.h:74
std::vector< DynamicList< unsigned > > active_atoms
void addAtomsDerivatives(const unsigned &iatom, const Vector &df, MultiColvarFunction *funcout) const
Add derivatives to central atom position.
void addDerivativeOfCentralAtomPos(const unsigned &iatom, const Tensor &df, MultiColvarFunction *funcout) const
Add derivative to the central atom position.
unsigned getNumberOfTerms()
Return the number of terms.
This class is used to pass the input to Vessels.
Definition: Vessel.h:53
Vector getPosition(const unsigned &) const
Get the orientation of the ith vector.
StoreCentralAtomsVessel(const vesselbase::VesselOptions &)
Constructor.
bool applyForce(std::vector< double > &)
This does nothing.
void finish()
This should mpi gather the active atoms.