- Timestamp:
- Feb 24, 2013, 12:58:53 PM (12 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, 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_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- ac868ee
- Parents:
- 63e786
- git-author:
- Frederik Heber <heber@…> (10/23/12 13:09:53)
- git-committer:
- Frederik Heber <heber@…> (02/24/13 12:58:53)
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/FunctionApproximation/Extractors.cpp
r63e786 r49f163 51 51 52 52 FunctionModel::arguments_t 53 Extractors:: _detail::gatherAllDistanceArguments(53 Extractors::gatherAllDistanceArguments( 54 54 const Fragment::positions_t &positions, 55 55 const size_t globalid) … … 61 61 for (;firstpositer != positions.end(); ++firstpositer) { 62 62 Fragment::positions_t::const_iterator secondpositer = positions.begin();//firstpositer; 63 for (; secondpositer != positions.end(); ++secondpositer) { 64 if (firstpositer == secondpositer) 65 continue; 66 argument_t arg; 67 const Vector firsttemp((*firstpositer)[0],(*firstpositer)[1],(*firstpositer)[2]); 68 const Vector secondtemp((*secondpositer)[0],(*secondpositer)[1],(*secondpositer)[2]); 69 arg.distance = firsttemp.distance(secondtemp); 70 arg.indices = std::make_pair( 71 std::distance( 72 positions.begin(), firstpositer), 73 std::distance( 74 positions.begin(), secondpositer) 75 ); 76 arg.globalid = globalid; 77 result.push_back(arg); 78 } 79 } 80 81 return result; 82 } 83 84 FunctionModel::arguments_t 85 Extractors::gatherAllSymmetricDistanceArguments( 86 const Fragment::positions_t &positions, 87 const size_t globalid) 88 { 89 FunctionModel::arguments_t result; 90 91 // go through current configuration and gather all other distances 92 Fragment::positions_t::const_iterator firstpositer = positions.begin(); 93 for (;firstpositer != positions.end(); ++firstpositer) { 94 Fragment::positions_t::const_iterator secondpositer = firstpositer; 63 95 for (; secondpositer != positions.end(); ++secondpositer) { 64 96 if (firstpositer == secondpositer) -
src/FunctionApproximation/Extractors.hpp
r63e786 r49f163 35 35 */ 36 36 namespace _detail { 37 /** Gather all distances from a given set of positions.38 *39 * \param positins vector of positions40 * \param globalid index to associated in argument_t with41 * \return vector of argument_ , each with a distance42 */43 FunctionModel::arguments_t44 gatherAllDistanceArguments(45 const Fragment::positions_t &positions,46 const size_t globalid);47 48 37 /** Gather all positions from the same aligned vector of charges. 49 38 * … … 99 88 } 100 89 90 /** Gather all distances from a given set of positions. 91 * 92 * \param positions vector of positions 93 * \param globalid index to associated in argument_t with 94 * \return vector of argument_ , each with a distance 95 */ 96 FunctionModel::arguments_t 97 gatherAllDistanceArguments( 98 const Fragment::positions_t &positions, 99 const size_t globalid); 100 101 /** Gather all distances from a given set of positions. 102 * 103 * Here, we only return one of the two equal distances. 104 * 105 * \param positions vector of positions 106 * \param globalid index to associated in argument_t with 107 * \return vector of argument_ , each with a distance 108 */ 109 FunctionModel::arguments_t 110 gatherAllSymmetricDistanceArguments( 111 const Fragment::positions_t &positions, 112 const size_t globalid); 113 101 114 /** Simple extractor of all unique pair distances of a given \a fragment. 102 115 * … … 110 123 ) { 111 124 // get distance out of Fragment 112 return _detail::gatherAllDistanceArguments(fragment.getPositions(), index);125 return gatherAllDistanceArguments(fragment.getPositions(), index); 113 126 } 114 127 -
src/LevMartester.cpp
r63e786 r49f163 364 364 // Afterwards we go through all of this type and gather the distance and the energy value 365 365 TrainingData MorseData( 366 boost::bind(&Extractors:: _detail::gatherAllDistanceArguments,366 boost::bind(&Extractors::gatherAllSymmetricDistanceArguments, 367 367 boost::bind(&Extractors::gatherDistanceOfTuples, 368 368 _1, Fragment::charges_t(2,6.)
Note:
See TracChangeset
for help on using the changeset viewer.