Changeset 7e81ca for src/Fragmentation


Ignore:
Timestamp:
Sep 12, 2016, 2:03:15 PM (8 years ago)
Author:
Frederik Heber <heber@…>
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)
Message:

Added Logging to SphericalPointDistribution for debugging.

Location:
src/Fragmentation/Exporters
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/Exporters/SphericalPointDistribution.cpp

    r6cb1cd r7e81ca  
    106106
    107107  if (_Matching.size() > 1) {
    108     // convert matching into two vectors to calculate distance among another
     108    LOG(3, "INFO: Matching is " << _Matching);
    109109
    110110    // calculate all pair-wise distances
     
    127127      errors.second += gap*gap;
    128128    }
    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 << ".");
    130133
    131134  return errors;
     
    140143  IndexArray_t indices(_matchingindices.begin(), _matchingindices.end());
    141144  std::sort(indices.begin(), indices.end());
     145  LOG(4, "DEBUG: sorted matching is " << indices);
    142146  IndexArray_t::const_iterator valueiter = indices.begin();
    143147  SphericalPointDistribution::Polygon_t::const_iterator pointiter =
     
    150154      remainingreturnpolygon.push_back(*pointiter);
    151155  }
     156  LOG(4, "DEBUG: remaining indices are " << remainingreturnpolygon);
    152157
    153158  return remainingreturnpolygon;
     
    177182      "rotatePolygon() - not exactly "+toString(3)+" angles given.");
    178183  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);
    179185
    180186  // apply rotation angles
     
    209215    unsigned int _matchingsize)
    210216{
     217  LOG(4, "DEBUG: Recursing with current matching " << _matching
     218      << ", remaining indices " << _indices
     219      << ", and sought size " << _matchingsize);
    211220  //!> threshold for L1 error below which matching is immediately acceptable
    212221  const double L1THRESHOLD = 1e-2;
    213222  if (!_MCS.foundflag) {
     223    LOG(3, "INFO: Current matching has size " << _matching.size() << " of " << _matchingsize);
    214224    if (_matching.size() < _matchingsize) {
    215225      // go through all indices
     
    218228        // add index to matching
    219229        _matching.push_back(*iter);
     230        LOG(4, "DEBUG: Adding " << *iter << " to matching.");
    220231        // remove index but keep iterator to position (is the next to erase element)
    221232        IndexList_t::iterator backupiter = _indices.erase(iter);
     
    231242      _MCS.foundflag = true;
    232243    } else {
     244      LOG(3, "INFO: Found matching " << _matching);
    233245      // calculate errors
    234246      std::pair<double, double> errors = calculateErrorOfMatching(
     
    255267  VectorArray_t remainingold(_polygon.begin(), _polygon.end());
    256268  VectorArray_t remainingnew(_newpolygon.begin(), _newpolygon.end());
     269  LOG(3, "INFO: Matching old polygon " << _polygon
     270      << " with new polygon " << _newpolygon);
    257271
    258272  if (_polygon.size() > 0) {
     
    276290      recurseMatchings(MCS, matching, indices, matchingsize);
    277291    }
     292    LOG(3, "INFO: Best matching is " << MCS.bestmatching);
    278293
    279294    // determine rotation angles to align the two point distributions with
     
    292307      oldCenter *= 1./(double)i;
    293308      newCenter *= 1./(double)i;
     309      LOG(3, "INFO: oldCenter is " << oldCenter << ", newCenter is " << newCenter);
    294310
    295311      Vector direction(0.,0.,0.);
  • src/Fragmentation/Exporters/SphericalPointDistribution.hpp

    r6cb1cd r7e81ca  
    7373      );
    7474
    75 
    7675  //!> default radius of the spherical distribution
    7776  const double Bondlength;
Note: See TracChangeset for help on using the changeset viewer.