Line data Source code
1 : /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 : Copyright (c) 2013-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/ActionShortcut.h" 23 : #include "core/ActionRegister.h" 24 : 25 : //+PLUMEDOC MCOLVAR DUMPMULTICOLVAR 26 : /* 27 : Dump atom positions and a vector of values to a file. 28 : 29 : This action has been depracated as the same result can be be achieved using [DUMPATOMS](DUMPATOMS.md) as you can if you look 30 : at the expanded version of the shortct in the example input below: 31 : 32 : ```plumed 33 : c1: COORDINATIONNUMBER SPECIES=1-100 SWITCH={RATIONAL R_0=0.1} 34 : DUMPMULTICOLVAR DATA=c1 FILE=coords.xyz 35 : ``` 36 : 37 : */ 38 : //+ENDPLUMEDOC 39 : 40 : namespace PLMD { 41 : namespace multicolvar { 42 : 43 : class DumpMultiColvar : public ActionShortcut { 44 : public: 45 : static void registerKeywords(Keywords& keys); 46 : explicit DumpMultiColvar(const ActionOptions&); 47 : }; 48 : 49 : PLUMED_REGISTER_ACTION(DumpMultiColvar,"DUMPMULTICOLVAR") 50 : 51 2 : void DumpMultiColvar::registerKeywords(Keywords& keys) { 52 2 : ActionShortcut::registerKeywords( keys ); 53 4 : keys.setDeprecated("DUMPATOMS"); 54 2 : keys.add("compulsory","DATA","the vector you wish to transform"); 55 2 : keys.add("compulsory","FILE","the file that you would like to output the data to"); 56 2 : keys.remove("HAS_VALUES"); 57 2 : keys.needsAction("DUMPATOMS"); 58 2 : } 59 : 60 0 : DumpMultiColvar::DumpMultiColvar(const ActionOptions& ao): 61 : Action(ao), 62 0 : ActionShortcut(ao) { 63 0 : warning("This action has been depracated. Look at the log to see how the same result is achieved with the new syntax"); 64 : std::string dd; 65 0 : parse("DATA",dd); 66 0 : readInputLine("DUMPATOMS ATOMS=" + dd + "_grp ARG=" + dd + " " + convertInputLineToString() ); 67 0 : } 68 : 69 : } 70 : }