Changeset 273382 for src/analysis_correlation.cpp
- Timestamp:
- Apr 13, 2010, 1:22:42 PM (16 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, Candidate_v1.7.0, 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:
- 1bd79e
- Parents:
- 72e7fa
- File:
-
- 1 edited
-
src/analysis_correlation.cpp (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/analysis_correlation.cpp
r72e7fa r273382 55 55 if (Walker->nr < OtherWalker->nr) 56 56 if ((type2 == NULL) || (OtherWalker->type == type2)) { 57 distance = Walker->node->PeriodicDistance( OtherWalker->node, (*MolWalker)->cell_size);57 distance = Walker->node->PeriodicDistance(*(OtherWalker->node), (*MolWalker)->cell_size); 58 58 //Log() << Verbose(1) <<"Inserting " << *Walker << " and " << *OtherWalker << endl; 59 59 outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> (Walker, OtherWalker) ) ); … … 104 104 Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl; 105 105 if ((type1 == NULL) || (Walker->type == type1)) { 106 periodicX .CopyVector(Walker->node);106 periodicX = *(Walker->node); 107 107 periodicX.MatrixMultiplication(FullInverseMatrix); // x now in [0,1)^3 108 108 // go through every range in xyz and get distance … … 110 110 for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++) 111 111 for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) { 112 checkX.Init(n[0], n[1], n[2]); 113 checkX.AddVector(&periodicX); 112 checkX = Vector(n[0], n[1], n[2]) + periodicX; 114 113 checkX.MatrixMultiplication(FullMatrix); 115 114 for (MoleculeList::const_iterator MolOtherWalker = MolWalker; MolOtherWalker != molecules->ListOfMolecules.end(); MolOtherWalker++) … … 122 121 if (Walker->nr < OtherWalker->nr) 123 122 if ((type2 == NULL) || (OtherWalker->type == type2)) { 124 periodicOtherX .CopyVector(OtherWalker->node);123 periodicOtherX = *(OtherWalker->node); 125 124 periodicOtherX.MatrixMultiplication(FullInverseMatrix); // x now in [0,1)^3 126 125 // go through every range in xyz and get distance … … 128 127 for (Othern[1]=-ranges[1]; Othern[1] <= ranges[1]; Othern[1]++) 129 128 for (Othern[2]=-ranges[2]; Othern[2] <= ranges[2]; Othern[2]++) { 130 checkOtherX.Init(Othern[0], Othern[1], Othern[2]); 131 checkOtherX.AddVector(&periodicOtherX); 129 checkOtherX = Vector(Othern[0], Othern[1], Othern[2]) + periodicOtherX; 132 130 checkOtherX.MatrixMultiplication(FullMatrix); 133 distance = checkX.Distance( &checkOtherX);131 distance = checkX.Distance(checkOtherX); 134 132 //Log() << Verbose(1) <<"Inserting " << *Walker << " and " << *OtherWalker << endl; 135 133 outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> (Walker, OtherWalker) ) ); … … 174 172 Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl; 175 173 if ((type == NULL) || (Walker->type == type)) { 176 distance = Walker->node->PeriodicDistance( point, (*MolWalker)->cell_size);174 distance = Walker->node->PeriodicDistance(*point, (*MolWalker)->cell_size); 177 175 Log() << Verbose(4) << "Current distance is " << distance << "." << endl; 178 176 outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> (Walker, point) ) ); … … 216 214 Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl; 217 215 if ((type == NULL) || (Walker->type == type)) { 218 periodicX .CopyVector(Walker->node);216 periodicX = *(Walker->node); 219 217 periodicX.MatrixMultiplication(FullInverseMatrix); // x now in [0,1)^3 220 218 // go through every range in xyz and get distance … … 222 220 for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++) 223 221 for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) { 224 checkX.Init(n[0], n[1], n[2]); 225 checkX.AddVector(&periodicX); 222 checkX = Vector(n[0], n[1], n[2]) + periodicX; 226 223 checkX.MatrixMultiplication(FullMatrix); 227 distance = checkX.Distance( point);224 distance = checkX.Distance(*point); 228 225 Log() << Verbose(4) << "Current distance is " << distance << "." << endl; 229 226 outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> (Walker, point) ) ); … … 320 317 Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl; 321 318 if ((type == NULL) || (Walker->type == type)) { 322 periodicX .CopyVector(Walker->node);319 periodicX = *(Walker->node); 323 320 periodicX.MatrixMultiplication(FullInverseMatrix); // x now in [0,1)^3 324 321 // go through every range in xyz and get distance … … 327 324 for (n[1]=-ranges[1]; n[1] <= ranges[1]; n[1]++) 328 325 for (n[2]=-ranges[2]; n[2] <= ranges[2]; n[2]++) { 329 checkX.Init(n[0], n[1], n[2]); 330 checkX.AddVector(&periodicX); 326 checkX = Vector(n[0], n[1], n[2]) + periodicX; 331 327 checkX.MatrixMultiplication(FullMatrix); 332 328 triangle = Surface->FindClosestTriangleToVector(&checkX, LC);
Note:
See TracChangeset
for help on using the changeset viewer.
