Changeset 9c793c for src/Potentials
- Timestamp:
- Nov 11, 2016, 2:25:36 PM (8 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_StructOpt_integration_tests, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_ChronosMutex, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, GeometryObjects, Gui_displays_atomic_force_velocity, IndependentFragmentGrids_IntegrationTest, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, RotateToPrincipalAxisSystem_UndoRedo, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, ThirdParty_MPQC_rebuilt_buildsystem, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, Ubuntu_1604_changes, stable
- Children:
- f5dbea
- Parents:
- bc069f
- git-author:
- Frederik Heber <heber@…> (10/05/16 21:33:40)
- git-committer:
- Frederik Heber <heber@…> (11/11/16 14:25:36)
- Location:
- src/Potentials
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Potentials/EmpiricalPotential.hpp
rbc069f r9c793c 17 17 #include <vector> 18 18 19 #include "Fragmentation/Homology/HomologyGraph.hpp"20 19 #include "FunctionApproximation/FunctionArgument.hpp" 21 20 #include "FunctionApproximation/FunctionModel.hpp" 21 #include "Potentials/BindingModel.hpp" 22 22 #include "Potentials/SerializablePotential.hpp" 23 23 #include "Potentials/InternalCoordinates/Coordinator.hpp" … … 84 84 /** Getter for the graph specifying the binding model of the potential. 85 85 * 86 * \return HomologyGraphof the binding model86 * \return BindingModel ref of the binding model 87 87 */ 88 virtual const HomologyGraph& getBindingModel() const=0;88 virtual const BindingModel& getBindingModel() const=0; 89 89 90 90 protected: -
src/Potentials/Specifics/ConstantPotential.cpp
rbc069f r9c793c 65 65 Coordinator::ptr ConstantPotential::coordinator(Memory::ignore(new OneBody_Constant())); 66 66 67 static HomologyGraphgenerateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes)67 static BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 68 68 { 69 69 // fill nodes 70 70 ASSERT( _ParticleTypes.size() <= (size_t)1, 71 71 "generateBindingModel() - ConstantPotential needs zero or one type."); 72 HomologyGraph::nodes_t nodes;72 BindingModel::vector_nodes_t nodes; 73 73 if (_ParticleTypes.size() == (size_t)1) 74 nodes. insert( std::make_pair(FragmentNode(_ParticleTypes.front(), 0), 1) );74 nodes.push_back( FragmentNode(_ParticleTypes.front(), 0) ); 75 75 76 76 // there are no edges 77 77 HomologyGraph::edges_t edges; 78 78 79 return HomologyGraph(nodes, edges);79 return BindingModel(nodes, edges); 80 80 } 81 81 … … 83 83 EmpiricalPotential(), 84 84 params(parameters_t(MAXPARAMS, 0.)), 85 bindingmodel( HomologyGraph())85 bindingmodel(BindingModel()) 86 86 { 87 87 // have some decent defaults for parameter_derivative checking -
src/Potentials/Specifics/ConstantPotential.hpp
rbc069f r9c793c 186 186 /** Getter for the graph specifying the binding model of the potential. 187 187 * 188 * \return HomologyGraphof the binding model189 */ 190 const HomologyGraph& getBindingModel() const188 * \return BindingModel ref of the binding model 189 */ 190 const BindingModel& getBindingModel() const 191 191 { return bindingmodel; } 192 192 … … 205 205 206 206 //!> binding model for this potential 207 const HomologyGraphbindingmodel;207 const BindingModel bindingmodel; 208 208 }; 209 209 -
src/Potentials/Specifics/FourBodyPotential_Improper.cpp
rbc069f r9c793c 53 53 Coordinator::ptr FourBodyPotential_Improper::coordinator(Memory::ignore(new FourBody_ImproperAngle())); 54 54 55 static HomologyGraphgenerateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes)55 static BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 56 56 { 57 57 // fill nodes 58 HomologyGraph::nodes_t nodes;58 BindingModel::vector_nodes_t nodes; 59 59 { 60 60 ASSERT( _ParticleTypes.size() == (size_t)4, 61 61 "generateBindingModel() - FourBodyPotential_Improper needs four types."); 62 std::pair<HomologyGraph::nodes_t::iterator, bool > inserter; 63 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[0], 3), 1) ); 64 if (!inserter.second) 65 ++(inserter.first->second); 66 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[1], 1), 1) ); 67 if (!inserter.second) 68 ++(inserter.first->second); 69 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[2], 1), 1) ); 70 if (!inserter.second) 71 ++(inserter.first->second); 72 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[3], 1), 1) ); 73 if (!inserter.second) 74 ++(inserter.first->second); 62 nodes.push_back( FragmentNode(_ParticleTypes[0], 3) ); 63 nodes.push_back( FragmentNode(_ParticleTypes[1], 1) ); 64 nodes.push_back( FragmentNode(_ParticleTypes[2], 1) ); 65 nodes.push_back( FragmentNode(_ParticleTypes[3], 1) ); 75 66 } 76 67 … … 90 81 } 91 82 92 return HomologyGraph(nodes, edges);83 return BindingModel(nodes, edges); 93 84 } 94 85 95 86 FourBodyPotential_Improper::FourBodyPotential_Improper() : 96 87 FourBodyPotential_Torsion(), 97 bindingmodel( HomologyGraph())88 bindingmodel(BindingModel()) 98 89 {} 99 90 -
src/Potentials/Specifics/FourBodyPotential_Improper.hpp
rbc069f r9c793c 62 62 /** Getter for the graph specifying the binding model of the potential. 63 63 * 64 * \return HomologyGraphof the binding model64 * \return BindingModel ref of the binding model 65 65 */ 66 const HomologyGraph& getBindingModel() const66 const BindingModel& getBindingModel() const 67 67 { return bindingmodel; } 68 68 … … 89 89 90 90 //!> binding model for this potential 91 const HomologyGraphbindingmodel;91 const BindingModel bindingmodel; 92 92 }; 93 93 -
src/Potentials/Specifics/FourBodyPotential_Torsion.cpp
rbc069f r9c793c 66 66 Coordinator::ptr FourBodyPotential_Torsion::coordinator(Memory::ignore(new FourBody_TorsionAngle())); 67 67 68 static HomologyGraphgenerateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes)68 static BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 69 69 { 70 70 // fill nodes 71 HomologyGraph::nodes_t nodes;71 BindingModel::vector_nodes_t nodes; 72 72 { 73 73 ASSERT( _ParticleTypes.size() == (size_t)4, 74 74 "generateBindingModel() - FourBodyPotential_Torsion needs four types."); 75 std::pair<HomologyGraph::nodes_t::iterator, bool > inserter; 76 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[0], 1), 1) ); 77 if (!inserter.second) 78 ++(inserter.first->second); 79 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[1], 2), 1) ); 80 if (!inserter.second) 81 ++(inserter.first->second); 82 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[2], 2), 1) ); 83 if (!inserter.second) 84 ++(inserter.first->second); 85 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[3], 1), 1) ); 86 if (!inserter.second) 87 ++(inserter.first->second); 75 nodes.push_back( FragmentNode(_ParticleTypes[0], 1) ); 76 nodes.push_back( FragmentNode(_ParticleTypes[1], 2) ); 77 nodes.push_back( FragmentNode(_ParticleTypes[2], 2) ); 78 nodes.push_back( FragmentNode(_ParticleTypes[3], 1) ); 88 79 } 89 80 … … 103 94 } 104 95 105 return HomologyGraph(nodes, edges);96 return BindingModel(nodes, edges); 106 97 } 107 98 … … 109 100 EmpiricalPotential(), 110 101 params(parameters_t(MAXPARAMS, 0.)), 111 bindingmodel( HomologyGraph())102 bindingmodel(BindingModel()) 112 103 { 113 104 // have some decent defaults for parameter_derivative checking -
src/Potentials/Specifics/FourBodyPotential_Torsion.hpp
rbc069f r9c793c 193 193 /** Getter for the graph specifying the binding model of the potential. 194 194 * 195 * \return HomologyGraphof the binding model196 */ 197 const HomologyGraph& getBindingModel() const195 * \return BindingModel ref of the binding model 196 */ 197 const BindingModel& getBindingModel() const 198 198 { return bindingmodel; } 199 199 … … 221 221 222 222 //!> binding model for this potential 223 const HomologyGraphbindingmodel;223 const BindingModel bindingmodel; 224 224 }; 225 225 -
src/Potentials/Specifics/ManyBodyPotential_Tersoff.cpp
rbc069f r9c793c 82 82 Coordinator::ptr ManyBodyPotential_Tersoff::coordinator(Memory::ignore(new OneBody_Constant())); 83 83 84 static HomologyGraphgenerateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes)84 static BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 85 85 { 86 86 // fill nodes 87 HomologyGraph::nodes_t nodes;87 BindingModel::vector_nodes_t nodes; 88 88 { 89 89 ASSERT( _ParticleTypes.size() == (size_t)2, 90 90 "generateBindingModel() - ManyBodyPotential_Tersoff needs two types."); 91 std::pair<HomologyGraph::nodes_t::iterator, bool > inserter; 92 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[0], 1), 1) ); 93 if (!inserter.second) 94 ++(inserter.first->second); 95 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[1], 1), 1) ); 96 if (!inserter.second) 97 ++(inserter.first->second); 91 nodes.push_back( FragmentNode(_ParticleTypes[0], 1) ); 92 nodes.push_back( FragmentNode(_ParticleTypes[1], 1) ); 98 93 } 99 94 … … 104 99 } 105 100 106 return HomologyGraph(nodes, edges);101 return BindingModel(nodes, edges); 107 102 } 108 103 … … 117 112 omega(1.), 118 113 triplefunction(&Helpers::NoOp_Triplefunction), 119 bindingmodel( HomologyGraph())114 bindingmodel(BindingModel()) 120 115 {} 121 116 -
src/Potentials/Specifics/ManyBodyPotential_Tersoff.hpp
rbc069f r9c793c 215 215 /** Getter for the graph specifying the binding model of the potential. 216 216 * 217 * \return HomologyGraphof the binding model218 */ 219 const HomologyGraph& getBindingModel() const217 * \return BindingModel ref of the binding model 218 */ 219 const BindingModel& getBindingModel() const 220 220 { return bindingmodel; } 221 221 … … 372 372 373 373 //!> binding model for this potential 374 const HomologyGraphbindingmodel;374 const BindingModel bindingmodel; 375 375 }; 376 376 -
src/Potentials/Specifics/PairPotential_Harmonic.cpp
rbc069f r9c793c 67 67 Coordinator::ptr PairPotential_Harmonic::coordinator(Memory::ignore(new TwoBody_Length())); 68 68 69 static HomologyGraphgenerateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes)69 static BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 70 70 { 71 71 // fill nodes 72 HomologyGraph::nodes_t nodes;72 BindingModel::vector_nodes_t nodes; 73 73 { 74 74 ASSERT( _ParticleTypes.size() == (size_t)2, 75 75 "generateBindingModel() - PairPotential_Harmonic needs two types."); 76 std::pair<HomologyGraph::nodes_t::iterator, bool > inserter; 77 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[0], 1), 1) ); 78 if (!inserter.second) 79 ++(inserter.first->second); 80 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[1], 1), 1) ); 81 if (!inserter.second) 82 ++(inserter.first->second); 76 nodes.push_back( FragmentNode(_ParticleTypes[0], 1) ); 77 nodes.push_back( FragmentNode(_ParticleTypes[1], 1) ); 83 78 } 84 79 … … 89 84 } 90 85 91 return HomologyGraph(nodes, edges);86 return BindingModel(nodes, edges); 92 87 } 93 88 … … 95 90 EmpiricalPotential(), 96 91 params(parameters_t(MAXPARAMS, 0.)), 97 bindingmodel( HomologyGraph())92 bindingmodel(BindingModel()) 98 93 { 99 94 // have some decent defaults for parameter_derivative checking -
src/Potentials/Specifics/PairPotential_Harmonic.hpp
rbc069f r9c793c 188 188 /** Getter for the graph specifying the binding model of the potential. 189 189 * 190 * \return HomologyGraphof the binding model191 */ 192 const HomologyGraph& getBindingModel() const190 * \return BindingModel ref of the binding model 191 */ 192 const BindingModel& getBindingModel() const 193 193 { return bindingmodel; } 194 194 … … 207 207 208 208 //!> binding model for this potential 209 const HomologyGraphbindingmodel;209 const BindingModel bindingmodel; 210 210 }; 211 211 -
src/Potentials/Specifics/PairPotential_LennardJones.cpp
rbc069f r9c793c 67 67 Coordinator::ptr PairPotential_LennardJones::coordinator(Memory::ignore(new TwoBody_Length())); 68 68 69 static HomologyGraphgenerateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes)69 static BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 70 70 { 71 71 // fill nodes 72 HomologyGraph::nodes_t nodes;72 BindingModel::vector_nodes_t nodes; 73 73 { 74 74 ASSERT( _ParticleTypes.size() == (size_t)2, 75 75 "generateBindingModel() - PairPotential_LennardJones needs two types."); 76 std::pair<HomologyGraph::nodes_t::iterator, bool > inserter; 77 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[0], 1), 1) ); 78 if (!inserter.second) 79 ++(inserter.first->second); 80 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[1], 1), 1) ); 81 if (!inserter.second) 82 ++(inserter.first->second); 76 nodes.push_back( FragmentNode(_ParticleTypes[0], 1) ); 77 nodes.push_back( FragmentNode(_ParticleTypes[1], 1) ); 83 78 } 84 79 … … 86 81 HomologyGraph::edges_t edges; 87 82 88 return HomologyGraph(nodes, edges);83 return BindingModel(nodes, edges); 89 84 } 90 85 … … 98 93 EmpiricalPotential(), 99 94 params(parameters_t(MAXPARAMS, 0.)), 100 bindingmodel( HomologyGraph())95 bindingmodel(BindingModel()) 101 96 { 102 97 // have some decent defaults for parameter_derivative checking -
src/Potentials/Specifics/PairPotential_LennardJones.hpp
rbc069f r9c793c 189 189 /** Getter for the graph specifying the binding model of the potential. 190 190 * 191 * \return HomologyGraphof the binding model192 */ 193 const HomologyGraph& getBindingModel() const191 * \return BindingModel ref of the binding model 192 */ 193 const BindingModel& getBindingModel() const 194 194 { return bindingmodel; } 195 195 … … 214 214 215 215 //!> binding model for this potential 216 const HomologyGraphbindingmodel;216 const BindingModel bindingmodel; 217 217 }; 218 218 -
src/Potentials/Specifics/PairPotential_Morse.cpp
rbc069f r9c793c 69 69 Coordinator::ptr PairPotential_Morse::coordinator(Memory::ignore(new TwoBody_Length())); 70 70 71 static HomologyGraphgenerateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes)71 static BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 72 72 { 73 73 // fill nodes 74 HomologyGraph::nodes_t nodes;74 BindingModel::vector_nodes_t nodes; 75 75 { 76 76 ASSERT( _ParticleTypes.size() == (size_t)2, 77 77 "generateBindingModel() - PairPotential_Morse needs two types."); 78 std::pair<HomologyGraph::nodes_t::iterator, bool > inserter; 79 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[0], 1), 1) ); 80 if (!inserter.second) 81 ++(inserter.first->second); 82 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[1], 1), 1) ); 83 if (!inserter.second) 84 ++(inserter.first->second); 78 nodes.push_back( FragmentNode(_ParticleTypes[0], 1) ); 79 nodes.push_back( FragmentNode(_ParticleTypes[1], 1) ); 85 80 } 86 81 … … 91 86 } 92 87 93 return HomologyGraph(nodes, edges);88 return BindingModel(nodes, edges); 94 89 } 95 90 … … 97 92 EmpiricalPotential(), 98 93 params(parameters_t(MAXPARAMS, 0.)), 99 bindingmodel( HomologyGraph())94 bindingmodel(BindingModel()) 100 95 { 101 96 // have some decent defaults for parameter_derivative checking -
src/Potentials/Specifics/PairPotential_Morse.hpp
rbc069f r9c793c 190 190 /** Getter for the graph specifying the binding model of the potential. 191 191 * 192 * \return HomologyGraphof the binding model193 */ 194 const HomologyGraph& getBindingModel() const192 * \return BindingModel ref of the binding model 193 */ 194 const BindingModel& getBindingModel() const 195 195 { return bindingmodel; } 196 196 … … 209 209 210 210 //!> binding model for this potential 211 const HomologyGraphbindingmodel;211 const BindingModel bindingmodel; 212 212 }; 213 213 -
src/Potentials/Specifics/ThreeBodyPotential_Angle.cpp
rbc069f r9c793c 67 67 Coordinator::ptr ThreeBodyPotential_Angle::coordinator(Memory::ignore(new ThreeBody_Angle())); 68 68 69 static HomologyGraphgenerateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes)69 static BindingModel generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 70 70 { 71 71 // fill nodes 72 HomologyGraph::nodes_t nodes;72 BindingModel::vector_nodes_t nodes; 73 73 { 74 74 ASSERT( _ParticleTypes.size() == (size_t)3, 75 75 "generateBindingModel() - ThreeBodyPotential_Angle needs three types."); 76 std::pair<HomologyGraph::nodes_t::iterator, bool > inserter; 77 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[0], 1), 1) ); 78 if (!inserter.second) 79 ++(inserter.first->second); 80 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[1], 2), 1) ); 81 if (!inserter.second) 82 ++(inserter.first->second); 83 inserter = nodes.insert( std::make_pair(FragmentNode(_ParticleTypes[2], 1), 1) ); 84 if (!inserter.second) 85 ++(inserter.first->second); 76 nodes.push_back( FragmentNode(_ParticleTypes[0], 1) ); 77 nodes.push_back( FragmentNode(_ParticleTypes[1], 2) ); 78 nodes.push_back( FragmentNode(_ParticleTypes[2], 1) ); 86 79 } 87 80 … … 98 91 } 99 92 100 return HomologyGraph(nodes, edges);93 return BindingModel(nodes, edges); 101 94 } 102 95 … … 104 97 EmpiricalPotential(), 105 98 params(parameters_t(MAXPARAMS, 0.)), 106 bindingmodel( HomologyGraph())99 bindingmodel(BindingModel()) 107 100 { 108 101 // have some decent defaults for parameter_derivative checking -
src/Potentials/Specifics/ThreeBodyPotential_Angle.hpp
rbc069f r9c793c 192 192 * \return HomologyGraph of the binding model 193 193 */ 194 const HomologyGraph& getBindingModel() const194 const BindingModel& getBindingModel() const 195 195 { return bindingmodel; } 196 196 … … 216 216 217 217 //!> binding model for this potential 218 const HomologyGraphbindingmodel;218 const BindingModel bindingmodel; 219 219 }; 220 220
Note:
See TracChangeset
for help on using the changeset viewer.