Changeset 5e17bf for src/Actions
- Timestamp:
- Jun 20, 2017, 7:58:37 PM (8 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_StructOpt_integration_tests, AutomationFragmentation_failures, Candidate_v1.6.1, ChangeBugEmailaddress, ChemicalSpaceEvaluator, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph_documentation, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, ForceAnnealing_oldresults, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, Gui_displays_atomic_force_velocity, IndependentFragmentGrids_IntegrationTest, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, RotateToPrincipalAxisSystem_UndoRedo, StoppableMakroAction, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps
- Children:
- 536b13
- Parents:
- 788dce
- git-author:
- Frederik Heber <heber@…> (03/22/17 16:06:01)
- git-committer:
- Frederik Heber <frederik.heber@…> (06/20/17 19:58:37)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/MoleculeAction/RotateAroundBondAction.cpp
r788dce r5e17bf 44 44 45 45 #include "Actions/UndoRedoHelpers.hpp" 46 #include "Graph/CyclicStructureAnalysis.hpp" 47 #include "Graph/DepthFirstSearchAnalysis.hpp" 46 48 47 49 #include "Atom/atom.hpp" … … 57 59 #include "RotateAroundBondAction.def" 58 60 #include "Action_impl_pre.hpp" 61 59 62 /** =========== define the function ====================== */ 63 static bool IsBondContainedInCycle(const bond::ptr &_bond) 64 { 65 // get the BackEdgeStack from somewhere 66 DepthFirstSearchAnalysis DFS; 67 DFS(); 68 DFS.CyclicBondAnalysis(); 69 // std::deque<bond::ptr> BackEdgeStack = DFS.getBackEdgeStack(); 70 // // then we analyse the cycles and get them 71 // CyclicStructureAnalysis CycleAnalysis(ExcludeHydrogen); // hydrogens never contained in cycles 72 // CycleAnalysis(&BackEdgeStack); 73 return _bond->Cyclic; 74 } 75 60 76 ActionState::ptr MoleculeRotateAroundBondAction::performCall() 61 77 { … … 74 90 if (mol != atoms[1]->getMolecule()) { 75 91 STATUS("The two selected atoms must belong to the same molecule."); 92 return Action::failure; 93 } 94 if (IsBondContainedInCycle(atoms[0]->getBond(atoms[1]))) { 95 STATUS("The given bond is contained in a cycle, cannot rotate!"); 76 96 return Action::failure; 77 97 }
Note:
See TracChangeset
for help on using the changeset viewer.