Changeset e6317b for src/Actions/WorldAction
- Timestamp:
- Jun 16, 2010, 12:24:21 PM (15 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:
- 492279
- Parents:
- f8e486 (diff), 980dd6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/Actions/WorldAction
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/WorldAction/AddEmptyBoundaryAction.cpp
rf8e486 re6317b 9 9 10 10 #include "Actions/WorldAction/AddEmptyBoundaryAction.hpp" 11 #include "CommandLineParser.hpp"12 11 #include "atom.hpp" 13 12 #include "log.hpp" -
src/Actions/WorldAction/BoundInBoxAction.cpp
rf8e486 re6317b 9 9 10 10 #include "Actions/WorldAction/BoundInBoxAction.hpp" 11 #include "CommandLineParser.hpp"12 11 #include "log.hpp" 13 12 #include "molecule.hpp" -
src/Actions/WorldAction/CenterInBoxAction.cpp
rf8e486 re6317b 9 9 10 10 #include "Actions/WorldAction/CenterInBoxAction.hpp" 11 #include "CommandLineParser.hpp"12 11 #include "log.hpp" 13 12 #include "molecule.hpp" -
src/Actions/WorldAction/CenterOnEdgeAction.cpp
rf8e486 re6317b 9 9 10 10 #include "Actions/WorldAction/CenterOnEdgeAction.hpp" 11 #include "CommandLineParser.hpp"12 11 #include "atom.hpp" 13 12 #include "log.hpp" -
src/Actions/WorldAction/ChangeBoxAction.cpp
rf8e486 re6317b 9 9 10 10 #include "Actions/WorldAction/ChangeBoxAction.hpp" 11 #include "CommandLineParser.hpp"12 11 #include "log.hpp" 13 12 #include "verbose.hpp" -
src/Actions/WorldAction/RemoveSphereOfAtomsAction.cpp
rf8e486 re6317b 9 9 10 10 #include "Actions/WorldAction/RemoveSphereOfAtomsAction.hpp" 11 #include "CommandLineParser.hpp"12 11 #include "atom.hpp" 13 12 #include "Descriptors/AtomDescriptor.hpp" 14 13 #include "log.hpp" 14 #include "molecule.hpp" 15 15 #include "vector.hpp" 16 16 #include "verbose.hpp" … … 38 38 Dialog *dialog = UIFactory::getInstance().makeDialog(); 39 39 double radius = 0.; 40 atom *first = NULL;40 Vector point; 41 41 42 42 dialog->queryDouble(NAME, &radius, MapOfActions::getInstance().getDescription(NAME)); 43 dialog->query Atom("atom-by-id", &first, MapOfActions::getInstance().getDescription("atom-by-id"));43 dialog->queryVector("position", &point, World::getInstance().getDomain(), false, MapOfActions::getInstance().getDescription("position")); 44 44 45 45 if(dialog->display()) { 46 46 delete dialog; 47 DoLog(1) && (Log() << Verbose(1) << "Removing atoms around " << first->nr<< " with radius " << radius << "." << endl);47 DoLog(1) && (Log() << Verbose(1) << "Removing atoms around " << point << " with radius " << radius << "." << endl); 48 48 vector<atom*> AllAtoms = World::getInstance().getAllAtoms(); 49 vector<atom*>::iterator AtomAdvancer = AllAtoms.begin(); 50 for (vector<atom*>::iterator AtomRunner = AtomAdvancer; AtomRunner != AllAtoms.end(); ) { 51 ++AtomAdvancer; 52 if (first != *AtomRunner) // dont't destroy reference ... 53 if (first->x.DistanceSquared((*AtomRunner)->x) > radius*radius) // distance to first above radius ... 54 World::getInstance().destroyAtom(*AtomRunner); 49 vector<molecule *> molecules = World::getInstance().getAllMolecules(); 50 for (vector<atom*>::iterator AtomRunner = AllAtoms.begin(); AtomRunner != AllAtoms.end(); ++AtomRunner) { 51 if (point.DistanceSquared((*AtomRunner)->x) > radius*radius) { // distance to first above radius ... 52 // TODO: This is not necessary anymore when atoms are completely handled by World (create/destroy and load/save) 53 for (vector<molecule *>::iterator iter = molecules.begin();iter != molecules.end();++iter) 54 (*iter)->erase(*AtomRunner); 55 World::getInstance().destroyAtom(*AtomRunner); 56 } 55 57 } 56 World::getInstance().destroyAtom(first);57 58 return Action::success; 58 59 } else { -
src/Actions/WorldAction/RepeatBoxAction.cpp
rf8e486 re6317b 9 9 10 10 #include "Actions/WorldAction/RepeatBoxAction.hpp" 11 #include "CommandLineParser.hpp"12 11 #include "atom.hpp" 13 12 #include "log.hpp" -
src/Actions/WorldAction/ScaleBoxAction.cpp
rf8e486 re6317b 9 9 10 10 #include "Actions/WorldAction/ScaleBoxAction.hpp" 11 #include "CommandLineParser.hpp"12 11 #include "atom.hpp" 13 12 #include "log.hpp" -
src/Actions/WorldAction/SetDefaultNameAction.cpp
rf8e486 re6317b 9 9 10 10 #include "Actions/WorldAction/SetDefaultNameAction.hpp" 11 #include "CommandLineParser.hpp"12 11 #include "log.hpp" 12 #include "verbose.hpp" 13 13 #include "World.hpp" 14 14 … … 39 39 40 40 if(dialog->display()) { 41 char outputname[MAXSTRINGSIZE]; 42 strcpy(outputname, defaultname.c_str()); 43 World::getInstance().setDefaultName(outputname); 41 World::getInstance().setDefaultName(defaultname); 42 DoLog(0) && (Log() << Verbose(0) << "Default name of new molecules set to " << World::getInstance().getDefaultName() << "." << endl); 44 43 delete dialog; 45 44 return Action::success; -
src/Actions/WorldAction/SetGaussianBasisAction.cpp
rf8e486 re6317b 9 9 10 10 #include "Actions/WorldAction/SetGaussianBasisAction.hpp" 11 #include "CommandLineParser.hpp"12 11 #include "config.hpp" 12 #include "log.hpp" 13 #include "verbose.hpp" 13 14 #include "World.hpp" 14 15 … … 33 34 Action::state_ptr WorldSetGaussianBasisAction::performCall() { 34 35 Dialog *dialog = UIFactory::getInstance().makeDialog(); 35 36 dialog->queryString(NAME, & World::getInstance().getConfig()->basis, MapOfActions::getInstance().getDescription(NAME));36 config *configuration = World::getInstance().getConfig(); 37 dialog->queryString(NAME, &(configuration->basis), MapOfActions::getInstance().getDescription(NAME)); 37 38 38 39 if(dialog->display()) { 40 DoLog(1) && (Log() << Verbose(1) << "Setting MPQC basis to " << configuration->basis << "." << endl); 39 41 delete dialog; 40 42 return Action::success;
Note:
See TracChangeset
for help on using the changeset viewer.