Carlo's problem with wurtzite
Hi folks, Last week Carlo posted a problem he was having with a hexagonal space group. He was getting different results when entering data directly into TkAtoms than when he saved the input data and reread it into TkAtoms. I finally found the source of the problem. All output files in TkAtoms are formatted according to "template files". The reason these template files exist is to make it easy for the user to tweak the appearence and content of the files Atoms writes out. Unfortunately there is a bug in the template that is used to save the input data to an atoms.inp file. In Carlo's example, one of the atoms was at the position (1/3,2/3,0). When Atoms save the data, it saved that position as (0.3333,0.3333,0), i.e. with four digits of precision. It turns out that Atoms considers *five* digits of precision, so it was not recognizing that 0.3333 was meant to represent 1/3. This lead directly to the problem that Carlo reported. Eventually Carlo was able to explain this to me in a way that made it into my very dense skull! ;-) This problem will be fixed in the next release of Atoms. Anyone who wants to fix this problem beforehand, here are the simple instructions: unix people: 1. Copy the atoms.atp file to your ~/.atoms/ directory. (Create it if it does not already exist.) The atoms.atp file will be found in someplace like /usr/lib/perl5/site_perl/5.8.0/Xray/atp/ 2. Edit ~/.atoms/atoms.atp and change the precision in the first non-comment line from 8.4 to 9.5. 3. Save the file and fire up TkAtoms. Should work now. windows people: 1. Using WordPad or NotePad, edit the file C:\Program Files\Ifeffit\perl\Xray\atp\atoms.atp 2. Change the precision in the first non-comment line from 8.4 to 9.5. 3. Save the file and fire up TkAtoms. Should work now. There is a moral to this story. Atoms handles numerical precision in a quirky manner. If it is possible to use a factional representation of a number, do so. (I.e. always use "1/3" rather than 0.33, 0.333, 0.3333, or 0.33333 -- even though the last one will, in fact, work correctly.) Thanks to Carlo for finding this problem and to Peter for a valient if unsuccessful stab at solving the problem. Thanks guys! B -- Bruce Ravel ----------------------------------- ravel@phys.washington.edu Code 6134, Building 3, Room 222 Naval Research Laboratory phone: (1) 202 767 5947 Washington DC 20375, USA fax: (1) 202 767 1697 NRL Synchrotron Radiation Consortium (NRL-SRC) Beamlines X11a, X11b, X23b National Synchrotron Light Source Brookhaven National Laboratory, Upton, NY 11973 My homepage: http://feff.phys.washington.edu/~ravel EXAFS software: http://feff.phys.washington.edu/~ravel/software/exafs/
For those of you who use the Debian Linux packages I hav in my repository, the fix has been made in the latest update. No need to make the changes Bruce suggests as long as you install the latest. Carlo On Thu, 6 Nov 2003, Bruce Ravel wrote:
This problem will be fixed in the next release of Atoms. Anyone who wants to fix this problem beforehand, here are the simple instructions:
unix people: 1. Copy the atoms.atp file to your ~/.atoms/ directory. (Create it if it does not already exist.) The atoms.atp file will be found in someplace like /usr/lib/perl5/site_perl/5.8.0/Xray/atp/ 2. Edit ~/.atoms/atoms.atp and change the precision in the first non-comment line from 8.4 to 9.5. 3. Save the file and fire up TkAtoms. Should work now.
windows people: 1. Using WordPad or NotePad, edit the file C:\Program Files\Ifeffit\perl\Xray\atp\atoms.atp 2. Change the precision in the first non-comment line from 8.4 to 9.5. 3. Save the file and fire up TkAtoms. Should work now.
There is a moral to this story. Atoms handles numerical precision in a quirky manner. If it is possible to use a factional representation of a number, do so. (I.e. always use "1/3" rather than 0.33, 0.333, 0.3333, or 0.33333 -- even though the last one will, in fact, work correctly.)
Thanks to Carlo for finding this problem and to Peter for a valient if unsuccessful stab at solving the problem. Thanks guys!
B
-- Carlo U. Segre -- Professor of Physics Associate Dean for Special Projects, Graduate College Illinois Institute of Technology Voice: 312.567.3498 Fax: 312.567.3494 segre@agni.phys.iit.edu http://www.iit.edu/~segre
participants (2)
-
Bruce Ravel
-
Carlo U. Segre