All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
PLMD::crystallization::StoreVectorsVessel Class Reference

#include <StoreVectorsVessel.h>

Inheritance diagram for PLMD::crystallization::StoreVectorsVessel:
Inheritance graph
[legend]

Public Member Functions

 StoreVectorsVessel (const vesselbase::VesselOptions &)
 Constructor. More...
 
void usedInFunction (const bool &)
 This turns on the full use of this action for storage. More...
 
bool calculate ()
 This makes sure vectors are normalized (they are already stored) More...
 
void recompute (const unsigned &, const unsigned &)
 This reperforms a calculation. More...
 
std::string description ()
 This does nothing. More...
 
void getVector (const unsigned &, std::vector< double > &)
 Get the orientation of the ith vector. More...
 
void chainRuleForComponent (const unsigned &, const unsigned &, const unsigned &jout, const unsigned &, const double &, multicolvar::MultiColvarFunction *)
 Chain rule for component. More...
 
void chainRuleForVector (const unsigned &, const unsigned &, const unsigned &, const std::vector< double > &, multicolvar::MultiColvarFunction *)
 Chain rule for whole vector. More...
 
void chainRule (const unsigned &, const std::vector< double > &)
 Chain rule and store output in local array called final_derivatives with vectors this does chain rule for dot products. More...
 
unsigned getNumberOfComponents () const
 Return the number of components in the vector. More...
 
virtual void resize ()
 Do all resizing of data. More...
 
void prepare ()
 Clear certain data before start of main loop. More...
 
unsigned getNumberOfDerivatives (const unsigned &)
 Get the number of derivatives for the ith value. More...
 
unsigned getStoredIndex (const unsigned &, const unsigned &)
 Get one of the stored indexes. More...
 
double getComponent (const unsigned &, const unsigned &)
 Get a component of the stored vector. More...
 
virtual void performTask (const unsigned &)
 This reperforms the task in the underlying action. More...
 
virtual void finishTask (const unsigned &)
 This reperforms the task. More...
 
double getFinalDerivative (const unsigned &ider) const
 Get the ider'th final derivative value. More...
 
void storeDerivativesLowMem (const unsigned &)
 This stores the data we get from the calculation. More...
 
void storeDerivativesHighMem (const unsigned &)
 This stores the data we get from the calculation. More...
 
virtual void finish ()
 Final step in gathering data. More...
 
virtual void activateIndices (ActionWithVessel *)
 Activate indexes (this is used at end of chain rule) More...
 
virtual void getIndexList (const unsigned &, const unsigned &, const unsigned &, std::vector< unsigned > &)
 Get the list of indices that we are storing data for. More...
 
virtual bool applyForce (std::vector< double > &)
 Forces on vectors should always be applied elsewhere. 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...
 

Static Public Member Functions

static void registerKeywords (Keywords &keys)
 
static std::string transformName (const std::string &name)
 Convert the name to the label of the component. More...
 

Public Attributes

Loglog
 Reference to the log on which to output details. More...
 

Protected Member Functions

bool weightHasDerivatives ()
 Is the weight differentiable. More...
 
bool usingLowMem ()
 Are we using low mem option. More...
 
void completeSetup (const unsigned &, const unsigned &)
 Finish the setup of the storage object by setting how much data has to be stored. More...
 
unsigned getNumberOfDerivativeSpacesPerComponent () const
 Return value of nspace. More...
 
void storeValues (const unsigned &)
 Retrieve the values from the underlying ActionWithVessel. More...
 
void setTaskToRecompute (const unsigned &ivec)
 Set the Task that needs redoing. More...
 
void setComponent (const unsigned &, const unsigned &, const double &)
 Set a component of one of the vectors. More...
 
double chainRule (const unsigned &, const unsigned &, const std::vector< double > &)
 This is the proper chain rule for vectors. More...
 
void chainRule (const unsigned &, const std::vector< double > &, Value *)
 Chain rule the vector and output derivatives to a value. More...
 
double getLocalDerivative (const unsigned &ibuf)
 Get the ibuf'th local derivative value. More...
 
void setLocalDerivative (const unsigned &ibuf, const double &val)
 Set the ibuf'th local derivative value. 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...
 
ActionWithVesselgetAction ()
 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...
 

Protected Attributes

Communicatorcomm
 A copy of the communicator. More...
 

Private Member Functions

void normalizeVector (const int &)
 

Private Attributes

bool store_director
 We want to store the director rather than the value. More...
 
unsigned ncomponents
 
std::vector< double > myfvec
 
VectorMultiColvarvecs
 

Friends

class VectorMultiColvar
 

Constructor & Destructor Documentation

PLMD::crystallization::StoreVectorsVessel::StoreVectorsVessel ( const vesselbase::VesselOptions da)

Constructor.

Member Function Documentation

virtual void PLMD::vesselbase::StoreDataVessel::activateIndices ( ActionWithVessel )
inlinevirtualinherited

Activate indexes (this is used at end of chain rule)

