Ignore:
Timestamp:
Oct 30, 2010, 8:42:44 PM (15 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
76cec6, c38826
Parents:
23359f
git-author:
Frederik Heber <heber@…> (10/30/10 19:55:54)
git-committer:
Frederik Heber <heber@…> (10/30/10 20:42:44)
Message:

Huge refactoring: Introduction of Traits to Actions.

This change is really big but the introduction of the Trait concept (at least
in its current light form) is so fundamental that lots of pieces had to be
changed in order to get everything working.

The main point why it was necessary to add these traits in the first place was
to comfortably allow for adding extension of Actions information-wise, i.e.
with stuff that is only important for the QtUI, such as icons, or tooltips, ...
This extra information should not be stored with Action itself, as it has
nothing to do with the workings of the Action. And neither should it get
stored with some blown-out-of-proportions MapOfActions class ...

The gist of the change is as follows:

  • OptionTrait contains the token, description, shortform and type of an option, such as ("position", "position in space, none, typeid(Vector)).
  • ActionTrait is the derived form for actions where additionally MenuPosition and MenuName are stored (and probably more to come for the GUI), also we have a set of OptionTrait instances, one for each option of the Action.
  • Action then contains this ActionTrait, specialized for each Action.
  • the preprocessor macros have been enhanced to gather all this information from the .def files.
  • MapOfActions is gone. Completely. Most of its use was to store this extra information and the ValueStorage part now is just in class ValueStorage.
  • ValueStorage is no more an interface to MapOfActions but as the name says a (type-safe) ValueStorage.

Listing the (remaining) changes in alphabetical order of the class:

  • Action
    • member value ::name dropped, ::getName() uses ActionTraits::getName()
    • new define NODEFAULT which is used in paramdefaults in .def files
    • all derived actions classes such as Process, Calculations, MakroAction,... have been adapated to use the ActionTrait concept as well.
  • ActionHistory
    • extraced RedoAction and UndoAction, shifted implementation into their own object files and they use .def files as well (i.e. streamlined with method used for other actions)
  • MenuDescription
    • contain information on Menus such as name, ...
    • new unit test checks for consistency
  • molecule
    • const member functions: Copy(), Output() and OutputBonds()
  • OptionRegistry
    • new registry class for options only
    • we want the same type throughout the code for each token, e.g. "position"
    • the registry containts checks for consistency
  • OptionTrait
    • default values are specified in paramdefaults, none are given by NODEFAULT
    • introduced default for translate-atoms, point-correlation, pair-correlation
  • Registry pattern
    • new unit test, but only sceleton code so far
  • ...Query, also ...Pipe
    • atoms, molecule and elements are now all const
    • also ValueStorage's signatures all have const therein
  • ValueStorage
    • set/queryCurrentValue from MapOfActions
    • at times VectorValue has been in .def files where Vector was in the signature. This is cleared. Such stuff is only present for e.g. BoxVector being queried as a Vector. But this is a feature and intended.
  • World
    • most of the (un)selection functions now work on const atoms and molecules
    • in one case we need a const_cast to remove this, but this is intentional, as the vector of selected atoms stores non-const pointers and this is ok.

There is only one test which had to be changed slightly because a specific
option token as "position" must now have the same type everywhere, e.g. always
Vector.

  • TESTFIX: Simple_configuration/2: --position -> --domain-position (and associated to BoxVector)
Location:
src/Actions/MoleculeAction
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/MoleculeAction/BondFileAction.cpp

    r23359f re4afb4  
    4646    mol = World::getInstance().beginMoleculeSelection()->second;
    4747    DoLog(0) && (Log() << Verbose(0) << "Parsing bonds from " << params.bondfile << "." << endl);
    48     ifstream input(params.bondfile.c_str());
     48    ifstream input(params.bondfile.string().c_str());
    4949    mol->CreateAdjacencyListFromDbondFile(&input);
    5050    input.close();
     
    7575  return false;
    7676}
    77 
    78 const string MoleculeBondFileAction::getName() {
    79   return NAME;
    80 }
    8177/** =========== end of function ====================== */
  • src/Actions/MoleculeAction/BondFileAction.def

    r23359f re4afb4  
    1111// i.e. there is an integer with variable name Z that can be found in
    1212// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required
    14 #define paramtypes (std::string)
     13// "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14#define paramtypes (boost::filesystem::path)
    1515#define paramtokens ("bond-file")
    1616#define paramdescriptions ("name of the bond file")
     17#undef paramdefaults
    1718#define paramreferences (bondfile)
    1819
     
    2930
    3031// finally the information stored in the ActionTrait specialization
    31 #undef DEFAULTVALUE
    32 #define DESCRIPTION "name of the bond file"
     32#define DESCRIPTION "parse bond structure from dbond file"
    3333#define SHORTFORM "A"
    34 #define TYPEINFO &typeid(std::string)
  • src/Actions/MoleculeAction/ChangeNameAction.cpp

    r23359f re4afb4  
    7171  return true;
    7272}
    73 
    74 const string MoleculeChangeNameAction::getName() {
    75   return NAME;
    76 }
    7773/** =========== end of function ====================== */
  • src/Actions/MoleculeAction/ChangeNameAction.def

    r23359f re4afb4  
    1111// i.e. there is an integer with variable name Z that can be found in
    1212// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required
     13// "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    1414#define paramtypes (std::string)
    1515#define paramtokens ("change-molname")
    16 #define paramdescriptions ("change the name of a molecule")
     16#define paramdescriptions ("new name of molecule")
     17#undef paramdefaults
    1718#define paramreferences (name)
    1819
     
    2930
    3031// finally the information stored in the ActionTrait specialization
    31 #undef DEFAULTVALUE
    3232#define DESCRIPTION "change the name of a molecule"
    3333#undef SHORTFORM
    34 #define TYPEINFO &typeid(std::string)
  • src/Actions/MoleculeAction/CopyAction.cpp

    r23359f re4afb4  
    9191  return true;
    9292}
    93 
    94 const string MoleculeCopyAction::getName() {
    95   return NAME;
    96 }
    9793/** =========== end of function ====================== */
  • src/Actions/MoleculeAction/CopyAction.def

    r23359f re4afb4  
    1111// i.e. there is an integer with variable name Z that can be found in
    1212// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required
    14 #define paramtypes (molecule *)(Vector)
     13// "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14#define paramtypes (const molecule *)(Vector)
    1515#define paramtokens ("copy-molecule")("position")
    16 #define paramdescriptions ("copies a molecule with all atoms and bonds")("position in R^3 space")
     16#define paramdescriptions ("molecule to copy")("position in R^3 space")
     17#undef paramdefaults
    1718#define paramreferences (mol)(position)
    1819
     
    2930
    3031// finally the information stored in the ActionTrait specialization
    31 #undef DEFAULTVALUE
    3232#define DESCRIPTION "copies a molecule with all atoms and bonds"
    3333#undef SHORTFORM
    34 #define TYPEINFO &typeid(molecule)
  • src/Actions/MoleculeAction/FillVoidWithMoleculeAction.cpp

    r23359f re4afb4  
    5454  // construct water molecule
    5555  molecule *filler = World::getInstance().createMolecule();
    56   std::string FilenameSuffix = params.fillername.substr(params.fillername.find_last_of('.')+1, params.fillername.length());
     56  std::string FilenameSuffix = params.fillername.string().substr(params.fillername.string().find_last_of('.')+1, params.fillername.string().length());
    5757  ifstream input;
    58   input.open(params.fillername.c_str());
     58  input.open(params.fillername.string().c_str());
    5959  switch (FormatParserStorage::getInstance().getTypeFromSuffix(FilenameSuffix)) {
    6060    case mpqc:
     
    9595  for (; iter != World::getInstance().moleculeEnd(); ++iter)
    9696    filler = *iter; // get last molecule
    97   filler->SetNameFromFilename(params.fillername.c_str());
     97  filler->SetNameFromFilename(params.fillername.string().c_str());
    9898  World::getInstance().getConfig()->BG->ConstructBondGraph(filler);
    9999
     
    128128  return false;
    129129}
    130 
    131 const string MoleculeFillVoidWithMoleculeAction::getName() {
    132   return NAME;
    133 }
    134130/** =========== end of function ====================== */
  • src/Actions/MoleculeAction/FillVoidWithMoleculeAction.def

    r23359f re4afb4  
    1212// i.e. there is an integer with variable name Z that can be found in
    1313// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required
    15 #define paramtypes (std::string)(Vector)(Vector)(bool)
     14// "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15#define paramtypes (boost::filesystem::path)(Vector)(Vector)(bool)
    1616#define paramtokens ("fill-void")("distances")("lengths")("DoRotate")
    17 #define paramdescriptions ("fill void space of box with a filler molecule")("list of three of distances in space, one for each axis direction")("list of three of lengths in space, one for each axis direction")("whether to rotate or not")
     17#define paramdescriptions ("name of xyz file of filler molecule")("list of three of distances in space, one for each axis direction")("list of three of lengths in space, one for each axis direction")("whether to rotate or not")
     18#undef paramdefaults
    1819#define paramreferences (fillername)(distances)(lengths)(DoRotate)
    1920
     
    3031
    3132// finally the information stored in the ActionTrait specialization
    32 #undef DEFAULTVALUE
    3333#define DESCRIPTION "fill void space of box with a filler molecule"
    3434#undef SHORTFORM
    35 #define TYPEINFO &typeid(std::string)
  • src/Actions/MoleculeAction/FillWithMoleculeAction.cpp

    r23359f re4afb4  
    4848  // construct water molecule
    4949  molecule *filler = World::getInstance().createMolecule();
    50   if (!filler->AddXYZFile(params.fillername)) {
     50  if (!filler->AddXYZFile(params.fillername.string())) {
    5151    DoeLog(0) && (eLog()<< Verbose(0) << "Could not parse filler molecule from " << params.fillername << "." << endl);
    5252  }
    53   filler->SetNameFromFilename(params.fillername.c_str());
     53  filler->SetNameFromFilename(params.fillername.string().c_str());
    5454  molecule *Filling = NULL;
    5555//    atom *first = NULL, *second = NULL, *third = NULL;
     
    110110  return false;
    111111}
    112 
    113 const string MoleculeFillWithMoleculeAction::getName() {
    114   return NAME;
    115 }
    116112/** =========== end of function ====================== */
  • src/Actions/MoleculeAction/FillWithMoleculeAction.def

    r23359f re4afb4  
    1212// i.e. there is an integer with variable name Z that can be found in
    1313// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required
    15 #define paramtypes (std::string)(Vector)(Vector)(double)(bool)
     14// "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     15#define paramtypes (boost::filesystem::path)(Vector)(Vector)(double)(bool)
    1616#define paramtokens ("fill-molecule")("distances")("lengths")("MaxDistance")("DoRotate")
    17 #define paramdescriptions ("fill around molecules' surface with a filler molecule")("list of three of distances in space, one for each axis direction")("list of three of lengths in space, one for each axis direction")("maximum spatial distance")("whether to rotate or not")
     17#define paramdescriptions ("name of xyz file of filler molecule")("list of three of distances in space, one for each axis direction")("list of three of lengths in space, one for each axis direction")("maximum spatial distance")("whether to rotate or not")
     18#undef paramdefaults
    1819#define paramreferences (fillername)(distances)(lengths)(MaxDistance)(DoRotate)
    1920
     
    3031
    3132// finally the information stored in the ActionTrait specialization
    32 #undef DEFAULTVALUE
    3333#define DESCRIPTION "fill around molecules' surface with a filler molecule"
    3434#define SHORTFORM "F"
    35 #define TYPEINFO &typeid(std::string)
     35
  • src/Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.cpp

    r23359f re4afb4  
    5050    if (params.IdMapping)
    5151      DoLog(1) && (Log() << Verbose(1) << "Using Identity for the permutation map." << endl);
    52     if (!mol->LinearInterpolationBetweenConfiguration(params.start, params.end, params.filename, *(World::getInstance().getConfig()), params.IdMapping))
     52    if (!mol->LinearInterpolationBetweenConfiguration(params.start, params.end, params.filename.branch_path().string(), *(World::getInstance().getConfig()), params.IdMapping))
    5353      DoLog(2) && (Log() << Verbose(2) << "Could not store " << params.filename << " files." << endl);
    5454    else
     
    7979  return false;
    8080}
    81 
    82 const string MoleculeLinearInterpolationofTrajectoriesAction::getName() {
    83   return NAME;
    84 }
    8581/** =========== end of function ====================== */
  • src/Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.def

    r23359f re4afb4  
    1111// i.e. there is an integer with variable name Z that can be found in
    1212// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required
    14 #define paramtypes (std::string)(int)(int)(bool)
     13// "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14#define paramtypes (boost::filesystem::path)(int)(int)(bool)
    1515#define paramtokens ("linear-interpolate")("start-step")("end-step")("id-mapping")
    16 #define paramdescriptions ("linear interpolation in discrete steps between start and end position of a molecule")("first or start step")("last or end step")("whether the identity shall be used in mapping atoms onto atoms or not")
     16#define paramdescriptions ("path where to store the intermediate configurations")("first or start step")("last or end step")("whether the identity shall be used in mapping atoms onto atoms or not")
     17#undef paramdefaults
    1718#define paramreferences (filename)(start)(end)(IdMapping)
    1819
     
    2930
    3031// finally the information stored in the ActionTrait specialization
    31 #undef DEFAULTVALUE
    3232#define DESCRIPTION "linear interpolation in discrete steps between start and end position of a molecule"
    3333#define SHORTFORM "L"
    34 #define TYPEINFO &typeid(std::string)
  • src/Actions/MoleculeAction/RotateAroundSelfByAngleAction.cpp

    r23359f re4afb4  
    107107  return true;
    108108}
    109 
    110 const string MoleculeRotateAroundSelfByAngleAction::getName() {
    111   return NAME;
    112 }
    113109/** =========== end of function ====================== */
  • src/Actions/MoleculeAction/RotateAroundSelfByAngleAction.def

    r23359f re4afb4  
    1212// i.e. there is an integer with variable name Z that can be found in
    1313// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    14 // "undefine" if no parameters are required
     14// "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    1515#define paramtypes (double)(Vector)
    1616#define paramtokens ("rotate-self")("position")
    17 #define paramdescriptions ("rotates molecules by a specific angle around own center of gravity")("position in R^3 space")
     17#define paramdescriptions ("rotation angle")("position in R^3 space")
     18#undef paramdefaults
    1819#define paramreferences (angle)(Axis)
    1920
     
    3031
    3132// finally the information stored in the ActionTrait specialization
    32 #undef DEFAULTVALUE
    3333#define DESCRIPTION "rotates molecules by a specific angle around own center of gravity"
    3434#undef SHORTFORM
    35 #define TYPEINFO &typeid(double)
  • src/Actions/MoleculeAction/RotateToPrincipalAxisSystemAction.cpp

    r23359f re4afb4  
    152152  return false;
    153153}
    154 
    155 const string MoleculeRotateToPrincipalAxisSystemAction::getName() {
    156   return NAME;
    157 }
    158154/** =========== end of function ====================== */
  • src/Actions/MoleculeAction/RotateToPrincipalAxisSystemAction.def

    r23359f re4afb4  
    1414// i.e. there is an integer with variable name Z that can be found in
    1515// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    16 // "undefine" if no parameters are required
     16// "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    1717#define paramtypes (Vector)
    1818#define paramtokens ("rotate-to-pas")
    19 #define paramdescriptions ("calculate the principal axis system of the specified molecule and rotate specified axis to align with main axis")
     19#define paramdescriptions ("vector to which to align the biggest eigenvector with")
     20#undef paramdefaults
    2021#define paramreferences (Axis)
    2122
     
    3233
    3334// finally the information stored in the ActionTrait specialization
    34 #undef DEFAULTVALUE
    3535#define DESCRIPTION "calculate the principal axis system of the specified molecule and rotate specified axis to align with main axis"
    3636#define SHORTFORM "m"
    37 #define TYPEINFO &typeid(VectorValue)
  • src/Actions/MoleculeAction/SaveAdjacencyAction.cpp

    r23359f re4afb4  
    5151    World::getInstance().getConfig()->BG->ConstructBondGraph(mol);
    5252    // TODO: sollte stream nicht filename benutzen, besser fuer unit test
    53     mol->StoreAdjacencyToFile(params.adjacencyfile);
     53    mol->StoreAdjacencyToFile(params.adjacencyfile.leaf(), params.adjacencyfile.branch_path().string());
    5454  }
    5555  return Action::success;
     
    7777  return false;
    7878}
    79 
    80 const string MoleculeSaveAdjacencyAction::getName() {
    81   return NAME;
    82 }
    8379/** =========== end of function ====================== */
  • src/Actions/MoleculeAction/SaveAdjacencyAction.def

    r23359f re4afb4  
    1111// i.e. there is an integer with variable name Z that can be found in
    1212// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required
    14 #define paramtypes (std::string)
     13// "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14#define paramtypes (boost::filesystem::path)
    1515#define paramtokens ("save-adjacency")
    1616#define paramdescriptions ("name of the adjacency file to write to")
     17#undef paramdefaults
    1718#define paramreferences (adjacencyfile)
    1819
     
    2930
    3031// finally the information stored in the ActionTrait specialization
    31 #undef DEFAULTVALUE
    32 #define DESCRIPTION "name of the adjacency file to write to"
     32#define DESCRIPTION "store adjacency of each atom to file"
    3333#define SHORTFORM "J"
    34 #define TYPEINFO &typeid(std::string)
  • src/Actions/MoleculeAction/SaveBondsAction.cpp

    r23359f re4afb4  
    5151    World::getInstance().getConfig()->BG->ConstructBondGraph(mol);
    5252    // TODO: sollte stream, nicht filenamen direkt nutzen, besser fuer unit tests
    53     mol->StoreBondsToFile(params.bondsfile);
     53    mol->StoreBondsToFile(params.bondsfile.leaf(), params.bondsfile.branch_path().string());
    5454  }
    5555  return Action::success;
     
    7777  return false;
    7878}
    79 
    80 const string MoleculeSaveBondsAction::getName() {
    81   return NAME;
    82 }
    8379/** =========== end of function ====================== */
  • src/Actions/MoleculeAction/SaveBondsAction.def

    r23359f re4afb4  
    1111// i.e. there is an integer with variable name Z that can be found in
    1212// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required
    14 #define paramtypes (std::string)
     13// "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14#define paramtypes (boost::filesystem::path)
    1515#define paramtokens ("save-bonds")
    1616#define paramdescriptions ("name of the bonds file to write to")
     17#undef paramdefaults
    1718#define paramreferences (bondsfile)
    1819
     
    2930
    3031// finally the information stored in the ActionTrait specialization
    31 #undef DEFAULTVALUE
    32 #define DESCRIPTION "name of the bonds file to write to"
     32#define DESCRIPTION "save bonds to dbond type file"
    3333#define SHORTFORM "j"
    34 #define TYPEINFO &typeid(std::string)
  • src/Actions/MoleculeAction/SaveTemperatureAction.cpp

    r23359f re4afb4  
    4747    DoLog(1) && (Log() << Verbose(1) << "Storing temperatures in " << params.temperaturefile << "." << endl);
    4848    ofstream output;
    49     output.open(params.temperaturefile.c_str(), ios::trunc);
     49    output.open(params.temperaturefile.string().c_str(), ios::trunc);
    5050    if (output.fail() || !mol->OutputTemperatureFromTrajectories((ofstream * const) &output, 0, mol->MDSteps))
    5151      DoLog(2) && (Log() << Verbose(2) << "File could not be written." << endl);
     
    7878  return false;
    7979}
    80 
    81 const string MoleculeSaveTemperatureAction::getName() {
    82   return NAME;
    83 }
    8480/** =========== end of function ====================== */
  • src/Actions/MoleculeAction/SaveTemperatureAction.def

    r23359f re4afb4  
    1111// i.e. there is an integer with variable name Z that can be found in
    1212// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required
    14 #define paramtypes (std::string)
     13// "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14#define paramtypes (boost::filesystem::path)
    1515#define paramtokens ("save-temperature")
    1616#define paramdescriptions ("name of the temperature file to write to")
     17#undef paramdefaults
    1718#define paramreferences (temperaturefile)
    1819
     
    2930
    3031// finally the information stored in the ActionTrait specialization
    31 #undef DEFAULTVALUE
    32 #define DESCRIPTION "name of the temperature file to write to"
     32#define DESCRIPTION "save the temperature per time step to file"
    3333#define SHORTFORM "S"
    34 #define TYPEINFO &typeid(std::string)
  • src/Actions/MoleculeAction/SuspendInWaterAction.cpp

    r23359f re4afb4  
    7777  return false;
    7878}
    79 
    80 const string MoleculeSuspendInWaterAction::getName() {
    81   return NAME;
    82 }
    8379/** =========== end of function ====================== */
  • src/Actions/MoleculeAction/SuspendInWaterAction.def

    r23359f re4afb4  
    1111// i.e. there is an integer with variable name Z that can be found in
    1212// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required
     13// "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
    1414#define paramtypes (double)
    1515#define paramtokens ("suspend-in-water")
    16 #define paramdescriptions ("suspend the given molecule in water such that in the domain the mean density is as specified")
     16#define paramdescriptions ("desired final density")
     17#undef paramdefaults
    1718#define paramreferences (density)
    1819
     
    2930
    3031// finally the information stored in the ActionTrait specialization
    31 #undef DEFAULTVALUE
    3232#define DESCRIPTION "suspend the given molecule in water such that in the domain the mean density is as specified"
    3333#define SHORTFORM "u"
    34 #define TYPEINFO &typeid(double)
  • src/Actions/MoleculeAction/VerletIntegrationAction.cpp

    r23359f re4afb4  
    4848    // TODO: sollte besser stream nutzen, nicht filename direkt (es sei denn, ist prefix), besser fuer unit test
    4949    char outputname[MAXSTRINGSIZE];
    50     strcpy(outputname, params.forcesfile.c_str());
     50    strcpy(outputname, params.forcesfile.string().c_str());
    5151    if (!mol->VerletForceIntegration(outputname, *(World::getInstance().getConfig()), 0))
    5252      DoLog(2) && (Log() << Verbose(2) << "File " << params.forcesfile << " not found." << endl);
     
    7878  return false;
    7979}
    80 
    81 const string MoleculeVerletIntegrationAction::getName() {
    82   return NAME;
    83 }
    8480/** =========== end of function ====================== */
  • src/Actions/MoleculeAction/VerletIntegrationAction.def

    r23359f re4afb4  
    1111// i.e. there is an integer with variable name Z that can be found in
    1212// ValueStorage by the token "Z" -> first column: int, Z, "Z"
    13 // "undefine" if no parameters are required
    14 #define paramtypes (std::string)
     13// "undefine" if no parameters are required, use (NODEFAULT) for each (undefined) default value
     14#define paramtypes (boost::filesystem::path)
    1515#define paramtokens ("verlet-integrate")
    1616#define paramdescriptions ("perform verlet integration of a given force file")
     17#undef paramdefaults
    1718#define paramreferences (forcesfile)
    1819
     
    2930
    3031// finally the information stored in the ActionTrait specialization
    31 #undef DEFAULTVALUE
    3232#define DESCRIPTION "perform verlet integration of a given force file"
    3333#define SHORTFORM "P"
    34 #define TYPEINFO &typeid(std::string)
Note: See TracChangeset for help on using the changeset viewer.