[xcrysden] How does xcrysden calculate and show the length of the force!

Tone Kokalj xcrysden@democritos.it
Fri, 08 Dec 2006 10:42:54 +0100


Yingli Niu wrote:
>   Have you ever plot forces using xcrysden?
> e.g. there are 2 atoms in the primitive
> cell(case.xsf):
> 
> 6  0.00 0.00 0.00  0.00 0.00 1.00
> 6  0.25 0.25 0.25  0.00 0.00 2.00
> 
> Surely you can set the data:
> 
> 6  0.00 0.00 0.00  0.00 0.00 1.00
> 6  0.25 0.25 0.25  0.00 0.00 3.00
> 
> But you will find the length of force of atom 2 is
> more longer than atom1. It is not 1:2  or 1:3 .
> 
> Is it a bug?

Yes, it is. Thank you very much for spotting it. The size of the force
was, unfortunately, accounted twice, so the scaling was quadratic and
not linear.
THIS IS A SEVERE BUG. For everyone that uses the force-feature of
xcrysden, you may wish to download the fixed version from:

Linux static version:
http://www.xcrysden.org/download/xc-pre1.5b-linuxPC-static.tar.gz

Sources:
http://www.xcrysden.org/download/xc-pre1.5b-src.tar.gz


> Where is the code the plot the force?

It is in C/xcForces.c and C/forces.c. The bug was in the first file.

Regards, Tone