Ignore:
Timestamp:
Apr 28, 2021, 10:02:49 PM (5 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
e0e77e
Parents:
87c1cc
git-author:
Frederik Heber <frederik.heber@…> (04/17/21 09:41:33)
git-committer:
Frederik Heber <frederik.heber@…> (04/28/21 22:02:49)
Message:

SaturateAction may use outer shell information.

  • when considering the outer shell, then we look at both occupied and unoccupied orbitals. The ideal polygon will be created for the number of all orbitals, but only the unoccupied will be allowed to be taken by either present bonds or saturation hydrogens.
  • SphericalPointDistribution allows to occupy less than present points.
  • I have tested this manually by adding oxygen, saturation, adding carbon, saturating again, then turning oxygen into nitrogen and saturating. Results were always exactly as hoped for.
  • DOCU: Added note to action in userguide.
File:
1 edited

Legend:

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

    r87c1cc r2390e6  
    882882SphericalPointDistribution::getRemainingPoints(
    883883    const WeightedPolygon_t &_polygon,
    884     const int _N)
     884    const int _num_spots,
     885    const int _num_spots_available)
    885886{
    886887  SphericalPointDistribution::Polygon_t remainingpoints;
    887888
    888889  // initialze to given number of points
    889   initSelf(_N);
     890  initSelf(_num_spots);
    890891  LOG(2, "INFO: Matching old polygon " << _polygon
    891892      << " with new polygon " << points);
    892893
    893894  // check whether any points will remain vacant
    894   int RemainingPoints = _N;
     895  int RemainingPoints = _num_spots_available;
    895896  for (WeightedPolygon_t::const_iterator iter = _polygon.begin();
    896897      iter != _polygon.end(); ++iter)
     
    899900    return remainingpoints;
    900901
    901   if (_N > 0) {
     902  if (_num_spots_available > 0) {
    902903    IndexList_t bestmatching = findBestMatching(_polygon);
    903904    LOG(2, "INFO: Best matching is " << bestmatching);
     
    10241025    SphericalPointDistribution::Polygon_t remainingpoints =
    10251026        removeMatchingPoints(rotatednewSet);
     1027    // when less spots unoccupied than the ideal polygon has nodes, remove some
     1028    if (RemainingPoints < remainingpoints.size())
     1029      remainingpoints.resize(RemainingPoints);
    10261030    LOG(2, "INFO: Remaining points are " << remainingpoints);
    10271031    return remainingpoints;
Note: See TracChangeset for help on using the changeset viewer.