Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
PLMD::adjmat::AdjacencyMatrixVessel Class Reference

#include <AdjacencyMatrixVessel.h>

Inheritance diagram for PLMD::adjmat::AdjacencyMatrixVessel:
Inheritance graph
[legend]

Public Member Functions

 AdjacencyMatrixVessel (const vesselbase::VesselOptions &)
 Constructor. More...
 
AdjacencyMatrixBasegetMatrixAction ()
 Get the underlying adjacency matrix action object. More...
 
bool matrixElementIsActive (const unsigned &ielem, const unsigned &jelem) const
 Is an element of the matrix currently active. More...
 
unsigned getStoreIndexFromMatrixIndices (const unsigned &ielem, const unsigned &jelem) const
 Get the index that a particular element is stored in from the matrix indices. More...
 
void retrieveMatrix (DynamicList< unsigned > &myactive_elements, Matrix< double > &mymatrix)
 Get the adjacency matrix. More...
 
void retrieveAdjacencyLists (std::vector< unsigned > &nneigh, Matrix< unsigned > &adj_list)
 Get the neighbour list based on the adjacency matrix. More...
 
void retrieveEdgeList (unsigned &nedge, std::vector< std::pair< unsigned, unsigned > > &edge_list)
 Retrieve the list of edges in the adjacency matrix/graph. More...
 
void retrieveDerivatives (const unsigned &myelem, const bool &normed, MultiValue &myvals)
 Retrieve the derivatives of the matrix element - this is overwritten as if we have derivatives wrt a weight... More...
 
void getMatrixIndices (const unsigned &code, unsigned &i, unsigned &j) const
 
void recalculateStoredQuantity (const unsigned &myelm, MultiValue &myvals)
 Recalculate a stored quantity. More...
 
bool undirectedGraph () const
 Can we think of the matrix as an undirected graph. More...
 
bool isSymmetric () const
 Is the matrix symmetric. More...
 
unsigned getNumberOfRows () const
 Get the number of rows. More...
 
unsigned getNumberOfColumns () const
 Get the number of columns. More...
 
bool nodesAreConnected (const unsigned &iatom, const unsigned &jatom) const
 Are these two nodes connected. More...
 
double getCutoffForConnection () const
 Get the cutoff that we are using for connections. More...
 
Vector getNodePosition (const unsigned &taskIndex) const
 
virtual unsigned getNumberOfStoredValues () const
 Get the number of values that have been stored. More...
 
unsigned getStoreIndex (const unsigned &) const
 Get the index to store a particular index inside. More...
 
void setHardCutoffOnWeight (const double &mytol)
 Set a hard cutoff on the weight of an element. More...
 
void addActionThatUses (ActionWithVessel *actionThatUses)
 Add an action that uses this data. More...
 
unsigned getNumberOfComponents () const
 Return the number of components in the vector. More...
 
void retrieveSequentialValue (const unsigned &myelem, const bool &normed, std::vector< double > &values) const
 Get the values of all the components in the vector. More...
 
void retrieveValueWithIndex (const unsigned &myelem, const bool &normed, std::vector< double > &values) const
 
double retrieveWeightWithIndex (const unsigned &myelem) const
 
virtual void resize ()
 Do all resizing of data. More...
 
virtual std::string description ()
 Return a description of the vessel contents. More...
 
unsigned getNumberOfDerivatives (const unsigned &)
 Get the number of derivatives for the ith value. More...
 
unsigned getSizeOfDerivativeList () const
 Get the size of the derivative list. More...
 
virtual void calculate (const unsigned &current, MultiValue &myvals, std::vector< double > &buffer, std::vector< unsigned > &der_index) const
 This stores the data when not using lowmem. More...
 
virtual void finish (const std::vector< double > &buffer)
 Final step in gathering data. More...
 
bool storedValueIsActive (const unsigned &iatom) const
 Is a particular stored value active at the present time. More...
 
void setActiveValsAndDerivatives (const std::vector< unsigned > &der_index)
 Set the active values. More...
 
virtual void activateIndices (ActionWithVessel *)
 Activate indexes (this is used at end of chain rule) More...
 
virtual bool applyForce (std::vector< double > &)
 Forces on vectors should always be applied elsewhere. More...
 
unsigned getNumberOfDataUsers () const
 Get the number of data users. More...
 
