Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/MapOfActions.cpp

    r4f7f34e r326bbe  
    2222#include "verbose.hpp"
    2323
     24#include "Actions/ActionRegistry.hpp"
     25#include "Actions/AnalysisAction/MolecularVolumeAction.hpp"
     26#include "Actions/AnalysisAction/PairCorrelationAction.hpp"
     27#include "Actions/AnalysisAction/PrincipalAxisSystemAction.hpp"
     28#include "Actions/AtomAction/AddAction.hpp"
     29#include "Actions/AtomAction/ChangeElementAction.hpp"
     30#include "Actions/AtomAction/RemoveAction.hpp"
     31#include "Actions/CmdAction/BondLengthTableAction.hpp"
     32#include "Actions/CmdAction/ElementDbAction.hpp"
     33#include "Actions/CmdAction/FastParsingAction.hpp"
     34#include "Actions/CmdAction/HelpAction.hpp"
     35#include "Actions/CmdAction/VerboseAction.hpp"
     36#include "Actions/CmdAction/VersionAction.hpp"
     37#include "Actions/FragmentationAction/DepthFirstSearchAction.hpp"
     38#include "Actions/FragmentationAction/SubgraphDissectionAction.hpp"
     39#include "Actions/FragmentationAction/FragmentationAction.hpp"
     40#include "Actions/MoleculeAction/BondFileAction.hpp"
     41#include "Actions/MoleculeAction/ChangeNameAction.hpp"
     42#include "Actions/MoleculeAction/FillWithMoleculeAction.hpp"
     43#include "Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.hpp"
     44#include "Actions/MoleculeAction/SaveAdjacencyAction.hpp"
     45#include "Actions/MoleculeAction/SaveBondsAction.hpp"
     46#include "Actions/MoleculeAction/SaveTemperatureAction.hpp"
     47#include "Actions/MoleculeAction/TranslateAction.hpp"
     48#include "Actions/MoleculeAction/VerletIntegrationAction.hpp"
     49#include "Actions/ParserAction/LoadXyzAction.hpp"
     50#include "Actions/ParserAction/SaveXyzAction.hpp"
     51#include "Actions/TesselationAction/ConvexEnvelopeAction.hpp"
     52#include "Actions/TesselationAction/NonConvexEnvelopeAction.hpp"
     53#include "Actions/WorldAction/AddEmptyBoundaryAction.hpp"
     54#include "Actions/WorldAction/BoundInBoxAction.hpp"
     55#include "Actions/WorldAction/CenterInBoxAction.hpp"
     56#include "Actions/WorldAction/CenterOnEdgeAction.hpp"
     57#include "Actions/WorldAction/ChangeBoxAction.hpp"
     58#include "Actions/WorldAction/InputAction.hpp"
     59#include "Actions/WorldAction/OutputAction.hpp"
     60#include "Actions/WorldAction/RemoveSphereOfAtomsAction.hpp"
     61#include "Actions/WorldAction/RepeatBoxAction.hpp"
     62#include "Actions/WorldAction/ScaleBoxAction.hpp"
     63#include "Actions/WorldAction/SetDefaultNameAction.hpp"
     64#include "Actions/WorldAction/SetGaussianBasisAction.hpp"
    2465#include "Actions/Values.hpp"
    2566
     
    99140  DescriptionMap["save-bonds"] = "name of the bonds file to write to";
    100141  DescriptionMap["save-temperature"] = "name of the temperature file to write to";
     142  DescriptionMap["SaveXyz"] = "save world as xyz file";
    101143  DescriptionMap["scale-box"] = "scale box and atomic positions inside";
    102144  DescriptionMap["subgraph-dissect"] = "dissect the molecular system into molecules representing disconnected subgraphs";
     
    245287  DefaultValue["periodic"] = "0";
    246288
    247 
    248   // list of generic actions
     289  // put action into each menu category
     290  MenuContainsActionMap.insert( pair<std::string, std::string> ("analysis", "molecular-volume") );
     291  MenuContainsActionMap.insert( pair<std::string, std::string> ("analysis", "pair-correlation") );
     292  MenuContainsActionMap.insert( pair<std::string, std::string> ("analysis", "principal-axis-system") );
     293
     294  MenuContainsActionMap.insert( pair<std::string, std::string> ("atom", "add-atom") );
     295  MenuContainsActionMap.insert( pair<std::string, std::string> ("atom", "change-element") );
     296  MenuContainsActionMap.insert( pair<std::string, std::string> ("atom", "remove-atom") );
     297
     298  MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "bond-table") );
     299  MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "element-db") );
     300  MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "fastparsing") );
     301  MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "verbose") );
     302  MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "version") );
     303
     304  MenuContainsActionMap.insert( pair<std::string, std::string> ("fragmentation", "depth-first-search") );
     305  MenuContainsActionMap.insert( pair<std::string, std::string> ("fragmentation", "fragment-mol") );
     306  MenuContainsActionMap.insert( pair<std::string, std::string> ("fragmentation", "subgraph-dissect") );
     307
     308  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "bond-file") );
     309  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "change-molname") );
     310  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "fill-molecule") );
     311  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "linear-interpolate") );
     312  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "rotate-to-pas") );
     313  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "save-adjacency") );
     314  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "save-bonds") );
     315  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "save-temperature") );
     316  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "suspend-in-water") );
     317  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "translate-mol") );
     318  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "verlet-integrate") );
     319
     320  MenuContainsActionMap.insert( pair<std::string, std::string> ("parser", "parse-xyz") );
     321  MenuContainsActionMap.insert( pair<std::string, std::string> ("parser", "SaveXyz") );
     322
     323  MenuContainsActionMap.insert( pair<std::string, std::string> ("tesselation", "convex-envelope") );
     324  MenuContainsActionMap.insert( pair<std::string, std::string> ("tesselation", "nonconvex-envelope") );
     325
     326  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "boundary") );
     327  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "bound-in-box") );
     328  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "center-in-box") );
     329  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "center-edge") );
     330  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "change-box") );
     331  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "input") );
     332  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "output") );
     333  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "remove-sphere") );
     334  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "repeat-box") );
     335  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "scale-box") );
     336  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "default-molname") );
     337  MenuContainsActionMap.insert( pair<std::string, std::string> ("world", "set-basis") );
     338
     339  // put actions into command line category
    249340        generic.insert("add-atom");
    250341  generic.insert("bond-file");
     
    328419}
    329420
     421
     422void MapOfActions::populateActions()
     423{
     424  new AnalysisMolecularVolumeAction();
     425  new AnalysisPairCorrelationAction();
     426  new AnalysisPrincipalAxisSystemAction();
     427
     428  new AtomAddAction();
     429  new AtomChangeElementAction();
     430  new AtomRemoveAction();
     431
     432  new CommandLineBondLengthTableAction();
     433  new CommandLineElementDbAction();
     434  new CommandLineFastParsingAction();
     435  new CommandLineHelpAction();
     436  new CommandLineVerboseAction();
     437  new CommandLineVersionAction();
     438
     439  new FragmentationDepthFirstSearchAction();
     440  new FragmentationFragmentationAction();
     441  new FragmentationSubgraphDissectionAction();
     442
     443  new MoleculeBondFileAction();
     444  new MoleculeChangeNameAction();
     445  new MoleculeFillWithMoleculeAction();
     446  new MoleculeLinearInterpolationofTrajectoriesAction();
     447  new MoleculeSaveAdjacencyAction();
     448  new MoleculeSaveBondsAction();
     449  new MoleculeSaveTemperatureAction();
     450  new MoleculeTranslateAction();
     451  new MoleculeVerletIntegrationAction();
     452
     453  new ParserLoadXyzAction();
     454  new ParserSaveXyzAction();
     455
     456  new TesselationConvexEnvelopeAction();
     457  new TesselationNonConvexEnvelopeAction();
     458
     459  new WorldAddEmptyBoundaryAction();
     460  new WorldBoundInBoxAction();
     461  new WorldCenterInBoxAction();
     462  new WorldCenterOnEdgeAction();
     463  new WorldChangeBoxAction();
     464  new WorldInputAction();
     465  new WorldOutputAction();
     466  new WorldRemoveSphereOfAtomsAction();
     467  new WorldRepeatBoxAction();
     468  new WorldScaleBoxAction();
     469  new WorldSetDefaultNameAction();
     470  new WorldSetGaussianBasisAction();
     471}
     472
     473
    330474/** Adds all options to the CommandLineParser.
    331475 *
Note: See TracChangeset for help on using the changeset viewer.