- Timestamp:
- Aug 30, 2025, 2:41:40 PM (2 months ago)
- Branches:
- Candidate_v1.7.0, stable
- Children:
- a4b917
- Parents:
- e83114
- git-author:
- Frederik Heber <frederik.heber@…> (08/17/25 20:24:43)
- git-committer:
- Frederik Heber <frederik.heber@…> (08/30/25 14:41:40)
- Location:
- src/Potentials
- Files:
-
- 18 edited
-
PotentialFactory.cpp (modified) (2 diffs)
-
PotentialFactory.hpp (modified) (1 diff)
-
Specifics/ConstantPotential.cpp (modified) (1 diff)
-
Specifics/ConstantPotential.hpp (modified) (1 diff)
-
Specifics/FourBodyPotential_Improper.cpp (modified) (1 diff)
-
Specifics/FourBodyPotential_Improper.hpp (modified) (1 diff)
-
Specifics/FourBodyPotential_Torsion.cpp (modified) (1 diff)
-
Specifics/FourBodyPotential_Torsion.hpp (modified) (1 diff)
-
Specifics/ManyBodyPotential_Tersoff.cpp (modified) (1 diff)
-
Specifics/ManyBodyPotential_Tersoff.hpp (modified) (1 diff)
-
Specifics/PairPotential_Harmonic.cpp (modified) (1 diff)
-
Specifics/PairPotential_Harmonic.hpp (modified) (1 diff)
-
Specifics/PairPotential_LennardJones.cpp (modified) (1 diff)
-
Specifics/PairPotential_LennardJones.hpp (modified) (1 diff)
-
Specifics/PairPotential_Morse.cpp (modified) (1 diff)
-
Specifics/PairPotential_Morse.hpp (modified) (1 diff)
-
Specifics/ThreeBodyPotential_Angle.cpp (modified) (1 diff)
-
Specifics/ThreeBodyPotential_Angle.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Potentials/PotentialFactory.cpp
re83114 ra0d8aa 108 108 "PotentialFactory::getNameForType() - cannot find potential of name "+_type); 109 109 return TypeToName[_type]; 110 } 111 112 unsigned int PotentialFactory::getPotentialsParticleTypeNumber(const std::string &_name) const { 113 EmpiricalPotential * const defaultPotential = getDefaultPotential(_name); 114 if (defaultPotential == NULL) 115 return 0; 116 const unsigned int particleTypeNumber = defaultPotential->getParticleTypeNumber(); 117 delete defaultPotential; 118 return particleTypeNumber; 110 119 } 111 120 … … 207 216 } 208 217 209 210 218 CONSTRUCT_SINGLETON(PotentialFactory) -
src/Potentials/PotentialFactory.hpp
re83114 ra0d8aa 69 69 const FunctionModel::parameters_t ¶ms) const; 70 70 71 /** Returns the number of particle types for the given potential. 72 * 73 * \param _name name of the potential 74 * \return number of particle types needed by the potential, 0 if potential unknown 75 */ 76 unsigned int getPotentialsParticleTypeNumber(const std::string &_name) const; 77 71 78 //!> typedef for map to lookup type for a given name 72 79 typedef std::map< std::string, enum PotentialTypes > NameToType_t; -
src/Potentials/Specifics/ConstantPotential.cpp
re83114 ra0d8aa 65 65 Coordinator::ptr ConstantPotential::coordinator( /* Memory::ignore( */ new OneBody_Constant() /*) */); 66 66 67 static BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 67 BindingModel ConstantPotential::generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) const 68 68 { 69 69 // fill nodes 70 ASSERT( _ParticleTypes.size() <= (size_t) 1,70 ASSERT( _ParticleTypes.size() <= (size_t)getParticleTypeNumber(), 71 71 "generateBindingModel() - ConstantPotential needs zero or one type."); 72 72 BindingModel::vector_nodes_t nodes; -
src/Potentials/Specifics/ConstantPotential.hpp
re83114 ra0d8aa 52 52 ConstantPotential(); 53 53 54 /** Creates the binding model specific for this potential. 55 * 56 * Private because this is used internally some of the constructors. 57 * 58 * \param _ParticleTypes particle type for the potential 59 * \return binding model 60 */ 61 BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) const; 62 54 63 public: 55 64 ConstantPotential(const ParticleTypes_t &_ParticleTypes); -
src/Potentials/Specifics/FourBodyPotential_Improper.cpp
re83114 ra0d8aa 53 53 Coordinator::ptr FourBodyPotential_Improper::coordinator( /* Memory::ignore( */ new FourBody_ImproperAngle() /* ) */ ); 54 54 55 static BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 55 BindingModel FourBodyPotential_Improper::generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) const 56 56 { 57 57 // fill nodes 58 58 BindingModel::vector_nodes_t nodes; 59 59 { 60 ASSERT( _ParticleTypes.size() == (size_t) 4,60 ASSERT( _ParticleTypes.size() == (size_t)getParticleTypeNumber(), 61 61 "generateBindingModel() - FourBodyPotential_Improper needs four types."); 62 62 nodes.push_back( FragmentNode(_ParticleTypes[0], 3) ); -
src/Potentials/Specifics/FourBodyPotential_Improper.hpp
re83114 ra0d8aa 43 43 */ 44 44 FourBodyPotential_Improper(); 45 46 /** Creates the binding model specific for this potential. 47 * 48 * Private because this is used internally some of the constructors. 49 * 50 * \param _ParticleTypes particle type for the potential 51 * \return binding model 52 */ 53 BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) const; 45 54 46 55 /** Returns the functor that converts argument_s into the -
src/Potentials/Specifics/FourBodyPotential_Torsion.cpp
re83114 ra0d8aa 66 66 Coordinator::ptr FourBodyPotential_Torsion::coordinator( /* Memory::ignore( */ new FourBody_TorsionAngle() /* ) */ ); 67 67 68 static BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 68 BindingModel FourBodyPotential_Torsion::generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) const 69 69 { 70 70 // fill nodes 71 71 BindingModel::vector_nodes_t nodes; 72 72 { 73 ASSERT( _ParticleTypes.size() == (size_t) 4,73 ASSERT( _ParticleTypes.size() == (size_t)getParticleTypeNumber(), 74 74 "generateBindingModel() - FourBodyPotential_Torsion needs four types."); 75 75 nodes.push_back( FragmentNode(_ParticleTypes[0], 1) ); -
src/Potentials/Specifics/FourBodyPotential_Torsion.hpp
re83114 ra0d8aa 53 53 FourBodyPotential_Torsion(); 54 54 55 /** Creates the binding model specific for this potential. 56 * 57 * Private because this is used internally some of the constructors. 58 * 59 * \param _ParticleTypes particle type for the potential 60 * \return binding model 61 */ 62 BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) const; 63 55 64 public: 56 65 FourBodyPotential_Torsion(const ParticleTypes_t &_ParticleTypes); -
src/Potentials/Specifics/ManyBodyPotential_Tersoff.cpp
re83114 ra0d8aa 82 82 Coordinator::ptr ManyBodyPotential_Tersoff::coordinator( /* Memory::ignore( */ new OneBody_Constant() /* ) */ ); 83 83 84 static BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 84 BindingModel ManyBodyPotential_Tersoff::generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) const 85 85 { 86 86 // fill nodes 87 87 BindingModel::vector_nodes_t nodes; 88 88 { 89 ASSERT( _ParticleTypes.size() == (size_t) 2,89 ASSERT( _ParticleTypes.size() == (size_t)getParticleTypeNumber(), 90 90 "generateBindingModel() - ManyBodyPotential_Tersoff needs two types."); 91 91 nodes.push_back( FragmentNode(_ParticleTypes[0], 1) ); -
src/Potentials/Specifics/ManyBodyPotential_Tersoff.hpp
re83114 ra0d8aa 52 52 ManyBodyPotential_Tersoff(); 53 53 54 /** Creates the binding model specific for this potential. 55 * 56 * Private because this is used internally some of the constructors. 57 * 58 * \param _ParticleTypes particle type for the potential 59 * \return binding model 60 */ 61 BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) const; 62 54 63 public: 55 64 /** Constructor for class ManyBodyPotential_Tersoff. -
src/Potentials/Specifics/PairPotential_Harmonic.cpp
re83114 ra0d8aa 67 67 Coordinator::ptr PairPotential_Harmonic::coordinator( /* Memory::ignore( */ new TwoBody_Length() /* ) */ ); 68 68 69 static BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 69 BindingModel PairPotential_Harmonic::generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) const 70 70 { 71 71 // fill nodes 72 72 BindingModel::vector_nodes_t nodes; 73 73 { 74 ASSERT( _ParticleTypes.size() == (size_t) 2,74 ASSERT( _ParticleTypes.size() == (size_t)getParticleTypeNumber(), 75 75 "generateBindingModel() - PairPotential_Harmonic needs two types."); 76 76 nodes.push_back( FragmentNode(_ParticleTypes[0], 1) ); -
src/Potentials/Specifics/PairPotential_Harmonic.hpp
re83114 ra0d8aa 51 51 PairPotential_Harmonic(); 52 52 53 /** Creates the binding model specific for this potential. 54 * 55 * Private because this is used internally some of the constructors. 56 * 57 * \param _ParticleTypes particle type for the potential 58 * \return binding model 59 */ 60 BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) const; 61 53 62 public: 54 63 PairPotential_Harmonic(const ParticleTypes_t &_ParticleTypes); -
src/Potentials/Specifics/PairPotential_LennardJones.cpp
re83114 ra0d8aa 67 67 Coordinator::ptr PairPotential_LennardJones::coordinator( /* Memory::ignore( */ new TwoBody_Length() /* ) */ ); 68 68 69 static BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 69 BindingModel PairPotential_LennardJones::generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) const 70 70 { 71 71 // fill nodes 72 72 BindingModel::vector_nodes_t nodes; 73 73 { 74 ASSERT( _ParticleTypes.size() == (size_t) 2,74 ASSERT( _ParticleTypes.size() == (size_t)getParticleTypeNumber(), 75 75 "generateBindingModel() - PairPotential_LennardJones needs two types."); 76 76 nodes.push_back( FragmentNode(_ParticleTypes[0], 1) ); -
src/Potentials/Specifics/PairPotential_LennardJones.hpp
re83114 ra0d8aa 52 52 PairPotential_LennardJones(); 53 53 54 /** Creates the binding model specific for this potential. 55 * 56 * Private because this is used internally some of the constructors. 57 * 58 * \param _ParticleTypes particle type for the potential 59 * \return binding model 60 */ 61 BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) const; 62 54 63 public: 55 64 PairPotential_LennardJones(const ParticleTypes_t &_ParticleTypes); -
src/Potentials/Specifics/PairPotential_Morse.cpp
re83114 ra0d8aa 69 69 Coordinator::ptr PairPotential_Morse::coordinator( /* Memory::ignore( */ new TwoBody_Length() /* ) */ ); 70 70 71 static BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 71 BindingModel PairPotential_Morse::generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) const 72 72 { 73 73 // fill nodes 74 74 BindingModel::vector_nodes_t nodes; 75 75 { 76 ASSERT( _ParticleTypes.size() == (size_t) 2,76 ASSERT( _ParticleTypes.size() == (size_t)getParticleTypeNumber(), 77 77 "generateBindingModel() - PairPotential_Morse needs two types."); 78 78 nodes.push_back( FragmentNode(_ParticleTypes[0], 1) ); -
src/Potentials/Specifics/PairPotential_Morse.hpp
re83114 ra0d8aa 51 51 PairPotential_Morse(); 52 52 53 /** Creates the binding model specific for this potential. 54 * 55 * Private because this is used internally some of the constructors. 56 * 57 * \param _ParticleTypes particle type for the potential 58 * \return binding model 59 */ 60 BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) const; 61 53 62 public: 54 63 PairPotential_Morse(const ParticleTypes_t &_ParticleTypes); -
src/Potentials/Specifics/ThreeBodyPotential_Angle.cpp
re83114 ra0d8aa 67 67 Coordinator::ptr ThreeBodyPotential_Angle::coordinator( /* Memory::ignore( */ new ThreeBody_Angle() /* ) */ ); 68 68 69 static BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 69 BindingModel ThreeBodyPotential_Angle::generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) const 70 70 { 71 71 // fill nodes 72 72 BindingModel::vector_nodes_t nodes; 73 73 { 74 ASSERT( _ParticleTypes.size() == (size_t) 3,74 ASSERT( _ParticleTypes.size() == (size_t)getParticleTypeNumber(), 75 75 "generateBindingModel() - ThreeBodyPotential_Angle needs three types."); 76 76 nodes.push_back( FragmentNode(_ParticleTypes[0], 1) ); -
src/Potentials/Specifics/ThreeBodyPotential_Angle.hpp
re83114 ra0d8aa 51 51 ThreeBodyPotential_Angle(); 52 52 53 /** Creates the binding model specific for this potential. 54 * 55 * Private because this is used internally some of the constructors. 56 * 57 * \param _ParticleTypes particle type for the potential 58 * \return binding model 59 */ 60 BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) const; 61 53 62 public: 54 63 ThreeBodyPotential_Angle(const ParticleTypes_t &_ParticleTypes);
Note:
See TracChangeset
for help on using the changeset viewer.
