Ignore:
Timestamp:
Aug 20, 2014, 1:06:16 PM (11 years ago)
Author:
Frederik Heber <heber@…>
Children:
ff72fb
Parents:
0b517b
git-author:
Frederik Heber <heber@…> (07/12/14 19:07:44)
git-committer:
Frederik Heber <heber@…> (08/20/14 13:06:16)
Message:

recurseMatching() now takes connections into account.

  • matchSphericalPointDistribution() replaced by getRemainingPoints() as that describes what it does. match...() sounds symmetrical which the function is no longer as connection is associated with former _newpolygon.
  • SphericalPointDistribution now has internal points and adjacency, initialized by initSelf().
  • findBestMatching() and getRemainingPoints() are no longer static functions.
  • all unit tests are working again, including the .._multiple() that tests for joint points due to bond degree greater than 1.
  • the huge case switch in SaturatedFragment::saturateAtom() now resides in initSelf().
File:
1 edited

Legend:

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

    r0b517b re6ca85  
    231231  // get perfect node distribution for the given remaining atoms with respect
    232232  // to valence of the atoms (for a saturated fragment, resembles number of bonds)
     233  // then get the number of vacant spots
    233234  SphericalPointDistribution polygonizer;
    234   SphericalPointDistribution::Polygon_t NewPolygon;
    235   switch (NumberOfPoints)
    236   {
    237     case 0:
    238       NewPolygon = polygonizer.get<0>();
    239       break;
    240     case 1:
    241       NewPolygon = polygonizer.get<1>();
    242       break;
    243     case 2:
    244       NewPolygon = polygonizer.get<2>();
    245       break;
    246     case 3:
    247       NewPolygon = polygonizer.get<3>();
    248       break;
    249     case 4:
    250       NewPolygon = polygonizer.get<4>();
    251       break;
    252     case 5:
    253       NewPolygon = polygonizer.get<5>();
    254       break;
    255     case 6:
    256       NewPolygon = polygonizer.get<6>();
    257       break;
    258     case 7:
    259       NewPolygon = polygonizer.get<7>();
    260       break;
    261     case 8:
    262       NewPolygon = polygonizer.get<8>();
    263       break;
    264     case 9:
    265       NewPolygon = polygonizer.get<9>();
    266       break;
    267     case 10:
    268       NewPolygon = polygonizer.get<10>();
    269       break;
    270     case 11:
    271       NewPolygon = polygonizer.get<11>();
    272       break;
    273     case 12:
    274       NewPolygon = polygonizer.get<12>();
    275       break;
    276     case 14:
    277       NewPolygon = polygonizer.get<14>();
    278       break;
    279     default:
    280       ASSERT(0, "SaturatedFragment::saturateAtom() - cannot deal with the case "
    281           +toString(NumberOfPoints)+".");
    282   }
    283   LOG(3, "DEBUG: Possible Polygon is " << NewPolygon);
    284 
    285   // then we need to match the old with the new
    286235  SphericalPointDistribution::Polygon_t RemainingPoints =
    287       SphericalPointDistribution::matchSphericalPointDistributions(Polygon, NewPolygon);
     236      polygonizer.getRemainingPoints(Polygon, NumberOfPoints);
    288237
    289238  LOG(3, "INFO: Points identified to fill are " << RemainingPoints);
Note: See TracChangeset for help on using the changeset viewer.