Changeset 7e81ca for src/Fragmentation
- Timestamp:
- Sep 12, 2016, 2:03:15 PM (8 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_StructOpt_integration_tests, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, 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_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, GeometryObjects, Gui_displays_atomic_force_velocity, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, Ubuntu_1604_changes, stable
- Children:
- 946948
- Parents:
- 6cb1cd
- git-author:
- Frederik Heber <heber@…> (05/10/16 20:35:40)
- git-committer:
- Frederik Heber <heber@…> (09/12/16 14:03:15)
- Location:
- src/Fragmentation/Exporters
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/Exporters/SphericalPointDistribution.cpp
r6cb1cd r7e81ca 106 106 107 107 if (_Matching.size() > 1) { 108 // convert matching into two vectors to calculate distance among another108 LOG(3, "INFO: Matching is " << _Matching); 109 109 110 110 // calculate all pair-wise distances … … 127 127 errors.second += gap*gap; 128 128 } 129 } 129 } else 130 ELOG(2, "calculateErrorOfMatching() - Given matching is empty."); 131 LOG(3, "INFO: Resulting errors for matching (L1, L2): " 132 << errors.first << "," << errors.second << "."); 130 133 131 134 return errors; … … 140 143 IndexArray_t indices(_matchingindices.begin(), _matchingindices.end()); 141 144 std::sort(indices.begin(), indices.end()); 145 LOG(4, "DEBUG: sorted matching is " << indices); 142 146 IndexArray_t::const_iterator valueiter = indices.begin(); 143 147 SphericalPointDistribution::Polygon_t::const_iterator pointiter = … … 150 154 remainingreturnpolygon.push_back(*pointiter); 151 155 } 156 LOG(4, "DEBUG: remaining indices are " << remainingreturnpolygon); 152 157 153 158 return remainingreturnpolygon; … … 177 182 "rotatePolygon() - not exactly "+toString(3)+" angles given."); 178 183 rotation.setRotation(_angles[0] * M_PI/180., _angles[1] * M_PI/180., _angles[2] * M_PI/180.); 184 LOG(4, "DEBUG: Rotation matrix is " << rotation); 179 185 180 186 // apply rotation angles … … 209 215 unsigned int _matchingsize) 210 216 { 217 LOG(4, "DEBUG: Recursing with current matching " << _matching 218 << ", remaining indices " << _indices 219 << ", and sought size " << _matchingsize); 211 220 //!> threshold for L1 error below which matching is immediately acceptable 212 221 const double L1THRESHOLD = 1e-2; 213 222 if (!_MCS.foundflag) { 223 LOG(3, "INFO: Current matching has size " << _matching.size() << " of " << _matchingsize); 214 224 if (_matching.size() < _matchingsize) { 215 225 // go through all indices … … 218 228 // add index to matching 219 229 _matching.push_back(*iter); 230 LOG(4, "DEBUG: Adding " << *iter << " to matching."); 220 231 // remove index but keep iterator to position (is the next to erase element) 221 232 IndexList_t::iterator backupiter = _indices.erase(iter); … … 231 242 _MCS.foundflag = true; 232 243 } else { 244 LOG(3, "INFO: Found matching " << _matching); 233 245 // calculate errors 234 246 std::pair<double, double> errors = calculateErrorOfMatching( … … 255 267 VectorArray_t remainingold(_polygon.begin(), _polygon.end()); 256 268 VectorArray_t remainingnew(_newpolygon.begin(), _newpolygon.end()); 269 LOG(3, "INFO: Matching old polygon " << _polygon 270 << " with new polygon " << _newpolygon); 257 271 258 272 if (_polygon.size() > 0) { … … 276 290 recurseMatchings(MCS, matching, indices, matchingsize); 277 291 } 292 LOG(3, "INFO: Best matching is " << MCS.bestmatching); 278 293 279 294 // determine rotation angles to align the two point distributions with … … 292 307 oldCenter *= 1./(double)i; 293 308 newCenter *= 1./(double)i; 309 LOG(3, "INFO: oldCenter is " << oldCenter << ", newCenter is " << newCenter); 294 310 295 311 Vector direction(0.,0.,0.); -
src/Fragmentation/Exporters/SphericalPointDistribution.hpp
r6cb1cd r7e81ca 73 73 ); 74 74 75 76 75 //!> default radius of the spherical distribution 77 76 const double Bondlength;
Note:
See TracChangeset
for help on using the changeset viewer.