[bcf653] | 1 | /*
|
---|
| 2 | * Project: MoleCuilder
|
---|
| 3 | * Description: creates and alters molecular systems
|
---|
| 4 | * Copyright (C) 2010 University of Bonn. All rights reserved.
|
---|
| 5 | * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
|
---|
| 6 | */
|
---|
| 7 |
|
---|
[97ebf8] | 8 | /*
|
---|
| 9 | * MapOfActions.cpp
|
---|
| 10 | *
|
---|
| 11 | * Created on: 10.05.2010
|
---|
| 12 | * Author: heber
|
---|
| 13 | */
|
---|
| 14 |
|
---|
[bf3817] | 15 | // include config.h
|
---|
| 16 | #ifdef HAVE_CONFIG_H
|
---|
| 17 | #include <config.h>
|
---|
| 18 | #endif
|
---|
| 19 |
|
---|
[112b09] | 20 | #include "Helpers/MemDebug.hpp"
|
---|
| 21 |
|
---|
[97ebf8] | 22 | using namespace std;
|
---|
| 23 |
|
---|
| 24 | #include "Actions/MapOfActions.hpp"
|
---|
[d02e07] | 25 | #include "Descriptors/AtomIdDescriptor.hpp"
|
---|
| 26 | #include "Descriptors/MoleculeIdDescriptor.hpp"
|
---|
[97ebf8] | 27 | #include "Helpers/Assert.hpp"
|
---|
[4e145c] | 28 | #include "Patterns/Singleton_impl.hpp"
|
---|
[97ebf8] | 29 |
|
---|
[0286bc] | 30 | #include <boost/lexical_cast.hpp>
|
---|
| 31 | #include <boost/optional.hpp>
|
---|
| 32 | #include <boost/program_options.hpp>
|
---|
[6f5dfe] | 33 | #include <boost/filesystem.hpp>
|
---|
[0286bc] | 34 |
|
---|
[986ed3] | 35 | #include <iostream>
|
---|
| 36 |
|
---|
[ab9a27] | 37 | #include "atom.hpp"
|
---|
[d02e07] | 38 | #include "Box.hpp"
|
---|
[97ebf8] | 39 | #include "CommandLineParser.hpp"
|
---|
[ab9a27] | 40 | #include "element.hpp"
|
---|
[952f38] | 41 | #include "Helpers/Log.hpp"
|
---|
[57f243] | 42 | #include "LinearAlgebra/Matrix.hpp"
|
---|
[ab9a27] | 43 | #include "molecule.hpp"
|
---|
[d02e07] | 44 | #include "periodentafel.hpp"
|
---|
[72f611] | 45 | #include "LinearAlgebra/BoxVector.hpp"
|
---|
[57f243] | 46 | #include "LinearAlgebra/Vector.hpp"
|
---|
[952f38] | 47 | #include "Helpers/Verbose.hpp"
|
---|
[97ebf8] | 48 |
|
---|
[326bbe] | 49 | #include "Actions/ActionRegistry.hpp"
|
---|
| 50 | #include "Actions/AnalysisAction/MolecularVolumeAction.hpp"
|
---|
| 51 | #include "Actions/AnalysisAction/PairCorrelationAction.hpp"
|
---|
[d02e07] | 52 | #include "Actions/AnalysisAction/PointCorrelationAction.hpp"
|
---|
[326bbe] | 53 | #include "Actions/AnalysisAction/PrincipalAxisSystemAction.hpp"
|
---|
[d02e07] | 54 | #include "Actions/AnalysisAction/SurfaceCorrelationAction.hpp"
|
---|
[326bbe] | 55 | #include "Actions/AtomAction/AddAction.hpp"
|
---|
| 56 | #include "Actions/AtomAction/ChangeElementAction.hpp"
|
---|
| 57 | #include "Actions/AtomAction/RemoveAction.hpp"
|
---|
[22c44bf] | 58 | #include "Actions/AtomAction/RotateAroundOriginByAngleAction.hpp"
|
---|
[34c338] | 59 | #include "Actions/AtomAction/TranslateAction.hpp"
|
---|
[53d01c] | 60 | #include "Actions/CommandAction/BondLengthTableAction.hpp"
|
---|
| 61 | #include "Actions/CommandAction/ElementDbAction.hpp"
|
---|
| 62 | #include "Actions/CommandAction/FastParsingAction.hpp"
|
---|
| 63 | #include "Actions/CommandAction/HelpAction.hpp"
|
---|
| 64 | #include "Actions/CommandAction/VerboseAction.hpp"
|
---|
| 65 | #include "Actions/CommandAction/VersionAction.hpp"
|
---|
[7230be] | 66 | #include "Actions/CommandAction/WarrantyAction.hpp"
|
---|
[1a7fd2] | 67 | #include "Actions/FragmentationAction/ConstructBondGraphAction.hpp"
|
---|
[326bbe] | 68 | #include "Actions/FragmentationAction/DepthFirstSearchAction.hpp"
|
---|
| 69 | #include "Actions/FragmentationAction/SubgraphDissectionAction.hpp"
|
---|
| 70 | #include "Actions/FragmentationAction/FragmentationAction.hpp"
|
---|
| 71 | #include "Actions/MoleculeAction/BondFileAction.hpp"
|
---|
| 72 | #include "Actions/MoleculeAction/ChangeNameAction.hpp"
|
---|
[1a7fd2] | 73 | #include "Actions/MoleculeAction/CopyAction.hpp"
|
---|
[326bbe] | 74 | #include "Actions/MoleculeAction/FillWithMoleculeAction.hpp"
|
---|
[eee966] | 75 | #include "Actions/MoleculeAction/FillVoidWithMoleculeAction.hpp"
|
---|
[326bbe] | 76 | #include "Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.hpp"
|
---|
[eaf4ae] | 77 | #include "Actions/MoleculeAction/RotateAroundSelfByAngleAction.hpp"
|
---|
[b2531f] | 78 | #include "Actions/MoleculeAction/RotateToPrincipalAxisSystemAction.hpp"
|
---|
[326bbe] | 79 | #include "Actions/MoleculeAction/SaveAdjacencyAction.hpp"
|
---|
| 80 | #include "Actions/MoleculeAction/SaveBondsAction.hpp"
|
---|
| 81 | #include "Actions/MoleculeAction/SaveTemperatureAction.hpp"
|
---|
[b2531f] | 82 | #include "Actions/MoleculeAction/SuspendInWaterAction.hpp"
|
---|
[326bbe] | 83 | #include "Actions/MoleculeAction/VerletIntegrationAction.hpp"
|
---|
| 84 | #include "Actions/ParserAction/LoadXyzAction.hpp"
|
---|
| 85 | #include "Actions/ParserAction/SaveXyzAction.hpp"
|
---|
[e472eab] | 86 | #include "Actions/SelectionAction/AllAtomsAction.hpp"
|
---|
[1cc87e] | 87 | #include "Actions/SelectionAction/AllAtomsInsideCuboidAction.hpp"
|
---|
| 88 | #include "Actions/SelectionAction/AllAtomsInsideSphereAction.hpp"
|
---|
[770287] | 89 | #include "Actions/SelectionAction/AllAtomsOfMoleculeAction.hpp"
|
---|
[e472eab] | 90 | #include "Actions/SelectionAction/AllMoleculesAction.hpp"
|
---|
[51769f] | 91 | #include "Actions/SelectionAction/AtomByElementAction.hpp"
|
---|
[533838] | 92 | #include "Actions/SelectionAction/AtomByIdAction.hpp"
|
---|
[e212ff] | 93 | #include "Actions/SelectionAction/ClearAllAtomsAction.hpp"
|
---|
[2218d94] | 94 | #include "Actions/SelectionAction/ClearAllMoleculesAction.hpp"
|
---|
[51769f] | 95 | #include "Actions/SelectionAction/MoleculeByFormulaAction.hpp"
|
---|
[533838] | 96 | #include "Actions/SelectionAction/MoleculeByIdAction.hpp"
|
---|
[481e92] | 97 | #include "Actions/SelectionAction/MoleculeOfAtomAction.hpp"
|
---|
[e472eab] | 98 | #include "Actions/SelectionAction/NotAllAtomsAction.hpp"
|
---|
[1cc87e] | 99 | #include "Actions/SelectionAction/NotAllAtomsInsideCuboidAction.hpp"
|
---|
| 100 | #include "Actions/SelectionAction/NotAllAtomsInsideSphereAction.hpp"
|
---|
[381c5f] | 101 | #include "Actions/SelectionAction/NotAllAtomsOfMoleculeAction.hpp"
|
---|
[e472eab] | 102 | #include "Actions/SelectionAction/NotAllMoleculesAction.hpp"
|
---|
[51769f] | 103 | #include "Actions/SelectionAction/NotAtomByElementAction.hpp"
|
---|
[533838] | 104 | #include "Actions/SelectionAction/NotAtomByIdAction.hpp"
|
---|
[51769f] | 105 | #include "Actions/SelectionAction/NotMoleculeByFormulaAction.hpp"
|
---|
[533838] | 106 | #include "Actions/SelectionAction/NotMoleculeByIdAction.hpp"
|
---|
[75a80f] | 107 | #include "Actions/SelectionAction/NotMoleculeOfAtomAction.hpp"
|
---|
[326bbe] | 108 | #include "Actions/TesselationAction/ConvexEnvelopeAction.hpp"
|
---|
| 109 | #include "Actions/TesselationAction/NonConvexEnvelopeAction.hpp"
|
---|
| 110 | #include "Actions/WorldAction/AddEmptyBoundaryAction.hpp"
|
---|
| 111 | #include "Actions/WorldAction/BoundInBoxAction.hpp"
|
---|
| 112 | #include "Actions/WorldAction/CenterInBoxAction.hpp"
|
---|
| 113 | #include "Actions/WorldAction/CenterOnEdgeAction.hpp"
|
---|
| 114 | #include "Actions/WorldAction/ChangeBoxAction.hpp"
|
---|
| 115 | #include "Actions/WorldAction/InputAction.hpp"
|
---|
| 116 | #include "Actions/WorldAction/OutputAction.hpp"
|
---|
| 117 | #include "Actions/WorldAction/RepeatBoxAction.hpp"
|
---|
| 118 | #include "Actions/WorldAction/ScaleBoxAction.hpp"
|
---|
| 119 | #include "Actions/WorldAction/SetDefaultNameAction.hpp"
|
---|
| 120 | #include "Actions/WorldAction/SetGaussianBasisAction.hpp"
|
---|
[b9c847] | 121 | #include "Actions/WorldAction/SetOutputFormatsAction.hpp"
|
---|
[0286bc] | 122 | #include "Actions/Values.hpp"
|
---|
| 123 |
|
---|
| 124 | void validate(boost::any& v, const std::vector<std::string>& values, VectorValue *, int)
|
---|
| 125 | {
|
---|
| 126 | VectorValue VV;
|
---|
[b540f3] | 127 | std::vector<std::string> components;
|
---|
| 128 |
|
---|
| 129 | // split comma-separated values
|
---|
| 130 | if (values.size() != 1) {
|
---|
| 131 | cerr << "Not one vector but " << components.size() << " given " << endl;
|
---|
| 132 | throw boost::program_options::validation_error("Unequal to one vector given");
|
---|
| 133 | }
|
---|
| 134 | std::string argument(values.at(0));
|
---|
| 135 | std::string::iterator Aiter = argument.begin();
|
---|
| 136 | std::string::iterator Biter = argument.begin();
|
---|
| 137 | for (; Aiter != argument.end(); ++Aiter) {
|
---|
| 138 | if (*Aiter == ',') {
|
---|
| 139 | components.push_back(string(Biter,Aiter));
|
---|
| 140 | do {
|
---|
| 141 | Aiter++;
|
---|
| 142 | } while (*Aiter == ' ' || *Aiter == '\t');
|
---|
| 143 | Biter = Aiter;
|
---|
| 144 | }
|
---|
| 145 | }
|
---|
| 146 | components.push_back(string(Biter,argument.end()));
|
---|
| 147 |
|
---|
| 148 | if (components.size() != 3) {
|
---|
| 149 | cerr << "Specified vector does not have three components but " << components.size() << endl;
|
---|
[0286bc] | 150 | throw boost::program_options::validation_error("Specified vector does not have three components");
|
---|
| 151 | }
|
---|
[b540f3] | 152 | VV.x = boost::lexical_cast<double>(components.at(0));
|
---|
| 153 | VV.y = boost::lexical_cast<double>(components.at(1));
|
---|
| 154 | VV.z = boost::lexical_cast<double>(components.at(2));
|
---|
[0286bc] | 155 | v = boost::any(VectorValue(VV));
|
---|
| 156 | }
|
---|
| 157 |
|
---|
| 158 | void validate(boost::any& v, const std::vector<std::string>& values, BoxValue *, int)
|
---|
| 159 | {
|
---|
| 160 | BoxValue BV;
|
---|
[b540f3] | 161 | std::vector<std::string> components;
|
---|
| 162 |
|
---|
| 163 | // split comma-separated values
|
---|
| 164 | if (values.size() != 1) {
|
---|
| 165 | cerr << "Not one vector but " << components.size() << " given " << endl;
|
---|
| 166 | throw boost::program_options::validation_error("Unequal to one vector given");
|
---|
| 167 | }
|
---|
| 168 | std::string argument(values.at(0));
|
---|
| 169 | std::string::iterator Aiter = argument.begin();
|
---|
| 170 | std::string::iterator Biter = argument.begin();
|
---|
| 171 | for (; Aiter != argument.end(); ++Aiter) {
|
---|
| 172 | if (*Aiter == ',') {
|
---|
| 173 | components.push_back(string(Biter,Aiter));
|
---|
| 174 | do {
|
---|
| 175 | Aiter++;
|
---|
| 176 | } while (*Aiter == ' ' || *Aiter == '\t');
|
---|
| 177 | Biter = Aiter;
|
---|
| 178 | }
|
---|
| 179 | }
|
---|
| 180 | components.push_back(string(Biter,argument.end()));
|
---|
| 181 |
|
---|
| 182 | if (components.size() != 6) {
|
---|
| 183 | cerr << "Specified vector does not have three components but " << components.size() << endl;
|
---|
[0286bc] | 184 | throw boost::program_options::validation_error("Specified symmetric box matrix does not have six components");
|
---|
| 185 | }
|
---|
[b540f3] | 186 | BV.xx = boost::lexical_cast<double>(components.at(0));
|
---|
[8467df] | 187 | BV.yx = boost::lexical_cast<double>(components.at(1));
|
---|
| 188 | BV.yy = boost::lexical_cast<double>(components.at(2));
|
---|
| 189 | BV.zx = boost::lexical_cast<double>(components.at(3));
|
---|
| 190 | BV.zy = boost::lexical_cast<double>(components.at(4));
|
---|
[b540f3] | 191 | BV.zz = boost::lexical_cast<double>(components.at(5));
|
---|
[0286bc] | 192 | v = boost::any(BoxValue(BV));
|
---|
| 193 | }
|
---|
| 194 |
|
---|
[97ebf8] | 195 | /** Constructor of class MapOfActions.
|
---|
| 196 | *
|
---|
| 197 | */
|
---|
| 198 | MapOfActions::MapOfActions()
|
---|
| 199 | {
|
---|
| 200 | // initialise lookup map
|
---|
| 201 | CmdParserLookup[&generic] = &(CommandLineParser::getInstance().generic);
|
---|
| 202 | CmdParserLookup[&config] = &(CommandLineParser::getInstance().config);
|
---|
| 203 | CmdParserLookup[&hidden] = &(CommandLineParser::getInstance().hidden);
|
---|
| 204 | CmdParserLookup[&visible] = &(CommandLineParser::getInstance().visible);
|
---|
| 205 |
|
---|
| 206 | // keys for actions
|
---|
| 207 | DescriptionMap["add-atom"] = "add atom of specified element";
|
---|
| 208 | DescriptionMap["bond-table"] = "setting name of the bond length table file";
|
---|
| 209 | DescriptionMap["bond-file"] = "name of the bond file";
|
---|
| 210 | DescriptionMap["boundary"] = "change box to add an empty boundary around all atoms";
|
---|
| 211 | DescriptionMap["bound-in-box"] = "bound all atoms in the domain";
|
---|
| 212 | DescriptionMap["center-edge"] = "center edge of all atoms on (0,0,0)";
|
---|
| 213 | DescriptionMap["center-in-box"] = "center all atoms in the domain";
|
---|
| 214 | DescriptionMap["change-box"] = "change the symmetrc matrix of the simulation domain";
|
---|
| 215 | DescriptionMap["change-element"] = "change the element of an atom";
|
---|
| 216 | DescriptionMap["change-molname"] = "change the name of a molecule";
|
---|
[e212ff] | 217 | DescriptionMap["clear-atom-selection"] = "clear the atom selection";
|
---|
[2218d94] | 218 | DescriptionMap["clear-molecule-selection"] = "clear the molecule selection";
|
---|
[c449d9] | 219 | DescriptionMap["construct-bondgraph"] = "construct the bond graph of the selected atoms";
|
---|
[97ebf8] | 220 | DescriptionMap["convex-envelope"] = "create the convex envelope for a molecule";
|
---|
[1a7fd2] | 221 | DescriptionMap["copy-molecule"] = "copies a molecule with all atoms and bonds";
|
---|
[97ebf8] | 222 | DescriptionMap["default-molname"] = "set the default name of new molecules";
|
---|
| 223 | DescriptionMap["depth-first-search"] = "Depth-First Search analysis of the molecular system";
|
---|
| 224 | DescriptionMap["element-db"] = "setting the path where the element databases can be found";
|
---|
| 225 | DescriptionMap["fastparsing"] = "setting whether trajectories shall be parsed completely (n) or just first step (y)";
|
---|
[eee966] | 226 | DescriptionMap["fill-molecule"] = "fill around molecules' surface with a filler molecule";
|
---|
| 227 | DescriptionMap["fill-void"] = "fill void space of box with a filler molecule";
|
---|
[97ebf8] | 228 | DescriptionMap["fragment-mol"] = "create for a given molecule into fragments up to given order";
|
---|
[7230be] | 229 | DescriptionMap["help"] = "help screen";
|
---|
[4f7f34e] | 230 | DescriptionMap["input"] = "specify input files";
|
---|
[97ebf8] | 231 | DescriptionMap["linear-interpolate"] = "linear interpolation in discrete steps between start and end position of a molecule";
|
---|
| 232 | DescriptionMap["molecular-volume"] = "calculate the volume of a given molecule";
|
---|
[b9c847] | 233 | DescriptionMap["nonconvex-envelope"] = "create the non-convex envelope for a molecule";
|
---|
| 234 | DescriptionMap["output"] = "write output files";
|
---|
| 235 | DescriptionMap["set-output"] = "specify output formats";
|
---|
[e65de8] | 236 | DescriptionMap["pair-correlation"] = "pair correlation analysis between two elements";
|
---|
[97ebf8] | 237 | DescriptionMap["parse-xyz"] = "parse xyz file into World";
|
---|
[e65de8] | 238 | DescriptionMap["point-correlation"] = "pair correlation analysis between element and point";
|
---|
[97ebf8] | 239 | DescriptionMap["principal-axis-system"] = "calculate the principal axis system of the specified molecule";
|
---|
[446bc1] | 240 | DescriptionMap["redo"] = "redo last action";
|
---|
[97ebf8] | 241 | DescriptionMap["remove-atom"] = "remove a specified atom";
|
---|
| 242 | DescriptionMap["repeat-box"] = "create periodic copies of the simulation box per axis";
|
---|
[22c44bf] | 243 | DescriptionMap["rotate-origin"] = "rotate selected atoms by a specific angle around origin";
|
---|
[eaf4ae] | 244 | DescriptionMap["rotate-self"] = "rotates molecules by a specific angle around own center of gravity";
|
---|
[97ebf8] | 245 | DescriptionMap["rotate-to-pas"] = "calculate the principal axis system of the specified molecule and rotate specified axis to align with main axis";
|
---|
| 246 | DescriptionMap["save-adjacency"] = "name of the adjacency file to write to";
|
---|
| 247 | DescriptionMap["save-bonds"] = "name of the bonds file to write to";
|
---|
| 248 | DescriptionMap["save-temperature"] = "name of the temperature file to write to";
|
---|
[326bbe] | 249 | DescriptionMap["SaveXyz"] = "save world as xyz file";
|
---|
[2a92ff] | 250 | DescriptionMap["scale-box"] = "scale box and atomic positions inside";
|
---|
[4e4c4d] | 251 | DescriptionMap["select-all-atoms"] = "select all atoms";
|
---|
| 252 | DescriptionMap["select-all-molecules"] = "select all molecules";
|
---|
[51769f] | 253 | DescriptionMap["select-atom-by-element"] = "select an atom by element";
|
---|
[4e4c4d] | 254 | DescriptionMap["select-atom-by-id"] = "select an atom by index";
|
---|
[1cc87e] | 255 | DescriptionMap["select-atoms-inside-cuboid"] = "select all atoms inside a cuboid";
|
---|
| 256 | DescriptionMap["select-atoms-inside-sphere"] = "select all atoms inside a sphere";
|
---|
[4e4c4d] | 257 | DescriptionMap["select-molecule-by-id"] = "select a molecule by index";
|
---|
[51769f] | 258 | DescriptionMap["select-molecule-by-formula"] = "select a molecule by chemical formula";
|
---|
[481e92] | 259 | DescriptionMap["select-molecule-of-atom"] = "select a molecule to which a given atom belongs";
|
---|
[770287] | 260 | DescriptionMap["select-molecules-atoms"] = "select all atoms of a molecule";
|
---|
[b9c847] | 261 | DescriptionMap["set-basis"] = "set the name of the gaussian basis set for MPQC";
|
---|
| 262 | DescriptionMap["set-output"] = "specify output formats";
|
---|
[6866aa] | 263 | DescriptionMap["subgraph-dissect"] = "dissect the molecular system into molecules representing disconnected subgraphs";
|
---|
[e65de8] | 264 | DescriptionMap["surface-correlation"] = "pair correlation analysis between element and surface";
|
---|
[97ebf8] | 265 | DescriptionMap["suspend-in-water"] = "suspend the given molecule in water such that in the domain the mean density is as specified";
|
---|
[34c338] | 266 | DescriptionMap["translate-atoms"] = "translate all selected atoms by given vector";
|
---|
[446bc1] | 267 | DescriptionMap["undo"] = "undo last action";
|
---|
[4e4c4d] | 268 | DescriptionMap["unselect-all-atoms"] = "unselect all atoms";
|
---|
| 269 | DescriptionMap["unselect-all-molecules"] = "unselect all molecules";
|
---|
[51769f] | 270 | DescriptionMap["unselect-atom-by-element"] = "unselect an atom by element";
|
---|
[4e4c4d] | 271 | DescriptionMap["unselect-atom-by-id"] = "unselect an atom by index";
|
---|
[1cc87e] | 272 | DescriptionMap["unselect-atoms-inside-cuboid"] = "unselect all atoms inside a cuboid";
|
---|
| 273 | DescriptionMap["unselect-atoms-inside-sphere"] = "unselect all atoms inside a sphere";
|
---|
[51769f] | 274 | DescriptionMap["unselect-molecule-by-formula"] = "unselect a molecule by chemical formula";
|
---|
[4e4c4d] | 275 | DescriptionMap["unselect-molecule-by-id"] = "unselect a molecule by index";
|
---|
[75a80f] | 276 | DescriptionMap["unselect-molecule-of-atom"] = "unselect a molecule to which a given atom belongs";
|
---|
[381c5f] | 277 | DescriptionMap["unselect-molecules-atoms"] = "unselect all atoms of a molecule";
|
---|
[97ebf8] | 278 | DescriptionMap["verbose"] = "set verbosity level";
|
---|
| 279 | DescriptionMap["verlet-integrate"] = "perform verlet integration of a given force file";
|
---|
| 280 | DescriptionMap["version"] = "show version";
|
---|
[7230be] | 281 | DescriptionMap["warranty"] = "statement concerning warranty of the software";
|
---|
[97ebf8] | 282 | // keys for values
|
---|
[31fb1d] | 283 | DescriptionMap["angle-x"] = "angle of a rotation around x axis";
|
---|
| 284 | DescriptionMap["angle-y"] = "angle of a rotation around y axis";
|
---|
| 285 | DescriptionMap["angle-z"] = "angle of a rotation around z axis";
|
---|
[97ebf8] | 286 | DescriptionMap["bin-output-file"] = "name of the bin output file";
|
---|
| 287 | DescriptionMap["bin-end"] = "start of the last bin";
|
---|
| 288 | DescriptionMap["bin-start"] = "start of the first bin";
|
---|
| 289 | DescriptionMap["bin-width"] = "width of the bins";
|
---|
[f6bd32] | 290 | DescriptionMap["convex-file"] = "filename of the non-convex envelope";
|
---|
[97ebf8] | 291 | DescriptionMap["distance"] = "distance in space";
|
---|
| 292 | DescriptionMap["distances"] = "list of three of distances in space, one for each axis direction";
|
---|
[0286bc] | 293 | DescriptionMap["DoRotate"] = "whether to rotate or just report angles";
|
---|
[58bbd3] | 294 | DescriptionMap["element"] = "single element";
|
---|
| 295 | DescriptionMap["elements"] = "set of elements";
|
---|
[a02462] | 296 | DescriptionMap["end-step"] = "last or end step";
|
---|
| 297 | DescriptionMap["id-mapping"] = "whether the identity shall be used in mapping atoms onto atoms or some closest distance measure shall be used";
|
---|
[97ebf8] | 298 | DescriptionMap["input"] = "name of input file";
|
---|
| 299 | DescriptionMap["length"] = "length in space";
|
---|
| 300 | DescriptionMap["lengths"] = "list of three of lengths in space, one for each axis direction";
|
---|
| 301 | DescriptionMap["MaxDistance"] = "maximum distance in space";
|
---|
| 302 | DescriptionMap["molecule-by-id"] = "index of a molecule";
|
---|
[f6bd32] | 303 | DescriptionMap["nonconvex-file"] = "filename of the non-convex envelope";
|
---|
[e4b5de] | 304 | DescriptionMap["order"] = "order of a discretization, dissection, ...";
|
---|
[97ebf8] | 305 | DescriptionMap["output-file"] = "name of the output file";
|
---|
| 306 | DescriptionMap["periodic"] = "system is constraint to periodic boundary conditions (y/n)";
|
---|
| 307 | DescriptionMap["position"] = "position in R^3 space";
|
---|
[a02462] | 308 | DescriptionMap["start-step"] = "first or start step";
|
---|
[97ebf8] | 309 |
|
---|
| 310 | // short forms for the actions
|
---|
| 311 | ShortFormMap["add-atom"] = "a";
|
---|
| 312 | ShortFormMap["bond-table"] = "g";
|
---|
| 313 | ShortFormMap["bond-file"] = "A";
|
---|
| 314 | ShortFormMap["boundary"] = "c";
|
---|
[6ca1f7] | 315 | ShortFormMap["change-box"] = "B";
|
---|
[97ebf8] | 316 | ShortFormMap["center-edge"] = "O";
|
---|
| 317 | ShortFormMap["center-in-box"] = "b";
|
---|
| 318 | ShortFormMap["change-element"] = "E";
|
---|
[b9c847] | 319 | // ShortFormMap["convex-envelope"] = "x";
|
---|
[97ebf8] | 320 | ShortFormMap["default-molname"] = "X";
|
---|
| 321 | ShortFormMap["depth-first-search"] = "D";
|
---|
| 322 | ShortFormMap["element-db"] = "e";
|
---|
| 323 | ShortFormMap["fastparsing"] = "n";
|
---|
| 324 | ShortFormMap["fill-molecule"] = "F";
|
---|
| 325 | ShortFormMap["fragment-mol"] = "f";
|
---|
| 326 | ShortFormMap["help"] = "h";
|
---|
| 327 | ShortFormMap["input"] = "i";
|
---|
| 328 | ShortFormMap["linear-interpolate"] = "L";
|
---|
| 329 | ShortFormMap["nonconvex-envelope"] = "N";
|
---|
[cd8e55] | 330 | // ShortFormMap["output"] = "o";
|
---|
[e65de8] | 331 | // ShortFormMap["pair-correlation"] = "C";
|
---|
[97ebf8] | 332 | ShortFormMap["parse-xyz"] = "p";
|
---|
| 333 | ShortFormMap["remove-atom"] = "r";
|
---|
| 334 | ShortFormMap["repeat-box"] = "d";
|
---|
| 335 | ShortFormMap["rotate-to-pas"] = "m";
|
---|
| 336 | ShortFormMap["save-adjacency"] = "J";
|
---|
| 337 | ShortFormMap["save-bonds"] = "j";
|
---|
| 338 | ShortFormMap["save-temperature"] = "S";
|
---|
| 339 | ShortFormMap["scale-box"] = "s";
|
---|
| 340 | ShortFormMap["set-basis"] = "M";
|
---|
[b9c847] | 341 | ShortFormMap["set-output"] = "o";
|
---|
[6866aa] | 342 | ShortFormMap["subgraph-dissect"] = "I";
|
---|
[48ab70a] | 343 | ShortFormMap["suspend-in-water"] = "u";
|
---|
[34c338] | 344 | ShortFormMap["translate-atoms"] = "t";
|
---|
[6670a97] | 345 | ShortFormMap["verbose"] = "v";
|
---|
[97ebf8] | 346 | ShortFormMap["verlet-integrate"] = "P";
|
---|
[6670a97] | 347 | ShortFormMap["version"] = "V";
|
---|
[97ebf8] | 348 |
|
---|
| 349 | // value types for the actions
|
---|
[e5c0a1] | 350 | TypeMap["add-atom"] = &typeid(const element);
|
---|
[ab9a27] | 351 | TypeMap["bond-file"] = &typeid(std::string);
|
---|
| 352 | TypeMap["bond-table"] = &typeid(std::string);
|
---|
| 353 | TypeMap["boundary"] = &typeid(VectorValue);
|
---|
| 354 | TypeMap["center-in-box"] = &typeid(BoxValue);
|
---|
| 355 | TypeMap["change-box"] = &typeid(BoxValue);
|
---|
[e5c0a1] | 356 | TypeMap["change-element"] = &typeid(const element);
|
---|
[ab9a27] | 357 | TypeMap["change-molname"] = &typeid(std::string);
|
---|
[e212ff] | 358 | TypeMap["clear-atom-selection"] = &typeid(void);
|
---|
[2218d94] | 359 | TypeMap["clear-molecule-selection"] = &typeid(void);
|
---|
[c449d9] | 360 | TypeMap["construct-bondgraph"] = &typeid(void);
|
---|
[1d9b7d2] | 361 | TypeMap["convex-envelope"] = &typeid(void);
|
---|
[1a7fd2] | 362 | TypeMap["copy-molecule"] = &typeid(molecule);
|
---|
[ab9a27] | 363 | TypeMap["default-molname"] = &typeid(std::string);
|
---|
| 364 | TypeMap["depth-first-search"] = &typeid(double);
|
---|
| 365 | TypeMap["element-db"] = &typeid(std::string);
|
---|
| 366 | TypeMap["fastparsing"] = &typeid(bool);
|
---|
| 367 | TypeMap["fill-molecule"] = &typeid(std::string);
|
---|
[eee966] | 368 | TypeMap["fill-void"] = &typeid(std::string);
|
---|
[ab9a27] | 369 | TypeMap["fragment-mol"] = &typeid(std::string);
|
---|
[6f5dfe] | 370 | TypeMap["input"] = &typeid(boost::filesystem::path);
|
---|
[ab9a27] | 371 | TypeMap["linear-interpolate"] = &typeid(std::string);
|
---|
| 372 | TypeMap["molecular-volume"] = &typeid(molecule);
|
---|
[1d9b7d2] | 373 | TypeMap["nonconvex-envelope"] = &typeid(double);
|
---|
[ab9a27] | 374 | TypeMap["output"] = &typeid(void);
|
---|
| 375 | TypeMap["parse-xyz"] = &typeid(std::string);
|
---|
[e65de8] | 376 | TypeMap["pair-correlation"] = &typeid(void);
|
---|
| 377 | TypeMap["point-correlation"] = &typeid(void);
|
---|
[b76394] | 378 | TypeMap["principal-axis-system"] = &typeid(void);
|
---|
[446bc1] | 379 | TypeMap["redo"] = &typeid(void);
|
---|
[120088] | 380 | TypeMap["remove-atom"] = &typeid(void);
|
---|
[ab9a27] | 381 | TypeMap["repeat-box"] = &typeid(VectorValue);
|
---|
[eaf4ae] | 382 | TypeMap["rotate-origin"] = &typeid(double);
|
---|
| 383 | TypeMap["rotate-self"] = &typeid(double);
|
---|
| 384 | TypeMap["rotate-to-pas"] = &typeid(VectorValue);
|
---|
[ab9a27] | 385 | TypeMap["save-adjacency"] = &typeid(std::string);
|
---|
| 386 | TypeMap["save-bonds"] = &typeid(std::string);
|
---|
| 387 | TypeMap["save-temperature"] = &typeid(std::string);
|
---|
| 388 | TypeMap["scale-box"] = &typeid(VectorValue);
|
---|
[770287] | 389 | TypeMap["select-all-atoms"] = &typeid(void);
|
---|
| 390 | TypeMap["select-all-molecules"] = &typeid(void);
|
---|
[51769f] | 391 | TypeMap["select-atom-by-element"] = &typeid(const element);
|
---|
[770287] | 392 | TypeMap["select-atom-by-id"] = &typeid(atom);
|
---|
[1cc87e] | 393 | TypeMap["select-atoms-inside-cuboid"] = &typeid(VectorValue);
|
---|
| 394 | TypeMap["select-atoms-inside-sphere"] = &typeid(double);
|
---|
[51769f] | 395 | TypeMap["select-molecule-by-formula"] = &typeid(std::string);
|
---|
[770287] | 396 | TypeMap["select-molecule-by-id"] = &typeid(molecule);
|
---|
[481e92] | 397 | TypeMap["select-molecule-of-atom"] = &typeid(atom);
|
---|
[770287] | 398 | TypeMap["select-molecules-atoms"] = &typeid(molecule);
|
---|
[ab9a27] | 399 | TypeMap["set-basis"] = &typeid(std::string);
|
---|
| 400 | TypeMap["set-output"] = &typeid(std::vector<std::string>);
|
---|
| 401 | TypeMap["subgraph-dissect"] = &typeid(void);
|
---|
[e65de8] | 402 | TypeMap["surface-correlation"] = &typeid(void);
|
---|
[ab9a27] | 403 | TypeMap["suspend-in-water"] = &typeid(double);
|
---|
[34c338] | 404 | TypeMap["translate-atoms"] = &typeid(VectorValue);
|
---|
[446bc1] | 405 | TypeMap["undo"] = &typeid(void);
|
---|
[770287] | 406 | TypeMap["unselect-all-atoms"] = &typeid(void);
|
---|
| 407 | TypeMap["unselect-all-molecules"] = &typeid(void);
|
---|
[51769f] | 408 | TypeMap["unselect-atom-by-element"] = &typeid(const element);
|
---|
[770287] | 409 | TypeMap["unselect-atom-by-id"] = &typeid(atom);
|
---|
[1cc87e] | 410 | TypeMap["unselect-atoms-inside-cuboid"] = &typeid(VectorValue);
|
---|
| 411 | TypeMap["unselect-atoms-inside-sphere"] = &typeid(double);
|
---|
[51769f] | 412 | TypeMap["unselect-molecule-by-formula"] = &typeid(std::string);
|
---|
[770287] | 413 | TypeMap["unselect-molecule-by-id"] = &typeid(molecule);
|
---|
[75a80f] | 414 | TypeMap["unselect-molecule-of-atom"] = &typeid(atom);
|
---|
[381c5f] | 415 | TypeMap["unselect-molecules-atoms"] = &typeid(molecule);
|
---|
[ab9a27] | 416 | TypeMap["verlet-integrate"] = &typeid(std::string);
|
---|
| 417 | TypeMap["verbose"] = &typeid(int);
|
---|
[e30ce8] | 418 |
|
---|
[97ebf8] | 419 | // value types for the values
|
---|
[31fb1d] | 420 | TypeMap["angle-x"] = &typeid(double);
|
---|
| 421 | TypeMap["angle-y"] = &typeid(double);
|
---|
| 422 | TypeMap["angle-z"] = &typeid(double);
|
---|
[ab9a27] | 423 | TypeMap["bin-output-file"] = &typeid(std::string);
|
---|
| 424 | TypeMap["bin-end"] = &typeid(double);
|
---|
| 425 | TypeMap["bin-start"] = &typeid(double);
|
---|
| 426 | TypeMap["bin-width"] = &typeid(double);
|
---|
| 427 | TypeMap["convex-file"] = &typeid(std::string);
|
---|
| 428 | TypeMap["distance"] = &typeid(double);
|
---|
| 429 | TypeMap["distances"] = &typeid(VectorValue);
|
---|
| 430 | TypeMap["DoRotate"] = &typeid(bool);
|
---|
[e5c0a1] | 431 | TypeMap["element"] = &typeid(const element);
|
---|
| 432 | TypeMap["elements"] = &typeid(std::vector<const element *>);
|
---|
[ab9a27] | 433 | TypeMap["end-step"] = &typeid(int);
|
---|
| 434 | TypeMap["id-mapping"] = &typeid(bool);
|
---|
| 435 | TypeMap["length"] = &typeid(double);
|
---|
| 436 | TypeMap["lengths"] = &typeid(VectorValue);
|
---|
| 437 | TypeMap["MaxDistance"] = &typeid(double);
|
---|
[e65de8] | 438 | TypeMap["molecule-by-id"] = &typeid(molecule);
|
---|
[ab9a27] | 439 | TypeMap["nonconvex-file"] = &typeid(std::string);
|
---|
| 440 | TypeMap["order"] = &typeid(int);
|
---|
| 441 | TypeMap["output-file"] = &typeid(std::string);
|
---|
| 442 | TypeMap["periodic"] = &typeid(bool);
|
---|
| 443 | TypeMap["position"] = &typeid(VectorValue);
|
---|
| 444 | TypeMap["start-step"] = &typeid(int);
|
---|
| 445 |
|
---|
[0b0a20] | 446 | TypeEnumMap[&typeid(void)] = None;
|
---|
| 447 | TypeEnumMap[&typeid(bool)] = Boolean;
|
---|
[ab9a27] | 448 | TypeEnumMap[&typeid(int)] = Integer;
|
---|
[0b0a20] | 449 | TypeEnumMap[&typeid(std::vector<int>)] = ListOfIntegers;
|
---|
[ab9a27] | 450 | TypeEnumMap[&typeid(double)] = Double;
|
---|
[0b0a20] | 451 | TypeEnumMap[&typeid(std::vector<double>)] = ListOfDoubles;
|
---|
[ab9a27] | 452 | TypeEnumMap[&typeid(std::string)] = String;
|
---|
[0b0a20] | 453 | TypeEnumMap[&typeid(std::vector<std::string>)] = ListOfStrings;
|
---|
| 454 | TypeEnumMap[&typeid(VectorValue)] = Vector;
|
---|
[39b639] | 455 | TypeEnumMap[&typeid(std::vector<VectorValue>)] = ListOfVectors;
|
---|
[0b0a20] | 456 | TypeEnumMap[&typeid(BoxValue)] = Box;
|
---|
| 457 | TypeEnumMap[&typeid(molecule)] = Molecule;
|
---|
| 458 | TypeEnumMap[&typeid(std::vector<molecule *>)] = ListOfMolecules;
|
---|
[ab9a27] | 459 | TypeEnumMap[&typeid(atom)] = Atom;
|
---|
[0b0a20] | 460 | TypeEnumMap[&typeid(std::vector<atom *>)] = ListOfAtoms;
|
---|
[e5c0a1] | 461 | TypeEnumMap[&typeid(const element)] = Element;
|
---|
| 462 | TypeEnumMap[&typeid(std::vector<const element *>)] = ListOfElements;
|
---|
[97ebf8] | 463 |
|
---|
[e30ce8] | 464 | // default values for any action that needs one (always string!)
|
---|
[ab9a27] | 465 | CurrentValue["bin-width"] = "0.5";
|
---|
| 466 | CurrentValue["fastparsing"] = "0";
|
---|
| 467 | CurrentValue["periodic"] = "0";
|
---|
[e30ce8] | 468 |
|
---|
[326bbe] | 469 | // put action into each menu category
|
---|
[b2531f] | 470 | MenuDescription["analysis"] = pair<std::string,std::string>("Analysis (pair correlation, volume)", "Analysis");
|
---|
[5b5c4d] | 471 | MenuDescription["atom"] = pair<std::string,std::string>("Edit atoms", "Atoms");
|
---|
| 472 | MenuDescription["command"] = pair<std::string,std::string>("Configuration", "configuration options");
|
---|
[b2531f] | 473 | MenuDescription["fragmentation"] = pair<std::string,std::string>("Fragmentation", "Fragmentation");
|
---|
[5b5c4d] | 474 | MenuDescription["molecule"] = pair<std::string,std::string>("Parse files into system", "Molecules");
|
---|
| 475 | MenuDescription["parser"] = pair<std::string,std::string>("Edit molecules (load, parse, save)", "Input/Output");
|
---|
| 476 | MenuDescription["selection"] = pair<std::string,std::string>("Select atoms/molecules", "Selection");
|
---|
| 477 | MenuDescription["tesselation"] = pair<std::string,std::string>("Tesselate molecules", "Tesselation");
|
---|
| 478 | MenuDescription["world"] = pair<std::string,std::string>("Edit world", "Globals");
|
---|
[b2531f] | 479 |
|
---|
[326bbe] | 480 | MenuContainsActionMap.insert( pair<std::string, std::string> ("analysis", "molecular-volume") );
|
---|
| 481 | MenuContainsActionMap.insert( pair<std::string, std::string> ("analysis", "pair-correlation") );
|
---|
[e65de8] | 482 | MenuContainsActionMap.insert( pair<std::string, std::string> ("analysis", "point-correlation") );
|
---|
| 483 | MenuContainsActionMap.insert( pair<std::string, std::string> ("analysis", "surface-correlation") );
|
---|
[326bbe] | 484 | MenuContainsActionMap.insert( pair<std::string, std::string> ("analysis", "principal-axis-system") );
|
---|
[e30ce8] | 485 |
|
---|
[326bbe] | 486 | MenuContainsActionMap.insert( pair<std::string, std::string> ("atom", "add-atom") );
|
---|
| 487 | MenuContainsActionMap.insert( pair<std::string, std::string> ("atom", "change-element") );
|
---|
| 488 | MenuContainsActionMap.insert( pair<std::string, std::string> ("atom", "remove-atom") );
|
---|
[34c338] | 489 | MenuContainsActionMap.insert( pair<std::string, std::string> ("atom", "translate-atoms") );
|
---|
[326bbe] | 490 |
|
---|
| 491 | MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "bond-table") );
|
---|
| 492 | MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "element-db") );
|
---|
| 493 | MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "fastparsing") );
|
---|
[7230be] | 494 | MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "help") );
|
---|
[326bbe] | 495 | MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "verbose") );
|
---|
| 496 | MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "version") );
|
---|
[7230be] | 497 | MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "warranty") );
|
---|
[326bbe] | 498 |
|
---|
[c449d9] | 499 | MenuContainsActionMap.insert( pair<std::string, std::string> ("fragmentation", "construct-bondgraph") );
|
---|
[326bbe] | 500 | MenuContainsActionMap.insert( pair<std::string, std::string> ("fragmentation", "depth-first-search") );
|
---|
| 501 | MenuContainsActionMap.insert( pair<std::string, std::string> ("fragmentation", "fragment-mol") );
|
---|
| 502 | MenuContainsActionMap.insert( pair<std::string, std::string> ("fragmentation", "subgraph-dissect") );
|
---|
| 503 |
|
---|
| 504 | MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "bond-file") );
|
---|
[1a7fd2] | 505 | MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "copy-molecule") );
|
---|
[326bbe] | 506 | MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "change-molname") );
|
---|
| 507 | MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "fill-molecule") );
|
---|
[eee966] | 508 | MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "fill-void") );
|
---|
[326bbe] | 509 | MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "linear-interpolate") );
|
---|
[eaf4ae] | 510 | MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "rotate-origin") );
|
---|
| 511 | MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "rotate-self") );
|
---|
[326bbe] | 512 | MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "rotate-to-pas") );
|
---|
| 513 | MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "save-adjacency") );
|
---|
| 514 | MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "save-bonds") );
|
---|
| 515 | MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "save-temperature") );
|
---|
| 516 | MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "suspend-in-water") );
|
---|
| 517 | MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "verlet-integrate") );
|
---|
| 518 |
|
---|
| 519 | MenuContainsActionMap.insert( pair<std::string, std::string> ("parser", "parse-xyz") );
|
---|
| 520 | MenuContainsActionMap.insert( pair<std::string, std::string> ("parser", "SaveXyz") );
|
---|
| 521 |
|
---|
[e212ff] | 522 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "clear-atom-selection") );
|
---|
[2218d94] | 523 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "clear-molecule-selection") );
|
---|
[e212ff] | 524 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "select-all-atoms") );
|
---|
| 525 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "select-all-molecules") );
|
---|
[51769f] | 526 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "select-atom-by-element") );
|
---|
[5b5c4d] | 527 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "select-atom-by-id") );
|
---|
[1cc87e] | 528 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "select-atoms-inside-cuboid") );
|
---|
| 529 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "select-atoms-inside-sphere") );
|
---|
[5b5c4d] | 530 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "select-molecule-by-id") );
|
---|
[51769f] | 531 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "select-molecule-by-formula") );
|
---|
[481e92] | 532 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "select-molecule-of-atom") );
|
---|
[770287] | 533 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "select-molecules-atoms") );
|
---|
[e212ff] | 534 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "unselect-all-atoms") );
|
---|
| 535 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "unselect-all-molecules") );
|
---|
[51769f] | 536 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "unselect-atom-by-element") );
|
---|
[5b5c4d] | 537 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "unselect-atom-by-id") );
|
---|
[1cc87e] | 538 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "unselect-atoms-inside-cuboid") );
|
---|
| 539 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "unselect-atoms-inside-sphere") );
|
---|
[51769f] | 540 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "unselect-molecule-by-formula") );
|
---|
[5b5c4d] | 541 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "unselect-molecule-by-id") );
|
---|
[75a80f] | 542 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "unselect-molecule-of-atom") );
|
---|
[381c5f] | 543 | MenuContainsActionMap.insert( pair<std::string, std::string> ("selection", "unselect-molecules-atoms") );
|
---|
[5b5c4d] | 544 |
|
---|
[326bbe] | 545 | MenuContainsActionMap.insert( pair<std::string, std::string> ("tesselation", "convex-envelope") );
|
---|
| 546 | MenuContainsActionMap.insert( pair<std::string, std::string> ("tesselation", "nonconvex-envelope") );
|
---|
| 547 |
|
---|
| 548 | MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "boundary") );
|
---|
| 549 | MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "bound-in-box") );
|
---|
| 550 | MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "center-in-box") );
|
---|
| 551 | MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "center-edge") );
|
---|
| 552 | MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "change-box") );
|
---|
| 553 | MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "input") );
|
---|
| 554 | MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "output") );
|
---|
| 555 | MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "repeat-box") );
|
---|
| 556 | MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "scale-box") );
|
---|
| 557 | MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "default-molname") );
|
---|
| 558 | MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "set-basis") );
|
---|
[b9c847] | 559 | MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "set-output") );
|
---|
[326bbe] | 560 |
|
---|
| 561 | // put actions into command line category
|
---|
[f0a3ec] | 562 | generic.insert("add-atom");
|
---|
[f4bd01] | 563 | generic.insert("bond-file");
|
---|
[39af9f] | 564 | generic.insert("bond-table");
|
---|
[116f37] | 565 | generic.insert("boundary");
|
---|
[97ebf8] | 566 | // generic.insert("bound-in-box");
|
---|
[584a2a] | 567 | generic.insert("center-edge");
|
---|
[158c594] | 568 | generic.insert("center-in-box");
|
---|
[6ca1f7] | 569 | generic.insert("change-box");
|
---|
[97ebf8] | 570 | // generic.insert("change-molname");
|
---|
[e212ff] | 571 | generic.insert("change-element");
|
---|
| 572 | generic.insert("clear-atom-selection");
|
---|
[2218d94] | 573 | generic.insert("clear-molecule-selection");
|
---|
[c449d9] | 574 | generic.insert("construct-bondgraph");
|
---|
[f6bd32] | 575 | generic.insert("convex-envelope");
|
---|
[1a7fd2] | 576 | generic.insert("copy-molecule");
|
---|
[387b36] | 577 | generic.insert("default-molname");
|
---|
[8540f0] | 578 | generic.insert("depth-first-search");
|
---|
[198494] | 579 | generic.insert("element-db");
|
---|
[f821d6] | 580 | generic.insert("fastparsing");
|
---|
[0286bc] | 581 | generic.insert("fill-molecule");
|
---|
[eee966] | 582 | generic.insert("fill-void");
|
---|
[e4b5de] | 583 | generic.insert("fragment-mol");
|
---|
[97ebf8] | 584 | generic.insert("help");
|
---|
[4f7f34e] | 585 | generic.insert("input");
|
---|
| 586 | generic.insert("linear-interpolate");
|
---|
[97ebf8] | 587 | // generic.insert("molecular-volume");
|
---|
[980dd6] | 588 | generic.insert("nonconvex-envelope");
|
---|
[4f7f34e] | 589 | generic.insert("output");
|
---|
[58bbd3] | 590 | generic.insert("pair-correlation");
|
---|
[a1e929] | 591 | generic.insert("parse-xyz");
|
---|
[e65de8] | 592 | generic.insert("point-correlation");
|
---|
[97ebf8] | 593 | // generic.insert("principal-axis-system");
|
---|
[446bc1] | 594 | generic.insert("redo");
|
---|
[d55743e] | 595 | generic.insert("remove-atom");
|
---|
[0286bc] | 596 | generic.insert("repeat-box");
|
---|
[eaf4ae] | 597 | generic.insert("rotate-origin");
|
---|
| 598 | generic.insert("rotate-self");
|
---|
[2b5574] | 599 | generic.insert("rotate-to-pas");
|
---|
[77de81] | 600 | generic.insert("save-adjacency");
|
---|
| 601 | generic.insert("save-bonds");
|
---|
[a307af] | 602 | generic.insert("save-temperature");
|
---|
[2a92ff] | 603 | generic.insert("scale-box");
|
---|
[e472eab] | 604 | generic.insert("select-all-atoms");
|
---|
| 605 | generic.insert("select-all-molecules");
|
---|
[51769f] | 606 | generic.insert("select-atom-by-element");
|
---|
[e472eab] | 607 | generic.insert("select-atom-by-id");
|
---|
[1cc87e] | 608 | generic.insert("select-atoms-inside-cuboid");
|
---|
| 609 | generic.insert("select-atoms-inside-sphere");
|
---|
[e472eab] | 610 | generic.insert("select-molecule-by-id");
|
---|
[51769f] | 611 | generic.insert("select-molecule-by-formula");
|
---|
[481e92] | 612 | generic.insert("select-molecule-of-atom");
|
---|
[770287] | 613 | generic.insert("select-molecules-atoms");
|
---|
[bdaacd] | 614 | generic.insert("set-basis");
|
---|
[b9c847] | 615 | generic.insert("set-output");
|
---|
[6866aa] | 616 | generic.insert("subgraph-dissect");
|
---|
[e65de8] | 617 | generic.insert("surface-correlation");
|
---|
[48ab70a] | 618 | generic.insert("suspend-in-water");
|
---|
[34c338] | 619 | generic.insert("translate-atoms");
|
---|
[446bc1] | 620 | generic.insert("undo");
|
---|
[e472eab] | 621 | generic.insert("unselect-all-atoms");
|
---|
| 622 | generic.insert("unselect-all-molecules");
|
---|
[51769f] | 623 | generic.insert("unselect-atom-by-element");
|
---|
[e472eab] | 624 | generic.insert("unselect-atom-by-id");
|
---|
[1cc87e] | 625 | generic.insert("unselect-atoms-inside-cuboid");
|
---|
| 626 | generic.insert("unselect-atoms-inside-sphere");
|
---|
[51769f] | 627 | generic.insert("unselect-molecule-by-formula");
|
---|
[e472eab] | 628 | generic.insert("unselect-molecule-by-id");
|
---|
[75a80f] | 629 | generic.insert("unselect-molecule-of-atom");
|
---|
[381c5f] | 630 | generic.insert("unselect-molecules-atoms");
|
---|
[97ebf8] | 631 | generic.insert("verbose");
|
---|
[aacce8] | 632 | generic.insert("verlet-integrate");
|
---|
[97ebf8] | 633 | generic.insert("version");
|
---|
[7230be] | 634 | generic.insert("warranty");
|
---|
[97ebf8] | 635 |
|
---|
| 636 | // positional arguments
|
---|
[f6bd32] | 637 | generic.insert("input");
|
---|
[0286bc] | 638 |
|
---|
| 639 | // hidden arguments
|
---|
[31fb1d] | 640 | hidden.insert("angle-x");
|
---|
| 641 | hidden.insert("angle-y");
|
---|
| 642 | hidden.insert("angle-z");
|
---|
[533838] | 643 | hidden.insert("bin-end");
|
---|
| 644 | hidden.insert("bin-output-file");
|
---|
| 645 | hidden.insert("bin-start");
|
---|
| 646 | hidden.insert("bin-width");
|
---|
| 647 | hidden.insert("convex-file");
|
---|
| 648 | hidden.insert("distance");
|
---|
| 649 | hidden.insert("DoRotate");
|
---|
| 650 | hidden.insert("distances");
|
---|
| 651 | hidden.insert("element");
|
---|
| 652 | hidden.insert("elements");
|
---|
| 653 | hidden.insert("end-step");
|
---|
| 654 | hidden.insert("id-mapping");
|
---|
| 655 | hidden.insert("lengths");
|
---|
| 656 | hidden.insert("MaxDistance");
|
---|
[e65de8] | 657 | hidden.insert("molecule-by-id");
|
---|
[533838] | 658 | hidden.insert("nonconvex-file");
|
---|
| 659 | hidden.insert("order");
|
---|
| 660 | hidden.insert("output-file");
|
---|
| 661 | hidden.insert("periodic");
|
---|
| 662 | hidden.insert("position");
|
---|
| 663 | hidden.insert("start-step");
|
---|
[97ebf8] | 664 | }
|
---|
| 665 |
|
---|
| 666 | /** Destructor of class MapOfActions.
|
---|
| 667 | *
|
---|
| 668 | */
|
---|
| 669 | MapOfActions::~MapOfActions()
|
---|
| 670 | {
|
---|
| 671 | DescriptionMap.clear();
|
---|
| 672 | }
|
---|
| 673 |
|
---|
[03c902] | 674 | bool MapOfActions::isCurrentValuePresent(const char *name) const
|
---|
| 675 | {
|
---|
| 676 | return (CurrentValue.find(name) != CurrentValue.end());
|
---|
| 677 | }
|
---|
| 678 |
|
---|
[d02e07] | 679 | void MapOfActions::queryCurrentValue(const char * name, class atom * &_T)
|
---|
| 680 | {
|
---|
| 681 | int atomID = -1;
|
---|
[4e145c] | 682 | if (typeid( atom ) == *TypeMap[name]) {
|
---|
| 683 | if (CurrentValue.find(name) == CurrentValue.end())
|
---|
| 684 | throw MissingValueException(__FILE__, __LINE__);
|
---|
[d02e07] | 685 | atomID = lexical_cast<int>(CurrentValue[name].c_str());
|
---|
[4e145c] | 686 | CurrentValue.erase(name);
|
---|
| 687 | } else
|
---|
[d02e07] | 688 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 689 | _T = World::getInstance().getAtom(AtomById(atomID));
|
---|
| 690 | }
|
---|
| 691 |
|
---|
[e5c0a1] | 692 | void MapOfActions::queryCurrentValue(const char * name, const element * &_T) {
|
---|
[d02e07] | 693 | int Z = -1;
|
---|
[e5c0a1] | 694 | if (typeid(const element ) == *TypeMap[name]) {
|
---|
[4e145c] | 695 | if (CurrentValue.find(name) == CurrentValue.end())
|
---|
| 696 | throw MissingValueException(__FILE__, __LINE__);
|
---|
[d02e07] | 697 | Z = lexical_cast<int>(CurrentValue[name].c_str());
|
---|
[4e145c] | 698 | CurrentValue.erase(name);
|
---|
| 699 | } else
|
---|
[d02e07] | 700 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 701 | _T = World::getInstance().getPeriode()->FindElement(Z);
|
---|
| 702 | }
|
---|
| 703 |
|
---|
| 704 | void MapOfActions::queryCurrentValue(const char * name, class molecule * &_T) {
|
---|
| 705 | int molID = -1;
|
---|
[4e145c] | 706 | if (typeid( molecule ) == *TypeMap[name]) {
|
---|
| 707 | if (CurrentValue.find(name) == CurrentValue.end())
|
---|
| 708 | throw MissingValueException(__FILE__, __LINE__);
|
---|
[d02e07] | 709 | molID = lexical_cast<int>(CurrentValue[name].c_str());
|
---|
[4e145c] | 710 | CurrentValue.erase(name);
|
---|
| 711 | } else
|
---|
[d02e07] | 712 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 713 | _T = World::getInstance().getMolecule(MoleculeById(molID));
|
---|
| 714 | }
|
---|
| 715 |
|
---|
| 716 | void MapOfActions::queryCurrentValue(const char * name, class Box &_T) {
|
---|
| 717 | Matrix M;
|
---|
| 718 | double tmp;
|
---|
| 719 | if (typeid( BoxValue ) == *TypeMap[name]) {
|
---|
[4e145c] | 720 | if (CurrentValue.find(name) == CurrentValue.end())
|
---|
| 721 | throw MissingValueException(__FILE__, __LINE__);
|
---|
[d02e07] | 722 | std::istringstream stream(CurrentValue[name]);
|
---|
| 723 | stream >> tmp;
|
---|
| 724 | M.set(0,0,tmp);
|
---|
| 725 | stream >> tmp;
|
---|
| 726 | M.set(0,1,tmp);
|
---|
| 727 | M.set(1,0,tmp);
|
---|
| 728 | stream >> tmp;
|
---|
| 729 | M.set(0,2,tmp);
|
---|
| 730 | M.set(2,0,tmp);
|
---|
| 731 | stream >> tmp;
|
---|
| 732 | M.set(1,1,tmp);
|
---|
| 733 | stream >> tmp;
|
---|
| 734 | M.set(1,2,tmp);
|
---|
| 735 | M.set(2,1,tmp);
|
---|
| 736 | stream >> tmp;
|
---|
| 737 | M.set(2,2,tmp);
|
---|
[39b639] | 738 | _T = M;
|
---|
| 739 | CurrentValue.erase(name);
|
---|
[d02e07] | 740 | } else
|
---|
| 741 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 742 | }
|
---|
| 743 |
|
---|
| 744 | void MapOfActions::queryCurrentValue(const char * name, class Vector &_T) {
|
---|
| 745 | if (typeid( VectorValue ) == *TypeMap[name]) {
|
---|
| 746 | std::istringstream stream(CurrentValue[name]);
|
---|
[4e145c] | 747 | CurrentValue.erase(name);
|
---|
[d02e07] | 748 | stream >> _T[0];
|
---|
| 749 | stream >> _T[1];
|
---|
| 750 | stream >> _T[2];
|
---|
| 751 | } else
|
---|
| 752 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 753 | }
|
---|
| 754 |
|
---|
[72f611] | 755 | void MapOfActions::queryCurrentValue(const char * name, class BoxVector &_T) {
|
---|
| 756 | if (typeid( VectorValue ) == *TypeMap[name]) {
|
---|
| 757 | std::istringstream stream(CurrentValue[name]);
|
---|
| 758 | CurrentValue.erase(name);
|
---|
| 759 | stream >> _T[0];
|
---|
| 760 | stream >> _T[1];
|
---|
| 761 | stream >> _T[2];
|
---|
| 762 | } else
|
---|
| 763 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 764 | }
|
---|
| 765 |
|
---|
[0b0a20] | 766 | void MapOfActions::queryCurrentValue(const char * name, std::vector<atom *>&_T)
|
---|
| 767 | {
|
---|
| 768 | int atomID = -1;
|
---|
| 769 | atom *Walker = NULL;
|
---|
| 770 | if (typeid( std::vector<atom *> ) == *TypeMap[name]) {
|
---|
| 771 | if (CurrentValue.find(name) == CurrentValue.end())
|
---|
| 772 | throw MissingValueException(__FILE__, __LINE__);
|
---|
| 773 | std::istringstream stream(CurrentValue[name]);
|
---|
| 774 | CurrentValue.erase(name);
|
---|
| 775 | while (!stream.fail()) {
|
---|
[e65de8] | 776 | stream >> atomID >> ws;
|
---|
[0b0a20] | 777 | Walker = World::getInstance().getAtom(AtomById(atomID));
|
---|
| 778 | if (Walker != NULL)
|
---|
| 779 | _T.push_back(Walker);
|
---|
[e65de8] | 780 | atomID = -1;
|
---|
| 781 | Walker = NULL;
|
---|
[0b0a20] | 782 | }
|
---|
| 783 | } else
|
---|
| 784 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 785 | }
|
---|
| 786 |
|
---|
[e5c0a1] | 787 | void MapOfActions::queryCurrentValue(const char * name, std::vector<const element *>&_T)
|
---|
[d02e07] | 788 | {
|
---|
| 789 | int Z = -1;
|
---|
[e5c0a1] | 790 | const element *elemental = NULL;
|
---|
| 791 | if (typeid( std::vector<const element *> ) == *TypeMap[name]) {
|
---|
[4e145c] | 792 | if (CurrentValue.find(name) == CurrentValue.end())
|
---|
| 793 | throw MissingValueException(__FILE__, __LINE__);
|
---|
[d02e07] | 794 | std::istringstream stream(CurrentValue[name]);
|
---|
[4e145c] | 795 | CurrentValue.erase(name);
|
---|
[d02e07] | 796 | while (!stream.fail()) {
|
---|
[e65de8] | 797 | stream >> Z >> ws;
|
---|
[d02e07] | 798 | elemental = World::getInstance().getPeriode()->FindElement(Z);
|
---|
| 799 | if (elemental != NULL)
|
---|
| 800 | _T.push_back(elemental);
|
---|
[e65de8] | 801 | Z = -1;
|
---|
[d02e07] | 802 | }
|
---|
| 803 | } else
|
---|
| 804 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 805 | }
|
---|
| 806 |
|
---|
[0b0a20] | 807 | void MapOfActions::queryCurrentValue(const char * name, std::vector<molecule *>&_T)
|
---|
[3e54d0] | 808 | {
|
---|
[0b0a20] | 809 | int molID = -1;
|
---|
| 810 | molecule *mol = NULL;
|
---|
| 811 | if (typeid( std::vector<molecule *> ) == *TypeMap[name]) {
|
---|
[4e145c] | 812 | if (CurrentValue.find(name) == CurrentValue.end())
|
---|
| 813 | throw MissingValueException(__FILE__, __LINE__);
|
---|
[3e54d0] | 814 | std::istringstream stream(CurrentValue[name]);
|
---|
[4e145c] | 815 | CurrentValue.erase(name);
|
---|
[3e54d0] | 816 | while (!stream.fail()) {
|
---|
[e65de8] | 817 | stream >> molID >> ws;
|
---|
[0b0a20] | 818 | mol = World::getInstance().getMolecule(MoleculeById(molID));
|
---|
| 819 | if (mol != NULL)
|
---|
| 820 | _T.push_back(mol);
|
---|
[e65de8] | 821 | molID = -1;
|
---|
| 822 | mol = NULL;
|
---|
[3e54d0] | 823 | }
|
---|
| 824 | } else
|
---|
| 825 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 826 | }
|
---|
| 827 |
|
---|
[6f5dfe] | 828 | void MapOfActions::queryCurrentValue(const char * name, boost::filesystem::path&_T)
|
---|
| 829 | {
|
---|
| 830 | std::string tmp;
|
---|
| 831 | if (typeid( boost::filesystem::path ) == *TypeMap[name]) {
|
---|
| 832 | if (CurrentValue.find(name) == CurrentValue.end())
|
---|
| 833 | throw MissingValueException(__FILE__, __LINE__);
|
---|
| 834 | std::istringstream stream(CurrentValue[name]);
|
---|
| 835 | CurrentValue.erase(name);
|
---|
| 836 | if (!stream.fail()) {
|
---|
| 837 | stream >> tmp >> ws;
|
---|
| 838 | _T = tmp;
|
---|
| 839 | }
|
---|
| 840 | } else
|
---|
| 841 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 842 | }
|
---|
| 843 |
|
---|
[d02e07] | 844 |
|
---|
| 845 | void MapOfActions::setCurrentValue(const char * name, class atom * &_T)
|
---|
| 846 | {
|
---|
| 847 | if (typeid( atom ) == *TypeMap[name]) {
|
---|
| 848 | std::ostringstream stream;
|
---|
| 849 | stream << _T->getId();
|
---|
| 850 | CurrentValue[name] = stream.str();
|
---|
| 851 | } else
|
---|
| 852 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 853 | }
|
---|
| 854 |
|
---|
[e5c0a1] | 855 | void MapOfActions::setCurrentValue(const char * name, const element * &_T)
|
---|
[d02e07] | 856 | {
|
---|
[e5c0a1] | 857 | if (typeid(const element ) == *TypeMap[name]) {
|
---|
[d02e07] | 858 | std::ostringstream stream;
|
---|
[83f176] | 859 | stream << _T->getAtomicNumber();
|
---|
[d02e07] | 860 | CurrentValue[name] = stream.str();
|
---|
| 861 | } else
|
---|
| 862 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 863 | }
|
---|
| 864 |
|
---|
| 865 | void MapOfActions::setCurrentValue(const char * name, class molecule * &_T)
|
---|
| 866 | {
|
---|
| 867 | if (typeid( molecule ) == *TypeMap[name]) {
|
---|
| 868 | std::ostringstream stream;
|
---|
| 869 | stream << _T->getId();
|
---|
| 870 | CurrentValue[name] = stream.str();
|
---|
| 871 | } else
|
---|
| 872 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 873 | }
|
---|
| 874 |
|
---|
| 875 | void MapOfActions::setCurrentValue(const char * name, class Box &_T)
|
---|
| 876 | {
|
---|
| 877 | const Matrix &M = _T.getM();
|
---|
[39b639] | 878 | if (typeid( BoxValue ) == *TypeMap[name]) {
|
---|
[d02e07] | 879 | std::ostringstream stream;
|
---|
| 880 | stream << M.at(0,0) << " ";
|
---|
| 881 | stream << M.at(0,1) << " ";
|
---|
| 882 | stream << M.at(0,2) << " ";
|
---|
| 883 | stream << M.at(1,1) << " ";
|
---|
| 884 | stream << M.at(1,2) << " ";
|
---|
| 885 | stream << M.at(2,2) << " ";
|
---|
| 886 | CurrentValue[name] = stream.str();
|
---|
| 887 | } else
|
---|
| 888 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 889 | }
|
---|
| 890 |
|
---|
| 891 | void MapOfActions::setCurrentValue(const char * name, class Vector &_T)
|
---|
| 892 | {
|
---|
[39b639] | 893 | if (typeid( VectorValue ) == *TypeMap[name]){
|
---|
[d02e07] | 894 | std::ostringstream stream;
|
---|
| 895 | stream << _T[0] << " ";
|
---|
| 896 | stream << _T[1] << " ";
|
---|
| 897 | stream << _T[2] << " ";
|
---|
| 898 | CurrentValue[name] = stream.str();
|
---|
| 899 | } else
|
---|
| 900 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 901 | }
|
---|
| 902 |
|
---|
[72f611] | 903 | void MapOfActions::setCurrentValue(const char * name, class BoxVector &_T)
|
---|
| 904 | {
|
---|
| 905 | if (typeid( VectorValue ) == *TypeMap[name]){
|
---|
| 906 | std::ostringstream stream;
|
---|
| 907 | stream << _T[0] << " ";
|
---|
| 908 | stream << _T[1] << " ";
|
---|
| 909 | stream << _T[2] << " ";
|
---|
| 910 | CurrentValue[name] = stream.str();
|
---|
| 911 | } else
|
---|
| 912 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 913 | }
|
---|
| 914 |
|
---|
[0b0a20] | 915 | void MapOfActions::setCurrentValue(const char * name, std::vector<atom *>&_T)
|
---|
| 916 | {
|
---|
| 917 | if (typeid( std::vector<atom *> ) == *TypeMap[name]) {
|
---|
| 918 | std::ostringstream stream;
|
---|
| 919 | for (std::vector<atom *>::iterator iter = _T.begin(); iter != _T.end(); ++iter) {
|
---|
| 920 | stream << (*iter)->getId() << " ";
|
---|
| 921 | }
|
---|
| 922 | CurrentValue[name] = stream.str();
|
---|
| 923 | } else
|
---|
| 924 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 925 | }
|
---|
| 926 |
|
---|
[e5c0a1] | 927 | void MapOfActions::setCurrentValue(const char * name, std::vector<const element *>&_T)
|
---|
[d02e07] | 928 | {
|
---|
[e5c0a1] | 929 | if (typeid( std::vector<const element *> ) == *TypeMap[name]) {
|
---|
[d02e07] | 930 | std::ostringstream stream;
|
---|
[e5c0a1] | 931 | for (std::vector<const element *>::iterator iter = _T.begin(); iter != _T.end(); ++iter) {
|
---|
[83f176] | 932 | stream << (*iter)->getAtomicNumber() << " ";
|
---|
[d02e07] | 933 | }
|
---|
| 934 | CurrentValue[name] = stream.str();
|
---|
| 935 | } else
|
---|
| 936 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 937 | }
|
---|
| 938 |
|
---|
[0b0a20] | 939 | void MapOfActions::setCurrentValue(const char * name, std::vector<molecule *>&_T)
|
---|
[3e54d0] | 940 | {
|
---|
[0b0a20] | 941 | if (typeid( std::vector<molecule *> ) == *TypeMap[name]) {
|
---|
[3e54d0] | 942 | std::ostringstream stream;
|
---|
[0b0a20] | 943 | for (std::vector<molecule *>::iterator iter = _T.begin(); iter != _T.end(); ++iter) {
|
---|
| 944 | stream << (*iter)->getId() << " ";
|
---|
[3e54d0] | 945 | }
|
---|
| 946 | CurrentValue[name] = stream.str();
|
---|
| 947 | } else
|
---|
| 948 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 949 | }
|
---|
| 950 |
|
---|
[6f5dfe] | 951 | void MapOfActions::setCurrentValue(const char * name, boost::filesystem::path &_T)
|
---|
| 952 | {
|
---|
| 953 | if (typeid( boost::filesystem::path ) == *TypeMap[name]) {
|
---|
| 954 | std::ostringstream stream;
|
---|
| 955 | stream << _T.string();
|
---|
| 956 | CurrentValue[name] = stream.str();
|
---|
| 957 | } else
|
---|
| 958 | throw IllegalTypeException(__FILE__,__LINE__);
|
---|
| 959 | }
|
---|
| 960 |
|
---|
[d02e07] | 961 |
|
---|
[326bbe] | 962 |
|
---|
| 963 | void MapOfActions::populateActions()
|
---|
| 964 | {
|
---|
| 965 | new AnalysisMolecularVolumeAction();
|
---|
| 966 | new AnalysisPairCorrelationAction();
|
---|
[d02e07] | 967 | new AnalysisPointCorrelationAction();
|
---|
[326bbe] | 968 | new AnalysisPrincipalAxisSystemAction();
|
---|
[d02e07] | 969 | new AnalysisSurfaceCorrelationAction();
|
---|
[326bbe] | 970 |
|
---|
| 971 | new AtomAddAction();
|
---|
| 972 | new AtomChangeElementAction();
|
---|
| 973 | new AtomRemoveAction();
|
---|
[22c44bf] | 974 | new AtomRotateAroundOriginByAngleAction();
|
---|
[34c338] | 975 | new AtomTranslateAction();
|
---|
[326bbe] | 976 |
|
---|
[53d01c] | 977 | new CommandBondLengthTableAction();
|
---|
| 978 | new CommandElementDbAction();
|
---|
| 979 | new CommandFastParsingAction();
|
---|
| 980 | new CommandHelpAction();
|
---|
| 981 | new CommandVerboseAction();
|
---|
| 982 | new CommandVersionAction();
|
---|
[7230be] | 983 | new CommandWarrantyAction();
|
---|
[326bbe] | 984 |
|
---|
[1a7fd2] | 985 | new FragmentationConstructBondGraphAction();
|
---|
[326bbe] | 986 | new FragmentationDepthFirstSearchAction();
|
---|
| 987 | new FragmentationFragmentationAction();
|
---|
| 988 | new FragmentationSubgraphDissectionAction();
|
---|
| 989 |
|
---|
| 990 | new MoleculeBondFileAction();
|
---|
| 991 | new MoleculeChangeNameAction();
|
---|
[1a7fd2] | 992 | new MoleculeCopyAction();
|
---|
[326bbe] | 993 | new MoleculeFillWithMoleculeAction();
|
---|
[eee966] | 994 | new MoleculeFillVoidWithMoleculeAction();
|
---|
[326bbe] | 995 | new MoleculeLinearInterpolationofTrajectoriesAction();
|
---|
[eaf4ae] | 996 | new MoleculeRotateAroundSelfByAngleAction();
|
---|
[b2531f] | 997 | new MoleculeRotateToPrincipalAxisSystemAction();
|
---|
[326bbe] | 998 | new MoleculeSaveAdjacencyAction();
|
---|
| 999 | new MoleculeSaveBondsAction();
|
---|
| 1000 | new MoleculeSaveTemperatureAction();
|
---|
[b2531f] | 1001 | new MoleculeSuspendInWaterAction();
|
---|
[326bbe] | 1002 | new MoleculeVerletIntegrationAction();
|
---|
| 1003 |
|
---|
| 1004 | new ParserLoadXyzAction();
|
---|
| 1005 | new ParserSaveXyzAction();
|
---|
| 1006 |
|
---|
[e212ff] | 1007 | new SelectionClearAllAtomsAction();
|
---|
[2218d94] | 1008 | new SelectionClearAllMoleculesAction();
|
---|
[e472eab] | 1009 | new SelectionAllAtomsAction();
|
---|
[1cc87e] | 1010 | new SelectionAllAtomsInsideCuboidAction();
|
---|
| 1011 | new SelectionAllAtomsInsideSphereAction();
|
---|
[770287] | 1012 | new SelectionAllAtomsOfMoleculeAction();
|
---|
[e472eab] | 1013 | new SelectionAllMoleculesAction();
|
---|
[51769f] | 1014 | new SelectionAtomByElementAction();
|
---|
[533838] | 1015 | new SelectionAtomByIdAction();
|
---|
| 1016 | new SelectionMoleculeByIdAction();
|
---|
[51769f] | 1017 | new SelectionMoleculeByFormulaAction();
|
---|
[481e92] | 1018 | new SelectionMoleculeOfAtomAction();
|
---|
[e472eab] | 1019 | new SelectionNotAllAtomsAction();
|
---|
[1cc87e] | 1020 | new SelectionNotAllAtomsInsideCuboidAction();
|
---|
| 1021 | new SelectionNotAllAtomsInsideSphereAction();
|
---|
[381c5f] | 1022 | new SelectionNotAllAtomsOfMoleculeAction();
|
---|
[e472eab] | 1023 | new SelectionNotAllMoleculesAction();
|
---|
[51769f] | 1024 | new SelectionNotAtomByElementAction();
|
---|
[533838] | 1025 | new SelectionNotAtomByIdAction();
|
---|
[51769f] | 1026 | new SelectionNotMoleculeByFormulaAction();
|
---|
[533838] | 1027 | new SelectionNotMoleculeByIdAction();
|
---|
[75a80f] | 1028 | new SelectionNotMoleculeOfAtomAction();
|
---|
[533838] | 1029 |
|
---|
[326bbe] | 1030 | new TesselationConvexEnvelopeAction();
|
---|
| 1031 | new TesselationNonConvexEnvelopeAction();
|
---|
| 1032 |
|
---|
| 1033 | new WorldAddEmptyBoundaryAction();
|
---|
| 1034 | new WorldBoundInBoxAction();
|
---|
| 1035 | new WorldCenterInBoxAction();
|
---|
| 1036 | new WorldCenterOnEdgeAction();
|
---|
| 1037 | new WorldChangeBoxAction();
|
---|
| 1038 | new WorldInputAction();
|
---|
| 1039 | new WorldOutputAction();
|
---|
| 1040 | new WorldRepeatBoxAction();
|
---|
| 1041 | new WorldScaleBoxAction();
|
---|
| 1042 | new WorldSetDefaultNameAction();
|
---|
| 1043 | new WorldSetGaussianBasisAction();
|
---|
[b9c847] | 1044 | new WorldSetOutputFormatsAction();
|
---|
[326bbe] | 1045 | }
|
---|
| 1046 |
|
---|
[97ebf8] | 1047 | /** Adds all options to the CommandLineParser.
|
---|
| 1048 | *
|
---|
| 1049 | */
|
---|
| 1050 | void MapOfActions::AddOptionsToParser()
|
---|
| 1051 | {
|
---|
| 1052 | // add other options
|
---|
| 1053 | for (map< set<string>*, po::options_description* >::iterator ListRunner = CmdParserLookup.begin(); ListRunner != CmdParserLookup.end(); ++ListRunner) {
|
---|
| 1054 | for (set<string>::iterator OptionRunner = ListRunner->first->begin(); OptionRunner != ListRunner->first->end(); ++OptionRunner) {
|
---|
| 1055 | if (hasValue(*OptionRunner)) {
|
---|
[e65de8] | 1056 | DoLog(1) && (Log() << Verbose(1) << "Adding option " << *OptionRunner << " with type " << TypeMap[*OptionRunner]->name() << " to CommandLineParser." << endl);
|
---|
[ab9a27] | 1057 | switch(TypeEnumMap[TypeMap[*OptionRunner]]) {
|
---|
[97ebf8] | 1058 | default:
|
---|
| 1059 | case None:
|
---|
| 1060 | ListRunner->second->add_options()
|
---|
| 1061 | (getKeyAndShortForm(*OptionRunner).c_str(), getDescription(*OptionRunner).c_str())
|
---|
| 1062 | ;
|
---|
| 1063 | break;
|
---|
| 1064 | case Boolean:
|
---|
| 1065 | ListRunner->second->add_options()
|
---|
[e30ce8] | 1066 | (getKeyAndShortForm(*OptionRunner).c_str(),
|
---|
[ab9a27] | 1067 | CurrentValue.find(*OptionRunner) != CurrentValue.end() ?
|
---|
[39b639] | 1068 | po::value< bool >()->default_value(lexical_cast<int>(CurrentValue[*OptionRunner].c_str())) :
|
---|
[e30ce8] | 1069 | po::value< bool >(),
|
---|
| 1070 | getDescription(*OptionRunner).c_str())
|
---|
[97ebf8] | 1071 | ;
|
---|
| 1072 | break;
|
---|
[0286bc] | 1073 | case Box:
|
---|
| 1074 | ListRunner->second->add_options()
|
---|
| 1075 | (getKeyAndShortForm(*OptionRunner).c_str(),
|
---|
[39b639] | 1076 | po::value<BoxValue>(),
|
---|
[0286bc] | 1077 | getDescription(*OptionRunner).c_str())
|
---|
| 1078 | ;
|
---|
| 1079 | break;
|
---|
[97ebf8] | 1080 | case Integer:
|
---|
| 1081 | ListRunner->second->add_options()
|
---|
[e30ce8] | 1082 | (getKeyAndShortForm(*OptionRunner).c_str(),
|
---|
[ab9a27] | 1083 | CurrentValue.find(*OptionRunner) != CurrentValue.end() ?
|
---|
[39b639] | 1084 | po::value< int >()->default_value(lexical_cast<int>(CurrentValue[*OptionRunner].c_str())) :
|
---|
[e30ce8] | 1085 | po::value< int >(),
|
---|
| 1086 | getDescription(*OptionRunner).c_str())
|
---|
[97ebf8] | 1087 | ;
|
---|
| 1088 | break;
|
---|
[0b0a20] | 1089 | case ListOfIntegers:
|
---|
[97ebf8] | 1090 | ListRunner->second->add_options()
|
---|
[e30ce8] | 1091 | (getKeyAndShortForm(*OptionRunner).c_str(),
|
---|
| 1092 | po::value< vector<int> >()->multitoken(),
|
---|
| 1093 | getDescription(*OptionRunner).c_str())
|
---|
[97ebf8] | 1094 | ;
|
---|
| 1095 | break;
|
---|
| 1096 | case Double:
|
---|
| 1097 | ListRunner->second->add_options()
|
---|
[e30ce8] | 1098 | (getKeyAndShortForm(*OptionRunner).c_str(),
|
---|
[ab9a27] | 1099 | CurrentValue.find(*OptionRunner) != CurrentValue.end() ?
|
---|
[39b639] | 1100 | po::value< double >()->default_value(lexical_cast<double>(CurrentValue[*OptionRunner].c_str())) :
|
---|
[e30ce8] | 1101 | po::value< double >(),
|
---|
| 1102 | getDescription(*OptionRunner).c_str())
|
---|
[97ebf8] | 1103 | ;
|
---|
| 1104 | break;
|
---|
| 1105 | case ListOfDoubles:
|
---|
| 1106 | ListRunner->second->add_options()
|
---|
[e30ce8] | 1107 | (getKeyAndShortForm(*OptionRunner).c_str(),
|
---|
| 1108 | po::value< vector<double> >()->multitoken(),
|
---|
| 1109 | getDescription(*OptionRunner).c_str())
|
---|
[97ebf8] | 1110 | ;
|
---|
| 1111 | break;
|
---|
| 1112 | case String:
|
---|
| 1113 | ListRunner->second->add_options()
|
---|
[e30ce8] | 1114 | (getKeyAndShortForm(*OptionRunner).c_str(),
|
---|
[ab9a27] | 1115 | CurrentValue.find(*OptionRunner) != CurrentValue.end() ?
|
---|
| 1116 | po::value< std::string >()->default_value(CurrentValue[*OptionRunner]) :
|
---|
[e30ce8] | 1117 | po::value< std::string >(),
|
---|
| 1118 | getDescription(*OptionRunner).c_str())
|
---|
[97ebf8] | 1119 | ;
|
---|
| 1120 | break;
|
---|
[0b0a20] | 1121 | case ListOfStrings:
|
---|
[cd8e55] | 1122 | ListRunner->second->add_options()
|
---|
| 1123 | (getKeyAndShortForm(*OptionRunner).c_str(),
|
---|
| 1124 | po::value< vector<std::string> >()->multitoken(),
|
---|
| 1125 | getDescription(*OptionRunner).c_str())
|
---|
| 1126 | ;
|
---|
| 1127 | break;
|
---|
[0b0a20] | 1128 | case Vector:
|
---|
[97ebf8] | 1129 | ListRunner->second->add_options()
|
---|
[e30ce8] | 1130 | (getKeyAndShortForm(*OptionRunner).c_str(),
|
---|
[0b0a20] | 1131 | po::value<VectorValue>(),
|
---|
[e30ce8] | 1132 | getDescription(*OptionRunner).c_str())
|
---|
[97ebf8] | 1133 | ;
|
---|
| 1134 | break;
|
---|
[0b0a20] | 1135 | case ListOfVectors:
|
---|
[97ebf8] | 1136 | ListRunner->second->add_options()
|
---|
[e30ce8] | 1137 | (getKeyAndShortForm(*OptionRunner).c_str(),
|
---|
[0b0a20] | 1138 | po::value< vector<VectorValue> >()->multitoken(),
|
---|
[e30ce8] | 1139 | getDescription(*OptionRunner).c_str())
|
---|
[97ebf8] | 1140 | ;
|
---|
| 1141 | break;
|
---|
| 1142 | case Molecule:
|
---|
| 1143 | ListRunner->second->add_options()
|
---|
[e30ce8] | 1144 | (getKeyAndShortForm(*OptionRunner).c_str(),
|
---|
[ab9a27] | 1145 | CurrentValue.find(*OptionRunner) != CurrentValue.end() ?
|
---|
[39b639] | 1146 | po::value< int >()->default_value(lexical_cast<int>(CurrentValue[*OptionRunner].c_str())) :
|
---|
[e30ce8] | 1147 | po::value< int >(),
|
---|
| 1148 | getDescription(*OptionRunner).c_str())
|
---|
[97ebf8] | 1149 | ;
|
---|
| 1150 | break;
|
---|
| 1151 | case ListOfMolecules:
|
---|
| 1152 | ListRunner->second->add_options()
|
---|
[e30ce8] | 1153 | (getKeyAndShortForm(*OptionRunner).c_str(),
|
---|
| 1154 | po::value< vector<int> >()->multitoken(),
|
---|
| 1155 | getDescription(*OptionRunner).c_str())
|
---|
[97ebf8] | 1156 | ;
|
---|
| 1157 | break;
|
---|
| 1158 | case Atom:
|
---|
| 1159 | ListRunner->second->add_options()
|
---|
[e30ce8] | 1160 | (getKeyAndShortForm(*OptionRunner).c_str(),
|
---|
[ab9a27] | 1161 | CurrentValue.find(*OptionRunner) != CurrentValue.end() ?
|
---|
[39b639] | 1162 | po::value< int >()->default_value(lexical_cast<int>(CurrentValue[*OptionRunner].c_str())) :
|
---|
[e30ce8] | 1163 | po::value< int >(),
|
---|
| 1164 | getDescription(*OptionRunner).c_str())
|
---|
[97ebf8] | 1165 | ;
|
---|
| 1166 | break;
|
---|
| 1167 | case ListOfAtoms:
|
---|
| 1168 | ListRunner->second->add_options()
|
---|
[e30ce8] | 1169 | (getKeyAndShortForm(*OptionRunner).c_str(),
|
---|
| 1170 | po::value< vector<int> >()->multitoken(),
|
---|
| 1171 | getDescription(*OptionRunner).c_str())
|
---|
[97ebf8] | 1172 | ;
|
---|
| 1173 | break;
|
---|
| 1174 | case Element:
|
---|
| 1175 | ListRunner->second->add_options()
|
---|
[e30ce8] | 1176 | (getKeyAndShortForm(*OptionRunner).c_str(),
|
---|
[39b639] | 1177 | po::value< int >(),
|
---|
[e30ce8] | 1178 | getDescription(*OptionRunner).c_str())
|
---|
[97ebf8] | 1179 | ;
|
---|
| 1180 | break;
|
---|
| 1181 | case ListOfElements:
|
---|
| 1182 | ListRunner->second->add_options()
|
---|
[e30ce8] | 1183 | (getKeyAndShortForm(*OptionRunner).c_str(),
|
---|
| 1184 | po::value< vector<int> >()->multitoken(),
|
---|
| 1185 | getDescription(*OptionRunner).c_str())
|
---|
[97ebf8] | 1186 | ;
|
---|
| 1187 | break;
|
---|
| 1188 | }
|
---|
| 1189 | } else {
|
---|
[0b0a20] | 1190 | DoLog(3) && (Log() << Verbose(3) << "Adding option " << *OptionRunner << " to CommandLineParser." << endl);
|
---|
[97ebf8] | 1191 | ListRunner->second->add_options()
|
---|
| 1192 | (getKeyAndShortForm(*OptionRunner).c_str(), getDescription(*OptionRunner).c_str())
|
---|
| 1193 | ;
|
---|
| 1194 | }
|
---|
| 1195 | }
|
---|
| 1196 | }
|
---|
| 1197 | }
|
---|
| 1198 |
|
---|
| 1199 | /** Getter for MapOfActions:DescriptionMap.
|
---|
| 1200 | * Note that we assert when action does not exist in CommandLineParser::DescriptionMap.
|
---|
| 1201 | * \param actionname name of the action to lookup
|
---|
| 1202 | * \return Description of the action
|
---|
| 1203 | */
|
---|
| 1204 | std::string MapOfActions::getDescription(string actionname)
|
---|
| 1205 | {
|
---|
| 1206 | ASSERT(DescriptionMap.find(actionname) != DescriptionMap.end(), "Unknown action name passed to MapOfActions::getDescription");
|
---|
| 1207 | return DescriptionMap[actionname];
|
---|
| 1208 | }
|
---|
| 1209 |
|
---|
| 1210 | /** Specific Getter for a MapOfActions:ShortFormMap.
|
---|
| 1211 | * If action has a short for, then combination is as "actionname,ShortForm" (this is
|
---|
| 1212 | * the desired format for boost::program_options). If no short form exists in the map,
|
---|
| 1213 | * just actionname will be returned
|
---|
| 1214 | * Note that we assert when action does not exist in CommandLineParser::DescriptionMap.
|
---|
| 1215 | * \param actionname name of the action to lookup
|
---|
| 1216 | * \return actionname,ShortForm or Description of the action
|
---|
| 1217 | */
|
---|
| 1218 | std::string MapOfActions::getKeyAndShortForm(string actionname)
|
---|
| 1219 | {
|
---|
| 1220 | stringstream output;
|
---|
| 1221 | ASSERT(DescriptionMap.find(actionname) != DescriptionMap.end(), "Unknown action name passed to MapOfActions::getDescriptionAndShortForm");
|
---|
| 1222 | output << actionname;
|
---|
| 1223 | if (ShortFormMap.find(actionname) != DescriptionMap.end())
|
---|
| 1224 | output << "," << ShortFormMap[actionname];
|
---|
| 1225 | return output.str();
|
---|
| 1226 | }
|
---|
| 1227 |
|
---|
| 1228 | /** Getter for MapOfActions:ShortFormMap.
|
---|
| 1229 | * Note that we assert when action does not exist CommandLineParser::ShortFormMap.
|
---|
| 1230 | * \param actionname name of the action to lookup
|
---|
| 1231 | * \return ShortForm of the action
|
---|
| 1232 | */
|
---|
| 1233 | std::string MapOfActions::getShortForm(string actionname)
|
---|
| 1234 | {
|
---|
| 1235 | ASSERT(ShortFormMap.find(actionname) != ShortFormMap.end(), "Unknown action name passed to MapOfActions::getShortForm");
|
---|
| 1236 | return ShortFormMap[actionname];
|
---|
| 1237 | }
|
---|
| 1238 |
|
---|
| 1239 | /** Returns whether the given action needs a value or not.
|
---|
| 1240 | * \param actionname name of the action to look up
|
---|
| 1241 | * \return true - value is needed, false - no value is stored in MapOfActions::TypeMap
|
---|
| 1242 | */
|
---|
| 1243 | bool MapOfActions::hasValue(string actionname)
|
---|
| 1244 | {
|
---|
| 1245 | return (TypeMap.find(actionname) != TypeMap.end());
|
---|
| 1246 | }
|
---|
| 1247 |
|
---|
| 1248 | /** Getter for MapOfActions::TypeMap.
|
---|
| 1249 | * \param actionname name of the action to look up
|
---|
| 1250 | * \return type of the action
|
---|
| 1251 | */
|
---|
[ab9a27] | 1252 | std::string MapOfActions::getValueType(string actionname)
|
---|
[97ebf8] | 1253 | {
|
---|
[ab9a27] | 1254 | return TypeMap[actionname]->name();
|
---|
[97ebf8] | 1255 | }
|
---|
| 1256 |
|
---|
| 1257 | /** Searches whether action is registered with CommandLineParser.
|
---|
| 1258 | * Note that this method is only meant transitionally for ParseCommandLineOptions' removal.
|
---|
| 1259 | * I.e. All actions that are already handled by the new CommandLineUIFactory can be checked
|
---|
| 1260 | * by this function.
|
---|
| 1261 | * \param shortform command short form to look for
|
---|
| 1262 | * \return true - action has been registered, false - action has not been registered.
|
---|
| 1263 | */
|
---|
| 1264 | bool MapOfActions::isShortFormPresent(string shortform)
|
---|
| 1265 | {
|
---|
| 1266 | bool result = false;
|
---|
| 1267 | string actionname;
|
---|
| 1268 | for (map<std::string, std::string>::iterator ShortFormRunner = ShortFormMap.begin(); ShortFormRunner != ShortFormMap.end(); ++ShortFormRunner)
|
---|
| 1269 | if (ShortFormRunner->second == shortform) {
|
---|
| 1270 | actionname = ShortFormRunner->first;
|
---|
| 1271 | break;
|
---|
| 1272 | }
|
---|
| 1273 | result = result || (generic.find(actionname) != generic.end());
|
---|
| 1274 | result = result || (config.find(actionname) != config.end());
|
---|
| 1275 | result = result || (hidden.find(actionname) != hidden.end());
|
---|
| 1276 | result = result || (visible.find(actionname) != visible.end());
|
---|
| 1277 | result = result || (inputfile.find(actionname) != inputfile.end());
|
---|
| 1278 | return result;
|
---|
| 1279 | }
|
---|
| 1280 |
|
---|
[7e6b00] | 1281 | /** Returns the inverse to MapOfActions::ShortFormMap, i.e. lookup actionname for its short form.
|
---|
| 1282 | * \return map from short form of action to name of action
|
---|
| 1283 | */
|
---|
| 1284 | map <std::string, std::string> MapOfActions::getShortFormToActionMap()
|
---|
| 1285 | {
|
---|
| 1286 | map <std::string, std::string> result;
|
---|
| 1287 |
|
---|
| 1288 | for (map<std::string, std::string>::iterator iter = ShortFormMap.begin(); iter != ShortFormMap.end(); ++iter)
|
---|
| 1289 | result[iter->second] = iter->first;
|
---|
| 1290 |
|
---|
| 1291 | return result;
|
---|
| 1292 | }
|
---|
[97ebf8] | 1293 |
|
---|
| 1294 |
|
---|
| 1295 | CONSTRUCT_SINGLETON(MapOfActions)
|
---|