Changeset e2925fd
- Timestamp:
- May 3, 2013, 9:46:45 AM (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:
- a86666
- Parents:
- 5281ff
- git-author:
- Frederik Heber <heber@…> (04/05/13 15:09:16)
- git-committer:
- Frederik Heber <heber@…> (05/03/13 09:46:45)
- Files:
-
- 8 added
- 16 edited
- 6 moved
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/AnalyseFragmentationResultsAction.cpp
r5281ff re2925fd 388 388 } 389 389 } 390 #else 391 if (DoLongrange) 392 ELOG(2, "File contains long-range information but long-range analysis capability not compiled in."); 390 393 #endif 391 394 -
src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
r5281ff re2925fd 153 153 vmgcontroller.setPort(params.port.get()); 154 154 const size_t NoJobs = shortrangedata.size()+full_sample.size(); 155 vmgcontroller.requestIds( NoJobs);156 157 // Phase Five : create VMGJobs155 vmgcontroller.requestIds(2*NoJobs); 156 157 // Phase Five a: create VMGJobs for electronic charge distribution 158 158 const size_t near_field_cells = params.near_field_cells.get(); 159 159 const size_t interpolation_degree = params.interpolation_degree.get(); … … 163 163 near_field_cells, 164 164 interpolation_degree, 165 VMGFragmentController::DontSampleParticles, 166 VMGFragmentController::DoTreatGrid, 165 167 params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly, 166 168 params.DoPrintDebug.get())) 167 // can't use the summed up fragment due to saturation hydrogens168 // summedChargeDensity.getFragment(),169 169 return Action::failure; 170 170 171 // Phase Six : calculate result171 // Phase Six a: calculate result 172 172 vmgcontroller.waitforResults(NoJobs); 173 173 vmgcontroller.getResults(longrangedata); … … 175 175 "FragmentationFragmentationAutomationAction::performCall() - number of MPQCresults+" 176 176 +toString(full_sample.size())+"="+toString(NoJobs) 177 +" and VMGresults "+toString(longrangedata.size())+" don't match.");177 +" and first VMGresults "+toString(longrangedata.size())+" don't match."); 178 178 Exitflag += vmgcontroller.getExitflag(); 179 180 { 181 std::map<JobId_t, VMGData> longrangedata_both; 182 // Phase Five b: create VMGJobs for nuclei charge distributions 183 const size_t near_field_cells = params.near_field_cells.get(); 184 const size_t interpolation_degree = params.interpolation_degree.get(); 185 if (!vmgcontroller.createLongRangeJobs( 186 shortrangedata, 187 full_sample, 188 near_field_cells, 189 interpolation_degree, 190 VMGFragmentController::DoSampleParticles, 191 VMGFragmentController::DoTreatGrid, 192 params.DoValenceOnly.get() ? MPQCData::DoSampleValenceOnly : MPQCData::DontSampleValenceOnly, 193 params.DoPrintDebug.get())) 194 return Action::failure; 195 196 // Phase Six b: calculate result 197 vmgcontroller.waitforResults(NoJobs); 198 vmgcontroller.getResults(longrangedata_both); 199 ASSERT( NoJobs == longrangedata_both.size(), 200 "FragmentationFragmentationAutomationAction::performCall() - number of MPQCresults+" 201 +toString(full_sample.size())+"="+toString(NoJobs) 202 +" and second VMGresults "+toString(longrangedata_both.size())+" don't match."); 203 Exitflag += vmgcontroller.getExitflag(); 204 205 // go through either data and replace nuclei_long with contribution from both 206 ASSERT( longrangedata.size() == longrangedata_both.size(), 207 "FragmentationFragmentationAutomationAction::performCall() - longrange results have different sizes."); 208 std::map<JobId_t, VMGData>::iterator destiter = longrangedata.begin(); 209 std::map<JobId_t, VMGData>::iterator srciter = longrangedata_both.begin(); 210 for (;destiter != longrangedata.end(); ++srciter, ++destiter) 211 destiter->second.nuclei_long = srciter->second.nuclei_long; 212 } 179 213 } 180 214 -
src/Fragmentation/Automation/VMGFragmentController.cpp
r5281ff re2925fd 71 71 const size_t near_field_cells, 72 72 const size_t interpolation_degree, 73 const SampleParticles_t _SampleParticles, 74 const TreatGrid_t _TreatGrid, 73 75 const MPQCData::DoValenceOnly_t _DoValenceOnly, 74 76 const bool _DoPrintDebug) … … 86 88 new VMGJob( 87 89 next_id, 88 data.sampled_grid, 90 _TreatGrid == DoTreatGrid ? 91 data.sampled_grid : 92 SamplingGrid(data.sampled_grid.begin, data.sampled_grid.end, data.sampled_grid.level), 89 93 data.positions, 90 94 data.charges, 91 95 near_field_cells, 92 96 interpolation_degree, 97 _SampleParticles == DoSampleParticles, 93 98 _DoPrintDebug) ); 94 99 jobs.push_back(testJob); … … 122 127 iter != full_sampled_grid.end(); 123 128 ++iter) { 129 const SamplingGrid &grid = *iter; 124 130 const JobId_t next_id = getAvailableId(); 125 131 LOG(1, "INFO: Creating full VMGJob with " << *iter … … 128 134 new VMGJob( 129 135 next_id, 130 *iter, 136 _TreatGrid == DoTreatGrid ? 137 grid : 138 SamplingGrid(grid.begin, grid.end, grid.level), 131 139 positions, 132 140 charges, 133 141 near_field_cells, 134 142 interpolation_degree, 143 _SampleParticles == DoSampleParticles, 135 144 _DoPrintDebug) ); 136 145 jobs.push_back(testJob); -
src/Fragmentation/Automation/VMGFragmentController.hpp
r5281ff re2925fd 39 39 {} 40 40 41 //>! Enumerization of possible treatment of nuclei point charges. 42 enum SampleParticles_t { 43 DontSampleParticles=0, 44 DoSampleParticles=1 45 }; 46 47 //>! Enumerization of possible treatment of electronic charge distribution on grid. 48 enum TreatGrid_t { 49 DontTreatGrid=0, 50 DoTreatGrid=1 51 }; 52 41 53 /** Creates the long range jobs from finished short-range jobs. 42 54 * … … 45 57 * \param near_field_cells radius of b-splines for interpolation charges onto grid 46 58 * \param interpolation_degree interpolation degree for newton interpolation from grid 59 * \param _SampleParticles whether to add nuclei charges to vmg calculation. 60 * \param _TreatGrid whether to add electron charge distribution to vmg calculation. 47 61 * \param _DoValenceOnly whether to neglect core electron and nuclei charges 48 62 * \param _DoPrintDebug whether we do print grid for debug visualization or not … … 53 67 const size_t near_field_cells, 54 68 const size_t interpolation_degree, 69 const SampleParticles_t _SampleParticles, 70 const TreatGrid_t _TreatGrid, 55 71 const MPQCData::DoValenceOnly_t _DoValenceOnly, 56 72 const bool _DoPrintDebug); -
src/Fragmentation/Summation/Containers/FragmentationLongRangeResults.cpp
r5281ff re2925fd 129 129 boost::fusion::at_key<VMGDataFused::electron_longrange>(instance) = 0.; 130 130 boost::fusion::at_key<VMGDataFused::electron_shortrange>(instance) = 0.; 131 boost::fusion::at_key<VMGDataFused::mixed_longrange>(instance) = 0.; 132 boost::fusion::at_key<VMGDataFused::mixed_shortrange>(instance) = 0.; 131 133 boost::fusion::at_key<VMGDataFused::nuclei_longrange>(instance) = 0.; 132 134 boost::fusion::at_key<VMGDataFused::nuclei_shortrange>(instance) = 0.; … … 136 138 } 137 139 for (size_t level = 2; level <= MaxLevel; ++level) { 138 // we have to fill in the remainder values in the LongRangeMap by hand 139 // weight times correct charge density of the same level 140 // We have calculated three different contributions: e-e, e-n+n-n, and n-n. 141 // And we want to have e-e+e-n, n-n+n-e (where e-n = n-e). 142 // For each of these three contributions we have a full solution and summed 143 // up short range solutions. 144 145 // first we obtain the full e-e energy as potential times charge on the 146 // respective level. 147 // \note that sampled_potential starts at level 2 because we do not calculate 148 // for level 1 as there saturated hydrogens are still present, leaving the 149 // result to be nonsense. 140 150 const SamplingGrid &charge_weight = 141 151 boost::fusion::at_key<MPQCDataFused::sampled_grid>(Result_Grid_fused[level-1]); 142 152 SamplingGrid full_sample_solution = fullsolutionData[level-2].sampled_potential; 143 153 full_sample_solution *= charge_weight; 154 double electron_solution_energy = full_sample_solution.integral(); 155 156 // then we subtract the summed-up short-range e-e interaction energy from 157 // the full solution. 144 158 const SamplingGrid &short_range_correction = 145 159 boost::fusion::at_key<VMGDataFused::sampled_potential>(Result_LongRange_fused[level-1]); 160 double electron_short_range_energy = short_range_correction.integral(); 146 161 full_sample_solution -= short_range_correction; 147 double full_solution_energy = fullsolutionData[level-2].e_long; 148 const double short_range_energy = 149 boost::fusion::at_key<VMGDataFused::energy_long>(Result_LongRange_fused[level-1]); 150 full_solution_energy -= short_range_energy; 151 152 // multiply element-wise with charge distribution 162 electron_solution_energy -= electron_short_range_energy; 163 ASSERT( fabs(electron_solution_energy - full_sample_solution.integral()) < 1e-7, 164 "FragmentationLongRangeResults::operator() - integral and energy are not exchangeable."); 165 166 // then, we obtain the e-n+n-n full solution in the same way 167 double nuclei_solution_energy = fullsolutionData[level-2].nuclei_long; 168 double nuclei_short_range_energy = 169 boost::fusion::at_key<VMGDataFused::nuclei_long>(Result_LongRange_fused[level-1]); 170 nuclei_solution_energy -= nuclei_short_range_energy; 171 172 // and also the e-n full solution 173 double both_solution_energy = fullsolutionData[level-2].electron_long; 174 double both_short_range_energy = 175 boost::fusion::at_key<VMGDataFused::electron_long>(Result_LongRange_fused[level-1]); 176 both_solution_energy -= both_short_range_energy; 177 178 // energies from interpolation at nuclei position has factor of 1/2 already 179 electron_solution_energy *= .5; 180 electron_short_range_energy *= .5; 181 182 // At last, we subtract e-n from n-n+e-n for full solution and short-range 183 // correction. 184 nuclei_solution_energy -= both_solution_energy; 185 nuclei_short_range_energy -= both_short_range_energy; 186 153 187 VMGDataLongRangeMap_t instance; 154 boost::fusion::at_key<VMGDataFused::electron_longrange>(instance) = .5*full_sample_solution.integral();188 boost::fusion::at_key<VMGDataFused::electron_longrange>(instance) = electron_solution_energy; 155 189 // LOG(0, "Remaining long-range potential integral of level " << level << " is " 156 190 // << full_sample_solution.integral() << "."); 157 boost::fusion::at_key<VMGDataFused::electron_shortrange>(instance) = .5*short_range_correction.integral();191 boost::fusion::at_key<VMGDataFused::electron_shortrange>(instance) = electron_short_range_energy; 158 192 // LOG(0, "Short-range correction potential integral of level " << level << " is " 159 193 // << short_range_correction.integral() << "."); 160 boost::fusion::at_key<VMGDataFused:: nuclei_longrange>(instance) = full_solution_energy;194 boost::fusion::at_key<VMGDataFused::mixed_longrange>(instance) = both_solution_energy; 161 195 // LOG(0, "Remaining long-range energy from potential integral of level " << level << " is " 162 196 // << full_solution_energy << "."); 163 boost::fusion::at_key<VMGDataFused::nuclei_shortrange>(instance) = short_range_energy; 197 boost::fusion::at_key<VMGDataFused::mixed_shortrange>(instance) = both_short_range_energy; 198 // LOG(0, "Short-range correction energy from potential integral of level " << level << " is " 199 // << short_range_energy << "."); 200 boost::fusion::at_key<VMGDataFused::nuclei_longrange>(instance) = nuclei_solution_energy; 201 // LOG(0, "Remaining long-range energy from potential integral of level " << level << " is " 202 // << full_solution_energy << "."); 203 boost::fusion::at_key<VMGDataFused::nuclei_shortrange>(instance) = nuclei_short_range_energy; 164 204 // LOG(0, "Short-range correction energy from potential integral of level " << level << " is " 165 205 // << short_range_energy << "."); 166 206 boost::fusion::at_key<VMGDataFused::total_longrange>(instance) = 167 boost::fusion::at_key<VMGDataFused::electron_longrange>(instance) - full_solution_energy; 207 boost::fusion::at_key<VMGDataFused::electron_longrange>(instance) 208 + 2.*boost::fusion::at_key<VMGDataFused::mixed_longrange>(instance) 209 + boost::fusion::at_key<VMGDataFused::nuclei_longrange>(instance); 168 210 boost::fusion::at_key<VMGDataFused::total_shortrange>(instance) = 169 boost::fusion::at_key<VMGDataFused::electron_shortrange>(instance) - short_range_energy; 211 boost::fusion::at_key<VMGDataFused::electron_shortrange>(instance) 212 + 2.*boost::fusion::at_key<VMGDataFused::mixed_shortrange>(instance) 213 + boost::fusion::at_key<VMGDataFused::nuclei_shortrange>(instance); 170 214 Result_LongRangeIntegrated_fused.push_back(instance); 171 215 } -
src/Fragmentation/Summation/Containers/VMGData.cpp
r5281ff re2925fd 42 42 VMGData::VMGData(const SamplingGridProperties &_props) : 43 43 sampled_potential(_props), 44 e_long(0.) 44 nuclei_long(0.), 45 electron_long(0.) 45 46 {} 46 47 … … 50 51 std::ostream & operator<<(std::ostream &ost, const VMGData &data) 51 52 { 52 ost << "Long-Range energy: " << data.e_long << std::endl; 53 ost << "Nuclei long-Range energy: " << data.nuclei_long << std::endl; 54 ost << "Electron long-Range energy: " << data.electron_long << std::endl; 53 55 return ost; 54 56 } -
src/Fragmentation/Summation/Containers/VMGData.hpp
r5281ff re2925fd 42 42 //!> sampled potential on the grid as output 43 43 SamplingGrid sampled_potential; 44 //!> long-range contribution to energy 45 double e_long; 44 //!> nuclei long-range contribution to energy 45 double nuclei_long; 46 //!> electron long-range contribution to energy 47 double electron_long; 46 48 47 49 private: … … 52 54 { 53 55 ar & sampled_potential; 54 ar & e_long; 56 if (version > 0) 57 ar & nuclei_long; 58 ar & electron_long; 55 59 } 56 60 }; 61 62 BOOST_CLASS_VERSION(VMGData, 1) 57 63 58 64 std::ostream & operator<<(std::ostream &ost, const VMGData &data); -
src/Fragmentation/Summation/Containers/VMGDataFused.hpp
r5281ff re2925fd 27 27 struct sampled_potential {}; 28 28 struct energy_potential {}; 29 struct energy_long {}; 29 struct nuclei_long {}; 30 struct electron_long {}; 30 31 31 32 // keys for longrange … … 35 36 struct nuclei_longrange {}; 36 37 struct nuclei_shortrange {}; 38 struct mixed_longrange {}; 39 struct mixed_shortrange {}; 37 40 struct total_longrange {}; 38 41 struct total_shortrange {}; -
src/Fragmentation/Summation/Containers/VMGDataMap.hpp
r5281ff re2925fd 32 32 boost::fusion::pair<VMGDataFused::sampled_potential, SamplingGrid >, 33 33 boost::fusion::pair<VMGDataFused::energy_potential, double >, 34 boost::fusion::pair<VMGDataFused::energy_long, double > 34 boost::fusion::pair<VMGDataFused::nuclei_long, double >, 35 boost::fusion::pair<VMGDataFused::electron_long, double > 35 36 > VMGDataMap_t; 36 37 … … 38 39 VMGDataFused::sampled_potential, 39 40 VMGDataFused::energy_potential, 40 VMGDataFused::energy_long 41 VMGDataFused::nuclei_long, 42 VMGDataFused::electron_long 41 43 > VMGDataVector_t; 42 44 … … 51 53 boost::fusion::pair<VMGDataFused::electron_longrange, double >, 52 54 boost::fusion::pair<VMGDataFused::electron_shortrange, double >, 55 boost::fusion::pair<VMGDataFused::mixed_longrange, double >, 56 boost::fusion::pair<VMGDataFused::mixed_shortrange, double >, 53 57 boost::fusion::pair<VMGDataFused::nuclei_longrange, double >, 54 58 boost::fusion::pair<VMGDataFused::nuclei_shortrange, double >, … … 60 64 VMGDataFused::electron_longrange, 61 65 VMGDataFused::electron_shortrange, 66 VMGDataFused::mixed_longrange, 67 VMGDataFused::mixed_shortrange, 62 68 VMGDataFused::nuclei_longrange, 63 69 VMGDataFused::nuclei_shortrange, -
src/Fragmentation/Summation/Containers/VMGData_printKeyNames.hpp
r5281ff re2925fd 36 36 (sampled_potential) \ 37 37 (energy_potential) \ 38 (energy_long) \ 38 (nuclei_long) \ 39 (electron_long) \ 39 40 (electron_longrange) \ 40 41 (electron_shortrange) \ 42 (mixed_longrange) \ 43 (mixed_shortrange) \ 41 44 (nuclei_longrange) \ 42 45 (nuclei_shortrange) \ -
src/Fragmentation/Summation/Converter/DataConverter.hpp
r5281ff re2925fd 90 90 boost::fusion::at_key<VMGDataFused::sampled_potential>(instance) = extractedData.sampled_potential; 91 91 boost::fusion::at_key<VMGDataFused::energy_potential>(instance) = extractedData.sampled_potential.integral(); 92 boost::fusion::at_key<VMGDataFused::energy_long>(instance) = extractedData.e_long; 92 boost::fusion::at_key<VMGDataFused::nuclei_long>(instance) = extractedData.nuclei_long; 93 boost::fusion::at_key<VMGDataFused::electron_long>(instance) = extractedData.electron_long; 93 94 VMGData_fused.insert( std::make_pair(dataiter->first, instance) ); 94 95 } -
src/Jobs/InterfaceVMGJob.cpp
r5281ff re2925fd 71 71 vmg_float _box_end, 72 72 const int& near_field_cells, 73 const ImportParticles_t _ImportParticles, 73 74 const bool _DoPrintDebug, 74 75 int coarseningSteps, … … 80 81 returndata(_returndata), 81 82 level(levelMax), 83 ImportParticles(_ImportParticles), 82 84 DoPrintDebug(_DoPrintDebug) 83 85 { … … 134 136 VMG::MG::GetFactory().GetObjectStorageVal<int>("PARTICLE_NEAR_FIELD_CELLS"))); 135 137 136 // create smeared-out particle charges on particle_grid via splines 137 LOG(1, "INFO: Creating particle grid for " << particles.size() << " particles."); 138 for (std::list<Particle::Particle>::iterator iter = particles.begin(); 139 iter != particles.end(); ++iter) { 140 LOG(2, "DEBUG: Current particle is at " << (*iter).Pos() 141 << " with charge " << (*iter).Charge() << "."); 142 spl.SetSpline(particle_grid, *iter); 138 if (ImportParticles == DoImportParticles) { 139 // create smeared-out particle charges on particle_grid via splines 140 LOG(1, "INFO: Creating particle grid for " << particles.size() << " particles."); 141 for (std::list<Particle::Particle>::iterator iter = particles.begin(); 142 iter != particles.end(); ++iter) { 143 LOG(2, "DEBUG: Current particle is at " << (*iter).Pos() 144 << " with charge " << (*iter).Charge() << "."); 145 spl.SetSpline(particle_grid, *iter); 146 } 143 147 } 144 148 … … 155 159 grid, 156 160 sampled_input, 157 -1.);161 1.); 158 162 159 163 if (DoPrintDebug) { … … 360 364 comm.PrintStringOnce("E_total*: %e", e_long + e_short_peak + e_short_spline - e_self); 361 365 362 returndata.e_long = e; 366 returndata.nuclei_long = e_long; 367 returndata.electron_long = e_long; 363 368 } -
src/Jobs/InterfaceVMGJob.hpp
r5281ff re2925fd 36 36 { 37 37 public: 38 enum ImportParticles_t { 39 DontImportParticles=0, 40 DoImportParticles=1, 41 }; 42 38 43 InterfaceVMGJob(const SamplingGrid &_sampled_input, 39 44 VMGData &returndata, … … 46 51 vmg_float _box_end, 47 52 const int& near_field_cells, 53 const ImportParticles_t _ImportParticles=DoImportParticles, 48 54 const bool _DoPrintDebug=false, 49 55 int coarseningSteps=0, … … 74 80 double box_end[3]; 75 81 82 //!> whether we import particles (true) or evaluate only 83 const ImportParticles_t ImportParticles; 84 76 85 //!> whether we do print grid for debug visualization or not 77 86 const bool DoPrintDebug; -
src/Jobs/VMGJob.cpp
r5281ff re2925fd 83 83 const size_t _near_field_cells, 84 84 const size_t _interpolation_degree, 85 const bool _DoImportParticles, 85 86 const bool _DoPrintDebug) : 86 87 FragmentJob(_JobId), … … 90 91 near_field_cells(_near_field_cells), 91 92 interpolation_degree(_interpolation_degree), 93 DoImportParticles(_DoImportParticles), 94 DoPrintDebug(_DoPrintDebug), 92 95 returndata(static_cast<const SamplingGridProperties &>(_density_grid)), 93 particles(), 94 DoPrintDebug(_DoPrintDebug) 96 particles() 95 97 {} 96 98 … … 99 101 near_field_cells(3), 100 102 interpolation_degree(3), 101 particles(), 102 DoPrintDebug(false) 103 DoImportParticles(true), 104 DoPrintDebug(false), 105 particles() 103 106 {} 104 107 … … 220 223 density_grid.end[0]-density_grid.begin[0], 221 224 near_field_cells, 225 DoImportParticles ? 226 VMGInterfaces::InterfaceVMGJob::DoImportParticles 227 : VMGInterfaces::InterfaceVMGJob::DontImportParticles, 222 228 DoPrintDebug); 223 229 new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear); -
src/Jobs/VMGJob.hpp
r5281ff re2925fd 42 42 * @param _interpolation_degree degree of interpolation polynomial for getting nuclei 43 43 * potential from grid 44 * @param _DoImportParticles whether we import particles (true) or evaluate only 44 45 * @param _DoPrintDebug whether we do print grid for debug visualization or not 45 46 */ … … 50 51 const size_t _near_field_cells, 51 52 const size_t _interpolation_degree, 53 const bool _DoImportParticles=true, 52 54 const bool _DoPrintDebug=false 53 55 ); … … 72 74 //!> interpolation degree used in sampling the potential of the nuclei 73 75 const size_t interpolation_degree; 76 //!> whether we import particles (true) or evaluate only 77 const bool DoImportParticles; 74 78 //!> whether we do print grid for debug visualization or not 75 79 const bool DoPrintDebug; … … 124 128 ar & const_cast< size_t &>(near_field_cells); 125 129 ar & const_cast< size_t &>(interpolation_degree); 130 ar & const_cast< bool &>(DoImportParticles); 126 131 ar & const_cast< bool &>(DoPrintDebug); 127 132 ar & returndata; -
tests/regression/Fragmentation/AnalyseFragmentationResults/testsuite-fragmentation-analyse-fragment-results.at
r5281ff re2925fd 18 18 ### fragment the molecule and check the number of configs 19 19 # 20 # BondFragment Results.dat is created like this:21 # ./molecuilder -i pre/alkane-3.pdb --change-box 20,0,20,0,0,20 --set-parser-parameters mpqc --parser-parameters "theory=CLHF;basis=6-31G;" --set-boundary-conditions Ignore Ignore Ignore --update-molecules --select-all-atoms --fragment-molecule BondFragment --DoSaturate 1 --ExcludeHydrogen 1 --distance 2. --order 6 --fragment-automation --DoLongrange 0 --server-address 127.0.0.1 --server-port 1026 --fragment-resultfile BondFragment Results.dat20 # BondFragmentShortRangeResults.dat is created like this: 21 # ./molecuilder -i pre/alkane-3.pdb --change-box 20,0,20,0,0,20 --set-parser-parameters mpqc --parser-parameters "theory=CLHF;basis=6-31G;" --set-boundary-conditions Ignore Ignore Ignore --update-molecules --select-all-atoms --fragment-molecule BondFragment --DoSaturate 1 --ExcludeHydrogen 1 --distance 2. --order 6 --fragment-automation --DoLongrange 0 --server-address 127.0.0.1 --server-port 1026 --fragment-resultfile BondFragmentShortRangeResults.dat 22 22 23 AT_SETUP([Fragmentation - Analyse fragmentation results])23 AT_SETUP([Fragmentation - Analyse short-range fragmentation results]) 24 24 AT_KEYWORDS([fragmentation analyse-fragment-results]) 25 25 26 file=BondFragment Results.dat26 file=BondFragmentShortRangeResults.dat 27 27 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/$file $file], 0) 28 28 AT_CHECK([chmod u+w $file], 0, [ignore], [ignore]) 29 29 AT_CHECK([../../molecuilder --analyse-fragment-results --fragment-resultfile $file], 0, [ignore], [ignore]) 30 AT_CHECK([output=BondFragment_Energy.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ $output], 0, [ignore], [ignore])31 AT_CHECK([output=BondFragment_Forces.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ $output], 0, [ignore], [ignore])32 AT_CHECK([output=BondFragment_Times.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ $output], 0, [ignore], [ignore])33 AT_CHECK([output=BondFragment_Eigenvalues.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ $output], 0, [ignore], [ignore])34 AT_CHECK([output=BondFragment_Eigenhistogram.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ $output], 0, [ignore], [ignore])30 AT_CHECK([output=BondFragment_Energy.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ShortRange/$output], 0, [ignore], [ignore]) 31 AT_CHECK([output=BondFragment_Forces.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ShortRange/$output], 0, [ignore], [ignore]) 32 AT_CHECK([output=BondFragment_Times.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ShortRange/$output], 0, [ignore], [ignore]) 33 AT_CHECK([output=BondFragment_Eigenvalues.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ShortRange/$output], 0, [ignore], [ignore]) 34 AT_CHECK([output=BondFragment_Eigenhistogram.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/ShortRange/$output], 0, [ignore], [ignore]) 35 35 36 36 AT_CLEANUP 37 38 # 39 # BondFragmentLongRangeResults.dat is created like this: 40 # ./molecuilder -i pre/alkane-3.pdb --change-box 20,0,20,0,0,20 --set-parser-parameters mpqc --parser-parameters "theory=CLHF;basis=6-31G;" --set-boundary-conditions Ignore Ignore Ignore --update-molecules --select-all-atoms --fragment-molecule BondFragment --DoSaturate 1 --ExcludeHydrogen 1 --distance 2. --order 6 --fragment-automation --DoLongrange 1 --DoValenceOnly 0 --grid-level 4 --near-field-cells 3 --server-address 127.0.0.1 --server-port 1026 --server-address 127.0.0.1 --server-port 1026 --fragment-resultfile BondFragmentLongRangeResults.dat 41 42 AT_SETUP([Fragmentation - Analyse long-range fragmentation results]) 43 AT_KEYWORDS([fragmentation analyse-fragment-results]) 44 45 file=BondFragmentLongRangeResults.dat 46 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/$file $file], 0) 47 AT_CHECK([chmod u+w $file], 0, [ignore], [ignore]) 48 AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/pre/alkane-3.pdb --analyse-fragment-results --fragment-resultfile $file], 0, [ignore], [stderr]) 49 AT_CHECK([output=BondFragment_Energy.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/$output], 0, [ignore], [ignore]) 50 AT_CHECK([output=BondFragment_Forces.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/$output], 0, [ignore], [ignore]) 51 AT_CHECK([output=BondFragment_Times.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/$output], 0, [ignore], [ignore]) 52 AT_CHECK([output=BondFragment_Eigenvalues.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/$output], 0, [ignore], [ignore]) 53 AT_CHECK([output=BondFragment_Eigenhistogram.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/$output], 0, [ignore], [ignore]) 54 AT_CHECK([grep "File contains long-range information" stderr], 0, [ignore], [ignore], [ 55 AT_CHECK([output=BondFragment_LongRangeEnergy.dat; diff $output ${abs_top_srcdir}/tests/regression/Fragmentation/AnalyseFragmentationResults/post/LongRange/$output], 0, [ignore], [ignore]) 56 ]) 57 58 AT_CLEANUP
Note:
See TracChangeset
for help on using the changeset viewer.