Changeset 9879f6 for src/analysis_correlation.cpp
- Timestamp:
- Mar 5, 2010, 10:16:47 AM (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:
- d3347e
- Parents:
- e87acf
- git-author:
- Frederik Heber <heber@…> (03/05/10 10:08:44)
- git-committer:
- Frederik Heber <heber@…> (03/05/10 10:16:47)
- File:
-
- 1 edited
-
src/analysis_correlation.cpp (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/analysis_correlation.cpp
re87acf r9879f6 41 41 if ((*MolWalker)->ActiveFlag) { 42 42 eLog() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl; 43 atom *Walker = (*MolWalker)->start; 44 while (Walker->next != (*MolWalker)->end) { 45 Walker = Walker->next; 46 Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl; 47 if ((type1 == NULL) || (Walker->type == type1)) { 43 for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) { 44 Log() << Verbose(3) << "Current atom is " << *(*iter) << "." << endl; 45 if ((type1 == NULL) || ((*iter)->type == type1)) { 48 46 for (MoleculeList::const_iterator MolOtherWalker = MolWalker; MolOtherWalker != molecules->ListOfMolecules.end(); MolOtherWalker++) 49 47 if ((*MolOtherWalker)->ActiveFlag) { 50 48 Log() << Verbose(2) << "Current other molecule is " << *MolOtherWalker << "." << endl; 51 atom *OtherWalker = (*MolOtherWalker)->start; 52 while (OtherWalker->next != (*MolOtherWalker)->end) { // only go up to Walker 53 OtherWalker = OtherWalker->next; 54 Log() << Verbose(3) << "Current otheratom is " << *OtherWalker << "." << endl; 55 if (Walker->nr < OtherWalker->nr) 56 if ((type2 == NULL) || (OtherWalker->type == type2)) { 57 distance = Walker->node->PeriodicDistance(OtherWalker->node, (*MolWalker)->cell_size); 58 //Log() << Verbose(1) <<"Inserting " << *Walker << " and " << *OtherWalker << endl; 59 outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> (Walker, OtherWalker) ) ); 49 for (molecule::const_iterator runner = (*MolOtherWalker)->begin(); runner != (*MolOtherWalker)->end(); ++runner) { 50 Log() << Verbose(3) << "Current otheratom is " << *(*runner) << "." << endl; 51 if ((*iter)->nr < (*runner)->nr) 52 if ((type2 == NULL) || ((*runner)->type == type2)) { 53 distance = (*iter)->node->PeriodicDistance((*runner)->node, (*MolWalker)->cell_size); 54 //Log() << Verbose(1) <<"Inserting " << *(*iter) << " and " << *(*runner) << endl; 55 outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> ((*iter), (*runner)) ) ); 60 56 } 61 57 } … … 99 95 double * FullInverseMatrix = InverseMatrix(FullMatrix); 100 96 eLog() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl; 101 atom *Walker = (*MolWalker)->start; 102 while (Walker->next != (*MolWalker)->end) { 103 Walker = Walker->next; 104 Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl; 105 if ((type1 == NULL) || (Walker->type == type1)) { 106 periodicX.CopyVector(Walker->node); 97 for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) { 98 Log() << Verbose(3) << "Current atom is " << *(*iter) << "." << endl; 99 if ((type1 == NULL) || ((*iter)->type == type1)) { 100 periodicX.CopyVector((*iter)->node); 107 101 periodicX.MatrixMultiplication(FullInverseMatrix); // x now in [0,1)^3 108 102 // go through every range in xyz and get distance … … 116 110 if ((*MolOtherWalker)->ActiveFlag) { 117 111 Log() << Verbose(2) << "Current other molecule is " << *MolOtherWalker << "." << endl; 118 atom *OtherWalker = (*MolOtherWalker)->start; 119 while (OtherWalker->next != (*MolOtherWalker)->end) { // only go up to Walker 120 OtherWalker = OtherWalker->next; 121 Log() << Verbose(3) << "Current otheratom is " << *OtherWalker << "." << endl; 122 if (Walker->nr < OtherWalker->nr) 123 if ((type2 == NULL) || (OtherWalker->type == type2)) { 124 periodicOtherX.CopyVector(OtherWalker->node); 112 for (molecule::const_iterator runner = (*MolOtherWalker)->begin(); runner != (*MolOtherWalker)->end(); ++runner) { 113 Log() << Verbose(3) << "Current otheratom is " << *(*runner) << "." << endl; 114 if ((*iter)->nr < (*runner)->nr) 115 if ((type2 == NULL) || ((*runner)->type == type2)) { 116 periodicOtherX.CopyVector((*runner)->node); 125 117 periodicOtherX.MatrixMultiplication(FullInverseMatrix); // x now in [0,1)^3 126 118 // go through every range in xyz and get distance … … 132 124 checkOtherX.MatrixMultiplication(FullMatrix); 133 125 distance = checkX.Distance(&checkOtherX); 134 //Log() << Verbose(1) <<"Inserting " << * Walker << " and " << *OtherWalker<< endl;135 outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> ( Walker, OtherWalker) ) );126 //Log() << Verbose(1) <<"Inserting " << *(*iter) << " and " << *(*runner) << endl; 127 outmap->insert ( pair<double, pair <atom *, atom*> > (distance, pair<atom *, atom*> ((*iter), (*runner)) ) ); 136 128 } 137 129 } … … 169 161 if ((*MolWalker)->ActiveFlag) { 170 162 Log() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl; 171 atom *Walker = (*MolWalker)->start; 172 while (Walker->next != (*MolWalker)->end) { 173 Walker = Walker->next; 174 Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl; 175 if ((type == NULL) || (Walker->type == type)) { 176 distance = Walker->node->PeriodicDistance(point, (*MolWalker)->cell_size); 163 for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) { 164 Log() << Verbose(3) << "Current atom is " << *(*iter) << "." << endl; 165 if ((type == NULL) || ((*iter)->type == type)) { 166 distance = (*iter)->node->PeriodicDistance(point, (*MolWalker)->cell_size); 177 167 Log() << Verbose(4) << "Current distance is " << distance << "." << endl; 178 outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> ( Walker, point) ) );168 outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> ((*iter), point) ) ); 179 169 } 180 170 } … … 211 201 double * FullInverseMatrix = InverseMatrix(FullMatrix); 212 202 Log() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl; 213 atom *Walker = (*MolWalker)->start; 214 while (Walker->next != (*MolWalker)->end) { 215 Walker = Walker->next; 216 Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl; 217 if ((type == NULL) || (Walker->type == type)) { 218 periodicX.CopyVector(Walker->node); 203 for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) { 204 Log() << Verbose(3) << "Current atom is " << *(*iter) << "." << endl; 205 if ((type == NULL) || ((*iter)->type == type)) { 206 periodicX.CopyVector((*iter)->node); 219 207 periodicX.MatrixMultiplication(FullInverseMatrix); // x now in [0,1)^3 220 208 // go through every range in xyz and get distance … … 227 215 distance = checkX.Distance(point); 228 216 Log() << Verbose(4) << "Current distance is " << distance << "." << endl; 229 outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> ( Walker, point) ) );217 outmap->insert ( pair<double, pair<atom *, const Vector*> >(distance, pair<atom *, const Vector*> ((*iter), point) ) ); 230 218 } 231 219 } … … 262 250 if ((*MolWalker)->ActiveFlag) { 263 251 Log() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl; 264 atom *Walker = (*MolWalker)->start; 265 while (Walker->next != (*MolWalker)->end) { 266 Walker = Walker->next; 267 Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl; 268 if ((type == NULL) || (Walker->type == type)) { 269 triangle = Surface->FindClosestTriangleToVector(Walker->node, LC ); 252 for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) { 253 Log() << Verbose(3) << "Current atom is " << *(*iter) << "." << endl; 254 if ((type == NULL) || ((*iter)->type == type)) { 255 triangle = Surface->FindClosestTriangleToVector((*iter)->node, LC ); 270 256 if (triangle != NULL) { 271 distance = DistanceToTrianglePlane( Walker->node, triangle);272 outmap->insert ( pair<double, pair<atom *, BoundaryTriangleSet*> >(distance, pair<atom *, BoundaryTriangleSet*> ( Walker, triangle) ) );257 distance = DistanceToTrianglePlane((*iter)->node, triangle); 258 outmap->insert ( pair<double, pair<atom *, BoundaryTriangleSet*> >(distance, pair<atom *, BoundaryTriangleSet*> ((*iter), triangle) ) ); 273 259 } 274 260 } … … 315 301 double * FullInverseMatrix = InverseMatrix(FullMatrix); 316 302 Log() << Verbose(2) << "Current molecule is " << *MolWalker << "." << endl; 317 atom *Walker = (*MolWalker)->start; 318 while (Walker->next != (*MolWalker)->end) { 319 Walker = Walker->next; 320 Log() << Verbose(3) << "Current atom is " << *Walker << "." << endl; 321 if ((type == NULL) || (Walker->type == type)) { 322 periodicX.CopyVector(Walker->node); 303 for (molecule::const_iterator iter = (*MolWalker)->begin(); iter != (*MolWalker)->end(); ++iter) { 304 Log() << Verbose(3) << "Current atom is " << *(*iter) << "." << endl; 305 if ((type == NULL) || ((*iter)->type == type)) { 306 periodicX.CopyVector((*iter)->node); 323 307 periodicX.MatrixMultiplication(FullInverseMatrix); // x now in [0,1)^3 324 308 // go through every range in xyz and get distance … … 339 323 // insert 340 324 ShortestDistance = sqrt(ShortestDistance); 341 outmap->insert ( pair<double, pair<atom *, BoundaryTriangleSet*> >(ShortestDistance, pair<atom *, BoundaryTriangleSet*> ( Walker, ShortestTriangle) ) );342 //Log() << Verbose(1) << "INFO: Inserting " << Walker<< " with distance " << ShortestDistance << " to " << *ShortestTriangle << "." << endl;325 outmap->insert ( pair<double, pair<atom *, BoundaryTriangleSet*> >(ShortestDistance, pair<atom *, BoundaryTriangleSet*> ((*iter), ShortestTriangle) ) ); 326 //Log() << Verbose(1) << "INFO: Inserting " << (*iter) << " with distance " << ShortestDistance << " to " << *ShortestTriangle << "." << endl; 343 327 } 344 328 }
Note:
See TracChangeset
for help on using the changeset viewer.
