Skip to main content

Tutorial Running Examples

TOPAS/TA/TC – how to run INP files

TOPAS Academic (TA) and the command line version (TC) are controlled using input (INP) files. The commercial GUI version of TOPAS can also run using these same files. This page describes four different ways or running INP files.

1. Using launch/Set INP file – no setup

1. You can tell any version of TOPAS to run a specific INP file using “Launch/Set INP file” in the top menus. In the run window (hit F5 if it isn’t shown) you will see the name of the INP written. In the example shown below it is called d5_05005.inp.

2. Hit the red arrow in the run window to run the file. In the image below it is top centre, just below “y”. It looks something like:

3. In the commercial version of TOPAS the run window will have a small “rocket” icon which toggles you between launch mode (runs from an INP file) and GUI mode.

4. The TOPAS window will look something like the image below.

2. Using topas-editor

1. The topas-editor extension in vs code is the most convenient way to interact with TOPAS. Details of what it does and how to install it are here.

2. If you open an INP file in topas-editor your screen will look something like the image below.

3. If you click “Send INP to TOPAS” in the left hand menus or click ctrl-ts the INP file is saved, a .backup is made, and the TOPAS run window will show you that this INP file is being used.

5. If the left hand TOPAS menus aren’t visible, click on the white “triangle in circle” icon. If it’s not visible then your topas-editor setup isn’t correct.

6. If they’re not already open, you can run either TOPAS Academic or the Bruker TOPAS using the icons on the left. TOPAS Academic can only be opened once.

7. Run the refinement by clicking the red arrow in the TOPAS run window. After refinement the INP file in topas-editor will automatically update with refined values.

8. You can also run the INP file directly from topas-editor by clicking on “Run TC on INP” or ctrl-tc. This will run the command line version of TOPAS (TC.EXE), you will see the Rwp in the terminal window of topas-editor. The INP file will be updated at the end of the refinement. You don’t see any graphics in this mode.

9. Inside the TOPAS_vn_Menus folder there is a folder called “Examples”. Within this you can find 100s of prewritten INP files. Any can be opened and run by clicking on the icon.

3. Using command line TC.EXE

1. TC.EXE is a command line version of TOPAS that will run INP files without any graphics. It is useful if you want to (e.g.) use python scripts to process large amounts of data in a way that is too complex for the built in #list methods.

2. In a powershell or command window change to the relevant direcory and type something like: c:\topasa_v8\tc.exe filename.inp. You may need to give the full pathname of filename.inp. The quick way of getting to the right directory is to just type “powershell” or “cmd” in the bar at the top of the windows explorer window.

4. Using jEdit

jEdit was the default way to interact with TOPAS academic before topas-editor, and should still work. jEdit instructions are retained here for legacy reasons.

TA examples can be easily run using jEdit. You can either open a prepared input file directly in jedit or use menus to find Alan’s example files.

Built in examples can be found within jEdit. Open the XInsert node “Topas_v4.1_Menus / Examples”. Open the node called Rietveld refinement. Click on the item called var_div_y2o3.inp. This loads the INP file var_div_y2o3.inp into jEdit from the directory test_examples found in the main TA directory. The jEdit screen should look like the following:

Click on the icon   to start TA. Note, once TA is started it is not necessary to start it again.
Click on the icon   .which sends the name of the present INP file to a text file in the main TA directory called LAUNCH_FILE.TXT. This simply instructs TA to operate on the INP file in the active jEdit view which in this case is ae1-adps.inp.
Alt-Tab to TA and press the icon in the Fit Window looking like   .; this starts the refinement of var_div_y2o3.inp.

At the end of refinement TA asks whether to update the INP file with the refined results; answer yes.

Alt-Tab back to jEdit; jEdit will automatically load the updated var_div_y2o3.inp file with the refined parameters shown in red.

All examples under the node “Examples” can be run in the manner described above. It is useful to look through the examples and try running a few.