[SciPy-User] optimize.fmin_cg and optimize.fmin_bgfs optimize to 0
Patrick Holvey
pholvey at gmail.com
Tue Jun 7 15:23:46 EDT 2011
Good afternoon everyone,
I've got an analytic gradient for an energy potential that I'm using to
minimize the energy for atom positions (the Keating potential on an system
of silica atoms). I'd previously used fmin_cg without an analytical
gradient (the gradient was estimated) but, if I'm going to be looking at
larger systems, estimated gradients slow the optimization to a crawl. So
I've found and coded the analytic gradient. However, when I use the
gradient in the optimization, all of the atom positions shoot right to the
origin (so they're all at 0,0,0) after just 2 function calls and 1 gradient
call, which seems very odd to me. So I tried fmin_bgfs with the gradient
and the same thing happened. Does anyone have any experience with analytic
gradients where this has happened to them? I'm confused as to whether the
problem is in my gradient implementation or in how I'm passing the gradient
or what.
For your reference, I've included my current implementation of the WWW
algorithm for silica to this email. Any and all help is always appreciated,
as I've been stuck on this for far too long. I'm still learning the finer
points of python programming (I wasn't a comp sci major in undergrad) so any
general pointers are also appreciated. Thanks so much,
Most sincerely,
Patrick Holvey
--
Patrick Holvey
Graduate Student
Dept. of Materials Science and Engineering
Johns Hopkins University
pholvey1 at jhu.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20110607/595afa94/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: autosimplewwwV4.py
Type: text/x-python
Size: 27377 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20110607/595afa94/attachment.py>
More information about the SciPy-User
mailing list