I've attached a python script below which will convert a gsas rfl file
into shelx hklf 4 format - it assumes there is no peak overlap at all,
so it is *not* hklf 5 format and *not* suitable for refinement!

After installing python from www.python.org and copying the script into
your working directory (eg c:\mydata) the usage from a dos prompt would be:

c:\mydata> rfltoshelx.py mydata.rfl mydata.hkl

It just picks out the h,k,l,FoSq,sig columns and scales the intensities
so they can be written within the fixed width limit for shelx.

good luck,

Jon

============== rfl2shelx.py ==================
#!/usr/bin/env python

import sys

data = []
max_intensity = 0.
for line in open(sys.argv[1],"r").readlines()[1:]:
try:
[H,K,L,M,sth_lam,TTH100,FWHM,FoSq,sig,Fobs,obs,phase] = [float(x) for x
in line.split()]
except:
break
data.append([H,K,L,FoSq,sig])
if FoSq > max_intensity:
max_intensity = FoSq

scale = 9999.99/max_intensity
outputfile = open(sys.argv[2],"w")
for [H,K,L,FoSq,sig] in data:
outputfile.write("%4d%4d%4d%8.2f%8.2f\n"%(H,K,L,FoSq*scale,sig*scale))
outputfile.close()





Dr. Yi-Ping Tong wrote:

>   But the 'R' option of REFLIST of GSAS just generates file format designed 
> for use by SIRPOW, not by SHELXTL-97. I want know how GSAS can prepare a 
> intensity and hkl value file designed for use by SHELXTL-97. Thanks in 
> advance.
>       
>Best wishes
>
>Dr. Y.-P. Tong
>
>
>
>
>
>
>
>                               
>
>Use "R" option in REFLIST
>
>R.B. Von Dreele
>IPNS Division
>Argonne National Laboratory
>Argonne, IL 60439-4814
>
>
>
>-----Original Message-----
>From: Dr. Yi-Ping Tong [mailto:[EMAIL PROTECTED] 
>Sent: Tuesday, May 30, 2006 9:55 AM
>To: Rietveld BBS
>software?
>
>
>
>Dear all
>
>Does anybody could tell me how GSAS can extract intensity and hkl
>valuesneeded by SHELXTL-97 software for structure determination ?  
>
>Any suggestions or comments are welcome. Thanks in advance.
>
>
>
>Best wishes
>
>Dr. Y. P. Tong
>
>China
>
>
>
>
>
>
>
>
>
>  
>


Reply via email to