out_int_out_ins
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
out_int_out_ins [2023/05/08 14:02] – created johnsoevans | out_int_out_ins [2023/05/19 22:28] (current) – [To use the macros] iangie | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Macros to output .ins and .int files ===== | ||
+ | The macros in this page are for TOPAS v7 to export .ins (instruction) file and .int (intensity, data) file to be further processed in [[https:// | ||
+ | |||
+ | I have spent some time to teach myself Japanese and gone through most part of its manuals. The Maximum Entropy Method (an algorithm to refine 3D electron cloud in unit cell) could be useful in TOPAS community. | ||
+ | Compare to those derived from crystal structure model (Space group, unit cell, atomic positions), structure factors derived from 3D electron cloud may fit measured patterns better, especially in organic crystals containing covalent bonds. The visualization of 3D electron cloud is also promoted by recent trend of visualizing ion transfer channels in the research field of solid electrolyte etc. | ||
+ | |||
+ | However, not like TOPAS in which a simple refinement could be set within ~20 lines of .inp file, the template .ins file for RIETAN-FP (exported by VESTA) is 1000+ lines, which I find not very user friendly. | ||
+ | With below 2 macros, TOPAS v7 can output the experiment data in .int format and the instruction file .ins for RIETAN-FP to process (with some Ad hoc editing). Hopefully they can bridge these two software better. | ||
+ | |||
+ | If any user in our open TOPAS community has suggestion or idea, or bug report on these macros, please kindly let me know and I am happy to learn from you: [[tony.wang@qut.edu.au]] | ||
+ | |||
+ | ==== To use the macros ==== | ||
+ | Copy and paste the Out_Int and Out_Ins macros at the end of this page into your local.inc, restart TOPAS to make them in effect. | ||
+ | The Out_Ins macro has equations built in to carry as much info from TOPAS model to RIETAN-FP .ins file. | ||
+ | LP_Facotr needs a name !lpf; X-ray footprint length needs a name !FPlenght, if Variable Divergence Slit is used. | ||
+ | So far, they work for single phase refinement only (MEM is refining single phase anyway.) | ||
+ | To use them, place them at the end of the " | ||
+ | |||
+ | <code topas> | ||
+ | xdd | ||
+ | ... | ||
+ | LP_Factor(!lpf, | ||
+ | [ lpsd_th2_angular_range_degrees | ||
+ | [ lpsd_equitorial_divergence_degrees | ||
+ | [ lpsd_equitorial_sample_length_mm !FPlength 20 ] | ||
+ | [ | ||
+ | ... | ||
+ | str | ||
+ | ... | ||
+ | phase_name " | ||
+ | ... | ||
+ | |||
+ | Out_Ins(same_phase_name) | ||
+ | Out_Int(same_phase_name) | ||
+ | </ | ||
+ | |||
+ | |||
+ | == Ad hoc editing == | ||
+ | Since it is hard to export apostrophe and comma from TOPAS (they are required by RIETAN-FP), I have used ' | ||
+ | Also the ions in RIETAN-FP are written like " | ||
+ | Below chstr_batch.bat file, using the string replacing program " | ||
+ | <code topas> | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | chstr %1 " | ||
+ | </ | ||
+ | |||
+ | Put the " | ||
+ | |||
+ | The final touch before the .ins file can be processed by RIETAN-FP is changing the space group number after "VNS1 =" and H-M mark after "HKLM1 =" from TOPAS style to RIETAN-FP style, so far I couldn' | ||
+ | |||
+ | ==== The macros ==== | ||
+ | === Out_Int === | ||
+ | |||
+ | <code topas> | ||
+ | macro Out_Int(phasename) { | ||
+ | xdd_sum NumData =1;:0 | ||
+ | out phasename## | ||
+ | {" | ||
+ | } | ||
+ | xdd_out phasename## | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | === Out_Ins === | ||
+ | |||
+ | https:// |
out_int_out_ins.txt · Last modified: 2023/05/19 22:28 by iangie