ActionWithVesselgetDataUser (const unsigned &)
 Get one of the ith data user. More...
 
void resizeTemporyMultiValues (const unsigned &nvals)
 Set the number of tempory multivalues we need. More...
 
MultiValuegetTemporyMultiValue (const unsigned &ind)
 Return a tempory multi value - we do this so as to avoid vector resizing. 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...
 
virtual void setBufferStart (unsigned &start)
 Set the start of the buffer. More...
 
virtual void prepare ()
 Do something before the loop. More...
 
virtual MultiValuetransformDerivatives (const unsigned &current, MultiValue &myvals, MultiValue &bvals)
 This is replaced in bridges so we can transform the derivatives. 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 &, MultiValue &, std::vector< double > &) const
 Retrieve the values from the underlying ActionWithVessel. More...
 
void storeDerivatives (const unsigned &, MultiValue &myvals, std::vector< double > &, std::vector< unsigned > &) const
 This stores the data we get from the calculation. 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 () const
 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...
 

Protected Attributes

unsigned bufstart
 The start of this Vessel's buffer in buffer in the underlying ActionWithVessel. More...
 
Communicatorcomm
 A copy of the communicator. More...
 

Private Attributes

AdjacencyMatrixBasefunction
 Pointer to underlying action. More...
 
bool symmetric
 Is the matrix symmetric and are we calculating hbonds. More...
 
bool hbonds
 

Friends

class AdjacencyMatrixBase
 
class ActionWithInputMatrix
 

Constructor & Destructor Documentation

◆ AdjacencyMatrixVessel()

PLMD::adjmat::AdjacencyMatrixVessel::AdjacencyMatrixVessel ( const vesselbase::VesselOptions da)
explicit

Constructor.

Member Function Documentation

◆ activateIndices()

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

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

◆ addActionThatUses()

void PLMD::vesselbase::StoreDataVessel::addActionThatUses ( ActionWithVessel actionThatUses)
inherited

Add an action that uses this data.

◆ applyForce()

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.

◆ calculate()

void PLMD::vesselbase::StoreDataVessel::calculate ( const unsigned &  current,
MultiValue myvals,
std::vector< double > &  buffer,
std::vector< unsigned > &  der_index 
) const
virtualinherited

This stores the data when not using lowmem.

Implements PLMD::vesselbase::Vessel.

◆ checkRead()

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

Check that readin was fine.

◆ completeSetup()

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

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

◆ description()

virtual std::string PLMD::vesselbase::StoreDataVessel::description ( )
inlinevirtualinherited

Return a description of the vessel contents.

Implements PLMD::vesselbase::Vessel.

Reimplemented in PLMD::vesselbase::Moments.

◆ error()

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

Report an error.

◆ finish()

void PLMD::vesselbase::StoreDataVessel::finish ( const std::vector< double > &  buffer)
virtualinherited

Final step in gathering data.

Implements PLMD::vesselbase::Vessel.

Reimplemented in PLMD::vesselbase::Moments.

◆ getAction()

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

Return a pointer to the action we are working in.

◆ getAllInput()

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

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

◆ getCutoffForConnection()

double PLMD::adjmat::AdjacencyMatrixVessel::getCutoffForConnection ( ) const

Get the cutoff that we are using for connections.

◆ getDataUser()

ActionWithVessel * PLMD::vesselbase::StoreDataVessel::getDataUser ( const unsigned &  idata)
inlineinherited

Get one of the ith data user.

◆ getLabel()

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

Return the label.

◆ getLocalDerivative()

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

Get the ibuf'th local derivative value.

◆ getMatrixAction()

AdjacencyMatrixBase * PLMD::adjmat::AdjacencyMatrixVessel::getMatrixAction ( )

Get the underlying adjacency matrix action object.

◆ getMatrixIndices()

void PLMD::adjmat::AdjacencyMatrixVessel::getMatrixIndices ( const unsigned &  code,
unsigned &  i,
unsigned &  j 
) const

◆ getName()

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

Return the name.

◆ getNLTolerance()

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

Return the value of the neighbor list tolerance.

◆ getNodePosition()

Vector PLMD::adjmat::AdjacencyMatrixVessel::getNodePosition ( const unsigned &  taskIndex) const

◆ getNumberOfColumns()

unsigned PLMD::adjmat::AdjacencyMatrixVessel::getNumberOfColumns ( ) const

