Changeset be97a8 for src/Actions/WorldAction/RepeatBoxAction.cpp
- Timestamp:
- Jul 20, 2010, 1:01:11 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:
- 3d078d, 4b6777, c644a5
- Parents:
- ba9f5b (diff), 818eda (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/WorldAction/RepeatBoxAction.cpp
rba9f5b rbe97a8 13 13 #include "molecule.hpp" 14 14 #include "vector.hpp" 15 #include "Matrix.hpp" 15 16 #include "verbose.hpp" 16 17 #include "World.hpp" 18 #include "Box.hpp" 17 19 18 20 #include <iostream> … … 46 48 MoleculeListClass *molecules = World::getInstance().getMolecules(); 47 49 48 dialog->queryVector(NAME, &Repeater, World::getInstance().getDomain(),false, MapOfActions::getInstance().getDescription(NAME));50 dialog->queryVector(NAME, &Repeater, false, MapOfActions::getInstance().getDescription(NAME)); 49 51 //dialog->queryMolecule("molecule-by-id", &mol,MapOfActions::getInstance().getDescription("molecule-by-id")); 50 52 vector<molecule *> AllMolecules; … … 59 61 if(dialog->display()) { 60 62 (cout << "Repeating box " << Repeater << " times for (x,y,z) axis." << endl); 61 double * const cell_size = World::getInstance().getDomain();62 double *M = ReturnFullMatrixforSymmetric(cell_size);63 Matrix M = World::getInstance().getDomain().getM(); 64 Matrix newM = M; 63 65 Vector x,y; 64 66 int n[NDIM]; 67 Matrix repMat; 65 68 for (int axis = 0; axis < NDIM; axis++) { 66 69 Repeater[axis] = floor(Repeater[axis]); … … 69 72 Repeater[axis] = 1; 70 73 } 71 cell_size[ ((axis == 1) ? 2 : (axis == 2) ? 5 : 0) ] *= Repeater[axis];74 repMat.at(axis,axis) = Repeater[axis]; 72 75 } 76 newM *= repMat; 77 World::getInstance().setDomain(newM); 73 78 74 World::getInstance().setDomain(cell_size);75 79 molecule *newmol = NULL; 76 80 Vector ** vectors = NULL; … … 99 103 DoeLog(1) && (eLog()<< Verbose(1) << "AtomCount " << count << " is not equal to number of atoms in molecule " << j << "!" << endl); 100 104 x = y; 101 x .MatrixMultiplication(M);105 x *= M; 102 106 newmol = World::getInstance().createMolecule(); 103 107 molecules->insert(newmol); … … 119 123 } 120 124 } 121 delete(M);122 125 delete dialog; 123 126 return Action::success;
Note:
See TracChangeset
for help on using the changeset viewer.