[SciPy-User] Optimize.fmin_cg INCREASES total forces after minimization
Wed Sep 14 11:26:18 CDT 2011
Patrick Holvey <pholvey <at> gmail.com> writes:
> 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-- Patrick HolveyGraduate StudentDept. of Materials
Science and EngineeringJohns Hopkins Universitypholvey1 <at> jhu.edu
> Attachment (autosimplewwwV5.py): text/x-python, 26 KiB
> Attachment (test-angle.xyz): chemical/x-pdb, 201 bytes
> SciPy-User mailing list
> SciPy-User <at> scipy.org
Please disregard this communique. It appears that the derivation of the forces
that I was using was flawed, so have to fix that before I can get back to
debugging. Back to the drawing board...
More information about the SciPy-User