Changeset c5e75f3 for src/Potentials/CompoundPotential.cpp
- Timestamp:
- Nov 4, 2016, 9:37:50 AM (9 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, Candidate_v1.7.0, 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:
- d5ca1a
- Parents:
- c7aac9
- git-author:
- Frederik Heber <heber@…> (10/03/16 10:35:00)
- git-committer:
- Frederik Heber <heber@…> (11/04/16 09:37:50)
- File:
-
- 1 edited
-
src/Potentials/CompoundPotential.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Potentials/CompoundPotential.cpp
rc7aac9 rc5e75f3 70 70 potential->getParticleTypes(); 71 71 72 // create charges73 Fragment::charges_t charges;74 charges.resize(types.size());75 std::transform(types.begin(), types.end(),76 charges.begin(), boost::lambda::_1);77 72 // convert into count map 78 Extractors::elementcounts_t counts_per_ charge=79 Extractors::_detail::getElementCounts( charges);80 // ASSERT( !counts_per_ charge.empty(),81 // "getFirstGraphwithSpecifiedElements() - chargecounts are empty?");82 LOG(2, "DEBUG: counts_per_ charge is " << counts_per_charge<< ".");73 Extractors::elementcounts_t counts_per_element = 74 Extractors::_detail::getElementCounts(types); 75 // ASSERT( !counts_per_element.empty(), 76 // "getFirstGraphwithSpecifiedElements() - element counts are empty?"); 77 LOG(2, "DEBUG: counts_per_element is " << counts_per_element << "."); 83 78 84 79 // check whether graph contains suitable types 85 Extractors::elementcounts_t::const_iterator countiter = counts_per_ charge.begin();86 for (; countiter != counts_per_ charge.end(); ++countiter)80 Extractors::elementcounts_t::const_iterator countiter = counts_per_element.begin(); 81 for (; countiter != counts_per_element.end(); ++countiter) 87 82 if (!graph.hasGreaterEqualTimesAtomicNumber( 88 83 static_cast<size_t>(countiter->first), … … 91 86 break; 92 87 // if we have a match for every count, store model 93 if( countiter == counts_per_ charge.end()) {88 if( countiter == counts_per_element.end()) { 94 89 LOG(1, "INFO: Potential " << potentialiter->first << " matches with fragment."); 95 90 models.push_back(static_cast<FunctionModel*>(potential));
Note:
See TracChangeset
for help on using the changeset viewer.
