- Timestamp:
- May 19, 2021, 7:06:29 PM (4 years ago)
- Branches:
- Candidate_v1.7.0, stable
- Children:
- 20fc6f
- Parents:
- c98620
- git-author:
- Frederik Heber <frederik.heber@…> (05/19/21 19:03:24)
- git-committer:
- Frederik Heber <frederik.heber@…> (05/19/21 19:06:29)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/PotentialAction/GeneratePotentialsAction.cpp
rc98620 r9b0dcd 43 43 #include <string> 44 44 45 #include <boost/foreach.hpp> 46 45 47 #include "Actions/PotentialAction/GeneratePotentialsAction.hpp" 46 48 … … 80 82 } 81 83 84 // gather list of potential candidates 85 std::vector<std::string> potentials; 86 if (!params.potential_list.isSet()) { 87 for (unsigned int i=0; i<PotentialTypesMax; ++i) 88 potentials.push_back(PotentialFactory::getNameForType((enum PotentialTypes)i)); 89 } else 90 potentials = params.potential_list.get(); 91 82 92 // go through all potential potentials :)4 83 93 const PotentialFactory& factory = PotentialFactory::getConstInstance(); … … 86 96 typedef std::set<BindingModel> unique_models_t; 87 97 unique_models_t unique_models; 88 for (unsigned int i=0; i<PotentialTypesMax; ++i) { 89 const std::string potential_name = PotentialFactory::getNameForType((enum PotentialTypes)i); 98 BOOST_FOREACH(std::string &potential_name, potentials) { 90 99 unique_models.clear(); 91 100 … … 102 111 103 112 // first need to construct potential, then may access it 104 EmpiricalPotential const * const defaultPotential = factory.getDefaultPotential((enum PotentialTypes)i); 113 const enum PotentialTypes potential_type = factory.getTypeForName(potential_name); 114 EmpiricalPotential const * const defaultPotential = factory.getDefaultPotential(potential_type); 105 115 /// 1. get its number of particles 106 116 const unsigned int num_particles = defaultPotential->getParticleTypeNumber();
Note:
See TracChangeset
for help on using the changeset viewer.
