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