Ignore:
Timestamp:
May 25, 2016, 7:13:58 AM (9 years ago)
Author:
Frederik Heber <heber@…>
Children:
7e9402
Parents:
6cf5bb
git-author:
Frederik Heber <heber@…> (06/29/14 18:02:32)
git-committer:
Frederik Heber <heber@…> (05/25/16 07:13:58)
Message:

Extended SphericalPointDistribution::Polygon_t to WeightedPolygon_t.

  • contains additionally the weights from the already present points.
  • in order to deal sensibly with present bonds of higher degree (>1) that shift neighboring occupied orbitals even further away, we additionally pass on the bond degree. This indicates how many points of the N points have to be accumulated for this on present bond.
  • TESTS: Regression test FragmentMolecule-cylces failing for the moment.
File:
1 edited

Legend:

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

    r6cf5bb r80c119  
    255255 */
    256256SphericalPointDistribution::IndexList_t SphericalPointDistribution::findBestMatching(
    257     const SphericalPointDistribution::Polygon_t &_polygon,
     257    const SphericalPointDistribution::WeightedPolygon_t &_polygon,
    258258    const SphericalPointDistribution::Polygon_t &_newpolygon
    259259    )
     
    262262  MCS.foundflag = false;
    263263  MCS.bestL2 = std::numeric_limits<double>::max();
    264   MCS.oldpoints.insert(MCS.oldpoints.begin(), _polygon.begin(),_polygon.end() );
     264  for (WeightedPolygon_t::const_iterator iter = _polygon.begin();
     265      iter != _polygon.end(); ++iter)
     266    MCS.oldpoints.push_back(iter->first);
    265267  MCS.newpoints.insert(MCS.newpoints.begin(), _newpolygon.begin(),_newpolygon.end() );
    266268
     
    490492SphericalPointDistribution::Polygon_t
    491493SphericalPointDistribution::matchSphericalPointDistributions(
    492     const SphericalPointDistribution::Polygon_t &_polygon,
     494    const SphericalPointDistribution::WeightedPolygon_t &_polygon,
    493495    const SphericalPointDistribution::Polygon_t &_newpolygon
    494496    )
    495497{
    496   SphericalPointDistribution::Polygon_t remainingreturnpolygon;
    497   VectorArray_t remainingold(_polygon.begin(), _polygon.end());
     498  SphericalPointDistribution::Polygon_t remainingpoints;
     499  VectorArray_t remainingold;
     500  for (WeightedPolygon_t::const_iterator iter = _polygon.begin();
     501      iter != _polygon.end(); ++iter)
     502    remainingold.push_back(iter->first);
    498503  VectorArray_t remainingnew(_newpolygon.begin(), _newpolygon.end());
    499504  LOG(2, "INFO: Matching old polygon " << _polygon
     
    503508    // same number of points desired as are present? Do nothing
    504509    LOG(2, "INFO: There are no vacant points to return.");
    505     return remainingreturnpolygon;
     510    return remainingpoints;
    506511  }
    507512
Note: See TracChangeset for help on using the changeset viewer.