void PLMD::vesselbase::Vessel::addToBufferElement ( const unsigned &  i,
const double &  val 
)
inlineinherited

Add something to the ith element in the buffer.

virtual bool PLMD::vesselbase::StoreDataVessel::applyForce ( std::vector< double > &  )
inlinevirtualinherited

Forces on vectors should always be applied elsewhere.

Implements PLMD::vesselbase::Vessel.

Reimplemented in PLMD::vesselbase::Moments.

bool PLMD::crystallization::StoreVectorsVessel::calculate ( )
virtual

This makes sure vectors are normalized (they are already stored)

Implements PLMD::vesselbase::Vessel.

double PLMD::vesselbase::StoreDataVessel::chainRule ( const unsigned &  ival,
const unsigned &  ider,
const std::vector< double > &  df 
)
protectedinherited

This is the proper chain rule for vectors.

void PLMD::vesselbase::StoreDataVessel::chainRule ( const unsigned &  ival,
const std::vector< double > &  df,
Value val 
)
protectedinherited

Chain rule the vector and output derivatives to a value.

void PLMD::vesselbase::StoreDataVessel::chainRule ( const unsigned &  ival,
const std::vector< double > &  df 
)
inherited

Chain rule and store output in local array called final_derivatives with vectors this does chain rule for dot products.

void PLMD::crystallization::StoreVectorsVessel::chainRuleForComponent ( const unsigned &  icolv,
const unsigned &  jin,
const unsigned &  jout,
const unsigned &  base_cv_no,
const double &  weight,
multicolvar::MultiColvarFunction funcout 
)

Chain rule for component.

void PLMD::crystallization::StoreVectorsVessel::chainRuleForVector ( const unsigned &  icolv,
const unsigned &  jout,
const unsigned &  base_cv_no,
const std::vector< double > &  df,
multicolvar::MultiColvarFunction funcout 
)

Chain rule for whole vector.

void PLMD::vesselbase::Vessel::checkRead ( )
inherited

Check that readin was fine.

void PLMD::vesselbase::StoreDataVessel::completeSetup ( const unsigned &  dstart,
const unsigned &  nvec 
)
protectedinherited

Finish the setup of the storage object by setting how much data has to be stored.

std::string PLMD::crystallization::StoreVectorsVessel::description ( )
inlinevirtual

This does nothing.

Implements PLMD::vesselbase::Vessel.

void PLMD::vesselbase::Vessel::error ( const std::string &  errmsg)
protectedinherited

Report an error.

void PLMD::vesselbase::StoreDataVessel::finish ( )
virtualinherited

Final step in gathering data.

Implements PLMD::vesselbase::Vessel.

Reimplemented in PLMD::multicolvar::AdjacencyMatrixVessel, and PLMD::vesselbase::Moments.

virtual void PLMD::vesselbase::StoreDataVessel::finishTask ( const unsigned &  )
inlinevirtualinherited

This reperforms the task.

Reimplemented in PLMD::multicolvar::StoreCentralAtomsVessel.

ActionWithVessel * PLMD::vesselbase::Vessel::getAction ( )
inlineprotectedinherited

Return a pointer to the action we are working in.

std::string PLMD::vesselbase::Vessel::getAllInput ( )
protectedinherited

This returns the whole input line (it is used for less_than/more_than/between)

double PLMD::vesselbase::Vessel::getBufferElement ( const unsigned &  i) const
inlineprotectedinherited

Get the value in the ith element of the buffer.

double PLMD::vesselbase::StoreDataVessel::getComponent ( const unsigned &  ival,
const unsigned &  jcomp 
)
inlineinherited

Get a component of the stored vector.

double PLMD::vesselbase::StoreDataVessel::getFinalDerivative ( const unsigned &  ider) const
inlineinherited

Get the ider'th final derivative value.

void PLMD::vesselbase::StoreDataVessel::getIndexList ( const unsigned &  ntotal,
const unsigned &  jstore,
const unsigned &  maxder,
std::vector< unsigned > &  indices 
)
virtualinherited

Get the list of indices that we are storing data for.

Reimplemented in PLMD::multicolvar::StoreCentralAtomsVessel.

std::string PLMD::vesselbase::Vessel::getLabel ( ) const
inherited

Return the label.

double PLMD::vesselbase::StoreDataVessel::getLocalDerivative ( const unsigned &  ibuf)
inlineprotectedinherited

Get the ibuf'th local derivative value.

std::string PLMD::vesselbase::Vessel::getName ( ) const
inherited

Return the name.

double PLMD::vesselbase::Vessel::getNLTolerance ( ) const
inlineprotectedinherited

Return the value of the neighbor list tolerance.

unsigned PLMD::vesselbase::StoreDataVessel::getNumberOfComponents ( ) const
inlineinherited

Return the number of components in the vector.

unsigned PLMD::vesselbase::StoreDataVessel::getNumberOfDerivatives ( const unsigned &  ival)
inlineinherited

Get the number of derivatives for the ith value.

unsigned PLMD::vesselbase::StoreDataVessel::getNumberOfDerivativeSpacesPerComponent ( ) const
inlineprotectedinherited

