LCOV - code coverage report
Current view: top level - adjmat - ActionWithInputMatrix.h (source / functions) Hit Total Coverage
Test: plumed test coverage Lines: 2 3 66.7 %
Date: 2018-12-19 07:49:13 Functions: 2 5 40.0 %

          Line data    Source code
       1             : /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
       2             :    Copyright (c) 2015-2018 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.org for more information.
       6             : 
       7             :    This file is part of plumed, version 2.
       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_adjmat_ActionWithInputMatrix_h
      23             : #define __PLUMED_adjmat_ActionWithInputMatrix_h
      24             : 
      25             : #include "core/ActionWithValue.h"
      26             : #include "core/ActionAtomistic.h"
      27             : #include "multicolvar/MultiColvarBase.h"
      28             : #include "multicolvar/MultiColvarFunction.h"
      29             : 
      30             : namespace PLMD {
      31             : namespace adjmat {
      32             : 
      33             : class AdjacencyMatrixVessel;
      34             : 
      35          19 : class ActionWithInputMatrix : public multicolvar::MultiColvarFunction {
      36             : protected:
      37             : /// The vessel that holds the adjacency matrix
      38             :   AdjacencyMatrixVessel* mymatrix;
      39             : /// Get number of base multicolvar types
      40             :   unsigned getNumberOfNodeTypes() const ;
      41             : /// Get number of atoms in each base multicolvar
      42             :   unsigned getNumberOfAtomsInGroup( const unsigned& igrp ) const ;
      43             : /// Get a pointer to the igrp th base multicolvar
      44             :   multicolvar::MultiColvarBase* getBaseMultiColvar( const unsigned& igrp ) const ;
      45             : public:
      46             :   static void registerKeywords( Keywords& keys );
      47             :   explicit ActionWithInputMatrix(const ActionOptions&);
      48             : /// Retrieve the vessel that holds the adjacency matrix
      49             :   AdjacencyMatrixVessel* getAdjacencyVessel() const ;
      50             : /// Retrieve the value of the connection
      51             :   double retrieveConnectionValue( const unsigned& i, const unsigned& j, std::vector<double>& vals ) const ;
      52             : /// Get the vector for task ind
      53             :   virtual void getInputData( const unsigned& ind, const bool& normed, const multicolvar::AtomValuePack& myatoms, std::vector<double>& orient0 ) const ;
      54             : /// Add the derivatives on a connection
      55             :   void addConnectionDerivatives( const unsigned& i, const unsigned& j, std::vector<double>& vals, MultiValue& myvals, MultiValue& myvout ) const ;
      56             : /// Get vector derivatives
      57             :   virtual MultiValue& getInputDerivatives( const unsigned& ind, const bool& normed, const multicolvar::AtomValuePack& myatoms ) const ;
      58             :   virtual unsigned getNumberOfDerivatives();
      59             : ///  Get the number of rows/cols in the adjacency matrix vessel
      60             :   virtual unsigned getNumberOfNodes() const ;
      61          52 :   bool isPeriodic() { return false; }
      62             :   virtual unsigned getNumberOfQuantities() const ;
      63             : ///
      64             :   virtual AtomNumber getAbsoluteIndexOfCentralAtom(const unsigned& i) const ;
      65             : /// No loop over tasks for ActionWithInputMatrix
      66           0 :   double compute( const unsigned& tindex, multicolvar::AtomValuePack& myatoms ) const { plumed_error(); }
      67             : ///
      68             :   virtual Vector getPositionOfAtomForLinkCells( const unsigned& iatom ) const ;
      69             : };
      70             : 
      71             : }
      72             : }
      73             : #endif

Generated by: LCOV version 1.13