Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/MapOfActions.cpp

    r8540f0 r39af9f  
    5050  v = boost::any(BoxValue(BV));
    5151}
    52 
    5352
    5453/** Constructor of class MapOfActions.
     
    8584  DescriptionMap["nonconvex-envelope"] = "create the non-convex envelope for a molecule";
    8685  DescriptionMap["molecular-volume"] = "calculate the volume of a given molecule";
    87   DescriptionMap["pair-correlation"] = "pair correlation analysis between two elements";
    88   DescriptionMap["pair-correlation-point"] = "pair correlation analysis between atoms of a element to a given point";
    89   DescriptionMap["pair-correlation-surface"] = "pair correlation analysis between atoms of a given element and a surface";
     86  DescriptionMap["pair-correlation"] = "pair correlation analysis between two elements, element and point or element and surface";
    9087  DescriptionMap["parse-xyz"] = "parse xyz file into World";
    9188  DescriptionMap["principal-axis-system"] = "calculate the principal axis system of the specified molecule";
     
    113110  DescriptionMap["distances"] = "list of three of distances in space, one for each axis direction";
    114111  DescriptionMap["DoRotate"] = "whether to rotate or just report angles";
    115   DescriptionMap["element"] = "set of elements";
     112  DescriptionMap["element"] = "single element";
     113  DescriptionMap["elements"] = "set of elements";
    116114  DescriptionMap["end-mol"] = "last or end step";
    117115  DescriptionMap["input"] = "name of input file";
     
    120118  DescriptionMap["MaxDistance"] = "maximum distance in space";
    121119  DescriptionMap["molecule-by-id"] = "index of a molecule";
     120  DescriptionMap["molecule-by-name"] = "name of a molecule";
    122121  DescriptionMap["order"] = "order of a discretization, dissection, ...";
    123122  DescriptionMap["output-file"] = "name of the output file";
     
    146145  ShortFormMap["linear-interpolate"] = "L";
    147146  ShortFormMap["nonconvex-envelope"] = "N";
    148   ShortFormMap["pair-correlation"] = "CE";
    149   ShortFormMap["pair-correlation-point"] = "CP";
    150   ShortFormMap["pair-correlation-surface"] = "CS";
     147  ShortFormMap["pair-correlation"] = "C";
    151148  ShortFormMap["parse-xyz"] = "p";
    152149  ShortFormMap["remove-atom"] = "r";
     
    188185  TypeMap["nonconvex-envelope"] = Molecule;
    189186  TypeMap["parse-xyz"] = String;
    190   TypeMap["principal-axis-system"] = Axis;
     187  TypeMap["pair-correlation"] = String;
     188  TypeMap["principal-axis-system"] = Molecule;
    191189  TypeMap["remove-atom"] = Atom;
    192190  TypeMap["remove-sphere"] = Atom;
     
    208206  TypeMap["bin-end"] = Double;
    209207  TypeMap["bin-start"] = Double;
     208  TypeMap["bin-width"] = Double;
    210209  TypeMap["distance"] = Double;
    211210  TypeMap["distances"] = Vector;
     
    217216  TypeMap["MaxDistance"] = Double;
    218217  TypeMap["molecule-by-id"] = Molecule;
     218  TypeMap["molecule-by-name"] = Molecule;
    219219  TypeMap["order"] = Integer;
    220220  TypeMap["output-file"] = String;
     
    224224  // default values for any action that needs one (always string!)
    225225  DefaultValue["molecule-by-id"] = "-1";
     226  DefaultValue["bin-width"] = "0.5";
     227  DefaultValue["periodic"] = "0";
    226228
    227229
     
    229231//      generic.insert("add-atom");
    230232//  generic.insert("bond-file");
    231 //      generic.insert("bond-table");
     233        generic.insert("bond-table");
    232234  generic.insert("boundary");
    233235//  generic.insert("bound-in-box");
     
    240242//      generic.insert("default-molname");
    241243        generic.insert("depth-first-search");
    242 //      generic.insert("element-db");
     244        generic.insert("element-db");
    243245//      generic.insert("fastparsing");
    244246  generic.insert("fill-molecule");
     
    248250//  generic.insert("molecular-volume");
    249251//  generic.insert("nonconvex-envelope");
    250 //      generic.insert("pair-correlation");
    251 //      generic.insert("pair-correlation-point");
    252 //      generic.insert("pair-correlation-surface");
     252        generic.insert("pair-correlation");
    253253//      generic.insert("parse-xyz");
    254254//  generic.insert("principal-axis-system");
     
    256256//  generic.insert("remove-sphere");
    257257  generic.insert("repeat-box");
    258 //  generic.insert("rotate-to-pas");
     258  generic.insert("rotate-to-pas");
    259259//      generic.insert("save-adjacency");
    260260//  generic.insert("save-bonds");
     
    269269        generic.insert("version");
    270270//      // list of generic values
    271 //      generic.insert("bin-output-file");
    272 //  generic.insert("bin-end");
    273 //  generic.insert("bin-start");
    274271//  generic.insert("distance");
    275272//  generic.insert("distances");
     
    278275    generic.insert("input");
    279276//  generic.insert("length");
    280 //  generic.insert("output-file");
    281 //  generic.insert("periodic");
    282 //  generic.insert("position");
    283277//  generic.insert("start-mol");
    284278
     
    287281
    288282    // hidden arguments
     283  generic.insert("bin-end");
     284  generic.insert("bin-output-file");
     285  generic.insert("bin-start");
     286  generic.insert("bin-width");
    289287  generic.insert("distance");
    290288  generic.insert("DoRotate");
    291289  generic.insert("distances");
     290  generic.insert("element");
     291  generic.insert("elements");
    292292  generic.insert("lengths");
    293293  generic.insert("MaxDistance");
    294294  generic.insert("molecule-by-id");
     295  generic.insert("molecule-by-name");
    295296  generic.insert("order");
     297  generic.insert("output-file");
     298  generic.insert("periodic");
     299  generic.insert("position");
    296300}
    297301
     
    541545}
    542546
     547/** Returns the inverse to MapOfActions::ShortFormMap, i.e. lookup actionname for its short form.
     548 * \return map from short form of action to name of action
     549 */
     550map <std::string, std::string> MapOfActions::getShortFormToActionMap()
     551{
     552  map <std::string, std::string> result;
     553
     554  for (map<std::string, std::string>::iterator iter = ShortFormMap.begin(); iter != ShortFormMap.end();  ++iter)
     555    result[iter->second] = iter->first;
     556
     557  return result;
     558}
    543559
    544560
Note: See TracChangeset for help on using the changeset viewer.