Changeset eaef9b for src/Fragmentation
- Timestamp:
- Sep 14, 2016, 6:43:46 PM (8 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_StructOpt_integration_tests, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, 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_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, 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_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, 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, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, Ubuntu_1604_changes, stable
- Children:
- dd9b90
- Parents:
- 4c648a
- git-author:
- Frederik Heber <heber@…> (06/20/16 05:39:28)
- git-committer:
- Frederik Heber <heber@…> (09/14/16 18:43:46)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/Automation/VMGFragmentController.cpp
r4c648a reaef9b 41 41 42 42 #include "VMGFragmentController.hpp" 43 44 #include "CodePatterns/Assert.hpp" 43 45 44 46 #include "Atom/atom.hpp" … … 69 71 } 70 72 73 static size_t getFragmentNearFieldCells( 74 const SamplingGrid &_fragment_grid, 75 const double _max_full_delta, 76 const size_t full_nfc 77 ) 78 { 79 // get delta of fragment for comparison 80 const double fragment_grid_delta = 81 std::max(_fragment_grid.getDeltaPerAxis(0), 82 std::max(_fragment_grid.getDeltaPerAxis(1), 83 _fragment_grid.getDeltaPerAxis(2))); 84 const double factor = _max_full_delta/fragment_grid_delta; 85 size_t increased_nfc = full_nfc * factor; 86 // never let nfc get smaller than 3 87 if (increased_nfc < 3) 88 increased_nfc = 3; 89 return increased_nfc; 90 } 91 71 92 bool VMGFragmentController::createLongRangeJobs( 72 93 const std::map<JobId_t, MPQCData> &fragmentData, … … 82 103 const bool _UseImplicitCharges) 83 104 { 105 // get max delta of full grid 106 ASSERT( !full_sampled_grid.empty(), 107 "VMGFragmentController::createLongRangeJobs() - given full_sampled_grid must not be empty."); 108 const double max_full_delta = 109 std::max(full_sampled_grid.back().getDeltaPerAxis(0), 110 std::max(full_sampled_grid.back().getDeltaPerAxis(1), 111 full_sampled_grid.back().getDeltaPerAxis(2))); 112 84 113 std::vector<FragmentJob::ptr> jobs; 85 114 /// add one job for each fragment as the short-range correction which we need … … 89 118 const JobId_t next_id = getAvailableId(); 90 119 const MPQCData &data = iter->second; 120 const size_t increased_nfc = getFragmentNearFieldCells( 121 data.sampled_grid, max_full_delta, near_field_cells); 91 122 LOG(1, "INFO: Creating VMGJob with " << data.sampled_grid 92 << " gridpoints and " << data.charges.size() << " particle charges."); 123 << " gridpoints and " << data.charges.size() << " particle charges, using " 124 << increased_nfc << " near field cells."); 93 125 FragmentJob::ptr testJob( 94 126 new VMGJob( … … 99 131 data.positions, 100 132 data.charges, 101 near_field_cells,133 increased_nfc, 102 134 interpolation_degree, 103 135 _SampleParticles == DoSampleParticles,
Note:
See TracChangeset
for help on using the changeset viewer.