Changeset 0d4168 for src/Actions
- Timestamp:
- May 20, 2014, 8:47:03 AM (11 years ago)
- 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:
- cc6e5c
- Parents:
- c09f94
- git-author:
- Frederik Heber <heber@…> (08/28/13 23:05:38)
- git-committer:
- Frederik Heber <heber@…> (05/20/14 08:47:03)
- Location:
- src/Actions
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/Action.cpp
rc09f94 r0d4168 136 136 } 137 137 ActionState::ptr state = Action::failure; 138 // try { 139 startTimer();138 startTimer(); 139 try { 140 140 state = performCall(); 141 endTimer(); 142 // } catch(MissingValueException&) { 143 // ELOG(0, "There is a value missing for action " << getName()); 144 // }; 141 } catch (ParameterException &e) { 142 if( const std::string *name=boost::get_error_info<ParameterName>(e) ) 143 ELOG(1, "The following parameter value is not valid: " << *name << "."); 144 state = Action::failure; 145 } 146 endTimer(); 145 147 146 148 if(shouldUndo() && state != failure){ -
src/Actions/ActionQueue.cpp
rc09f94 r0d4168 46 46 #include <vector> 47 47 48 #include "Actions/ActionExceptions.hpp" 48 49 #include "Actions/ActionHistory.hpp" 49 50 #include "Actions/ActionRegistry.hpp" 51 #include "World.hpp" 50 52 51 53 using namespace MoleCuilder; … … 79 81 newaction->prepare(state); 80 82 actionqueue.push_back( newaction ); 81 newaction->call(); 83 try { 84 newaction->call(); 85 } catch(ActionFailureException &e) { 86 std::cerr << "Action " << *boost::get_error_info<ActionNameString>(e) << " has failed." << std::endl; 87 World::getInstance().setExitFlag(5); 88 } 82 89 } 83 90 -
src/Actions/GlobalListOfActions.hpp
rc09f94 r0d4168 48 48 (CommandHelp) \ 49 49 (CommandHelpRedistribute) \ 50 (CommandLoadSession) \51 50 (CommandSetRandomNumbersEngine) \ 52 51 (CommandSetRandomNumbersDistribution) \ … … 170 169 171 170 // define final list 172 #define GLOBALLISTOFACTIONS GLOBALLISTOFACTIONS_LEVMAR 171 172 #ifdef HAVE_PYTHON 173 #define GLOBALLISTOFACTIONS_PYTHON \ 174 BOOST_PP_SEQ_PUSH_BACK( \ 175 GLOBALLISTOFACTIONS_LEVMAR, \ 176 CommandLoadSession \ 177 ) 178 #else 179 #define GLOBALLISTOFACTIONS_PYTHON \ 180 GLOBALLISTOFACTIONS_LEVMAR 181 #endif 182 183 #define GLOBALLISTOFACTIONS GLOBALLISTOFACTIONS_PYTHON 184 185 // define python list 186 // skips CommandLoadSession as this causes dangerous infinite loops 187 #define GLOBALLISTOFPYTHONACTIONS \ 188 GLOBALLISTOFACTIONS_LEVMAR 173 189 174 190 #endif /* GLOBALLISTOFACTIONS_HPP_ */ -
src/Actions/Makefile.am
rc09f94 r0d4168 190 190 Actions/CommandAction/HelpAction.cpp \ 191 191 Actions/CommandAction/HelpRedistributeAction.cpp \ 192 Actions/CommandAction/LoadSessionAction.cpp \193 192 Actions/CommandAction/StoreSessionAction.cpp \ 194 193 Actions/CommandAction/VerboseAction.cpp \ … … 201 200 Actions/CommandAction/HelpAction.hpp \ 202 201 Actions/CommandAction/HelpRedistributeAction.hpp \ 203 Actions/CommandAction/LoadSessionAction.hpp \204 202 Actions/CommandAction/StoreSessionAction.hpp \ 205 203 Actions/CommandAction/VerboseAction.hpp \ … … 212 210 Actions/CommandAction/HelpAction.def \ 213 211 Actions/CommandAction/HelpRedistributeAction.def \ 214 Actions/CommandAction/LoadSessionAction.def \215 212 Actions/CommandAction/StoreSessionAction.def \ 216 213 Actions/CommandAction/VerboseAction.def \ 217 214 Actions/CommandAction/VersionAction.def \ 218 215 Actions/CommandAction/WarrantyAction.def 216 217 if CONDPYTHON 218 CMDACTIONSOURCE += \ 219 Actions/CommandAction/LoadSessionAction.cpp 220 CMDACTIONHEADER += \ 221 Actions/CommandAction/LoadSessionAction.hpp 222 CMDACTIONDEFS += \ 223 Actions/CommandAction/LoadSessionAction.def 224 endif 219 225 220 226 FILLACTIONSOURCE = \
Note:
See TracChangeset
for help on using the changeset viewer.