Return value of nspace.

int PLMD::vesselbase::Vessel::getNumericalLabel ( ) const
inlineprotectedinherited

Return the numerical label.

unsigned PLMD::vesselbase::StoreDataVessel::getStoredIndex ( const unsigned &  ival,
const unsigned &  jindex 
)
inlineinherited

Get one of the stored indexes.

double PLMD::vesselbase::Vessel::getTolerance ( ) const
inlineprotectedinherited

Return the value of the tolerance.

void PLMD::crystallization::StoreVectorsVessel::getVector ( const unsigned &  imol,
std::vector< double > &  vec 
)
inline

Get the orientation of the ith vector.

void PLMD::crystallization::StoreVectorsVessel::normalizeVector ( const int &  jstore)
private
template<class T >
void PLMD::vesselbase::Vessel::parse ( const std::string &  key,
T &  t 
)
protectedinherited

Parse something from the input.

void PLMD::vesselbase::Vessel::parseFlag ( const std::string &  key,
bool &  t 
)
protectedinherited

Parse one keyword as boolean flag.

template<class T >
void PLMD::vesselbase::Vessel::parseVector ( const std::string &  key,
std::vector< T > &  t 
)
protectedinherited

Parse one keyword as std::vector.

void PLMD::vesselbase::StoreDataVessel::performTask ( const unsigned &  ivec)
inlinevirtualinherited

This reperforms the task in the underlying action.

Reimplemented in PLMD::multicolvar::StoreCentralAtomsVessel.

void PLMD::vesselbase::StoreDataVessel::prepare ( )
virtualinherited

Clear certain data before start of main loop.

Reimplemented from PLMD::vesselbase::Vessel.

void PLMD::crystallization::StoreVectorsVessel::recompute ( const unsigned &  ivec,
const unsigned &  jstore 
)
virtual

This reperforms a calculation.

Reimplemented from PLMD::vesselbase::StoreDataVessel.

void PLMD::crystallization::StoreVectorsVessel::registerKeywords ( Keywords keys)
static
void PLMD::vesselbase::StoreDataVessel::resize ( )
virtualinherited

Do all resizing of data.

Implements PLMD::vesselbase::Vessel.

Reimplemented in PLMD::vesselbase::Moments.

void PLMD::vesselbase::Vessel::resizeBuffer ( const unsigned &  n)
inlineprotectedinherited

Set the size of the data buffer.

void PLMD::vesselbase::Vessel::setBufferElement ( const unsigned &  i,
const double &  val 
)
inlineprotectedinherited

Set the value of the ith element in the buffer.

void PLMD::vesselbase::StoreDataVessel::setComponent ( const unsigned &  ival,
const unsigned &  jcomp,
const double &  val 
)
inlineprotectedinherited

Set a component of one of the vectors.

void PLMD::vesselbase::StoreDataVessel::setLocalDerivative ( const unsigned &  ibuf,
const double &  val 
)
inlineprotectedinherited

Set the ibuf'th local derivative value.

void PLMD::vesselbase::StoreDataVessel::setTaskToRecompute ( const unsigned &  ivec)
protectedinherited

Set the Task that needs redoing.

void PLMD::vesselbase::StoreDataVessel::storeDerivativesHighMem ( const unsigned &  myelem)
inherited

This stores the data we get from the calculation.

void PLMD::vesselbase::StoreDataVessel::storeDerivativesLowMem ( const unsigned &  jstore)
inherited

This stores the data we get from the calculation.

void PLMD::vesselbase::StoreDataVessel::storeValues ( const unsigned &  myelem)
protectedinherited

Retrieve the values from the underlying ActionWithVessel.

std::string PLMD::vesselbase::Vessel::transformName ( const std::string &  name)
staticinherited

Convert the name to the label of the component.

void PLMD::crystallization::StoreVectorsVessel::usedInFunction ( const bool &  store)

This turns on the full use of this action for storage.

bool PLMD::vesselbase::StoreDataVessel::usingLowMem ( )
inlineprotectedinherited

Are we using low mem option.

bool PLMD::vesselbase::StoreDataVessel::weightHasDerivatives ( )
inlineprotectedinherited

Is the weight differentiable.

void PLMD::vesselbase::Vessel::zero ( )
inlineinherited

Set all the buffer elements to zero.

Friends And Related Function Documentation

friend class VectorMultiColvar
friend

Member Data Documentation

Communicator& PLMD::vesselbase::Vessel::comm
protectedinherited

A copy of the communicator.

Log& PLMD::vesselbase::Vessel::log
inherited

Reference to the log on which to output details.

std::vector<double> PLMD::crystallization::StoreVectorsVessel::myfvec
private
unsigned PLMD::crystallization::StoreVectorsVessel::ncomponents
private
bool PLMD::crystallization::StoreVectorsVessel::store_director
private

We want to store the director rather than the value.

VectorMultiColvar* PLMD::crystallization::StoreVectorsVessel::vecs
private

The documentation for this class was generated from the following files: