Changeset f10b0c for src/Actions/SelectionAction/Atoms
- Timestamp:
- Jun 11, 2012, 9:53:19 AM (13 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:
- 95f965
- Parents:
- b9c69d
- git-author:
- Michael Ankele <ankele@…> (04/24/12 13:55:16)
- git-committer:
- Frederik Heber <heber@…> (06/11/12 09:53:19)
- Location:
- src/Actions/SelectionAction/Atoms
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/SelectionAction/Atoms/AllAtomsInsideCuboidAction.cpp
rb9c69d rf10b0c 47 47 RealSpaceMatrix RotationMatrix; 48 48 49 RotationMatrix.setRotation(params.Xangle , params.Yangle, params.Zangle);49 RotationMatrix.setRotation(params.Xangle.get(), params.Yangle.get(), params.Zangle.get()); 50 50 51 LOG(1, "Selecting all atoms inside a rotated " << RotationMatrix << " cuboid at " << params.position << " and extension of " << params.extension<< ".");52 Shape s = translate(transform(stretch(Cuboid(),params.extension ),RotationMatrix),params.position);51 LOG(1, "Selecting all atoms inside a rotated " << RotationMatrix << " cuboid at " << params.position.get() << " and extension of " << params.extension.get() << "."); 52 Shape s = translate(transform(stretch(Cuboid(),params.extension.get()),RotationMatrix),params.position.get()); 53 53 std::vector<atom *> selectedAtoms = World::getInstance().getAllAtoms(AtomsBySelection() && AtomsByShape(s)); 54 54 World::getInstance().selectAllAtoms(AtomsByShape(s)); -
src/Actions/SelectionAction/Atoms/AllAtomsInsideSphereAction.cpp
rb9c69d rf10b0c 44 44 /** =========== define the function ====================== */ 45 45 Action::state_ptr SelectionAllAtomsInsideSphereAction::performCall() { 46 LOG(1, "Selecting all atoms inside a sphere at " << params.position << " with radius " << params.radius<< ".");47 Shape s = translate(resize(Sphere(),params.radius ),params.position);46 LOG(1, "Selecting all atoms inside a sphere at " << params.position.get() << " with radius " << params.radius.get() << "."); 47 Shape s = translate(resize(Sphere(),params.radius.get()),params.position.get()); 48 48 std::vector<atom *> selectedAtoms = World::getInstance().getAllAtoms(AtomsBySelection() && AtomsByShape(s)); 49 49 World::getInstance().selectAllAtoms(AtomsByShape(s)); -
src/Actions/SelectionAction/Atoms/AtomByElementAction.cpp
rb9c69d rf10b0c 41 41 /** =========== define the function ====================== */ 42 42 Action::state_ptr SelectionAtomByElementAction::performCall() { 43 LOG(1, "Selecting atoms of type " << *params.elemental );43 LOG(1, "Selecting atoms of type " << *params.elemental.get()); 44 44 std::vector<atom *> selectedAtoms = World::getInstance().getAllAtoms(AtomsBySelection()); 45 World::getInstance().selectAllAtoms(AtomByType(params.elemental ));45 World::getInstance().selectAllAtoms(AtomByType(params.elemental.get())); 46 46 LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected."); 47 47 return Action::state_ptr(new SelectionAtomByElementState(selectedAtoms,params)); … … 51 51 SelectionAtomByElementState *state = assert_cast<SelectionAtomByElementState*>(_state.get()); 52 52 53 World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental ));53 World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental.get())); 54 54 BOOST_FOREACH(atom *_atom, state->selectedAtoms) 55 55 World::getInstance().selectAtom(_atom); … … 61 61 SelectionAtomByElementState *state = assert_cast<SelectionAtomByElementState*>(_state.get()); 62 62 63 World::getInstance().selectAllAtoms(AtomByType(state->params.elemental ));63 World::getInstance().selectAllAtoms(AtomByType(state->params.elemental.get())); 64 64 65 65 return Action::state_ptr(_state); -
src/Actions/SelectionAction/Atoms/AtomByIdAction.cpp
rb9c69d rf10b0c 38 38 /** =========== define the function ====================== */ 39 39 Action::state_ptr SelectionAtomByIdAction::performCall() { 40 const atom *Walker = World::getInstance().getAtom(AtomById(params.WalkerId ));40 const atom *Walker = World::getInstance().getAtom(AtomById(params.WalkerId.get())); 41 41 if (Walker != NULL) { 42 42 if (!World::getInstance().isSelected(Walker)) { … … 56 56 SelectionAtomByIdState *state = assert_cast<SelectionAtomByIdState*>(_state.get()); 57 57 58 const atom *Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId ));58 const atom *Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId.get())); 59 59 World::getInstance().unselectAtom(Walker); 60 60 … … 65 65 SelectionAtomByIdState *state = assert_cast<SelectionAtomByIdState*>(_state.get()); 66 66 67 const atom *Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId ));67 const atom *Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId.get())); 68 68 World::getInstance().selectAtom(Walker); 69 69 -
src/Actions/SelectionAction/Atoms/AtomByOrderAction.cpp
rb9c69d rf10b0c 39 39 /** =========== define the function ====================== */ 40 40 Action::state_ptr SelectionAtomByOrderAction::performCall() { 41 const atom *Walker = World::getInstance().getAtom(AtomByOrder(params.order ));41 const atom *Walker = World::getInstance().getAtom(AtomByOrder(params.order.get())); 42 42 if (Walker != NULL) { 43 43 if (!World::getInstance().isSelected(Walker)) { -
src/Actions/SelectionAction/Atoms/NotAllAtomsInsideCuboidAction.cpp
rb9c69d rf10b0c 46 46 Action::state_ptr SelectionNotAllAtomsInsideCuboidAction::performCall() { 47 47 RealSpaceMatrix RotationMatrix; 48 RotationMatrix.setRotation(params.Xangle , params.Yangle, params.Zangle);48 RotationMatrix.setRotation(params.Xangle.get(), params.Yangle.get(), params.Zangle.get()); 49 49 50 LOG(1, "Unselecting all atoms inside a rotated " << RotationMatrix << " cuboid at " << params.position << " and extension of " << params.extension<< ".");51 Shape s = translate(transform(stretch(Cuboid(),params.extension ),RotationMatrix),params.position);50 LOG(1, "Unselecting all atoms inside a rotated " << RotationMatrix << " cuboid at " << params.position.get() << " and extension of " << params.extension.get() << "."); 51 Shape s = translate(transform(stretch(Cuboid(),params.extension.get()),RotationMatrix),params.position.get()); 52 52 std::vector<atom *> unselectedAtoms = World::getInstance().getAllAtoms((!AtomsBySelection()) && AtomsByShape(s)); 53 53 World::getInstance().unselectAllAtoms(AtomsByShape(s)); -
src/Actions/SelectionAction/Atoms/NotAllAtomsInsideSphereAction.cpp
rb9c69d rf10b0c 44 44 /** =========== define the function ====================== */ 45 45 Action::state_ptr SelectionNotAllAtomsInsideSphereAction::performCall() { 46 LOG(1, "Unselecting all atoms inside a sphere at " << params.position << " with radius " << params.radius<< ".");47 Shape s = translate(resize(Sphere(),params.radius ),params.position);46 LOG(1, "Unselecting all atoms inside a sphere at " << params.position.get() << " with radius " << params.radius.get() << "."); 47 Shape s = translate(resize(Sphere(),params.radius.get()),params.position.get()); 48 48 std::vector<atom *> unselectedAtoms = World::getInstance().getAllAtoms((!AtomsBySelection()) && AtomsByShape(s)); 49 49 World::getInstance().unselectAllAtoms(AtomsByShape(s)); -
src/Actions/SelectionAction/Atoms/NotAtomByElementAction.cpp
rb9c69d rf10b0c 41 41 /** =========== define the function ====================== */ 42 42 Action::state_ptr SelectionNotAtomByElementAction::performCall() { 43 LOG(1, "Unselecting atoms of type " << *params.elemental );43 LOG(1, "Unselecting atoms of type " << *params.elemental.get()); 44 44 std::vector<atom *> unselectedAtoms = World::getInstance().getAllAtoms(!AtomsBySelection()); 45 World::getInstance().unselectAllAtoms(AtomByType(params.elemental ));45 World::getInstance().unselectAllAtoms(AtomByType(params.elemental.get())); 46 46 LOG(0, World::getInstance().countSelectedAtoms() << " atoms remain selected."); 47 47 return Action::state_ptr(new SelectionNotAtomByElementState(unselectedAtoms,params)); … … 51 51 SelectionNotAtomByElementState *state = assert_cast<SelectionNotAtomByElementState*>(_state.get()); 52 52 53 World::getInstance().selectAllAtoms(AtomByType(state->params.elemental ));53 World::getInstance().selectAllAtoms(AtomByType(state->params.elemental.get())); 54 54 BOOST_FOREACH(atom *_atom, state->unselectedAtoms) 55 55 World::getInstance().unselectAtom(_atom); … … 61 61 SelectionNotAtomByElementState *state = assert_cast<SelectionNotAtomByElementState*>(_state.get()); 62 62 63 World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental ));63 World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental.get())); 64 64 65 65 return Action::state_ptr(_state); -
src/Actions/SelectionAction/Atoms/NotAtomByIdAction.cpp
rb9c69d rf10b0c 38 38 /** =========== define the function ====================== */ 39 39 Action::state_ptr SelectionNotAtomByIdAction::performCall() { 40 const atom * Walker = World::getInstance().getAtom(AtomById(params.WalkerId ));40 const atom * Walker = World::getInstance().getAtom(AtomById(params.WalkerId.get())); 41 41 if (Walker != NULL) { 42 42 if (World::getInstance().isSelected(Walker)) { … … 56 56 SelectionNotAtomByIdState *state = assert_cast<SelectionNotAtomByIdState*>(_state.get()); 57 57 58 const atom * Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId ));58 const atom * Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId.get())); 59 59 World::getInstance().selectAtom(Walker); 60 60 … … 65 65 SelectionNotAtomByIdState *state = assert_cast<SelectionNotAtomByIdState*>(_state.get()); 66 66 67 const atom * Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId ));67 const atom * Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId.get())); 68 68 World::getInstance().unselectAtom(Walker); 69 69 -
src/Actions/SelectionAction/Atoms/NotAtomByOrderAction.cpp
rb9c69d rf10b0c 39 39 /** =========== define the function ====================== */ 40 40 Action::state_ptr SelectionNotAtomByOrderAction::performCall() { 41 const atom * Walker = World::getInstance().getAtom(AtomByOrder(params.order ));41 const atom * Walker = World::getInstance().getAtom(AtomByOrder(params.order.get())); 42 42 if (Walker != NULL) { 43 43 if (World::getInstance().isSelected(Walker)) {
Note:
See TracChangeset
for help on using the changeset viewer.