Changeset 26b4d62 for src/Actions
- Timestamp:
- Jun 27, 2014, 9:32:03 PM (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, Candidate_v1.7.0, 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:
- c73e35
- Parents:
- 0b6b77
- git-author:
- Frederik Heber <heber@…> (06/19/14 13:56:27)
- git-committer:
- Frederik Heber <heber@…> (06/27/14 21:32:03)
- Location:
- src/Actions
- Files:
-
- 67 edited
-
AnalysisAction/DipoleAngularCorrelationAction.cpp (modified) (2 diffs)
-
AnalysisAction/DipoleCorrelationAction.cpp (modified) (1 diff)
-
AnalysisAction/SurfaceCorrelationAction.cpp (modified) (1 diff)
-
AtomAction/AddAction.cpp (modified) (1 diff)
-
AtomAction/RemoveAction.cpp (modified) (1 diff)
-
AtomAction/RotateAroundOriginByAngleAction.cpp (modified) (1 diff)
-
AtomAction/SaveSelectedAtomsAction.cpp (modified) (4 diffs)
-
BondAction/BondAddAction.cpp (modified) (1 diff)
-
BondAction/BondRemoveAction.cpp (modified) (1 diff)
-
CommandAction/BondLengthTableAction.cpp (modified) (1 diff)
-
CommandAction/ElementDbAction.cpp (modified) (2 diffs)
-
CommandAction/HelpAction.cpp (modified) (1 diff)
-
CommandAction/LoadSessionAction.cpp (modified) (1 diff)
-
CommandAction/VersionAction.cpp (modified) (1 diff)
-
FillAction/FillRegularGridAction.cpp (modified) (5 diffs)
-
FillAction/FillSurfaceAction.cpp (modified) (4 diffs)
-
FragmentationAction/AnalyseFragmentationResultsAction.cpp (modified) (2 diffs)
-
FragmentationAction/ClearFragmentationResultsAction.cpp (modified) (1 diff)
-
FragmentationAction/FragmentationAction.cpp (modified) (2 diffs)
-
FragmentationAction/FragmentationAutomationAction.cpp (modified) (5 diffs)
-
FragmentationAction/ParseFragmentJobsAction.cpp (modified) (2 diffs)
-
FragmentationAction/StoreSaturatedFragmentAction.cpp (modified) (1 diff)
-
GraphAction/DestroyAdjacencyAction.cpp (modified) (1 diff)
-
GraphAction/UpdateMoleculesAction.cpp (modified) (1 diff)
-
MoleculeAction/BondFileAction.cpp (modified) (2 diffs)
-
MoleculeAction/ChangeBondAngleAction.cpp (modified) (1 diff)
-
MoleculeAction/ChangeNameAction.cpp (modified) (1 diff)
-
MoleculeAction/FillVoidWithMoleculeAction.cpp (modified) (2 diffs)
-
MoleculeAction/FillWithMoleculeAction.cpp (modified) (1 diff)
-
MoleculeAction/LinearInterpolationofTrajectoriesAction.cpp (modified) (1 diff)
-
MoleculeAction/LoadAction.cpp (modified) (2 diffs)
-
MoleculeAction/RotateAroundSelfByAngleAction.cpp (modified) (1 diff)
-
MoleculeAction/RotateToPrincipalAxisSystemAction.cpp (modified) (1 diff)
-
MoleculeAction/SaveAdjacencyAction.cpp (modified) (1 diff)
-
MoleculeAction/SaveBondsAction.cpp (modified) (1 diff)
-
MoleculeAction/SaveSelectedMoleculesAction.cpp (modified) (4 diffs)
-
MoleculeAction/SaveTemperatureAction.cpp (modified) (2 diffs)
-
MoleculeAction/StretchBondAction.cpp (modified) (1 diff)
-
MoleculeAction/SuspendInWaterAction.cpp (modified) (1 diff)
-
MoleculeAction/VerletIntegrationAction.cpp (modified) (1 diff)
-
ParserAction/ParseTremoloPotentialsAction.cpp (modified) (3 diffs)
-
ParserAction/SaveSelectedAtomsAsExtTypesAction.cpp (modified) (2 diffs)
-
ParserAction/SetOutputFormatsAction.cpp (modified) (3 diffs)
-
PotentialAction/FitParticleChargesAction.cpp (modified) (1 diff)
-
PotentialAction/FitPotentialAction.cpp (modified) (4 diffs)
-
PotentialAction/ParseHomologiesAction.cpp (modified) (1 diff)
-
PotentialAction/SaveHomologiesAction.cpp (modified) (1 diff)
-
SelectionAction/Atoms/AllAtomsInsideVolumeAction.cpp (modified) (3 diffs)
-
SelectionAction/Atoms/AtomByIdAction.cpp (modified) (1 diff)
-
SelectionAction/Atoms/AtomByOrderAction.cpp (modified) (1 diff)
-
SelectionAction/Atoms/NotAllAtomsInsideVolumeAction.cpp (modified) (3 diffs)
-
SelectionAction/Atoms/NotAtomByIdAction.cpp (modified) (1 diff)
-
SelectionAction/Atoms/NotAtomByOrderAction.cpp (modified) (1 diff)
-
SelectionAction/Molecules/MoleculeByIdAction.cpp (modified) (1 diff)
-
SelectionAction/Molecules/MoleculeByOrderAction.cpp (modified) (1 diff)
-
SelectionAction/Molecules/NotMoleculeByIdAction.cpp (modified) (1 diff)
-
SelectionAction/Molecules/NotMoleculeByOrderAction.cpp (modified) (1 diff)
-
SelectionAction/Shapes/NotShapeByNameAction.cpp (modified) (1 diff)
-
SelectionAction/Shapes/ShapeByNameAction.cpp (modified) (1 diff)
-
ShapeAction/CombineShapesAction.cpp (modified) (4 diffs)
-
TesselationAction/ConvexEnvelopeAction.cpp (modified) (3 diffs)
-
TesselationAction/NonConvexEnvelopeAction.cpp (modified) (1 diff)
-
WorldAction/AddEmptyBoundaryAction.cpp (modified) (1 diff)
-
WorldAction/CenterOnEdgeAction.cpp (modified) (1 diff)
-
WorldAction/InputAction.cpp (modified) (3 diffs)
-
WorldAction/OutputAction.cpp (modified) (3 diffs)
-
WorldAction/OutputAsAction.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/AnalysisAction/DipoleAngularCorrelationAction.cpp
r0b6b77 r26b4d62 83 83 std::vector<atom *> atoms = World::getInstance().getSelectedAtoms(); 84 84 if (atoms.empty()) { 85 ELOG(2,"Formula "+toString(DipoleFormula)+" selects no atoms.");85 STATUS("Formula "+toString(DipoleFormula)+" selects no atoms."); 86 86 return Action::failure; 87 87 } … … 139 139 140 140 // exit 141 STATUS("Dipole angular correlation calculation successful."); 141 142 return Action::success; 142 143 } -
src/Actions/AnalysisAction/DipoleCorrelationAction.cpp
r0b6b77 r26b4d62 67 67 DipoleCorrelationMap *correlationmap = NULL; 68 68 std::vector<molecule*> molecules = World::getInstance().getSelectedMolecules(); 69 LOG(0, "STATUS: There are " << molecules.size() <<" selected molecules.");69 STATUS("There are "+toString(molecules.size())+" selected molecules."); 70 70 ASSERT(!params.periodic.get(), "AnalysisDipoleCorrelationAction() - periodic case not implemented."); 71 71 correlationmap = DipoleCorrelation(molecules); -
src/Actions/AnalysisAction/SurfaceCorrelationAction.cpp
r0b6b77 r26b4d62 84 84 } 85 85 if ( atoms.size() == 0) { 86 ELOG(1,"You have not select any atoms.");86 STATUS("You have not select any atoms."); 87 87 return Action::failure; 88 88 } -
src/Actions/AtomAction/AddAction.cpp
r0b6b77 r26b4d62 93 93 } 94 94 if (first->getId() != state->id) 95 if (!first->changeId(state->id)) 95 if (!first->changeId(state->id)) { 96 STATUS("Could not change atom id "+toString(first->getId())+"->"+toString(state->id)+"."); 96 97 return Action::failure; 98 } 99 97 100 return ActionState::ptr(_state); 98 101 } -
src/Actions/AtomAction/RemoveAction.cpp
r0b6b77 r26b4d62 81 81 if (AddAtomsFromAtomicInfo(state->Walkers)) 82 82 return ActionState::ptr(_state); 83 else 83 else { 84 STATUS("Failed to re-add removed atoms."); 84 85 return Action::failure; 86 } 85 87 } 86 88 -
src/Actions/AtomAction/RotateAroundOriginByAngleAction.cpp
r0b6b77 r26b4d62 59 59 60 60 // check whether Axis is valid 61 if (params.Axis.get().IsZero()) 61 if (params.Axis.get().IsZero()) { 62 STATUS("Specified Rotation axis is zero."); 62 63 return Action::failure; 64 } 63 65 64 66 // convert from degrees to radian -
src/Actions/AtomAction/SaveSelectedAtomsAction.cpp
r0b6b77 r26b4d62 63 63 FilenamePrefix = params.filename.get().stem().string(); 64 64 } else { 65 ELOG(1, "Output filedoes not have a suffix, cannot recognize format.");65 STATUS("Output file "+params.filename.get().string()+"does not have a suffix, cannot recognize format."); 66 66 return Action::failure; 67 67 } … … 74 74 FormatParserStorage::getInstance().saveSelectedAtoms(output, FilenameSuffix); 75 75 } else { 76 ELOG(1, "Could not open file " << params.filename.get() << "."); 76 STATUS("Could not open file "+params.filename.get().string()+"."); 77 return Action::failure; 77 78 } 78 79 output.close(); … … 84 85 // ParserSaveXyzState *state = assert_cast<ParserSaveXyzState*>(_state.get()); 85 86 86 return Action:: failure;87 return Action::success; 87 88 // string newName = state->mol->getName(); 88 89 // state->mol->setName(state->lastName); … … 92 93 93 94 ActionState::ptr AtomSaveSelectedAtomsAction::performRedo(ActionState::ptr _state){ 94 return Action:: failure;95 return Action::success; 95 96 // // Undo and redo have to do the same for this action 96 97 // return performUndo(_state); -
src/Actions/BondAction/BondAddAction.cpp
r0b6b77 r26b4d62 58 58 // check preconditions 59 59 if (World::getInstance().countSelectedAtoms() != 2) { 60 ELOG(1,"Exactly two atoms must be selected for BondAction Add.");60 STATUS("Exactly two atoms must be selected for BondAction Add."); 61 61 return Action::failure; 62 62 } 63 63 const std::vector<atom *> selected_atoms = World::getInstance().getSelectedAtoms(); 64 64 if (selected_atoms[0]->IsBondedTo(WorldTime::getTime(), selected_atoms[1])) { 65 ELOG(2,"There already is a bond in between the two selected atoms.");65 STATUS("There already is a bond in between the two selected atoms."); 66 66 return Action::failure; 67 67 } -
src/Actions/BondAction/BondRemoveAction.cpp
r0b6b77 r26b4d62 58 58 // check preconditions 59 59 if (World::getInstance().countSelectedAtoms() != 2) { 60 ELOG(1,"Exactly two atoms must be selected for BondAction Remove.");60 STATUS("Exactly two atoms must be selected for BondAction Remove."); 61 61 return Action::failure; 62 62 } 63 63 const std::vector<atom *> selected_atoms = World::getInstance().getSelectedAtoms(); 64 64 if (!selected_atoms[0]->IsBondedTo(WorldTime::getTime(), selected_atoms[1])) { 65 ELOG(2,"There is no bond in between the two selected atoms.");65 STATUS("There is no bond in between the two selected atoms."); 66 66 return Action::failure; 67 67 } -
src/Actions/CommandAction/BondLengthTableAction.cpp
r0b6b77 r26b4d62 76 76 std::ifstream input(params.BondGraphFileName.get().string().c_str()); 77 77 if ((input.good()) && (BG->LoadBondLengthTable(input))) { 78 LOG( 0, "Bond length table parsed successfully.");78 LOG(1, "Bond length table parsed successfully."); 79 79 input.close(); 80 80 return ActionState::ptr(UndoState); 81 81 } else { 82 ELOG(1, "Bond length table parsing failed."); 82 STATUS("Bond length table "+params.BondGraphFileName.get().string() 83 +" parsing failed."); 83 84 input.close(); 84 85 } 85 86 } else { 86 ELOG(1, "Bond length table loading failed."); 87 STATUS("Bond length table "+params.BondGraphFileName.get().string() 88 +" loading failed."); 87 89 } 88 90 // recover bond graph -
src/Actions/CommandAction/ElementDbAction.cpp
r0b6b77 r26b4d62 80 80 periode->CleanupPeriodtable(); 81 81 if (periode->LoadPeriodentafel(configuration->databasepath)) { 82 LOG(0,"Element list loaded successfully.");82 STATUS("Element list loaded successfully."); 83 83 //periode->Output(); 84 84 return ActionState::ptr(UndoState); 85 85 } else { 86 LOG(0,"Element list loading failed.");86 STATUS("Element list loading failed."); 87 87 delete UndoState; 88 88 return Action::failure; … … 117 117 periode->CleanupPeriodtable(); 118 118 if (periode->LoadPeriodentafel(configuration->databasepath)) { 119 LOG(0, "Element list loaded successfully.");119 STATUS("Redoing Element list loaded successfully."); 120 120 //periode->Output(); 121 121 return ActionState::ptr(_state); 122 122 } else { 123 LOG(0, "Element list loading failed.");123 STATUS("Redoing Element list loading failed."); 124 124 return Action::failure; 125 125 } -
src/Actions/CommandAction/HelpAction.cpp
r0b6b77 r26b4d62 98 98 std::cout << std::endl; 99 99 } else { 100 ELOG(1, "No action is known by the name " << params.actionname.get() <<".");100 STATUS("No action is known by the name "+params.actionname.get()+"."); 101 101 return Action::failure; 102 102 } -
src/Actions/CommandAction/LoadSessionAction.cpp
r0b6b77 r26b4d62 60 60 if (executePythonScript(params.filename.get().string())) 61 61 return Action::success; 62 else 62 else { 63 STATUS("Failed executing python script."); 63 64 return Action::failure; 65 } 64 66 #else 65 ELOG(1,"Python capabilities have not been compiled in.");67 STATUS("Python capabilities have not been compiled in."); 66 68 return Action::failure; 67 69 #endif -
src/Actions/CommandAction/VersionAction.cpp
r0b6b77 r26b4d62 49 49 /** =========== define the function ====================== */ 50 50 ActionState::ptr CommandVersionAction::performCall() { 51 LOG(1, "STATUS: Version of the program is " << MOLECUILDERVERSION <<".");51 STATUS("Version of the program is "+toString(MOLECUILDERVERSION)+"."); 52 52 return Action::success; 53 53 } -
src/Actions/FillAction/FillRegularGridAction.cpp
r0b6b77 r26b4d62 84 84 const std::vector< molecule *> molecules = World::getInstance().getSelectedMolecules(); 85 85 if (molecules.size() != 1) { 86 ELOG(1,"No exactly one molecule selected, aborting,");86 STATUS("No exactly one molecule selected, aborting,"); 87 87 return Action::failure; 88 88 } … … 99 99 if (params.SphereRadius.get() != 0.) { 100 100 if ( atoms.size() == 0) { 101 ELOG(1, "You have given a sphere radius " << params.SphereRadius.get()102 <<" != 0, but have not select any atoms.");101 STATUS("You have given a sphere radius "+toString(params.SphereRadius.get()) 102 +" != 0, but have not select any atoms."); 103 103 return Action::failure; 104 104 } … … 168 168 169 169 if (!successflag) { 170 ELOG(1,"Insertion failed, removing inserted clusters, translating original one back");170 STATUS("Insertion failed, removing inserted clusters, translating original one back"); 171 171 RemoveAtomsFromAtomicInfo(clonedatominfos); 172 172 clonedatoms.clear(); … … 191 191 if (successflag) 192 192 return ActionState::ptr(UndoState); 193 else 193 else { 194 194 return Action::failure; 195 } 195 196 } 196 197 … … 220 221 if (statusflag) 221 222 return ActionState::ptr(_state); 222 else 223 else { 224 STATUS("Failed re-adding filled in atoms."); 223 225 return Action::failure; 226 } 224 227 } 225 228 -
src/Actions/FillAction/FillSurfaceAction.cpp
r0b6b77 r26b4d62 72 72 std::vector<AtomicInfo> movedatoms; 73 73 if (molecules.size() != 1) { 74 ELOG(1,"No exactly one molecule selected, aborting,");74 STATUS("No exactly one molecule selected, aborting,"); 75 75 return Action::failure; 76 76 } … … 112 112 std::vector<Shape*> selectedShapes = ShapeRegistry::getInstance().getSelectedShapes(); 113 113 if (selectedShapes.size() != 1){ 114 ELOG(1, "FillSurfaceAction::performCall(): there has to be exactly 1 selected shape.");114 STATUS("There has to be exactly 1 selected shape."); 115 115 return Action::failure; 116 116 } … … 150 150 151 151 if (!successflag) { 152 ELOG(1,"Insertion failed, removing inserted clusters, translating original one back");152 STATUS("Insertion failed, removing inserted clusters, translating original one back"); 153 153 RemoveAtomsFromAtomicInfo(clonedatominfos); 154 154 clonedatoms.clear(); … … 198 198 if (statusflag) 199 199 return ActionState::ptr(_state); 200 else 200 else { 201 STATUS("Failed to re-added filled in atoms."); 201 202 return Action::failure; 203 } 202 204 } 203 205 -
src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp
r0b6b77 r26b4d62 525 525 526 526 if (keysets.KeySets.empty()) { 527 ELOG(2,"There are no results in the container.");527 STATUS("There are no results in the container."); 528 528 return Action::failure; 529 529 } … … 613 613 if (DoLongrange) { 614 614 if ( World::getInstance().getAllAtoms().size() == 0) { 615 ELOG(1,"Please load the full molecule intostd::map<JobId_t, VMGData> longrangeData the world before starting this action.");615 STATUS("Please load the full molecule intostd::map<JobId_t, VMGData> longrangeData the world before starting this action."); 616 616 return Action::failure; 617 617 } -
src/Actions/FragmentationAction/ClearFragmentationResultsAction.cpp
r0b6b77 r26b4d62 56 56 LOG(1, "STATUS: Fragmentation results cleared."); 57 57 return Action::success; 58 } else 58 } else { 59 STATUS("Failed to clear fragmentation results."); 59 60 return Action::failure; 61 } 60 62 } 61 63 -
src/Actions/FragmentationAction/FragmentationAction.cpp
r0b6b77 r26b4d62 89 89 // check for selected atoms 90 90 if (world.beginAtomSelection() == world.endAtomSelection()) { 91 ELOG(1,"There are no atoms selected for fragmentation.");91 STATUS("There are no atoms selected for fragmentation."); 92 92 return Action::failure; 93 93 } … … 279 279 exporter(); 280 280 #else 281 ELOG(1,"No output file types specified and JobMarket support is not compiled in.");281 STATUS("No output file types specified and JobMarket support is not compiled in."); 282 282 return Action::failure; 283 283 #endif -
src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
r0b6b77 r26b4d62 152 152 if (params.DoLongrange.get()) { 153 153 if ( World::getInstance().getAllAtoms().size() == 0) { 154 ELOG(1,"Please load the full molecule into the world before starting this action.");154 STATUS("Please load the full molecule into the world before starting this action."); 155 155 return Action::failure; 156 156 } … … 196 196 params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly, 197 197 params.DoPrintDebug.get(), 198 OpenBoundaryConditions)) 198 OpenBoundaryConditions)) { 199 STATUS("Could not create long-range jobs for electronic charge distribution."); 199 200 return Action::failure; 201 } 200 202 201 203 // Phase Six a: calculate result … … 222 224 params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly, 223 225 params.DoPrintDebug.get(), 224 OpenBoundaryConditions)) 226 OpenBoundaryConditions)) { 227 STATUS("Could not create long-range jobs for nuclei charge distribution."); 225 228 return Action::failure; 229 } 226 230 227 231 // Phase Six b: calculate result … … 255 259 debugcontroller.setPort(params.port.get()); 256 260 debugcontroller.requestIds(full_sample.size()); 257 if (!debugcontroller.createDebugJobs(full_sample, OpenBoundaryConditions)) 261 if (!debugcontroller.createDebugJobs(full_sample, OpenBoundaryConditions)) { 262 STATUS("Could not create debug jobs."); 258 263 return Action::failure; 264 } 259 265 debugcontroller.waitforResults(full_sample.size()); 260 266 debugcontroller.getResults(debugData); … … 286 292 } 287 293 294 if (Exitflag != 0) 295 STATUS("Controller has returned failure."); 288 296 return (Exitflag == 0) ? Action::success : Action::failure; 289 297 } -
src/Actions/FragmentationAction/ParseFragmentJobsAction.cpp
r0b6b77 r26b4d62 53 53 // check for present jobs 54 54 if (params.jobfiles.get().empty()) { 55 ELOG(2,"Given vector of jobfiles is empty!");55 STATUS("Given vector of jobfiles is empty!"); 56 56 return Action::failure; 57 57 } … … 60 60 if(!FragmentJobQueue::getInstance().addJobsFromFiles( 61 61 params.jobfiles.get(), 62 params.level.get())) 62 params.level.get())) { 63 STATUS("Could not parse all given jobs files."); 63 64 return Action::failure; 65 } 64 66 size_t FragmentCounter = FragmentJobQueue::getInstance().size(); 65 67 LOG(1, "STATUS: I parsed " << FragmentCounter << " fragment files."); -
src/Actions/FragmentationAction/StoreSaturatedFragmentAction.cpp
r0b6b77 r26b4d62 60 60 // check for selected atoms 61 61 if (world.beginAtomSelection() == world.endAtomSelection()) { 62 ELOG(1,"There are not atoms selected for storing.");62 STATUS("There are not atoms selected for storing."); 63 63 return Action::failure; 64 64 } -
src/Actions/GraphAction/DestroyAdjacencyAction.cpp
r0b6b77 r26b4d62 72 72 World::AtomComposite Set = World::getInstance().getAllAtoms(AtomsBySelection()); 73 73 if (Set.empty()) { 74 ELOG(2,"No atoms selected.");74 STATUS("No atoms selected."); 75 75 return Action::failure; 76 76 } -
src/Actions/GraphAction/UpdateMoleculesAction.cpp
r0b6b77 r26b4d62 92 92 if (World::getInstance().numMolecules() == 0) { 93 93 //World::getInstance().destroyMolecule(mol); 94 ELOG(1,"There are no molecules.");94 STATUS("There are no molecules."); 95 95 return Action::failure; 96 96 } -
src/Actions/MoleculeAction/BondFileAction.cpp
r0b6b77 r26b4d62 67 67 mol->getBondCount(); 68 68 return Action::success; 69 } else 69 } else { 70 STATUS("There is not exactly one molecule selected."); 70 71 return Action::failure; 72 } 71 73 } 72 74 … … 77 79 // state->mol->setName(state->lastName); 78 80 81 STATUS("Undo for MoleculeBondFileAction not implemented."); 79 82 return Action::failure; 80 83 } 81 84 82 85 ActionState::ptr MoleculeBondFileAction::performRedo(ActionState::ptr _state){ 86 STATUS("Redo for MoleculeBondFileAction not implemented."); 83 87 return Action::failure; 84 88 } -
src/Actions/MoleculeAction/ChangeBondAngleAction.cpp
r0b6b77 r26b4d62 120 120 const std::vector< atom *> atoms = World::getInstance().getSelectedAtoms(); 121 121 if (atoms.size() != 3) { 122 ELOG(1,"Exactly three atoms must be selected.");122 STATUS("Exactly three atoms must be selected."); 123 123 return Action::failure; 124 124 } 125 125 // check precondition: linearly bonded atoms 126 126 const std::vector<size_t> indices = sortIndicesFromCentralAtom(atoms); 127 if (indices.size() != 3) 127 if (indices.size() != 3) { 128 STATUS("Selected atoms must be linearly bonded/form a chain"); 128 129 return Action::failure; 130 } 129 131 const molecule *mol = atoms[0]->getMolecule(); 130 132 if ((mol != atoms[1]->getMolecule()) || (mol != atoms[2]->getMolecule())) { 131 ELOG(1,"The two selected atoms must belong to the same molecule.");133 STATUS("The two selected atoms must belong to the same molecule."); 132 134 return Action::failure; 133 135 } -
src/Actions/MoleculeAction/ChangeNameAction.cpp
r0b6b77 r26b4d62 57 57 mol->setName(params.name.get()); 58 58 return ActionState::ptr(new MoleculeChangeNameState(mol,params)); 59 } else 59 } else { 60 STATUS("There must be exactly one molecule selected."); 60 61 return Action::failure; 62 } 61 63 } 62 64 -
src/Actions/MoleculeAction/FillVoidWithMoleculeAction.cpp
r0b6b77 r26b4d62 62 62 ActionState::ptr MoleculeFillVoidWithMoleculeAction::performCall() { 63 63 if (!boost::filesystem::exists(params.fillername.get())) { 64 ELOG(1, "File with filler molecule " << params.fillername.get() <<" does not exist!");64 STATUS("File with filler molecule "+params.fillername.get().string()+" does not exist!"); 65 65 return Action::failure; 66 66 } … … 152 152 //MoleculeFillVoidWithMoleculeState *state = assert_cast<MoleculeFillVoidWithMoleculeState*>(_state.get()); 153 153 154 STATUS("Redo for MoleculeFillVoidWithMoleculeAction not implemented."); 154 155 return Action::failure; 155 156 //return ActionState::ptr(_state); -
src/Actions/MoleculeAction/FillWithMoleculeAction.cpp
r0b6b77 r26b4d62 156 156 //MoleculeFillWithMoleculeState *state = assert_cast<MoleculeFillWithMoleculeState*>(_state.get()); 157 157 158 STATUS("Redo of MoleculeFillWithMoleculeAction not implemented."); 158 159 return Action::failure; 159 160 //return ActionState::ptr(_state); -
src/Actions/MoleculeAction/LinearInterpolationofTrajectoriesAction.cpp
r0b6b77 r26b4d62 74 74 // state->mol->setName(state->lastName); 75 75 76 STATUS("Undo of MoleculeLinearInterpolationofTrajectoriesAction not implemented."); 76 77 return Action::failure; 77 78 } -
src/Actions/MoleculeAction/LoadAction.cpp
r0b6b77 r26b4d62 60 60 // parsing file if present 61 61 if (!boost::filesystem::exists(params.filename.get())) { 62 LOG(1, "Specified input file " << params.filename.get() <<" not found.");62 STATUS("Specified input file "+params.filename.get().string()+" not found."); 63 63 return Action::failure; 64 64 } else { … … 73 73 FilenamePrefix = params.filename.get().stem().string(); 74 74 } else { 75 ELOG(1,"Input file does not have a suffix, cannot recognize format.");75 STATUS("Input file does not have a suffix, cannot recognize format."); 76 76 return Action::failure; 77 77 } -
src/Actions/MoleculeAction/RotateAroundSelfByAngleAction.cpp
r0b6b77 r26b4d62 57 57 // check whether a molecule is selected 58 58 std::vector<molecule *> selectedMolecules = World::getInstance().getSelectedMolecules(); 59 if (selectedMolecules.size() == 0) 59 if (selectedMolecules.size() == 0) { 60 STATUS("There are need to be some molecules selected."); 60 61 return Action::failure; 62 } 61 63 62 64 // go through all selected molecules 63 65 BOOST_FOREACH(molecule *mol, selectedMolecules) { 64 66 // check whether Axis is valid 65 if (params.Axis.get().IsZero()) 67 if (params.Axis.get().IsZero()) { 68 STATUS("Rotation Axis must not be zero."); 66 69 return Action::failure; 70 } 67 71 68 72 // convert from degrees to radian -
src/Actions/MoleculeAction/RotateToPrincipalAxisSystemAction.cpp
r0b6b77 r26b4d62 78 78 // state->mol->setName(state->lastName); 79 79 80 STATUS("Undo of MoleculeRotateToPrincipalAxisSystemAction not implemented."); 80 81 return Action::failure; 81 82 } 82 83 83 84 ActionState::ptr MoleculeRotateToPrincipalAxisSystemAction::performRedo(ActionState::ptr _state){ 85 STATUS("Redo of MoleculeRotateToPrincipalAxisSystemAction not implemented."); 84 86 return Action::failure; 85 87 } -
src/Actions/MoleculeAction/SaveAdjacencyAction.cpp
r0b6b77 r26b4d62 82 82 // state->mol->setName(state->lastName); 83 83 84 STATUS("Undo of MoleculeSaveAdjacencyAction not implemented."); 84 85 return Action::failure; 85 86 } -
src/Actions/MoleculeAction/SaveBondsAction.cpp
r0b6b77 r26b4d62 70 70 // state->mol->setName(state->lastName); 71 71 72 STATUS("Undo of MoleculeSaveBondsAction not implemented."); 72 73 return Action::failure; 73 74 } -
src/Actions/MoleculeAction/SaveSelectedMoleculesAction.cpp
r0b6b77 r26b4d62 63 63 FilenamePrefix = params.filename.get().stem().string(); 64 64 } else { 65 ELOG(1,"Output file does not have a suffix, cannot recognize format.");65 STATUS("Output file does not have a suffix, cannot recognize format."); 66 66 return Action::failure; 67 67 } … … 74 74 FormatParserStorage::getInstance().saveSelectedMolecules(output, FilenameSuffix); 75 75 } else { 76 ELOG(1, "Could not open file " << params.filename.get() <<".");76 STATUS("Could not open file "+params.filename.get().string()+"."); 77 77 } 78 78 output.close(); … … 84 84 // ParserSaveXyzState *state = assert_cast<ParserSaveXyzState*>(_state.get()); 85 85 86 return Action:: failure;86 return Action::success; 87 87 // string newName = state->mol->getName(); 88 88 // state->mol->setName(state->lastName); … … 92 92 93 93 ActionState::ptr MoleculeSaveSelectedMoleculesAction::performRedo(ActionState::ptr _state){ 94 return Action:: failure;94 return Action::success; 95 95 // // Undo and redo have to do the same for this action 96 96 // return performUndo(_state); -
src/Actions/MoleculeAction/SaveTemperatureAction.cpp
r0b6b77 r26b4d62 63 63 const size_t MDSteps = set.getMaxTrajectorySize(); 64 64 OutputTemperature<std::vector<atom *> > writer(set); 65 if (output.fail() || !writer((ofstream * const) &output, 0, MDSteps)) 66 LOG(2, "File could not be written."); 67 else 65 if (output.fail() || !writer((ofstream * const) &output, 0, MDSteps)) { 66 STATUS("File could not be written."); 67 return Action::failure; 68 } else 68 69 LOG(2, "File stored."); 69 70 output.close(); … … 77 78 // state->mol->setName(state->lastName); 78 79 79 return Action:: failure;80 return Action::success; 80 81 } 81 82 -
src/Actions/MoleculeAction/StretchBondAction.cpp
r0b6b77 r26b4d62 58 58 const std::vector< atom *> atoms = World::getInstance().getSelectedAtoms(); 59 59 if (atoms.size() != 2) { 60 ELOG(1,"Exactly two atoms must be selected.");60 STATUS("Exactly two atoms must be selected."); 61 61 return Action::failure; 62 62 } 63 63 const molecule *mol = atoms[0]->getMolecule(); 64 64 if (mol != atoms[1]->getMolecule()) { 65 ELOG(1,"The two selected atoms must belong to the same molecule.");65 STATUS("The two selected atoms must belong to the same molecule."); 66 66 return Action::failure; 67 67 } -
src/Actions/MoleculeAction/SuspendInWaterAction.cpp
r0b6b77 r26b4d62 74 74 // state->mol->setName(state->lastName); 75 75 76 STATUS("Undo of MoleculeSuspendInWaterAction not implemented."); 76 77 return Action::failure; 77 78 } -
src/Actions/MoleculeAction/VerletIntegrationAction.cpp
r0b6b77 r26b4d62 89 89 // state->mol->setName(state->lastName); 90 90 91 STATUS("Undo of MoleculeVerletIntegrationAction not implemented."); 91 92 return Action::failure; 92 93 } 93 94 94 95 ActionState::ptr MoleculeVerletIntegrationAction::performRedo(ActionState::ptr _state){ 96 STATUS("Rddo of MoleculeVerletIntegrationAction not implemented."); 95 97 return Action::failure; 96 98 } -
src/Actions/ParserAction/ParseTremoloPotentialsAction.cpp
r0b6b77 r26b4d62 58 58 // parsing file if present 59 59 if (!boost::filesystem::exists(params.filename.get())) { 60 LOG(1, "Specified potentials file " << params.filename.get() <<" not found.");60 STATUS("Specified potentials file "+params.filename.get().string()+" not found."); 61 61 // DONT FAIL: it's just empty we re-create default id-mapping 62 62 parser.createKnownTypesByIdentity(); 63 63 return Action::failure; 64 64 } else { 65 65 LOG(1, "Specified potentials file found, parsing ... "); … … 77 77 // ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get()); 78 78 79 STATUS("Undo of ParserParseTremoloPotentialsAction not implemented."); 79 80 return Action::failure; 80 81 // string newName = state->mol->getName(); … … 85 86 86 87 ActionState::ptr ParserParseTremoloPotentialsAction::performRedo(ActionState::ptr _state){ 88 STATUS("Redo of ParserParseTremoloPotentialsAction not implemented."); 87 89 return Action::failure; 88 90 } -
src/Actions/ParserAction/SaveSelectedAtomsAsExtTypesAction.cpp
r0b6b77 r26b4d62 56 56 ActionState::ptr ParserSaveSelectedAtomsAsExtTypesAction::performCall() { 57 57 if (boost::filesystem::exists(params.filename.get())) { 58 ELOG(1, "Specified exttypes file " << params.filename.get() <<" already exists.");58 STATUS("Specified exttypes file "+params.filename.get().string()+" already exists."); 59 59 60 60 return Action::failure; … … 70 70 if (status) 71 71 return Action::success; 72 else 72 else { 73 STATUS("Failed to write ext file."); 73 74 return Action::failure; 75 } 74 76 } 75 77 } -
src/Actions/ParserAction/SetOutputFormatsAction.cpp
r0b6b77 r26b4d62 56 56 for (vector<std::string>::const_iterator iter = params.FormatList.get().begin(); iter != params.FormatList.get().end(); ++iter) { 57 57 if (!FormatParserStorage::getInstance().add(*iter)) { 58 ELOG(1, "Unknown parser format in ParserSetOutputFormatsAction: '" << *iter <<"'");58 STATUS("Unknown parser format in ParserSetOutputFormatsAction: '"+*iter+"'"); 59 59 return Action::failure; 60 60 } else { … … 68 68 // ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get()); 69 69 70 STATUS("Undo of ParserSetOutputFormatsAction not implemented."); 70 71 return Action::failure; 71 72 // string newName = state->mol->getName(); … … 76 77 77 78 ActionState::ptr ParserSetOutputFormatsAction::performRedo(ActionState::ptr _state){ 79 STATUS("Redo of ParserSetOutputFormatsAction not implemented."); 78 80 return Action::failure; 79 81 } -
src/Actions/PotentialAction/FitParticleChargesAction.cpp
r0b6b77 r26b4d62 125 125 // for the moment just use the very first fragment 126 126 if (range.first == range.second) { 127 ELOG(1,"HomologyContainer does not contain specified fragment.");127 STATUS("HomologyContainer does not contain specified fragment."); 128 128 return Action::failure; 129 129 } 130 130 HomologyContainer::const_iterator iter = range.first; 131 131 if (!iter->second.containsGrids) { 132 ELOG(2,"This HomologyGraph does not contain sampled grids.");132 STATUS("This HomologyGraph does not contain sampled grids."); 133 133 return Action::failure; 134 134 } -
src/Actions/PotentialAction/FitPotentialAction.cpp
r0b6b77 r26b4d62 131 131 } catch (SerializablePotentialMissingValueException &e) { 132 132 if (const std::string *key = boost::get_error_info<SerializablePotentialKey>(e)) 133 ELOG(1, "Missing value when parsing information for potential " 134 << *key << "."); 133 STATUS("Missing value when parsing information for potential "+*key+"."); 135 134 else 136 ELOG(1,"Missing value parsing information for potential with unknown key.");135 STATUS("Missing value parsing information for potential with unknown key."); 137 136 return Action::failure; 138 137 } catch (SerializablePotentialIllegalKeyException &e) { 139 138 if (const std::string *key = boost::get_error_info<SerializablePotentialKey>(e)) 140 ELOG(1, "Illegal key parsing information for potential " 141 << *key << "."); 139 STATUS("Illegal key parsing information for potential "+*key+"."); 142 140 else 143 ELOG(1,"Illegal key parsing information for potential with unknown key.");141 STATUS("Illegal key parsing information for potential with unknown key."); 144 142 return Action::failure; 145 143 } 146 144 } else { 147 ELOG(0, "Failed to parse from " << params.potential_file.get().string() <<".");145 STATUS("Failed to parse from "+params.potential_file.get().string()+"."); 148 146 return Action::failure; 149 147 } … … 156 154 } else { 157 155 if (params.charges.get().empty()) { 158 ELOG(1,"Neither charges nor potential file given!");156 STATUS("Neither charges nor potential file given!"); 159 157 return Action::failure; 160 158 } else { … … 220 218 << fragmentnumbers << " is " << graph << "."); 221 219 } else { 222 ELOG(1, "Specific fragment " << fragmentnumbers <<" not found in homologies!");220 STATUS("Specific fragment "+toString(fragmentnumbers)+" not found in homologies!"); 223 221 return Action::failure; 224 222 } … … 301 299 << l2error << " are " << model->getParameters() << "."); 302 300 } else { 303 ELOG(0, "We require parameter derivatives for a box constraint minimization.");301 STATUS("No required parameter derivatives for a box constraint minimization known."); 304 302 return Action::failure; 305 303 } -
src/Actions/PotentialAction/ParseHomologiesAction.cpp
r0b6b77 r26b4d62 81 81 if (!params.homology_file.get().empty()) { 82 82 const boost::filesystem::path &homology_file = params.homology_file.get(); 83 if (homology_file.string() != "") { 84 LOG(1, "INFO: Parsing HomologyGraphs from file " << homology_file.string() << "."); 85 parseHomologiesFromFile(homology_file); 86 return Action::success; 87 } 83 LOG(1, "INFO: Parsing HomologyGraphs from file " << homology_file.string() << "."); 84 parseHomologiesFromFile(homology_file); 85 return Action::success; 86 } else { 87 STATUS("Homology file name is empty."); 88 return Action::failure; 88 89 } 90 } 89 91 92 ActionState::ptr PotentialParseHomologiesAction::performUndo(ActionState::ptr _state) { 93 STATUS("Undo of PotentialParseHomologiesAction not implemented."); 90 94 return Action::failure; 91 95 } 92 96 93 ActionState::ptr PotentialParseHomologiesAction::performUndo(ActionState::ptr _state) {94 return Action::success;95 }96 97 97 ActionState::ptr PotentialParseHomologiesAction::performRedo(ActionState::ptr _state){ 98 return Action::success; 98 STATUS("Redo of PotentialParseHomologiesAction not implemented."); 99 return Action::failure; 99 100 } 100 101 -
src/Actions/PotentialAction/SaveHomologiesAction.cpp
r0b6b77 r26b4d62 83 83 if (!params.homology_file.get().empty()) { 84 84 const boost::filesystem::path &homology_file = params.homology_file.get(); 85 if (homology_file.string() != "") {86 LOG(1, "INFO: Appending HomologyGraphs to file " << homology_file.string() << ".");87 if (!writeHomologiesToFile(homology_file))88 return Action::failure;85 LOG(1, "INFO: Appending HomologyGraphs to file " << homology_file.string() << "."); 86 if (!writeHomologiesToFile(homology_file)) { 87 STATUS("Failed to write homology file."); 88 return Action::failure; 89 89 } 90 return Action::success; 91 } else { 92 STATUS("Homology file name empty."); 93 return Action::failure; 90 94 } 91 92 return Action::success;93 95 } 94 96 -
src/Actions/SelectionAction/Atoms/AllAtomsInsideVolumeAction.cpp
r0b6b77 r26b4d62 61 61 std::vector<Shape*> selectedShapes = ShapeRegistry::getInstance().getSelectedShapes(); 62 62 if (selectedShapes.size() != 1){ 63 ELOG(1, "SelectionAllAtomsInsideVolumeAction::performCall(): there has to be exactly 1 selected shape.");63 STATUS("There has to be exactly 1 selected shape."); 64 64 return Action::failure; 65 65 } … … 74 74 75 75 std::vector<Shape*> selectedShapes = ShapeRegistry::getInstance().getSelectedShapes(); 76 if (selectedShapes.size() != 1)77 return Action::failure;78 76 World::getInstance().unselectAllAtoms(AtomsByShape(*selectedShapes[0])); 79 77 BOOST_FOREACH(atom *_atom, state->selectedAtoms) … … 87 85 88 86 std::vector<Shape*> selectedShapes = ShapeRegistry::getInstance().getSelectedShapes(); 89 if (selectedShapes.size() != 1)90 return Action::failure;91 87 World::getInstance().selectAllAtoms(AtomsByShape(*selectedShapes[0])); 92 88 -
src/Actions/SelectionAction/Atoms/AtomByIdAction.cpp
r0b6b77 r26b4d62 85 85 switch (status) { 86 86 case AtomMissing: 87 STATUS("Cannot find all atoms with given ids."); 87 88 return Action::failure; 88 89 break; -
src/Actions/SelectionAction/Atoms/AtomByOrderAction.cpp
r0b6b77 r26b4d62 65 65 } 66 66 } else { 67 STATUS("Cannot find atom by given order of "+toString(params.order.get())+"."); 67 68 return Action::failure; 68 69 } -
src/Actions/SelectionAction/Atoms/NotAllAtomsInsideVolumeAction.cpp
r0b6b77 r26b4d62 60 60 std::vector<Shape*> selectedShapes = ShapeRegistry::getInstance().getSelectedShapes(); 61 61 if (selectedShapes.size() != 1){ 62 ELOG(1, "SelectionNotAllAtomsInsideVolumeAction::performCall(): there has to be exactly 1 selected shape.");62 STATUS("There has to be exactly 1 selected shape."); 63 63 return Action::failure; 64 64 } … … 73 73 74 74 std::vector<Shape*> selectedShapes = ShapeRegistry::getInstance().getSelectedShapes(); 75 if (selectedShapes.size() != 1)76 return Action::failure;77 75 World::getInstance().selectAllAtoms(AtomsByShape(*selectedShapes[0])); 78 76 BOOST_FOREACH(atom *_atom, state->unselectedAtoms) … … 86 84 87 85 std::vector<Shape*> selectedShapes = ShapeRegistry::getInstance().getSelectedShapes(); 88 if (selectedShapes.size() != 1)89 return Action::failure;90 86 World::getInstance().unselectAllAtoms(AtomsByShape(*selectedShapes[0])); 91 87 -
src/Actions/SelectionAction/Atoms/NotAtomByIdAction.cpp
r0b6b77 r26b4d62 85 85 switch (status) { 86 86 case AtomMissing: 87 STATUS("Cannot find all atoms by given ids."); 87 88 return Action::failure; 88 89 break; -
src/Actions/SelectionAction/Atoms/NotAtomByOrderAction.cpp
r0b6b77 r26b4d62 65 65 } 66 66 } else { 67 STATUS("Cannot find atom by given order of "+toString(params.order.get())+"."); 67 68 return Action::failure; 68 69 } -
src/Actions/SelectionAction/Molecules/MoleculeByIdAction.cpp
r0b6b77 r26b4d62 64 64 } 65 65 } else { 66 STATUS("Cannot find molecule by given index "+toString(params.molindex.get())+"."); 66 67 return Action::failure; 67 68 } -
src/Actions/SelectionAction/Molecules/MoleculeByOrderAction.cpp
r0b6b77 r26b4d62 66 66 } 67 67 } else { 68 STATUS("Cannot find molecule by given index "+toString(params.molindex.get())+"."); 68 69 return Action::failure; 69 70 } -
src/Actions/SelectionAction/Molecules/NotMoleculeByIdAction.cpp
r0b6b77 r26b4d62 64 64 } 65 65 } else { 66 STATUS("Cannot find molecule by given index "+toString(params.molindex.get())+"."); 66 67 return Action::failure; 67 68 } -
src/Actions/SelectionAction/Molecules/NotMoleculeByOrderAction.cpp
r0b6b77 r26b4d62 66 66 } 67 67 } else { 68 STATUS("Cannot find molecule by given index "+toString(params.molindex.get())+"."); 68 69 return Action::failure; 69 70 } -
src/Actions/SelectionAction/Shapes/NotShapeByNameAction.cpp
r0b6b77 r26b4d62 62 62 } 63 63 } else { 64 STATUS("Cannot find shape by given name "+toString(params.shapeName.get())+"."); 64 65 return Action::failure; 65 66 } -
src/Actions/SelectionAction/Shapes/ShapeByNameAction.cpp
r0b6b77 r26b4d62 62 62 } 63 63 } else { 64 STATUS("Cannot find shape by given name "+toString(params.shapeName.get())+"."); 64 65 return Action::failure; 65 66 } -
src/Actions/ShapeAction/CombineShapesAction.cpp
r0b6b77 r26b4d62 61 61 if (op == "AND"){ 62 62 if (selectedShapes.size() != 2){ 63 ELOG(1,"Operation AND requires exactly 2 selected shapes.");63 STATUS("Operation AND requires exactly 2 selected shapes."); 64 64 return Action::failure; 65 65 } … … 67 67 }else if (op == "OR"){ 68 68 if (selectedShapes.size() != 2){ 69 ELOG(1,"Operation OR requires exactly 2 selected shapes.");69 STATUS("Operation OR requires exactly 2 selected shapes."); 70 70 return Action::failure; 71 71 } … … 73 73 }else if (op == "NOT"){ 74 74 if (selectedShapes.size() != 1){ 75 ELOG(1,"Operation NOT requires exactly 1 selected shape.");75 STATUS("Operation NOT requires exactly 1 selected shape."); 76 76 return Action::failure; 77 77 } … … 116 116 std::string op = params.shape_op.get(); 117 117 if (op == "AND"){ 118 if (selectedShapes.size() != 2){119 ELOG(1, "Operation AND requires exactly 2 selected shapes.");120 return Action::failure;121 }122 118 s = (*selectedShapes[0]) && (*selectedShapes[1]); 123 119 }else if (op == "OR"){ 124 if (selectedShapes.size() != 2){125 ELOG(1, "Operation OR requires exactly 2 selected shapes.");126 return Action::failure;127 }128 120 s = (*selectedShapes[0]) || (*selectedShapes[1]); 129 121 }else if (op == "NOT"){ 130 if (selectedShapes.size() != 1){131 ELOG(1, "Operation NOT requires exactly 1 selected shape.");132 return Action::failure;133 }134 122 s = ! (*selectedShapes[0]); 135 123 }else{ -
src/Actions/TesselationAction/ConvexEnvelopeAction.cpp
r0b6b77 r26b4d62 72 72 //FindConvexBorder(mol, BoundaryPoints, TesselStruct, LCList, argv[argptr]); 73 73 // TODO: Beide Funktionen sollten streams anstelle des Filenamen benutzen, besser fuer unit tests 74 FindNonConvexBorder(mol, TesselStruct, LCList, 50., params.filenameNonConvex.get().string().c_str());74 Success &= FindNonConvexBorder(mol, TesselStruct, LCList, 50., params.filenameNonConvex.get().string().c_str()); 75 75 //RemoveAllBoundaryPoints(TesselStruct, mol, argv[argptr]); 76 76 const double volumedifference = ConvexizeNonconvexEnvelope(TesselStruct, mol, params.filenameConvex.get().string().c_str()); … … 83 83 if (Success) 84 84 return Action::success; 85 else 85 else { 86 STATUS("Failed to find the non convex border."); 86 87 return Action::failure; 88 } 87 89 } 88 90 … … 93 95 // state->mol->setName(state->lastName); 94 96 97 STATUS("Undo of TesselationConvexEnvelopeAction not implemented."); 95 98 return Action::failure; 96 99 } -
src/Actions/TesselationAction/NonConvexEnvelopeAction.cpp
r0b6b77 r26b4d62 88 88 // state->mol->setName(state->lastName); 89 89 90 STATUS("Undo of TesselationNonConvexEnvelopeAction not implemented."); 90 91 return Action::failure; 91 92 } -
src/Actions/WorldAction/AddEmptyBoundaryAction.cpp
r0b6b77 r26b4d62 117 117 return ActionState::ptr(UndoState); 118 118 } else { 119 ELOG(2,"There must be atoms present for AddingEmptyBoundary.");119 STATUS("There must be atoms present for AddingEmptyBoundary."); 120 120 return Action::failure; 121 121 } -
src/Actions/WorldAction/CenterOnEdgeAction.cpp
r0b6b77 r26b4d62 80 80 // get maximum and minimum 81 81 if (AllAtoms.empty()) { 82 ELOG(2, "For WorldCenterOnEdgeAction atoms must bepresent.");82 STATUS("There are no atoms present."); 83 83 return Action::failure; 84 84 } -
src/Actions/WorldAction/InputAction.cpp
r0b6b77 r26b4d62 72 72 parsers.SetOutputPrefixForAll(FilenamePrefix); 73 73 } else { 74 ELOG(1,"Input file does not have a suffix, cannot recognize format.");74 STATUS("Input file does not have a suffix, cannot recognize format."); 75 75 return Action::failure; 76 76 } … … 103 103 // ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get()); 104 104 105 STATUS("Undo of WorldInputAction not implemented."); 105 106 return Action::failure; 106 107 // string newName = state->mol->getName(); … … 111 112 112 113 ActionState::ptr WorldInputAction::performRedo(ActionState::ptr _state){ 114 STATUS("Redo of WorldInputAction not implemented."); 113 115 return Action::failure; 114 116 } -
src/Actions/WorldAction/OutputAction.cpp
r0b6b77 r26b4d62 60 60 // Parser configured to save anything? 61 61 if (!FormatParserStorage::getInstance().isAbleToSave()){ 62 ELOG(1,"No parser or file prefix selected.");62 STATUS("No parser or file prefix selected."); 63 63 return Action::failure; 64 64 } … … 73 73 // ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get()); 74 74 75 STATUS("Undo of WorldOutputAction not implemented."); 75 76 return Action::failure; 76 77 // string newName = state->mol->getName(); … … 81 82 82 83 ActionState::ptr WorldOutputAction::performRedo(ActionState::ptr _state){ 84 STATUS("Redo of WorldOutputAction not implemented."); 83 85 return Action::failure; 84 86 } -
src/Actions/WorldAction/OutputAsAction.cpp
r0b6b77 r26b4d62 64 64 FilenamePrefix = params.filename.get().stem().string(); 65 65 } else { 66 ELOG(1,"Output file does not have a suffix, cannot recognize format.");66 STATUS("Output file does not have a suffix, cannot recognize format."); 67 67 return Action::failure; 68 68 } … … 75 75 FormatParserStorage::getInstance().saveWorld(output, FilenameSuffix); 76 76 } else { 77 ELOG(1, "Could not open file " << params.filename.get() << "."); 77 STATUS("Could not open file "+params.filename.get().string()+"."); 78 return Action::failure; 78 79 } 79 80 output.close(); … … 85 86 // ParserLoadXyzState *state = assert_cast<ParserLoadXyzState*>(_state.get()); 86 87 88 STATUS("Undo of WorldOutputAsAction not implemented."); 87 89 return Action::failure; 88 90 // string newName = state->mol->getName(); … … 93 95 94 96 ActionState::ptr WorldOutputAsAction::performRedo(ActionState::ptr _state){ 97 STATUS("Redo of WorldOutputAsAction not implemented."); 95 98 return Action::failure; 96 99 }
Note:
See TracChangeset
for help on using the changeset viewer.
