Ignore:
Timestamp:
Nov 4, 2016, 9:37:50 AM (9 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, 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)
Message:

ParticleType_t is now an unsigned int.

  • this allows direct use of atomicNumber_t and also signed integers dont' make much sense for a particle type, i.e. an id.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Potentials/CompoundPotential.cpp

    rc7aac9 rc5e75f3  
    7070        potential->getParticleTypes();
    7171
    72     // create charges
    73     Fragment::charges_t charges;
    74     charges.resize(types.size());
    75     std::transform(types.begin(), types.end(),
    76         charges.begin(), boost::lambda::_1);
    7772    // convert into count map
    78     Extractors::elementcounts_t counts_per_charge =
    79         Extractors::_detail::getElementCounts(charges);
    80 //    ASSERT( !counts_per_charge.empty(),
    81 //        "getFirstGraphwithSpecifiedElements() - charge counts 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 << ".");
    8378
    8479    // 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)
    8782      if (!graph.hasGreaterEqualTimesAtomicNumber(
    8883          static_cast<size_t>(countiter->first),
     
    9186        break;
    9287    // if we have a match for every count, store model
    93     if( countiter == counts_per_charge.end()) {
     88    if( countiter == counts_per_element.end()) {
    9489      LOG(1, "INFO: Potential " << potentialiter->first << " matches with fragment.");
    9590      models.push_back(static_cast<FunctionModel*>(potential));
Note: See TracChangeset for help on using the changeset viewer.