Changeset 77675f


Ignore:
Timestamp:
Dec 29, 2009, 11:57:09 AM (15 years ago)
Author:
Tillmann Crueger <crueger@…>
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:
8f113e
Parents:
0229f9
Message:

Moved flipChosen method from oldmenu to MoleculeListClass

Location:
src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/menu.cpp

    r0229f9 r77675f  
    12241224}
    12251225
    1226 void oldmenu::flipChosen(MoleculeListClass *molecules) {
    1227   int j;
    1228   Log() << Verbose(0) << "Enter index of molecule: ";
    1229   cin >> j;
    1230   for(MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++)
    1231     if ((*ListRunner)->IndexNr == j)
    1232       (*ListRunner)->ActiveFlag = !(*ListRunner)->ActiveFlag;
    1233 }
    1234 
    12351226void oldmenu::perform(MoleculeListClass *molecules, config *configuration, periodentafel *periode, char *ConfigFileName)
    12361227{
     
    12421233  new SeperatorItem(main_menu);
    12431234
    1244   Action *setMoleculeAction = new MethodAction(boost::bind(&oldmenu::flipChosen,this,molecules));
     1235  Action *setMoleculeAction = new MethodAction(boost::bind(&MoleculeListClass::flipChosen,molecules));
    12451236  new ActionMenuItem('a',"set molecule (in)active",main_menu,setMoleculeAction);
    12461237
  • src/menu.hpp

    r0229f9 r77675f  
    3232  void EditMolecules(periodentafel *, MoleculeListClass *);
    3333  void FragmentAtoms(molecule *, config *);
    34   void flipChosen(MoleculeListClass*);
    3534  void ManipulateAtoms(periodentafel *, MoleculeListClass *, config *);
    3635  void MeasureAtoms(periodentafel *, molecule *, config *);
  • src/molecule.hpp

    r0229f9 r77675f  
    327327  int CountAllAtoms() const;
    328328
     329  void flipChosen();
     330
    329331  // merging of molecules
    330332  bool SimpleMerge(molecule *mol, molecule *srcmol);
  • src/moleculelist.cpp

    r0229f9 r77675f  
    839839
    840840
     841void MoleculeListClass::flipChosen() {
     842  int j;
     843  Log() << Verbose(0) << "Enter index of molecule: ";
     844  cin >> j;
     845  for(MoleculeList::iterator ListRunner = ListOfMolecules.begin(); ListRunner != ListOfMolecules.end(); ListRunner++)
     846    if ((*ListRunner)->IndexNr == j)
     847      (*ListRunner)->ActiveFlag = !(*ListRunner)->ActiveFlag;
     848}
     849
     850
    841851/******************************************* Class MoleculeLeafClass ************************************************/
    842852
Note: See TracChangeset for help on using the changeset viewer.