Ignore:
Timestamp:
Nov 4, 2016, 9:37:50 AM (8 years ago)
Author:
Frederik Heber <heber@…>
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)
Message:

Added HomologyGraph describing binding model to every EmpiricalPotential.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Potentials/Specifics/ManyBodyPotential_Tersoff.cpp

    rc5e75f3 rd5ca1a  
    8282Coordinator::ptr ManyBodyPotential_Tersoff::coordinator(Memory::ignore(new OneBody_Constant()));
    8383
     84static HomologyGraph generateBindingModel(const EmpiricalPotential::ParticleTypes_t &_ParticleTypes)
     85{
     86  // fill nodes
     87  HomologyGraph::nodes_t nodes;
     88  {
     89    ASSERT( _ParticleTypes.size() == (size_t)2,
     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);
     98  }
     99
     100  // there are no edges
     101  HomologyGraph::edges_t edges;
     102  {
     103    edges.insert( std::make_pair( FragmentEdge(_ParticleTypes[0], _ParticleTypes[1]), 1) );
     104  }
     105
     106  return HomologyGraph(nodes, edges);
     107}
     108
    84109ManyBodyPotential_Tersoff::ManyBodyPotential_Tersoff() :
    85110    EmpiricalPotential(),
     
    91116    chi(1.),
    92117    omega(1.),
    93     triplefunction(&Helpers::NoOp_Triplefunction)
     118    triplefunction(&Helpers::NoOp_Triplefunction),
     119    bindingmodel(HomologyGraph())
    94120{}
    95121
     
    105131    chi(1.),
    106132    omega(1.),
    107     triplefunction(&Helpers::NoOp_Triplefunction)
     133    triplefunction(&Helpers::NoOp_Triplefunction),
     134    bindingmodel(generateBindingModel(_ParticleTypes))
    108135{
    109136  // have some decent defaults for parameter_derivative checking
     
    144171  chi(_chi),
    145172  omega(_mu),
    146   triplefunction(&Helpers::NoOp_Triplefunction)
     173  triplefunction(&Helpers::NoOp_Triplefunction),
     174  bindingmodel(generateBindingModel(_ParticleTypes))
    147175{
    148176//  Info info(__func__);
Note: See TracChangeset for help on using the changeset viewer.