- Timestamp:
- Nov 4, 2016, 9:37:50 AM (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:
- 67044a
- Parents:
- c5e75f3
- git-author:
- Frederik Heber <heber@…> (10/03/16 18:26:30)
- git-committer:
- Frederik Heber <heber@…> (11/04/16 09:37:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Potentials/Specifics/FourBodyPotential_Improper.cpp
rc5e75f3 rd5ca1a 35 35 #include "CodePatterns/MemDebug.hpp" 36 36 37 #include "CodePatterns/Assert.hpp" 38 37 39 #include "FourBodyPotential_Improper.hpp" 38 40 … … 51 53 Coordinator::ptr FourBodyPotential_Improper::coordinator(Memory::ignore(new FourBody_ImproperAngle())); 52 54 55 static HomologyGraph generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes) 56 { 57 // fill nodes 58 HomologyGraph::nodes_t nodes; 59 { 60 ASSERT( _ParticleTypes.size() == (size_t)4, 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); 75 } 76 77 // there are no edges 78 HomologyGraph::edges_t edges; 79 { 80 std::pair<HomologyGraph::edges_t::iterator, bool > inserter; 81 inserter = edges.insert( std::make_pair( FragmentEdge(_ParticleTypes[0], _ParticleTypes[1]), 1) ); 82 if (!inserter.second) 83 ++(inserter.first->second); 84 inserter = edges.insert( std::make_pair( FragmentEdge(_ParticleTypes[0], _ParticleTypes[2]), 1) ); 85 if (!inserter.second) 86 ++(inserter.first->second); 87 inserter = edges.insert( std::make_pair( FragmentEdge(_ParticleTypes[0], _ParticleTypes[3]), 1) ); 88 if (!inserter.second) 89 ++(inserter.first->second); 90 } 91 92 return HomologyGraph(nodes, edges); 93 } 94 53 95 FourBodyPotential_Improper::FourBodyPotential_Improper() : 54 FourBodyPotential_Torsion() 96 FourBodyPotential_Torsion(), 97 bindingmodel(HomologyGraph()) 55 98 {} 56 99 57 100 FourBodyPotential_Improper::FourBodyPotential_Improper( 58 101 const ParticleTypes_t &_ParticleTypes) : 59 FourBodyPotential_Torsion(_ParticleTypes) 102 FourBodyPotential_Torsion(_ParticleTypes), 103 bindingmodel(generateBindingModel(_ParticleTypes)) 60 104 {} 61 105 … … 67 111 _ParticleTypes, 68 112 _spring_constant, 69 _equilibrium_distance) 113 _equilibrium_distance), 114 bindingmodel(generateBindingModel(_ParticleTypes)) 70 115 {} 71 116
Note:
See TracChangeset
for help on using the changeset viewer.