Get the number of columns.

◆ getNumberOfComponents()

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

Return the number of components in the vector.

◆ getNumberOfDataUsers()

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

Get the number of data users.

◆ getNumberOfDerivatives()

unsigned PLMD::vesselbase::StoreDataVessel::getNumberOfDerivatives ( const unsigned &  )
inherited

Get the number of derivatives for the ith value.

◆ getNumberOfDerivativeSpacesPerComponent()

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

Return value of nspace.

◆ getNumberOfRows()

unsigned PLMD::adjmat::AdjacencyMatrixVessel::getNumberOfRows ( ) const

Get the number of rows.

◆ getNumberOfStoredValues()

unsigned PLMD::vesselbase::StoreDataVessel::getNumberOfStoredValues ( ) const
inlinevirtualinherited

Get the number of values that have been stored.

◆ getNumericalLabel()

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

Return the numerical label.

◆ getSizeOfDerivativeList()

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

Get the size of the derivative list.

◆ getStoreIndex()

unsigned PLMD::vesselbase::StoreDataVessel::getStoreIndex ( const unsigned &  ind) const
inlineinherited

Get the index to store a particular index inside.

◆ getStoreIndexFromMatrixIndices()

unsigned PLMD::adjmat::AdjacencyMatrixVessel::getStoreIndexFromMatrixIndices ( const unsigned &  ielem,
const unsigned &  jelem 
) const

Get the index that a particular element is stored in from the matrix indices.

◆ getTemporyMultiValue()

MultiValue & PLMD::vesselbase::StoreDataVessel::getTemporyMultiValue ( const unsigned &  ind)
inherited

Return a tempory multi value - we do this so as to avoid vector resizing.

◆ getTolerance()

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

Return the value of the tolerance.

◆ isSymmetric()

bool PLMD::adjmat::AdjacencyMatrixVessel::isSymmetric ( ) const

Is the matrix symmetric.

◆ matrixElementIsActive()

bool PLMD::adjmat::AdjacencyMatrixVessel::matrixElementIsActive ( const unsigned &  ielem,
const unsigned &  jelem 
) const

Is an element of the matrix currently active.

◆ nodesAreConnected()

bool PLMD::adjmat::AdjacencyMatrixVessel::nodesAreConnected ( const unsigned &  iatom,
const unsigned &  jatom 
) const

Are these two nodes connected.

◆ parse()

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

Parse something from the input.

◆ parseFlag()

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

Parse one keyword as boolean flag.

◆ parseVector()

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

Parse one keyword as std::vector.

◆ prepare()

virtual void PLMD::vesselbase::Vessel::prepare ( )
inlinevirtualinherited

Do something before the loop.

Reimplemented in PLMD::vesselbase::BridgeVessel, and PLMD::mapping::SpathVessel.

◆ recalculateStoredQuantity()

void PLMD::adjmat::AdjacencyMatrixVessel::recalculateStoredQuantity ( const unsigned &  myelm,
MultiValue myvals 
)
virtual

Recalculate a stored quantity.

Reimplemented from PLMD::vesselbase::StoreDataVessel.

◆ registerKeywords()

void PLMD::adjmat::AdjacencyMatrixVessel::registerKeywords ( Keywords keys)
static

◆ resize()

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

Do all resizing of data.

Implements PLMD::vesselbase::Vessel.

Reimplemented in PLMD::vesselbase::Moments.

◆ resizeBuffer()

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

Set the size of the data buffer.

◆ resizeTemporyMultiValues()

void PLMD::vesselbase::StoreDataVessel::resizeTemporyMultiValues ( const unsigned &  nvals)
inherited

Set the number of tempory multivalues we need.

◆ retrieveAdjacencyLists()

void PLMD::adjmat::AdjacencyMatrixVessel::retrieveAdjacencyLists ( std::vector< unsigned > &  nneigh,
Matrix< unsigned > &  adj_list 
)

Get the neighbour list based on the adjacency matrix.

◆ retrieveDerivatives()

void PLMD::adjmat::AdjacencyMatrixVessel::retrieveDerivatives ( const unsigned &  myelem,
const bool &  normed,
MultiValue myvals 
)
virtual

Retrieve the derivatives of the matrix element - this is overwritten as if we have derivatives wrt a weight...

Reimplemented from PLMD::vesselbase::StoreDataVessel.

