Changeset 5a255af for src/Potentials/StreamFactory_EmpiricalPotential.cpp
- Timestamp:
- Aug 30, 2025, 2:41:40 PM (2 months ago)
- Branches:
- Candidate_v1.7.0, stable
- Children:
- 72b6d7
- Parents:
- 476781
- git-author:
- Frederik Heber <frederik.heber@…> (08/15/25 21:55:25)
- git-committer:
- Frederik Heber <frederik.heber@…> (08/30/25 14:41:40)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Potentials/StreamFactory_EmpiricalPotential.cpp
r476781 r5a255af 49 49 std::istream &serialized) const 50 50 { 51 EmpiricalPotential * full_potential ;51 EmpiricalPotential * full_potential = NULL; 52 52 // now stream in types and parameters 53 53 try { 54 // first, deserialize into a default potential for the correct particle types 54 55 EmpiricalPotential * const potential = getDefaultPotential(potentialtype); 55 56 potential->stream_from(serialized); 56 // also need to generate the binding model57 // then create a proper instance which also has the correct BindingModel 57 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); 63 LOG(3, "Deserialized full potential: " << *full_potential); 58 64 delete potential; 59 65 } catch (SerializerMissingValueException &e) {
Note:
See TracChangeset
for help on using the changeset viewer.
