Objects that inherit from FunctionVessel can be used (in tandem with PLMD::ActionWithVessel) to calculate functions of the form \(\prod_k H_k[ \sum_j \prod_i g_i(x) ]\). More...
#include <FunctionVessel.h>

Public Member Functions | |
| FunctionVessel (const VesselOptions &) | |
| void | resize () |
| This does the resizing of the buffer. More... | |
| bool | applyForce (std::vector< double > &forces) |
| This applies all the forces. More... | |
| std::string | description () |
| The description for the log. More... | |
| virtual std::string | function_description ()=0 |
| The rest of the description of what we are calculating. More... | |
| virtual unsigned | getNumberOfTerms () |
| Return number of terms. More... | |
| std::string | getName () const |
| Return the name. More... | |
| std::string | getLabel () const |
| Return the label. More... | |
| void | checkRead () |
| Check that readin was fine. More... | |
| void | zero () |
| Set all the buffer elements to zero. More... | |
| void | addToBufferElement (const unsigned &i, const double &val) |
| Add something to the ith element in the buffer. More... | |
| virtual void | prepare () |
| Do something before the loop. More... | |
| virtual bool | calculate ()=0 |
| Calculate the part of the vessel that is done in the loop. More... | |
| virtual void | finish ()=0 |
| Complete the calculation once the loop is finished. More... | |
Static Public Member Functions | |
| static void | registerKeywords (Keywords &keys) |
Public Attributes | |
| Log & | log |
| Reference to the log on which to output details. More... | |
Protected Member Functions | |
| bool | addValueUsingTolerance (const unsigned &jval, const double &val) |
| Add some value to the accumulator if it is greater than tolerance. More... | |
| void | addValueIgnoringTolerance (const unsigned &jval, const double &val) |
| Add some value to the accumulator and ignore the tolerance. More... | |
| void | setOutputValue (const double &val) |
| Set the final value. More... | |
| double | getFinalValue (const unsigned &j) |
| Get the nth value in the distribution. More... | |
| void | mergeFinalDerivatives (const std::vector< double > &df) |
| This does a combination of the product and chain rules. More... | |
| int | getNumericalLabel () const |
| Return the numerical label. More... | |
| void | error (const std::string &errmsg) |
| Report an error. More... | |
| template<class T > | |
| void | parse (const std::string &key, T &t) |
| Parse something from the input. More... | |
| template<class T > | |
| void | parseVector (const std::string &key, std::vector< T > &t) |
| Parse one keyword as std::vector. More... | |
| void | parseFlag (const std::string &key, bool &t) |
| Parse one keyword as boolean flag. More... | |
| std::string | getAllInput () |
| This returns the whole input line (it is used for less_than/more_than/between) More... | |
| ActionWithVessel * | getAction () |
| Return a pointer to the action we are working in. More... | |
| double | getTolerance () const |
| Return the value of the tolerance. More... | |
| double | getNLTolerance () const |
| Return the value of the neighbor list tolerance. More... | |
| void | resizeBuffer (const unsigned &n) |
| Set the size of the data buffer. More... | |
| void | setBufferElement (const unsigned &i, const double &val) |
| Set the value of the ith element in the buffer. More... | |
| double | getBufferElement (const unsigned &i) const |
| Get the value in the ith element of the buffer. More... | |
| void | stashBuffers () |
| Store everything that is the buffers. More... | |
| void | setBufferFromStash () |
| Add the contents of the stash to the buffer. More... | |
Protected Attributes | |
| bool | diffweight |
| Are the derivatives differentiable. More... | |
| Communicator & | comm |
| A copy of the communicator. More... | |
Private Attributes | |
| unsigned | nderivatives |
| The number of derivatives. More... | |
| Value * | final_value |
| This is the pointer to the value we are creating. More... | |
Objects that inherit from FunctionVessel can be used (in tandem with PLMD::ActionWithVessel) to calculate functions of the form \(\prod_k H_k[ \sum_j \prod_i g_i(x) ]\).
They should take in a series of values and return one single value.
Definition at line 41 of file FunctionVessel.h.
| PLMD::vesselbase::FunctionVessel::FunctionVessel | ( | const VesselOptions & | da | ) |
Definition at line 33 of file FunctionVessel.cpp.
|
inlineinherited |
|
inlineprotected |
Add some value to the accumulator and ignore the tolerance.
Definition at line 83 of file FunctionVessel.h.
|
inlineprotected |
Add some value to the accumulator if it is greater than tolerance.
Definition at line 76 of file FunctionVessel.h.
|
virtual |
This applies all the forces.
Implements PLMD::vesselbase::Vessel.
Definition at line 70 of file FunctionVessel.cpp.
|
pure virtualinherited |
Calculate the part of the vessel that is done in the loop.
Implemented in PLMD::multicolvar::StoreColvarVessel, PLMD::vesselbase::BridgeVessel, PLMD::multicolvar::StoreCentralAtomsVessel, PLMD::multicolvar::DHEnergy, PLMD::vesselbase::ShortcutVessel, PLMD::vesselbase::Between, PLMD::vesselbase::MoreThan, PLMD::vesselbase::LessThan, PLMD::vesselbase::Min, PLMD::vesselbase::Mean, and PLMD::vesselbase::Sum.
|
inherited |
Check that readin was fine.
Definition at line 111 of file Vessel.cpp.
|
virtual |
The description for the log.
Implements PLMD::vesselbase::Vessel.
Definition at line 50 of file FunctionVessel.cpp.
|
protectedinherited |
Report an error.
Definition at line 122 of file Vessel.cpp.
|
pure virtualinherited |
Complete the calculation once the loop is finished.
Implemented in PLMD::multicolvar::StoreColvarVessel, PLMD::vesselbase::BridgeVessel, PLMD::multicolvar::StoreCentralAtomsVessel, PLMD::multicolvar::DHEnergy, PLMD::vesselbase::ShortcutVessel, PLMD::vesselbase::Between, PLMD::vesselbase::MoreThan, PLMD::vesselbase::LessThan, PLMD::vesselbase::Min, PLMD::vesselbase::Mean, and PLMD::vesselbase::Sum.
|
pure virtual |
The rest of the description of what we are calculating.
Implemented in PLMD::multicolvar::DHEnergy, PLMD::vesselbase::Between, PLMD::vesselbase::MoreThan, PLMD::vesselbase::LessThan, PLMD::vesselbase::Min, PLMD::vesselbase::Mean, and PLMD::vesselbase::Sum.
|
inlineprotectedinherited |
|
protectedinherited |
This returns the whole input line (it is used for less_than/more_than/between)
Definition at line 84 of file Vessel.cpp.
|
inlineprotectedinherited |
|
inlineprotected |
Get the nth value in the distribution.
Definition at line 88 of file FunctionVessel.h.
|
inherited |
Return the label.
Definition at line 80 of file Vessel.cpp.
|
inherited |
Return the name.
Definition at line 76 of file Vessel.cpp.
|
inlineprotectedinherited |
|
inlinevirtual |
Return number of terms.
Implements PLMD::vesselbase::Vessel.
Definition at line 72 of file FunctionVessel.h.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
protected |
This does a combination of the product and chain rules.
Definition at line 60 of file FunctionVessel.cpp.
|
protectedinherited |
|
protectedinherited |
Parse one keyword as boolean flag.
Definition at line 93 of file Vessel.cpp.
|
protectedinherited |
|
inlinevirtualinherited |
Do something before the loop.
Reimplemented in PLMD::vesselbase::BridgeVessel.
|
static |
Definition at line 28 of file FunctionVessel.cpp.
|
virtual |
This does the resizing of the buffer.
Implements PLMD::vesselbase::Vessel.
Definition at line 54 of file FunctionVessel.cpp.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
protectedinherited |
Add the contents of the stash to the buffer.
Definition at line 133 of file Vessel.cpp.
|
inlineprotected |
Set the final value.
Definition at line 94 of file FunctionVessel.h.
|
protectedinherited |
Store everything that is the buffers.
Definition at line 128 of file Vessel.cpp.
|
inlineinherited |
|
protectedinherited |
|
protected |
Are the derivatives differentiable.
Definition at line 49 of file FunctionVessel.h.
|
private |
This is the pointer to the value we are creating.
Definition at line 46 of file FunctionVessel.h.
|
inherited |
|
private |
The number of derivatives.
Definition at line 44 of file FunctionVessel.h.
Hosted by GitHub
|
1.8.8
|