Ignore:
Timestamp:
Aug 30, 2025, 2:41:40 PM (2 months ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
a0d8aa
Parents:
72b6d7
git-author:
Frederik Heber <frederik.heber@…> (08/16/25 10:32:39)
git-committer:
Frederik Heber <frederik.heber@…> (08/30/25 14:41:40)
Message:

StreamFactory_EmpiricalPotential creates potential instances with params.

  • EmpiricalPotential expose getter and setter for parameters.
  • potential and stream factor for EmpiricalPotential have new createInstance that also takes a present parameter set.
  • this is used in StreamFactory_EmpiricalPotential::createInstance from istream to create the correct instance with parameters directly.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Potentials/StreamFactory_EmpiricalPotential.cpp

    r72b6d7 re83114  
    5656    potential->stream_from(serialized);
    5757    // then create a proper instance which also has the correct BindingModel
    58     full_potential = createInstance(potentialtype, potential->getParticleTypes());
    59     // finally, serialize&deserialize parameters from default into the full instance
    60     std::stringstream parameter_stream;
    61     potential->stream_to(parameter_stream);
    62     full_potential->stream_from(parameter_stream);
     58    full_potential = createInstance(potentialtype, potential->getParticleTypes(), potential->getParameters());
    6359    LOG(3, "Deserialized full potential: " << *full_potential);
    6460    delete potential;
Note: See TracChangeset for help on using the changeset viewer.