◆ retrieveEdgeList()

void PLMD::adjmat::AdjacencyMatrixVessel::retrieveEdgeList ( unsigned &  nedge,
std::vector< std::pair< unsigned, unsigned > > &  edge_list 
)

Retrieve the list of edges in the adjacency matrix/graph.

◆ retrieveMatrix()

void PLMD::adjmat::AdjacencyMatrixVessel::retrieveMatrix ( DynamicList< unsigned > &  myactive_elements,
Matrix< double > &  mymatrix 
)

Get the adjacency matrix.

◆ retrieveSequentialValue()

void PLMD::vesselbase::StoreDataVessel::retrieveSequentialValue ( const unsigned &  myelem,
const bool &  normed,
std::vector< double > &  values 
) const
inherited

Get the values of all the components in the vector.

◆ retrieveValueWithIndex()

void PLMD::vesselbase::StoreDataVessel::retrieveValueWithIndex ( const unsigned &  myelem,
const bool &  normed,
std::vector< double > &  values 
) const
inherited

◆ retrieveWeightWithIndex()

double PLMD::vesselbase::StoreDataVessel::retrieveWeightWithIndex ( const unsigned &  myelem) const
inherited

◆ setActiveValsAndDerivatives()

void PLMD::vesselbase::StoreDataVessel::setActiveValsAndDerivatives ( const std::vector< unsigned > &  der_index)
inherited

Set the active values.

◆ setBufferStart()

void PLMD::vesselbase::Vessel::setBufferStart ( unsigned &  start)
inlinevirtualinherited

Set the start of the buffer.

Reimplemented in PLMD::vesselbase::BridgeVessel.

◆ setHardCutoffOnWeight()

void PLMD::vesselbase::StoreDataVessel::setHardCutoffOnWeight ( const double &  mytol)
inherited

Set a hard cutoff on the weight of an element.

◆ setLocalDerivative()

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

Set the ibuf'th local derivative value.

◆ storeDerivatives()

void PLMD::vesselbase::StoreDataVessel::storeDerivatives ( const unsigned &  myelem,
MultiValue myvals,
std::vector< double > &  buffer,
std::vector< unsigned > &  der_list 
) const
protectedinherited

This stores the data we get from the calculation.

◆ storedValueIsActive()

bool PLMD::vesselbase::StoreDataVessel::storedValueIsActive ( const unsigned &  iatom) const
inlineinherited

Is a particular stored value active at the present time.

◆ storeValues()

void PLMD::vesselbase::StoreDataVessel::storeValues ( const unsigned &  myelem,
MultiValue myvals,
std::vector< double > &  buffer 
) const
protectedinherited

Retrieve the values from the underlying ActionWithVessel.

◆ transformDerivatives()

MultiValue & PLMD::vesselbase::Vessel::transformDerivatives ( const unsigned &  current,
MultiValue myvals,
MultiValue bvals 
)
inlinevirtualinherited

This is replaced in bridges so we can transform the derivatives.

Reimplemented in PLMD::vesselbase::BridgeVessel.

◆ transformName()

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

Convert the name to the label of the component.

◆ undirectedGraph()

bool PLMD::adjmat::AdjacencyMatrixVessel::undirectedGraph ( ) const

Can we think of the matrix as an undirected graph.

◆ usingLowMem()

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

Are we using low mem option.

◆ weightHasDerivatives()

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

Is the weight differentiable.

Friends And Related Function Documentation

◆ ActionWithInputMatrix

friend class ActionWithInputMatrix
friend

◆ AdjacencyMatrixBase

friend class AdjacencyMatrixBase
friend

Member Data Documentation

◆ bufstart

unsigned PLMD::vesselbase::Vessel::bufstart
protectedinherited

The start of this Vessel's buffer in buffer in the underlying ActionWithVessel.

◆ comm

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

A copy of the communicator.

◆ function

AdjacencyMatrixBase* PLMD::adjmat::AdjacencyMatrixVessel::function
private

Pointer to underlying action.

◆ hbonds

bool PLMD::adjmat::AdjacencyMatrixVessel::hbonds
private

◆ log

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

Reference to the log on which to output details.

◆ symmetric

bool PLMD::adjmat::AdjacencyMatrixVessel::symmetric
private

Is the matrix symmetric and are we calculating hbonds.


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