Hi Ross,

I am not sure if you can do it with a macro - If Alan says no, may be it cannot 
be done. But, if I am understanding your question correct:

Yes, you can output only the intensities of the hkl's you want; and also you 
can automate the whole process - works like a charm.

1. Create "variable names" for all the intensities you will need (this step is 
conveniently done in GUI mode, but can be directly done in launch file too)
2. Output a .inp file
3. Write instructions for getting necessary output
4. Create a batch file with input and output file names (of course, several 
copy, paste, and minor edit, may be necessary if you want the results from a 
number of files)
5. Run the batch file

Refer to the "Technical Reference" manual (TOPAS 4.1) section 13 titled 
"Automated TOPAS Operation" and the associated tutorial files in the tutorial 
directories. 

Good luck,

Bhuv

Texas A&M Univ
Coll. Stn. TX



--- On Thu, 12/4/08, AlanCoelho <[EMAIL PROTECTED]> wrote:

> From: AlanCoelho <[EMAIL PROTECTED]>
> Subject: RE: macro's in TOPAS
> To: "'Ross Williams'" <[EMAIL PROTECTED]>, rietveld_l@ill.fr
> Date: Thursday, December 4, 2008, 4:10 AM
> Hi Ross
> 
> There's no way of outputting a selection of hkls;
> it's all or none.
> 
> You can however omit hkls at the start of the refinement;
> ie.
> 
>       omit_hkls = And(H, K, Mod(L, 2));
>       omit_hkls = H > 10;
>       etc...
> 
> You can use this in an indirect manner to first refine
> using all hkls and
> then in a subsequent refinement omit the unwanted hkls; ie:
> 
> tc INP_FILE "macro M_ {}"
> copy INP_FILE.OUT INP_FILE.INP
> tc INP_FILE "macro M_ { omit_hkls = H; iters 0 }"
> etc...
> 
> where the macro M_ is placed at the str level; ie.
> 
>       xdd...
>               str...
>                       M_
> 
> Alternatively an actual program can be written to
> manipulate the output hkl
> file; this should be trivial to do. I will for future
> reference however
> consider outputting a selection of hkls.
> 
> Cheers
> Alan
> 
> 
> 
> 
> -----Original Message-----
> From: Ross Williams [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, 4 December 2008 7:41 PM
> To: rietveld_l@ill.fr
> Subject: macro's in TOPAS
> 
> Dear All,
> 
> I am trying to write a macro in TOPAS (version 4) to output
> the intensities
> of specific reflections for each phase, for the purposes
> comparing multiple
> structures of the same phase from the literature.
> 
> To date I have been able to achieve this by using the
> following macro which
> output all the hkl's and the intensity of each, then I
> use a spreadsheet
> package to sort my data appropriately, but this is
> cumbersome and I have
> hundreds of structures I  would like to examine. 
> 
> 
> macro out_specific_hkl_details(file)
> {
>  phase_out file append load out_record out_fmt out_eqn
>    {
>               " %s" = Get(phase_name);
>               " %3.0f " = H;
>               " %3.0f " = K;
>               " %3.0f " = L;
>               " %11.5f \n " = I_after_scale_pks;
>    }
> }
> 
> 
> Ideally I would like to output:
> 
> Phase1Name I(hkl_1) I(hkl_2) I(hkl_3) I(hkl_4) I(hkl_5)
> Phase2Name I(hkl_1) I(hkl_2) I(hkl_3) I(hkl_4) I(hkl_5)
> Phase3Name I(hkl_1) I(hkl_2) I(hkl_3) I(hkl_4) I(hkl_5)
> Phase4Name I(hkl_1) I(hkl_2) I(hkl_3) I(hkl_4) I(hkl_5)
> 
> The problem is I can't work out how to output
> parameters for specific hkl's,
> can anyone help me?
> 
> 
> Thanks,
> 
> Ross
> 
> 
> +++++++++++++++++++++++++
> Ross Williams
> PhD Student
> Centre for Materials Research
> Department of Imaging and Applied Physics
> Curtin University of Technology
> GPO Box U1987 Perth WA 6845
> Western Australia
> Phone: +61 (0)8 9266 4219
> Fax:     +61 (0)8 9266 2377
> Email:   [EMAIL PROTECTED]


      

Reply via email to