Ignore:
Timestamp:
Jun 11, 2012, 9:53:19 AM (13 years ago)
Author:
Frederik Heber <heber@…>
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)
Message:

disastrously big and ugly commit

  • using new Parameter<T> classes:
    • Actions
    • Queries (all UIs)
  • TODO:
    • actions crash cause Value is unset
    • no query<BoxVector>
Location:
src/Actions/SelectionAction/Atoms
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/SelectionAction/Atoms/AllAtomsInsideCuboidAction.cpp

    rb9c69d rf10b0c  
    4747  RealSpaceMatrix RotationMatrix;
    4848
    49   RotationMatrix.setRotation(params.Xangle, params.Yangle, params.Zangle);
     49  RotationMatrix.setRotation(params.Xangle.get(), params.Yangle.get(), params.Zangle.get());
    5050
    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());
    5353  std::vector<atom *> selectedAtoms = World::getInstance().getAllAtoms(AtomsBySelection() && AtomsByShape(s));
    5454  World::getInstance().selectAllAtoms(AtomsByShape(s));
  • src/Actions/SelectionAction/Atoms/AllAtomsInsideSphereAction.cpp

    rb9c69d rf10b0c  
    4444/** =========== define the function ====================== */
    4545Action::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());
    4848  std::vector<atom *> selectedAtoms = World::getInstance().getAllAtoms(AtomsBySelection() && AtomsByShape(s));
    4949  World::getInstance().selectAllAtoms(AtomsByShape(s));
  • src/Actions/SelectionAction/Atoms/AtomByElementAction.cpp

    rb9c69d rf10b0c  
    4141/** =========== define the function ====================== */
    4242Action::state_ptr SelectionAtomByElementAction::performCall() {
    43   LOG(1, "Selecting atoms of type " << *params.elemental);
     43  LOG(1, "Selecting atoms of type " << *params.elemental.get());
    4444  std::vector<atom *> selectedAtoms = World::getInstance().getAllAtoms(AtomsBySelection());
    45   World::getInstance().selectAllAtoms(AtomByType(params.elemental));
     45  World::getInstance().selectAllAtoms(AtomByType(params.elemental.get()));
    4646  LOG(0, World::getInstance().countSelectedAtoms() << " atoms selected.");
    4747  return Action::state_ptr(new SelectionAtomByElementState(selectedAtoms,params));
     
    5151  SelectionAtomByElementState *state = assert_cast<SelectionAtomByElementState*>(_state.get());
    5252
    53   World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental));
     53  World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental.get()));
    5454  BOOST_FOREACH(atom *_atom, state->selectedAtoms)
    5555    World::getInstance().selectAtom(_atom);
     
    6161  SelectionAtomByElementState *state = assert_cast<SelectionAtomByElementState*>(_state.get());
    6262
    63   World::getInstance().selectAllAtoms(AtomByType(state->params.elemental));
     63  World::getInstance().selectAllAtoms(AtomByType(state->params.elemental.get()));
    6464
    6565  return Action::state_ptr(_state);
  • src/Actions/SelectionAction/Atoms/AtomByIdAction.cpp

    rb9c69d rf10b0c  
    3838/** =========== define the function ====================== */
    3939Action::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()));
    4141  if (Walker != NULL) {
    4242    if (!World::getInstance().isSelected(Walker)) {
     
    5656  SelectionAtomByIdState *state = assert_cast<SelectionAtomByIdState*>(_state.get());
    5757
    58   const atom *Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId));
     58  const atom *Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId.get()));
    5959  World::getInstance().unselectAtom(Walker);
    6060
     
    6565  SelectionAtomByIdState *state = assert_cast<SelectionAtomByIdState*>(_state.get());
    6666
    67   const atom *Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId));
     67  const atom *Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId.get()));
    6868  World::getInstance().selectAtom(Walker);
    6969
  • src/Actions/SelectionAction/Atoms/AtomByOrderAction.cpp

    rb9c69d rf10b0c  
    3939/** =========== define the function ====================== */
    4040Action::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()));
    4242  if (Walker != NULL) {
    4343    if (!World::getInstance().isSelected(Walker)) {
  • src/Actions/SelectionAction/Atoms/NotAllAtomsInsideCuboidAction.cpp

    rb9c69d rf10b0c  
    4646Action::state_ptr SelectionNotAllAtomsInsideCuboidAction::performCall() {
    4747  RealSpaceMatrix RotationMatrix;
    48   RotationMatrix.setRotation(params.Xangle, params.Yangle, params.Zangle);
     48  RotationMatrix.setRotation(params.Xangle.get(), params.Yangle.get(), params.Zangle.get());
    4949
    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());
    5252  std::vector<atom *> unselectedAtoms = World::getInstance().getAllAtoms((!AtomsBySelection()) && AtomsByShape(s));
    5353  World::getInstance().unselectAllAtoms(AtomsByShape(s));
  • src/Actions/SelectionAction/Atoms/NotAllAtomsInsideSphereAction.cpp

    rb9c69d rf10b0c  
    4444/** =========== define the function ====================== */
    4545Action::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());
    4848  std::vector<atom *> unselectedAtoms = World::getInstance().getAllAtoms((!AtomsBySelection()) && AtomsByShape(s));
    4949  World::getInstance().unselectAllAtoms(AtomsByShape(s));
  • src/Actions/SelectionAction/Atoms/NotAtomByElementAction.cpp

    rb9c69d rf10b0c  
    4141/** =========== define the function ====================== */
    4242Action::state_ptr SelectionNotAtomByElementAction::performCall() {
    43   LOG(1, "Unselecting atoms of type " << *params.elemental);
     43  LOG(1, "Unselecting atoms of type " << *params.elemental.get());
    4444  std::vector<atom *> unselectedAtoms = World::getInstance().getAllAtoms(!AtomsBySelection());
    45   World::getInstance().unselectAllAtoms(AtomByType(params.elemental));
     45  World::getInstance().unselectAllAtoms(AtomByType(params.elemental.get()));
    4646  LOG(0, World::getInstance().countSelectedAtoms() << " atoms remain selected.");
    4747  return Action::state_ptr(new SelectionNotAtomByElementState(unselectedAtoms,params));
     
    5151  SelectionNotAtomByElementState *state = assert_cast<SelectionNotAtomByElementState*>(_state.get());
    5252
    53   World::getInstance().selectAllAtoms(AtomByType(state->params.elemental));
     53  World::getInstance().selectAllAtoms(AtomByType(state->params.elemental.get()));
    5454  BOOST_FOREACH(atom *_atom, state->unselectedAtoms)
    5555    World::getInstance().unselectAtom(_atom);
     
    6161  SelectionNotAtomByElementState *state = assert_cast<SelectionNotAtomByElementState*>(_state.get());
    6262
    63   World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental));
     63  World::getInstance().unselectAllAtoms(AtomByType(state->params.elemental.get()));
    6464
    6565  return Action::state_ptr(_state);
  • src/Actions/SelectionAction/Atoms/NotAtomByIdAction.cpp

    rb9c69d rf10b0c  
    3838/** =========== define the function ====================== */
    3939Action::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()));
    4141  if (Walker != NULL) {
    4242    if (World::getInstance().isSelected(Walker)) {
     
    5656  SelectionNotAtomByIdState *state = assert_cast<SelectionNotAtomByIdState*>(_state.get());
    5757
    58   const atom * Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId));
     58  const atom * Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId.get()));
    5959  World::getInstance().selectAtom(Walker);
    6060
     
    6565  SelectionNotAtomByIdState *state = assert_cast<SelectionNotAtomByIdState*>(_state.get());
    6666
    67   const atom * Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId));
     67  const atom * Walker = World::getInstance().getAtom(AtomById(state->params.WalkerId.get()));
    6868  World::getInstance().unselectAtom(Walker);
    6969
  • src/Actions/SelectionAction/Atoms/NotAtomByOrderAction.cpp

    rb9c69d rf10b0c  
    3939/** =========== define the function ====================== */
    4040Action::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()));
    4242  if (Walker != NULL) {
    4343    if (World::getInstance().isSelected(Walker)) {
Note: See TracChangeset for help on using the changeset viewer.