[SciPy-User] Optimize.fmin_cg INCREASES total forces after minimization

Patrick Holvey pholvey@gmail....
Mon Sep 12 22:30:32 CDT 2011

Hi everyone,

I've got the attached program which I've detailed in previous emails.  I'm
working on debugging my gradients (which I think I have) but something weird
is going on.  When you load the program (from autosimplewwwV5 import *) into
the interpreter and call TrueSystem.getforces() it returns the sum of the
absolute values of the forces experienced by the atoms.  Ok, so when I run
TrueSystem.relax() it runs the system through fmin_cg a number of times.
Here, I'm not sure why it's only going through 5-7 iterations a run before
quitting so I have it run multiple (50) times to get some relaxation going
on.  After running the relaxation, I call getforces() again, only to see
that the forces have increased!  (from 625 to 640) Very curious.

I've attached both the full code and the test atom setup (a three atom
system, 1 Si atom bonded to 2 Oxygen atoms in an angle configuration).  As
expected, initially, the forces indicate the Si atom wants to pull up from
the O atoms and the O atoms want to move away from each other and down, away
from the Si atom.  This is not what happens.  In fact, both of the oxygen
atoms move towards each other compressing the O-Si-O angle, and only
marginally lengthening the O-Si bond. This can be seen by calling
TrueSystem.writetofile("Filename") which will output a .xyz of the current
system configuration.

Any help on this is greatly appreciated.  Thanks so much.


Patrick Holvey
Graduate Student
Dept. of Materials Science and Engineering
Johns Hopkins University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20110912/f5ce90e7/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: autosimplewwwV5.py
Type: text/x-python
Size: 27095 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-user/attachments/20110912/f5ce90e7/attachment-0001.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-angle.xyz
Type: chemical/x-pdb
Size: 200 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-user/attachments/20110912/f5ce90e7/attachment-0001.pdb 

More information about the SciPy-User mailing list