Changeset c7aac9 for src/FunctionApproximation
- 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:
- c5e75f3
- Parents:
- e47ac7
- git-author:
- Frederik Heber <heber@…> (10/02/16 14:03:57)
- git-committer:
- Frederik Heber <heber@…> (11/04/16 09:37:50)
- Location:
- src/FunctionApproximation
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/FunctionApproximation/Extractors.cpp
re47ac7 rc7aac9 59 59 Extractors::gatherAllSymmetricDistanceArguments( 60 60 const Fragment::positions_t& positions, 61 const Fragment:: charges_t& charges,61 const Fragment::atomicnumbers_t& atomicnumbers, 62 62 const size_t globalid) 63 63 { … … 76 76 arg.distance = firsttemp.distance(secondtemp); 77 77 arg.types = std::make_pair( 78 charges[ std::distance(positions.begin(), firstpositer) ],79 charges[ std::distance(positions.begin(), secondpositer) ]78 (int)atomicnumbers[ std::distance(positions.begin(), firstpositer) ], 79 (int)atomicnumbers[ std::distance(positions.begin(), secondpositer) ] 80 80 ); 81 81 arg.indices = std::make_pair( -
src/FunctionApproximation/Extractors.hpp
re47ac7 rc7aac9 69 69 * 70 70 * \param positions all nuclei positions 71 * \param charges all nuclei charges71 * \param atomicNumber all nuclei atomic numbers 72 72 * \param globalid index to associated in argument_t with 73 73 * \return vector of argument_ , each with a distance … … 76 76 gatherAllSymmetricDistanceArguments( 77 77 const Fragment::positions_t& positions, 78 const Fragment:: charges_t& charges,78 const Fragment::atomicnumbers_t& atomicnumbers, 79 79 const size_t globalid); 80 80 … … 83 83 * 84 84 * \param positions all nuclei positions 85 * \param charges all nuclei charges85 * \param atomicNumber all nuclei atomic numbers 86 86 * \param index index refers to the index within the global set of configurations 87 87 * \return vector of of argument_t containing all found distances … … 89 89 inline FunctionModel::arguments_t gatherAllSymmetricDistances( 90 90 const Fragment::positions_t& positions, 91 const Fragment:: charges_t& charges,91 const Fragment::atomicnumbers_t& atomicnumbers, 92 92 const size_t index 93 93 ) { 94 94 // get distance out of Fragment 95 return gatherAllSymmetricDistanceArguments(positions, charges, index);95 return gatherAllSymmetricDistanceArguments(positions, atomicnumbers, index); 96 96 } 97 97 -
src/FunctionApproximation/TrainingData.cpp
re47ac7 rc7aac9 58 58 for (HomologyContainer::const_iterator iter = range.first; iter != range.second; ++iter) { 59 59 const Fragment &fragment = iter->second.fragment; 60 // create internal list of arguments61 60 FunctionModel::arguments_t all_args = Extractors::gatherAllSymmetricDistances( 62 61 fragment.getPositions(), 63 fragment.get Charges(),62 fragment.getAtomicNumbers(), 64 63 DistanceVector.size() 65 64 ); -
src/FunctionApproximation/unittests/ExtractorsUnitTest.cpp
re47ac7 rc7aac9 85 85 86 86 // create charges 87 Fragment:: charges_t charges;88 charges += 6., 6., 1., 1., 1.;87 Fragment::atomicnumbers_t atomicnumbers; 88 atomicnumbers += 6, 6, 1, 1, 1; 89 89 90 90 // create distances 91 91 FunctionModel::arguments_t args = 92 Extractors::gatherAllSymmetricDistances(positions, charges, 0);92 Extractors::gatherAllSymmetricDistances(positions, atomicnumbers, 0); 93 93 CPPUNIT_ASSERT_EQUAL( (size_t)(5*4/2), args.size() ); 94 94
Note:
See TracChangeset
for help on using the changeset viewer.