newtons method notes -...
TRANSCRIPT
![Page 1: Newtons Method Notes - fri.cnm.utexas.edufri.cnm.utexas.edu/fri/stream/Course_Notes/Newtons_Method_Notes.… · Newtons_Method_Notes.pptx Author: Duncan, Juliana R Created Date: 2/6/2018](https://reader031.vdocuments.site/reader031/viewer/2022022601/5b4a55de7f8b9aa82c8c1eff/html5/thumbnails/1.jpg)
Local Op)miza)on: Newton’s Method
![Page 2: Newtons Method Notes - fri.cnm.utexas.edufri.cnm.utexas.edu/fri/stream/Course_Notes/Newtons_Method_Notes.… · Newtons_Method_Notes.pptx Author: Duncan, Juliana R Created Date: 2/6/2018](https://reader031.vdocuments.site/reader031/viewer/2022022601/5b4a55de7f8b9aa82c8c1eff/html5/thumbnails/2.jpg)
Classes of Op)miza)on Method There are two class of local op)miza)on methods: 1. First-‐order methods
1. Only u)lizes first deriva)ves 2. Gradient Descent is an example of a first order
method
2. Second-‐order methods 1. U)lizes first and second deriva)ves 2. Newton’s method is a second-‐order method First we will go over the equa)ons for the
Newton’s Method local op)miza)on algorithm and compare them to Gradient Descent
![Page 3: Newtons Method Notes - fri.cnm.utexas.edufri.cnm.utexas.edu/fri/stream/Course_Notes/Newtons_Method_Notes.… · Newtons_Method_Notes.pptx Author: Duncan, Juliana R Created Date: 2/6/2018](https://reader031.vdocuments.site/reader031/viewer/2022022601/5b4a55de7f8b9aa82c8c1eff/html5/thumbnails/3.jpg)
Review: Algorithm for Gradient Descent
The general procedure for numerical geometry op)miza)on is as follows: 1. Calculate the force on all atoms for some
configura)on of an atomic system. 2. If the magnitude of the force is less than
threshold, you have found a cri)cal point! STOP. 3. If not, move the atoms such that they go
towards a cri)cal points 4. Repeat.
rn+1 = rn +αF(rn )
![Page 4: Newtons Method Notes - fri.cnm.utexas.edufri.cnm.utexas.edu/fri/stream/Course_Notes/Newtons_Method_Notes.… · Newtons_Method_Notes.pptx Author: Duncan, Juliana R Created Date: 2/6/2018](https://reader031.vdocuments.site/reader031/viewer/2022022601/5b4a55de7f8b9aa82c8c1eff/html5/thumbnails/4.jpg)
Algorithm for Newton’s Method The general procedure for numerical geometry op)miza)on is as follows: 1. Calculate the force on all atoms for some
configura)on of an atomic system. 2. If the magnitude of the force is less than
threshold, you have found a cri)cal point! STOP. 3. If not, move the atoms such that they go
towards a cri)cal points. In NM you will need to calculate second deriva4ves, V’’, as well.
4. Repeat.
rn+1 = rn +F(rn )V ''(rn )
![Page 5: Newtons Method Notes - fri.cnm.utexas.edufri.cnm.utexas.edu/fri/stream/Course_Notes/Newtons_Method_Notes.… · Newtons_Method_Notes.pptx Author: Duncan, Juliana R Created Date: 2/6/2018](https://reader031.vdocuments.site/reader031/viewer/2022022601/5b4a55de7f8b9aa82c8c1eff/html5/thumbnails/5.jpg)
Newton’s Method (NM)
• So far, I have just shown you the equa)ons for Newton’s Method.
• I will show you the deriva)on of NM in a few slides, but let’s start with the same example given in class with gradient descent to see how this algorithm works…
![Page 6: Newtons Method Notes - fri.cnm.utexas.edufri.cnm.utexas.edu/fri/stream/Course_Notes/Newtons_Method_Notes.… · Newtons_Method_Notes.pptx Author: Duncan, Juliana R Created Date: 2/6/2018](https://reader031.vdocuments.site/reader031/viewer/2022022601/5b4a55de7f8b9aa82c8c1eff/html5/thumbnails/6.jpg)
Example Newton’s Method
Step #, n rn F(rn) rn+1=rn+F(rn)/V’’ (rn) 1 1 2 3
V(r)
r
Start with a ini)al guess of the local minimum:
r=1
V (r) = (r −3)2
r1=1
![Page 7: Newtons Method Notes - fri.cnm.utexas.edufri.cnm.utexas.edu/fri/stream/Course_Notes/Newtons_Method_Notes.… · Newtons_Method_Notes.pptx Author: Duncan, Juliana R Created Date: 2/6/2018](https://reader031.vdocuments.site/reader031/viewer/2022022601/5b4a55de7f8b9aa82c8c1eff/html5/thumbnails/7.jpg)
Example Newton’s Method
Step #, n rn F(rn) rn+1=rn+F(rn)/V’’ (rn) 1 1 4 2 3
V(r)
r
1. Calculate the force on all atoms for some configura)on of an
atomic system.
V (r) = (r −3)2
!F(r) = − d
drV (r) = −2(r −3)
!F(1) = −2(1−3) = 4
r1=1
![Page 8: Newtons Method Notes - fri.cnm.utexas.edufri.cnm.utexas.edu/fri/stream/Course_Notes/Newtons_Method_Notes.… · Newtons_Method_Notes.pptx Author: Duncan, Juliana R Created Date: 2/6/2018](https://reader031.vdocuments.site/reader031/viewer/2022022601/5b4a55de7f8b9aa82c8c1eff/html5/thumbnails/8.jpg)
Example Newton’s Method
Step #, n rn F(rn) rn+1=rn+F(rn)/V’’ (rn) 1 1 4 2 3
V(r)
r
V (r) = (r −3)2 2. If the magnitude of the force is less than threshold (0.01eV/Angstrom), you have found a
cri)cal point! STOP. !F(1) = 4!F(1) = 4*4 = 4
4 < 0.01− > False
!F(r1)r1=1
![Page 9: Newtons Method Notes - fri.cnm.utexas.edufri.cnm.utexas.edu/fri/stream/Course_Notes/Newtons_Method_Notes.… · Newtons_Method_Notes.pptx Author: Duncan, Juliana R Created Date: 2/6/2018](https://reader031.vdocuments.site/reader031/viewer/2022022601/5b4a55de7f8b9aa82c8c1eff/html5/thumbnails/9.jpg)
Example Newton’s Method
Step #, n rn F(rn) rn+1=rn+F(rn)/V’’ (rn) 1 1 4 2 3
V(r)
r
3. If not, move the atoms such that they go towards a cri)cal points. First calculate V’’
V (r) = (r −3)2
rn+1 = rn +αF(rn )V ''(rn )
V ''(r) = 2
r1=1
![Page 10: Newtons Method Notes - fri.cnm.utexas.edufri.cnm.utexas.edu/fri/stream/Course_Notes/Newtons_Method_Notes.… · Newtons_Method_Notes.pptx Author: Duncan, Juliana R Created Date: 2/6/2018](https://reader031.vdocuments.site/reader031/viewer/2022022601/5b4a55de7f8b9aa82c8c1eff/html5/thumbnails/10.jpg)
Example Newton’s Method
Step #, n rn F(rn) rn+1=rn+F(rn)/V’’ (rn) 1 1 4 3 2 3 3
V(r)
r
3. If not, move the atoms such that they go towards a cri)cal
points.
V (r) = (r −3)2
rn+1 = rn +F(rn )V ''(rn )
r2 = r1 +F(rn )V ''(rn )
=1+ 42= 3
r1=1
r2=3
![Page 11: Newtons Method Notes - fri.cnm.utexas.edufri.cnm.utexas.edu/fri/stream/Course_Notes/Newtons_Method_Notes.… · Newtons_Method_Notes.pptx Author: Duncan, Juliana R Created Date: 2/6/2018](https://reader031.vdocuments.site/reader031/viewer/2022022601/5b4a55de7f8b9aa82c8c1eff/html5/thumbnails/11.jpg)
Example Newton’s Method
Step #, n rn F(rn) rn+1=rn+F(rn)/V’’ (rn) 1 1 4 3 2 3 3
V(r)
r
3. If not, move the atoms such that they go towards a cri)cal
points.
V (r) = (r −3)2
r2 = r1 +F(rn )V ''(rn )
=1+ 42= 3
r1=1
r2=3 You already found the cri)cal point in only one step!
![Page 12: Newtons Method Notes - fri.cnm.utexas.edufri.cnm.utexas.edu/fri/stream/Course_Notes/Newtons_Method_Notes.… · Newtons_Method_Notes.pptx Author: Duncan, Juliana R Created Date: 2/6/2018](https://reader031.vdocuments.site/reader031/viewer/2022022601/5b4a55de7f8b9aa82c8c1eff/html5/thumbnails/12.jpg)
Newton’s Method (NM) • Here is why:
– NM assumes that a second order Taylor expansion is accurate around your current posi)on:
– Then a near-‐by cri)cal point is approximated by taking the deriva)ve of Vapprox , seang it equal to zero, and solving for r
– Below is the equa)on found when solving for r in the equa)on above. No)ce that this is the same as the Newton’s Method equa)ons introduced earlier. We just derived NM! (If you want to see all the algebra, check out the last slide!).
Vapprox (r) =V (r0 )+V '(r0 )(r − r0 )+12V ''(r0 )(r − r0 )
2
Vapprox '(r) =V '(r0 )+V ''(r0 )(r − r0 ) = 0
rn+1 = rn +F(rn )V ''(rn )
Newton’s Method algorithm!
r = r0 −V '(r0 )V ''(r0 )
![Page 13: Newtons Method Notes - fri.cnm.utexas.edufri.cnm.utexas.edu/fri/stream/Course_Notes/Newtons_Method_Notes.… · Newtons_Method_Notes.pptx Author: Duncan, Juliana R Created Date: 2/6/2018](https://reader031.vdocuments.site/reader031/viewer/2022022601/5b4a55de7f8b9aa82c8c1eff/html5/thumbnails/13.jpg)
Newton’s Method
• Since a second order Taylor expansion works perfectly for a parabola, NM works in one step!
• In the extra credit assignment, you will implement Newton’s method and apply it to the L-‐J poten)al (it will not be as simple as the example shown in these slides!)
• You will explore some of the issues that come up in Newton’s Method and start to think about how we can address these problems.
![Page 14: Newtons Method Notes - fri.cnm.utexas.edufri.cnm.utexas.edu/fri/stream/Course_Notes/Newtons_Method_Notes.… · Newtons_Method_Notes.pptx Author: Duncan, Juliana R Created Date: 2/6/2018](https://reader031.vdocuments.site/reader031/viewer/2022022601/5b4a55de7f8b9aa82c8c1eff/html5/thumbnails/14.jpg)
Newton’s Method (NM) • Here is why:
– NM assumes that a second order Taylor expansion is accurate around your current posi)on:
– Then a near-‐by cri)cal point is approximated by taking the deriva)ve of Vapprox , seang it equal to zero, and solving for r
Vapprox (r) =V (r0 )+V '(r0 )(r − r0 )+12V ''(r0 )(r − r0 )
2
Vapprox '(r) =V '(r0 )+V ''(r0 )(r − r0 ) = 0V '(r0 )+V ''(r0 )(r − r0 ) = 0V ''(r0 )(r − r0 ) = −V '(r0 )
r − r0 =−V '(r0 )V ''(r0 )
r = r0 +F(r0 )V ''(r0 )
rn+1 = rn +F(rn )V ''(rn )
Newton’s Method algorithm!