LCOV - code coverage report
Current view: top level - generic - EndPlumed.cpp (source / functions) Hit Total Coverage
Test: plumed test coverage Lines: 8 10 80.0 %
Date: 2026-03-30 11:13:23 Functions: 2 4 50.0 %

          Line data    Source code
       1             : /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
       2             :    Copyright (c) 2017-2023 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             : #include "core/ActionRegister.h"
      23             : #include "core/ActionSet.h"
      24             : #include "core/PlumedMain.h"
      25             : 
      26             : namespace PLMD {
      27             : namespace generic {
      28             : 
      29             : //+PLUMEDOC GENERIC ENDPLUMED
      30             : /*
      31             : Terminate plumed input.
      32             : 
      33             : Can be used to effectively comment out the rest of the input file.
      34             : It can be useful to quickly ignore part of a long input file. However,
      35             : one should keep in mind that when opening the file it might be difficult to
      36             : find where the commented out part begins. Regular comments (with `#`) are
      37             : usually easier to read. Notice that \ref VimSyntax "VIM syntax" should be able
      38             : to detect this command and properly mark the rest of the file as a comment,
      39             : although since vim doesn't parse the whole file it might fail in doing so for long
      40             : input files.
      41             : 
      42             : \par Examples
      43             : 
      44             : \plumedfile
      45             : d: DISTANCE ATOMS=1,10
      46             : PRINT ARG=d FILE=COLVAR STRIDE=10
      47             : ENDPLUMED
      48             : commands here are ignored
      49             : PRINT ARG=d FILE=COLVAR STRIDE=1
      50             : \endplumedfile
      51             : 
      52             : */
      53             : //+ENDPLUMEDOC
      54             : class EndPlumed:
      55             :   public Action {
      56             : public:
      57             :   explicit EndPlumed(const ActionOptions&ao);
      58             : /// Register all the relevant keywords for the action
      59             :   static void registerKeywords( Keywords& keys );
      60           0 :   void calculate() override {}
      61           0 :   void apply() override {}
      62             : };
      63             : 
      64             : PLUMED_REGISTER_ACTION(EndPlumed,"ENDPLUMED")
      65             : 
      66         299 : void EndPlumed::registerKeywords( Keywords& keys ) {
      67         299 :   Action::registerKeywords( keys );
      68         299 : }
      69             : 
      70         295 : EndPlumed::EndPlumed(const ActionOptions&ao):
      71         295 :   Action(ao) {
      72         295 :   checkRead();
      73         295 :   plumed.setEndPlumed();
      74         295 : }
      75             : 
      76             : }
      77             : }
      78             : 

Generated by: LCOV version 1.16