幻灯片11Second-derivativesof energyCan be evaluated analytically, through solution of"Coupled Perturbed Hartree-Fock"equations;MorecommonforcorrelatedmethodsandDFTtousefinite differences;Select the point of interest (too expensive tocompute overthe entire PES)Aminimum,i.e.thatg=0;AssumeitsEpesislocallyharmonic;Calculate the first-derivative at some small.displacements h awayfrom the pointof interestJansen, chp 11.6.1 Coupled Perturbed HartreeFock11更复杂;可以解析求解,通过CPHF方程,也就是将微扰理论用于HF方程。对于dft和含有电子相关项的方法,更多的是有限差分法。如果EpEs是局部近似简谐振动,二阶导数可以在一阶导数的基础上进行差分,一般在极大点极小点周围展开
幻灯片 11 Second-derivatives of energy 11 • Can be evaluated analytically, through solution of “Coupled Perturbed Hartree-Fock” equations; • More common for correlated methods and DFT to use finite differences; • Select the point of interest (too expensive to compute over the entire PES) • A minimum, i.e. that g = 0; • Assume its EPES is locally harmonic; • Calculate the first-derivative at some small displacements h away from the point of interest Jansen, chp 11.6.1 Coupled Perturbed Hartree–Fock 更复杂; 可以解析求解,通过CPHF方程,也就是将微扰理论用于HF方程。 对于dft和含有电子相关项的方法,更多的是有限差分法。 如果EPES是局部近似简谐振动,二阶导数可以在一阶导数的基础上进行差分,一 般在极大点极小点周围展开
幻灯片12Finitedifference(CEEETEEeEs如图所示,如果对一阶导,dE/dqi继续求导,可以进行差分法。一般选取g=0附近,假设原子核在此周围的运动可以用谐振子模型描述。然后将一阶导的qi坐标进行变化,土h,h不能太大(超出谐振子假设)或者太小(数值噪音)。然后dE/dgi对同一个坐标gi进行操作,一共3N个g,每个两侧差分,计算2*3N次。此时的Hessian就是对角矩阵,本征值是曲率curvature。有时候谐振子模型在该点不适用,需要考虑非谐振子模型,需要计算更多有限差分的点。更高阶的能量的导数
幻灯片 12 Finite difference 12 如图所示,如果对一阶导,dE/dqi继续求导,可以进行差分法。 一般选取g=0附近,假设原子核在此周围的运动可以用谐振子模型描述。然后将 一阶导的qi坐标进行变化,±h,h不能太大(超出谐振子假设)或者太小(数 值噪音)。 然后dE/dqi对同一个坐标qi进行操作,一共3N个q,每个两侧差分,计算2*3N 次。此时的Hessian就是对角矩阵,本征值是曲率curvature。 有时候谐振子模型在该点不适用,需要考虑非谐振子模型,需要计算更多有限 差分的点。更高阶的能量的导数
幻灯片13Finite differenceh must be small enough to stay in the harmonicregion, but big enough to avoid numerical noiseswamping the gradients;.For a moleculewith Natoms,to construct Hessian(3N X 3N, diagonalize), have to evaluate gradients2*3N times for two-sided differencing. Obviouslytends tobequite expensive;Togetbetterprecisionandaccuracy,couldcalculateevenmore than two displacements,and could evenfit toa more complicated function than a harmonicpotential13这是对刚才的图的解释,如果谐振子模型不适用,那么只有增加求导的阶数
幻灯片 13 Finite difference 13 • h must be small enough to stay in the harmonic region, but big enough to avoid numerical noise swamping the gradients; • For a molecule with N atoms, to construct Hessian (3N × 3N , diagonalize), have to evaluate gradients 2*3N times for two-sided differencing. Obviously tends to be quite expensive; • To get better precision and accuracy, could calculate even more than two displacements, and could even fit to a more complicated function than a harmonic potential 这是对刚才的图的解释,如果谐振子模型不适用,那么只有增加求导的阶数
幻灯片14OptimizationalgorithmsGeometryoptimization isoneofthemostcommontasks;Finding a minimum point on Epes;"Energy-only"algorithms search forminimawithout anygradient/force information;Effectively infer gradients and Hessian from lots ofdisplacements;Very slow to convergeand are only used in specializedsituations;it is computationally costlytocalculategradientsanalytically, but they can vastly increase the speed ofoptimizations;Algorithms apply toboth geometry optimization andelectronic structure calculation Jensen Chp 13Schlegel,J.Comp.Chem.2003, 24,1514优化算法a.几何优化是最常见的问题,就是找PES上的极小点。b.只靠能量的算法不使用梯度和力的信息,而通过大量的改变位置来推测g和h,一般不用(在没有g和h的情况下,确实有高精度计算,MR-MP2等),很慢。虽然计算h和g要花费时间,但是他们会使后续计算大大加速。C.d.这些优化算法对于sCF和geomopt同样有效
幻灯片 14 Optimization algorithms 14 • Geometry optimization is one of the most common tasks; • Finding a minimum point on EPES; • “Energy-only” algorithms search for minima without any gradient/force information; • Effectively infer gradients and Hessian from lots of displacements; • Very slow to converge and are only used in specialized situations; • It is computationally costly to calculate gradients analytically, but they can vastly increase the speed of optimizations; • Algorithms apply to both geometry optimization and electronic structure calculation Jensen Chp 13 Schlegel, J. Comp. Chem. 2003, 24, 1514 优化算法 a. 几何优化是最常见的问题,就是找PES上的极小点。 b. 只靠能量的算法不使用梯度和力的信息,而通过大量的改变位置来推测g和 h,一般不用(在没有g和h的情况下,确实有高精度计算,MR-MP2等),很慢。 c. 虽然计算h和g要花费时间,但是他们会使后续计算大大加速。 d. 这些优化算法对于SCF和geom opt同样有效
幻灯片15SteepestdescentConsider some set of coordinates R for which we have Epesandg;.Moststraightforwardapproachwouldbetomoveatomsin direction of-g, i.e. find 入 such that coordinates R'= R-Ag have mimimum energy;Called a line-search;Repeat starting from updated R'until Epes orgis+sufficientlysmall;While every step lowers the energy,this algorithm tends.to converge very slowly neara minimum.https://en.wikipedia.org/wiki/Gradientdescent3a.如果我们有Epes和g,最直接的方式就是把原子核沿-g的方向移动,当然移动幅度可以用个参数入,通过找Emin,确定入,称为“线搜索”。b.重复,直至在新的坐标R'下,△Epesorg<threshold阈值.c.这个方法在远离极小值时比较好用,靠近时会震荡,难以收敛
幻灯片 15 Steepest descent 15 • Consider some set of coordinates R for which we have EPES and g; • Most straightforward approach would be to move atoms in direction of –g, i.e. find λ such that coordinates R′ = R −λg have mimimum energy; • Called a line-search; • Repeat starting from updated R′ until ΔEPES or g is sufficiently small; • While every step lowers the energy, this algorithm tends to converge very slowly near a minimum. https://en.wikipedia.org/wiki/Gradient_descent a. 如果我们有Epes和g,最直接的方式就是把原子核沿-g的方向移动,当然移动 幅度可以用个参数λ,通过找Emin,确定λ,称为“线搜索”。 b. 重复,直至在新的坐标R’下,ΔEPES or g < threshold阈值. c. 这个方法在远离极小值时比较好用,靠近时会震荡,难以收敛