Changeset 1024cb for src/Actions/WorldAction
- Timestamp:
- May 31, 2010, 5:32:27 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:
- e08c46
- Parents:
- 42af9e (diff), a7b761b (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. - git-author:
- Frederik Heber <heber@…> (05/31/10 17:29:30)
- git-committer:
- Frederik Heber <heber@…> (05/31/10 17:32:27)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/WorldAction/RepeatBoxAction.cpp
r42af9e r1024cb 40 40 molecule *mol = NULL; 41 41 int j = 0; 42 atom *Walker = NULL; 42 43 43 44 dialog->queryVector(NAME, &Repeater, World::getInstance().getDomain(), false, MapOfActions::getInstance().getDescription(NAME)); … … 54 55 Repeater[axis] = 1; 55 56 } 56 mol->CountAtoms(); // recount atoms 57 if (mol->AtomCount != 0) { // if there is more than none 58 count = mol->AtomCount; // is changed becausing of adding, thus has to be stored away beforehand 57 if (mol->getAtomCount() != 0) { // if there is more than none 58 count = mol->getAtomCount(); // is changed becausing of adding, thus has to be stored away beforehand 59 59 Elements = new const element *[count]; 60 60 vectors = new Vector *[count]; 61 61 j = 0; 62 atom *first = mol->start; 63 while (first->next != mol->end) { // make a list of all atoms with coordinates and element 64 first = first->next; 65 Elements[j] = first->type; 66 vectors[j] = &first->x; 62 for(molecule::iterator AtomRunner = mol->begin(); AtomRunner != mol->end(); ++AtomRunner) { 63 Elements[j] = (*AtomRunner)->type; 64 vectors[j] = &(*AtomRunner)->x; 67 65 j++; 68 66 } … … 75 73 x += y; // per factor one cell width further 76 74 for (int k=count;k--;) { // go through every atom of the original cell 77 first= World::getInstance().createAtom(); // create a new body78 first->x = (*vectors[k]) + x;79 first->type = Elements[k]; // insert original element80 mol->AddAtom( first); // and add to the molecule (which increments ElementsInMolecule, AtomCount, ...)75 Walker = World::getInstance().createAtom(); // create a new body 76 Walker->x = (*vectors[k]) + x; 77 Walker->type = Elements[k]; // insert original element 78 mol->AddAtom(Walker); // and add to the molecule (which increments ElementsInMolecule, AtomCount, ...) 81 79 } 82 80 }
Note:
See TracChangeset
for help on using the changeset viewer.