Changeset 990a62
- Timestamp:
- Dec 19, 2012, 3:25:54 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:
- 752dc7
- Parents:
- ffc368
- git-author:
- Frederik Heber <heber@…> (10/05/12 16:45:23)
- git-committer:
- Frederik Heber <heber@…> (12/19/12 15:25:54)
- Location:
- src/Potentials/Specifics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Potentials/Specifics/ManyBodyPotential_Tersoff.cpp
rffc368 r990a62 51 51 ) : 52 52 params(parameters_t(MAXPARAMS, 0.)), 53 lambda3(0.), 54 alpha(0.), 55 chi(1.), 56 omega(1.), 53 57 triplefunction(_triplefunction) 54 58 {} … … 72 76 boost::function< std::vector<arguments_t>(const argument_t &, const double)> &_triplefunction) : 73 77 params(parameters_t(MAXPARAMS, 0.)), 78 lambda3(_lambda3), 79 alpha(_alpha), 80 chi(_chi), 81 omega(_mu), 74 82 triplefunction(_triplefunction) 75 83 { … … 81 89 params[lambda] = _lambda; 82 90 params[mu] = _mu; 83 params[lambda3]= _lambda3;84 params[alpha]= _alpha;91 // lambda3 = _lambda3; 92 // alpha = _alpha; 85 93 params[beta] = _beta; 86 params[chi]= _chi;87 params[omega]= _omega;94 // chi = _chi; 95 // omega = _omega; 88 96 params[n] = _n; 89 97 params[c] = _c; … … 104 112 cutoff * ( 105 113 function_prefactor( 106 params[alpha],114 alpha, 107 115 function_eta(r_ij)) 108 116 * function_smoother( … … 174 182 -r_ij.distance * cutoff * params[lambda] * ( 175 183 function_prefactor( 176 params[alpha],184 alpha, 177 185 function_eta(r_ij)) 178 186 * function_smoother( … … 201 209 break; 202 210 } 203 case lambda3: 204 { 205 const double result = 0.; 206 return results_t(1, result); 207 break; 208 } 209 case alpha: 210 { 211 const double temp = 212 pow(params[alpha]*function_eta(r_ij), params[n]); 213 const double cutoff = function_cutoff(r_ij.distance); 214 const double result = (cutoff == 0.) || (params[alpha] == 0. )? 215 0. : 216 function_smoother( 217 -params[A], 218 params[lambda], 219 r_ij.distance) 220 * (-.5) * params[alpha] * (temp/params[alpha]) 221 / (1. + temp) 222 ; 223 return results_t(1, result); 224 break; 225 } 211 // case lambda3: 212 // { 213 // const double result = 0.; 214 // return results_t(1, result); 215 // break; 216 // } 217 // case alpha: 218 // { 219 // const double temp = 220 // pow(alpha*function_eta(r_ij), params[n]); 221 // const double cutoff = function_cutoff(r_ij.distance); 222 // const double result = (cutoff == 0.) || (alpha == 0. )? 223 // 0. : 224 // function_smoother( 225 // -params[A], 226 // params[lambda], 227 // r_ij.distance) 228 // * (-.5) * alpha * (temp/alpha) 229 // / (1. + temp) 230 // ; 231 // return results_t(1, result); 232 // break; 233 // } 234 // case chi: 235 // { 236 // const double result = 0.; 237 // return results_t(1, result); 238 // break; 239 // } 240 // case omega: 241 // { 242 // const double result = 0.; 243 // return results_t(1, result); 244 // break; 245 // } 226 246 case beta: 227 247 { … … 309 329 { 310 330 // Info info(__func__); 311 const double result = params[chi]* pow(331 const double result = chi * pow( 312 332 (1. + pow(alpha * eta, params[n])), 313 333 -1./(2.*params[n])); … … 345 365 const argument_t &r_ik = (*iter)[0]; 346 366 result += function_cutoff(r_ik.distance) 347 * exp( Helpers::pow( params[lambda3]* (r_ij.distance - r_ik.distance) ,3));367 * exp( Helpers::pow(lambda3 * (r_ij.distance - r_ik.distance) ,3)); 348 368 } 349 369 … … 370 390 result += 371 391 function_cutoff(r_ik.distance) 372 * params[omega]392 * omega 373 393 * function_angle(r_ij.distance, r_ik.distance, r_jk.distance) 374 * exp( Helpers::pow( params[lambda3]* (r_ij.distance - r_ik.distance) ,3));394 * exp( Helpers::pow(lambda3 * (r_ij.distance - r_ik.distance) ,3)); 375 395 } 376 396 -
src/Potentials/Specifics/ManyBodyPotential_Tersoff.hpp
rffc368 r990a62 186 186 lambda=4, 187 187 mu=5, 188 lambda3=6,189 alpha=7,190 beta=8,191 chi=9,192 omega=10,193 n=11,194 c=12,195 d=13,196 h=14,188 beta=6, 189 n=7, 190 c=8, 191 d=9, 192 h=10, 193 // lambda3=11, 194 // alpha=12, 195 // chi=13, 196 // omega=14, 197 197 MAXPARAMS 198 198 }; 199 199 //!> parameter vector with parameters as in enum parameter_enum_t 200 200 parameters_t params; 201 202 // some internal parameters which are fixed 203 const double lambda3; 204 const double alpha; 205 const double chi; 206 const double omega; 201 207 202 208 public: -
src/Potentials/Specifics/unittests/ManyBodyPotential_TersoffUnitTest.cpp
rffc368 r990a62 134 134 params[ManyBodyPotential_Tersoff::lambda] = 3.487900e+00; 135 135 params[ManyBodyPotential_Tersoff::mu] = 2.211900e+00; 136 params[ManyBodyPotential_Tersoff::lambda3] = 0.;137 params[ManyBodyPotential_Tersoff::alpha] = 0.;136 // params[ManyBodyPotential_Tersoff::lambda3] = 0.; 137 // params[ManyBodyPotential_Tersoff::alpha] = 0.; 138 138 params[ManyBodyPotential_Tersoff::beta] = 1.572400e-07; 139 params[ManyBodyPotential_Tersoff::chi] = 1.;140 params[ManyBodyPotential_Tersoff::omega] = 1.;139 // params[ManyBodyPotential_Tersoff::chi] = 1.; 140 // params[ManyBodyPotential_Tersoff::omega] = 1.; 141 141 params[ManyBodyPotential_Tersoff::n] = 7.275100e-01; 142 142 params[ManyBodyPotential_Tersoff::c] = 3.804900e+04;
Note:
See TracChangeset
for help on using the changeset viewer.