Ignore:
Timestamp:
Oct 2, 2016, 2:03:57 PM (9 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Fix_FitPotential_needs_atomicnumbers
Children:
be20db
Parents:
6ffdf2
Message:

FIX: TrainingData used charges instead of atomic numbers to recognize fragments.

  • this only works if we do not DoSampleValenceOnly. Otherwise charges are no longer directly associable with the atomic number of the nuclei.
  • Extractors::gatherAllSymmetricDistanceArguments now needs atomicnumbers instead of charges.
  • TESTFIX: needed to adapt ExtractorsUnitTest.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/FunctionApproximation/Extractors.cpp

    r6ffdf2 rc93e58  
    5959Extractors::gatherAllSymmetricDistanceArguments(
    6060    const Fragment::positions_t& positions,
    61     const Fragment::charges_t& charges,
     61    const Fragment::atomicnumbers_t& atomicnumbers,
    6262    const size_t globalid)
    6363{
     
    7676      arg.distance = firsttemp.distance(secondtemp);
    7777      arg.types = std::make_pair(
    78           charges[ std::distance(positions.begin(), firstpositer) ],
    79           charges[ std::distance(positions.begin(), secondpositer) ]
     78          (int)atomicnumbers[ std::distance(positions.begin(), firstpositer) ],
     79          (int)atomicnumbers[ std::distance(positions.begin(), secondpositer) ]
    8080          );
    8181      arg.indices = std::make_pair(
Note: See TracChangeset for help on using the changeset viewer.