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 : { 57 : public: 58 : explicit EndPlumed(const ActionOptions&ao); 59 : /// Register all the relevant keywords for the action 60 : static void registerKeywords( Keywords& keys ); 61 0 : void calculate() override {} 62 0 : void apply() override {} 63 : }; 64 : 65 10678 : PLUMED_REGISTER_ACTION(EndPlumed,"ENDPLUMED") 66 : 67 260 : void EndPlumed::registerKeywords( Keywords& keys ) { 68 260 : Action::registerKeywords( keys ); 69 260 : } 70 : 71 259 : EndPlumed::EndPlumed(const ActionOptions&ao): 72 259 : Action(ao) 73 : { 74 259 : checkRead(); 75 259 : plumed.setEndPlumed(); 76 259 : } 77 : 78 : } 79 : } 80 :