Changeset b5b01e for src/Actions/WorldAction
- Timestamp:
- Sep 19, 2013, 8:23:52 PM (12 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:
- 6367dd
- Parents:
- f92ef3
- git-author:
- Frederik Heber <heber@…> (08/19/13 19:04:10)
- git-committer:
- Frederik Heber <heber@…> (09/19/13 20:23:52)
- Location:
- src/Actions/WorldAction
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/WorldAction/AddEmptyBoundaryAction.cpp
rf92ef3 rb5b01e 60 60 #include "Action_impl_pre.hpp" 61 61 /** =========== define the function ====================== */ 62 Action ::state_ptr WorldAddEmptyBoundaryAction::performCall() {62 ActionState::ptr WorldAddEmptyBoundaryAction::performCall() { 63 63 Vector Min; 64 64 Vector Max; … … 115 115 ); 116 116 117 return Action ::state_ptr(UndoState);117 return ActionState::ptr(UndoState); 118 118 } else { 119 119 ELOG(2, "There must be atoms present for AddingEmptyBoundary."); … … 122 122 } 123 123 124 Action ::state_ptr WorldAddEmptyBoundaryAction::performUndo(Action::state_ptr _state) {124 ActionState::ptr WorldAddEmptyBoundaryAction::performUndo(ActionState::ptr _state) { 125 125 WorldAddEmptyBoundaryState *state = assert_cast<WorldAddEmptyBoundaryState*>(_state.get()); 126 126 … … 142 142 *(*AtomRunner) += state->Min - state->params.boundary.get(); 143 143 144 return Action ::state_ptr(_state);144 return ActionState::ptr(_state); 145 145 } 146 146 147 Action ::state_ptr WorldAddEmptyBoundaryAction::performRedo(Action::state_ptr _state){147 ActionState::ptr WorldAddEmptyBoundaryAction::performRedo(ActionState::ptr _state){ 148 148 WorldAddEmptyBoundaryState *state = assert_cast<WorldAddEmptyBoundaryState*>(_state.get()); 149 149 … … 160 160 *(*AtomRunner) -= state->Min - state->params.boundary.get(); 161 161 162 return Action ::state_ptr(_state);162 return ActionState::ptr(_state); 163 163 } 164 164 -
src/Actions/WorldAction/BoundInBoxAction.cpp
rf92ef3 rb5b01e 53 53 #include "Action_impl_pre.hpp" 54 54 /** =========== define the function ====================== */ 55 Action ::state_ptr WorldBoundInBoxAction::performCall() {55 ActionState::ptr WorldBoundInBoxAction::performCall() { 56 56 // create undo state 57 57 std::vector< boost::shared_ptr<Vector> > OldPositions; … … 76 76 (*MolRunner)->BoundInBox(); 77 77 } 78 return Action ::state_ptr(undoState);78 return ActionState::ptr(undoState); 79 79 } 80 80 81 Action ::state_ptr WorldBoundInBoxAction::performUndo(Action::state_ptr _state) {81 ActionState::ptr WorldBoundInBoxAction::performUndo(ActionState::ptr _state) { 82 82 WorldBoundInBoxState *state = assert_cast<WorldBoundInBoxState*>(_state.get()); 83 83 … … 97 97 } 98 98 99 return Action ::state_ptr(_state);99 return ActionState::ptr(_state); 100 100 } 101 101 102 Action ::state_ptr WorldBoundInBoxAction::performRedo(Action::state_ptr _state){102 ActionState::ptr WorldBoundInBoxAction::performRedo(ActionState::ptr _state){ 103 103 // WorldBoundInBoxState *state = assert_cast<WorldBoundInBoxState*>(_state.get()); 104 104 … … 111 111 } 112 112 113 return Action ::state_ptr(_state);113 return ActionState::ptr(_state); 114 114 } 115 115 -
src/Actions/WorldAction/CenterInBoxAction.cpp
rf92ef3 rb5b01e 61 61 #include "Action_impl_pre.hpp" 62 62 /** =========== define the function ====================== */ 63 Action ::state_ptr WorldCenterInBoxAction::performCall() {63 ActionState::ptr WorldCenterInBoxAction::performCall() { 64 64 // create undo state 65 65 std::stringstream undostream; … … 102 102 ); 103 103 104 return Action ::state_ptr(UndoState);104 return ActionState::ptr(UndoState); 105 105 } 106 106 107 Action ::state_ptr WorldCenterInBoxAction::performUndo(Action::state_ptr _state) {107 ActionState::ptr WorldCenterInBoxAction::performUndo(ActionState::ptr _state) { 108 108 WorldCenterInBoxState *state = assert_cast<WorldCenterInBoxState*>(_state.get()); 109 109 … … 133 133 LOG(0, "Box domain restored to " << World::getInstance().getDomain().getM()); 134 134 135 return Action ::state_ptr(_state);135 return ActionState::ptr(_state); 136 136 } 137 137 138 Action ::state_ptr WorldCenterInBoxAction::performRedo(Action::state_ptr _state){138 ActionState::ptr WorldCenterInBoxAction::performRedo(ActionState::ptr _state){ 139 139 WorldCenterInBoxState *state = assert_cast<WorldCenterInBoxState*>(_state.get()); 140 140 … … 151 151 LOG(0, "Box domain is again " << World::getInstance().getDomain().getM()); 152 152 153 return Action ::state_ptr(_state);153 return ActionState::ptr(_state); 154 154 } 155 155 -
src/Actions/WorldAction/CenterOnEdgeAction.cpp
rf92ef3 rb5b01e 60 60 #include "Action_impl_pre.hpp" 61 61 /** =========== define the function ====================== */ 62 Action ::state_ptr WorldCenterOnEdgeAction::performCall() {62 ActionState::ptr WorldCenterOnEdgeAction::performCall() { 63 63 Vector Min; 64 64 Vector Max; … … 115 115 ); 116 116 117 return Action ::state_ptr(UndoState);117 return ActionState::ptr(UndoState); 118 118 } 119 119 120 Action ::state_ptr WorldCenterOnEdgeAction::performUndo(Action::state_ptr _state) {120 ActionState::ptr WorldCenterOnEdgeAction::performUndo(ActionState::ptr _state) { 121 121 WorldCenterOnEdgeState *state = assert_cast<WorldCenterOnEdgeState*>(_state.get()); 122 122 … … 138 138 LOG(0, "Box domain restored to " << World::getInstance().getDomain().getM()); 139 139 140 return Action ::state_ptr(_state);140 return ActionState::ptr(_state); 141 141 } 142 142 143 Action ::state_ptr WorldCenterOnEdgeAction::performRedo(Action::state_ptr _state){143 ActionState::ptr WorldCenterOnEdgeAction::performRedo(ActionState::ptr _state){ 144 144 WorldCenterOnEdgeState *state = assert_cast<WorldCenterOnEdgeState*>(_state.get()); 145 145 … … 162 162 LOG(0, "Box domain is again " << World::getInstance().getDomain().getM()); 163 163 164 return Action ::state_ptr(_state);164 return ActionState::ptr(_state); 165 165 } 166 166 -
src/Actions/WorldAction/ChangeBoxAction.cpp
rf92ef3 rb5b01e 58 58 #include "Action_impl_pre.hpp" 59 59 /** =========== define the function ====================== */ 60 Action ::state_ptr WorldChangeBoxAction::performCall() {60 ActionState::ptr WorldChangeBoxAction::performCall() { 61 61 // create undo state 62 62 std::stringstream undostream; … … 77 77 ); 78 78 79 return Action ::state_ptr(UndoState);79 return ActionState::ptr(UndoState); 80 80 } 81 81 82 Action ::state_ptr WorldChangeBoxAction::performUndo(Action::state_ptr _state) {82 ActionState::ptr WorldChangeBoxAction::performUndo(ActionState::ptr _state) { 83 83 WorldChangeBoxState *state = assert_cast<WorldChangeBoxState*>(_state.get()); 84 84 … … 93 93 LOG(0, "Box domain restored to " << World::getInstance().getDomain().getM()); 94 94 95 return Action ::state_ptr(_state);95 return ActionState::ptr(_state); 96 96 } 97 97 98 Action ::state_ptr WorldChangeBoxAction::performRedo(Action::state_ptr _state){98 ActionState::ptr WorldChangeBoxAction::performRedo(ActionState::ptr _state){ 99 99 World::getInstance().setDomain(params.cell_size.get()); // this is needed as only this function is OBSERVEd. 100 100 … … 102 102 LOG(0, "Box domain is again " << World::getInstance().getDomain().getM()); 103 103 104 return Action ::state_ptr(_state);104 return ActionState::ptr(_state); 105 105 } 106 106 -
src/Actions/WorldAction/InputAction.cpp
rf92ef3 rb5b01e 55 55 #include "Action_impl_pre.hpp" 56 56 /** =========== define the function ====================== */ 57 Action ::state_ptr WorldInputAction::performCall() {57 ActionState::ptr WorldInputAction::performCall() { 58 58 // MoleculeListClass *molecules = World::getInstance().getMolecules(); 59 59 // molecule *mol = NULL; … … 100 100 } 101 101 102 Action ::state_ptr WorldInputAction::performUndo(Action::state_ptr _state) {102 ActionState::ptr WorldInputAction::performUndo(ActionState::ptr _state) { 103 103 // ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get()); 104 104 … … 107 107 // state->mol->setName(state->lastName); 108 108 // 109 // return Action ::state_ptr(new ParserLoadXyzState(state->mol,newName));109 // return ActionState::ptr(new ParserLoadXyzState(state->mol,newName)); 110 110 } 111 111 112 Action ::state_ptr WorldInputAction::performRedo(Action::state_ptr _state){112 ActionState::ptr WorldInputAction::performRedo(ActionState::ptr _state){ 113 113 return Action::failure; 114 114 } -
src/Actions/WorldAction/OutputAction.cpp
rf92ef3 rb5b01e 54 54 #include "Action_impl_pre.hpp" 55 55 /** =========== define the function ====================== */ 56 Action ::state_ptr WorldOutputAction::performCall() {56 ActionState::ptr WorldOutputAction::performCall() { 57 57 LOG(1, "Storing world to input file."); 58 58 … … 70 70 } 71 71 72 Action ::state_ptr WorldOutputAction::performUndo(Action::state_ptr _state) {72 ActionState::ptr WorldOutputAction::performUndo(ActionState::ptr _state) { 73 73 // ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get()); 74 74 … … 77 77 // state->mol->setName(state->lastName); 78 78 // 79 // return Action ::state_ptr(new ParserLoadXyzState(state->mol,newName));79 // return ActionState::ptr(new ParserLoadXyzState(state->mol,newName)); 80 80 } 81 81 82 Action ::state_ptr WorldOutputAction::performRedo(Action::state_ptr _state){82 ActionState::ptr WorldOutputAction::performRedo(ActionState::ptr _state){ 83 83 return Action::failure; 84 84 } -
src/Actions/WorldAction/OutputAsAction.cpp
rf92ef3 rb5b01e 53 53 #include "Action_impl_pre.hpp" 54 54 /** =========== define the function ====================== */ 55 Action ::state_ptr WorldOutputAsAction::performCall() {55 ActionState::ptr WorldOutputAsAction::performCall() { 56 56 LOG(1, "Storing world to file " << params.filename.get() << "."); 57 57 … … 82 82 } 83 83 84 Action ::state_ptr WorldOutputAsAction::performUndo(Action::state_ptr _state) {84 ActionState::ptr WorldOutputAsAction::performUndo(ActionState::ptr _state) { 85 85 // ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get()); 86 86 … … 89 89 // state->mol->setName(state->lastName); 90 90 // 91 // return Action ::state_ptr(new ParserLoadXyzState(state->mol,newName));91 // return ActionState::ptr(new ParserLoadXyzState(state->mol,newName)); 92 92 } 93 93 94 Action ::state_ptr WorldOutputAsAction::performRedo(Action::state_ptr _state){94 ActionState::ptr WorldOutputAsAction::performRedo(ActionState::ptr _state){ 95 95 return Action::failure; 96 96 } -
src/Actions/WorldAction/RepeatBoxAction.cpp
rf92ef3 rb5b01e 113 113 } 114 114 115 Action ::state_ptr WorldRepeatBoxAction::performCall() {115 ActionState::ptr WorldRepeatBoxAction::performCall() { 116 116 std::vector<molecule *> AllMolecules; 117 117 DoLog(0) && (Log() << Verbose(0) << "Using all molecules." << endl); … … 132 132 LOG(0, "Box domain is now " << World::getInstance().getDomain().getM()); 133 133 134 return Action ::state_ptr(undostate);134 return ActionState::ptr(undostate); 135 135 } 136 136 137 Action ::state_ptr WorldRepeatBoxAction::performUndo(Action::state_ptr _state) {137 ActionState::ptr WorldRepeatBoxAction::performUndo(ActionState::ptr _state) { 138 138 WorldRepeatBoxState *state = assert_cast<WorldRepeatBoxState*>(_state.get()); 139 139 MoleculeListClass *molecules = World::getInstance().getMolecules(); … … 158 158 LOG(0, "Box domain restored to " << World::getInstance().getDomain().getM()); 159 159 160 return Action ::state_ptr(_state);160 return ActionState::ptr(_state); 161 161 } 162 162 163 Action ::state_ptr WorldRepeatBoxAction::performRedo(Action::state_ptr _state){163 ActionState::ptr WorldRepeatBoxAction::performRedo(ActionState::ptr _state){ 164 164 WorldRepeatBoxState *state = assert_cast<WorldRepeatBoxState*>(_state.get()); 165 165 … … 174 174 LOG(0, "Box domain is again " << World::getInstance().getDomain().getM()); 175 175 176 return Action ::state_ptr(_state);176 return ActionState::ptr(_state); 177 177 } 178 178 -
src/Actions/WorldAction/ScaleBoxAction.cpp
rf92ef3 rb5b01e 54 54 #include "Action_impl_pre.hpp" 55 55 /** =========== define the function ====================== */ 56 Action ::state_ptr WorldScaleBoxAction::performCall() {56 ActionState::ptr WorldScaleBoxAction::performCall() { 57 57 double x[NDIM]; 58 58 … … 80 80 WorldScaleBoxState *UndoState = new WorldScaleBoxState(params); 81 81 82 return Action ::state_ptr(UndoState);82 return ActionState::ptr(UndoState); 83 83 } 84 84 85 Action ::state_ptr WorldScaleBoxAction::performUndo(Action::state_ptr _state) {85 ActionState::ptr WorldScaleBoxAction::performUndo(ActionState::ptr _state) { 86 86 WorldScaleBoxState *state = assert_cast<WorldScaleBoxState*>(_state.get()); 87 87 … … 107 107 LOG(0, "Box domain restored to " << World::getInstance().getDomain().getM()); 108 108 109 return Action ::state_ptr(_state);109 return ActionState::ptr(_state); 110 110 } 111 111 112 Action ::state_ptr WorldScaleBoxAction::performRedo(Action::state_ptr _state){112 ActionState::ptr WorldScaleBoxAction::performRedo(ActionState::ptr _state){ 113 113 WorldScaleBoxState *state = assert_cast<WorldScaleBoxState*>(_state.get()); 114 114 … … 134 134 LOG(0, "Box domain is again " << World::getInstance().getDomain().getM()); 135 135 136 return Action ::state_ptr(_state);136 return ActionState::ptr(_state); 137 137 } 138 138 -
src/Actions/WorldAction/SetBoundaryConditionsAction.cpp
rf92ef3 rb5b01e 54 54 #include "Action_impl_pre.hpp" 55 55 /** =========== define the function ====================== */ 56 Action ::state_ptr WorldSetBoundaryConditionsAction::performCall() {56 ActionState::ptr WorldSetBoundaryConditionsAction::performCall() { 57 57 // gather undo information 58 58 std::stringstream undostream; … … 70 70 71 71 LOG(0, "STATUS: Boundary conditions are now " << World::getInstance().getDomain().getConditionNames() << "."); 72 return Action ::state_ptr(UndoState);72 return ActionState::ptr(UndoState); 73 73 } 74 74 75 Action ::state_ptr WorldSetBoundaryConditionsAction::performUndo(Action::state_ptr _state) {75 ActionState::ptr WorldSetBoundaryConditionsAction::performUndo(ActionState::ptr _state) { 76 76 WorldSetBoundaryConditionsState *state = assert_cast<WorldSetBoundaryConditionsState*>(_state.get()); 77 77 … … 80 80 81 81 LOG(0, "STATUS: Boundary conditions are set back to " << World::getInstance().getDomain().getConditionNames() << "."); 82 return Action ::state_ptr(_state);82 return ActionState::ptr(_state); 83 83 } 84 84 85 Action ::state_ptr WorldSetBoundaryConditionsAction::performRedo(Action::state_ptr _state){85 ActionState::ptr WorldSetBoundaryConditionsAction::performRedo(ActionState::ptr _state){ 86 86 WorldSetBoundaryConditionsState *state = assert_cast<WorldSetBoundaryConditionsState*>(_state.get()); 87 87 … … 90 90 91 91 LOG(0, "STATUS: Boundary conditions are again " << World::getInstance().getDomain().getConditionNames() << "."); 92 return Action ::state_ptr(_state);92 return ActionState::ptr(_state); 93 93 } 94 94 -
src/Actions/WorldAction/SetDefaultNameAction.cpp
rf92ef3 rb5b01e 50 50 #include "Action_impl_pre.hpp" 51 51 /** =========== define the function ====================== */ 52 Action ::state_ptr WorldSetDefaultNameAction::performCall() {52 ActionState::ptr WorldSetDefaultNameAction::performCall() { 53 53 string Worldsdefaultname; 54 54 Worldsdefaultname = World::getInstance().getDefaultName(); … … 57 57 World::getInstance().setDefaultName(params.newname.get()); 58 58 LOG(0, "Default name of new molecules set to " << World::getInstance().getDefaultName() << "."); 59 return Action ::state_ptr(UndoState);59 return ActionState::ptr(UndoState); 60 60 } 61 61 62 Action ::state_ptr WorldSetDefaultNameAction::performUndo(Action::state_ptr _state) {62 ActionState::ptr WorldSetDefaultNameAction::performUndo(ActionState::ptr _state) { 63 63 WorldSetDefaultNameState *state = assert_cast<WorldSetDefaultNameState*>(_state.get()); 64 64 … … 66 66 LOG(0, "Default name of new molecules set to " << World::getInstance().getDefaultName() << "."); 67 67 68 return Action ::state_ptr(_state);68 return ActionState::ptr(_state); 69 69 } 70 70 71 Action ::state_ptr WorldSetDefaultNameAction::performRedo(Action::state_ptr _state){71 ActionState::ptr WorldSetDefaultNameAction::performRedo(ActionState::ptr _state){ 72 72 WorldSetDefaultNameState *state = assert_cast<WorldSetDefaultNameState*>(_state.get()); 73 73 … … 75 75 LOG(0, "Default name of new molecules set to " << World::getInstance().getDefaultName() << "."); 76 76 77 return Action ::state_ptr(_state);77 return ActionState::ptr(_state); 78 78 } 79 79 -
src/Actions/WorldAction/SetWorldTimeAction.cpp
rf92ef3 rb5b01e 51 51 #include "Action_impl_pre.hpp" 52 52 /** =========== define the function ====================== */ 53 Action ::state_ptr WorldSetWorldTimeAction::performCall() {53 ActionState::ptr WorldSetWorldTimeAction::performCall() { 54 54 // create undo state 55 55 int oldtime; … … 59 59 World::getInstance().setTime(params.newtime.get()); 60 60 LOG(0, "Current time step is now: " << WorldTime::getTime() << "."); 61 return Action ::state_ptr(UndoState);61 return ActionState::ptr(UndoState); 62 62 } 63 63 64 Action ::state_ptr WorldSetWorldTimeAction::performUndo(Action::state_ptr _state) {64 ActionState::ptr WorldSetWorldTimeAction::performUndo(ActionState::ptr _state) { 65 65 WorldSetWorldTimeState *state = assert_cast<WorldSetWorldTimeState*>(_state.get()); 66 66 … … 68 68 LOG(0, "Current time step is now again: " << WorldTime::getTime() << "."); 69 69 70 return Action ::state_ptr(_state);70 return ActionState::ptr(_state); 71 71 } 72 72 73 Action ::state_ptr WorldSetWorldTimeAction::performRedo(Action::state_ptr _state){73 ActionState::ptr WorldSetWorldTimeAction::performRedo(ActionState::ptr _state){ 74 74 WorldSetWorldTimeState *state = assert_cast<WorldSetWorldTimeState*>(_state.get()); 75 75 … … 77 77 LOG(0, "Current time step is now: " << WorldTime::getTime() << "."); 78 78 79 return Action ::state_ptr(_state);79 return ActionState::ptr(_state); 80 80 } 81 81
Note:
See TracChangeset
for help on using the changeset viewer.