tutorial_TOPilot_AI
TOPilot AI in TOPAS
The VS Code topas-editor extension lets you install a set of skills to work with either Claude Code, GitHub Copilot or ChatGPT’s Codex. The skill (topas-inp-writer) has been developed by John, Alan and Oliver Wagstaff based on the TOPAS manual, the source code, this website, the wiki, other training material and 1000s of pre-existing INP files.
You should treat it as experimental and remember that you are responsible for all INP files created.
Most of the testing has been done with Claude
How to install and configure.
1. You will normally be asked to configure TOPilot when topas-editor updates. You should then update the topas-inp-writer skill periodically: go to the “TOPilot AI interface” menu and click “Install/update TOPAS AI skills”.
2. Information about how to configure TOPilot are in the “TOPilot help/disclaimer” menu.
3. There is information on using TOPilot on my YouTube channel.
3. You will need a Claude/Copilot/Codex account.
4. You will need python installed.
Example use
1. In VS Code open the folder c:\users\your_user_name\.claude\skills\topas-inp-writer\test_examples. You might want to make a copy of the folder.
2. Open the “instructions.md” file in each folder. With Claude, click on the orange star in the top right of the window and ask Claude to “execute the instructions in instructions.md”. Watch what happens. You may get prompted to allow commands. At various points it will open html files with plots or other results. Each analysis might take 30 minutes to run. Start with the simplest lamno3_rietveld example.
3. There are some very short prewritten prompts you can send directly to each of the AI tools. If you have a pay-as-you go account these may be the cheapest route.
4. Try some of the following commands on an open INP file:
- Summarise this inp file
- Check file (e.g. add some typographical errors first)
- Set the topas hierarchy (will make nice tab indents)
- Set coordinates and cell parameters to refine as allowed by symmetry.
- Fit and plot
- Create a report of the Rietveld as a word document.
- Expand INP file (expand macros and include files)
- Add ADPs to selected sites
- Plot str in 3D (ADPs are plotted)
- Show heatmap (if you have a correlation matrix)
- Macro Browser (loads the html is TOPAS_DIR)
5. Open any folder containing a powder pattern and a structural model (e.g. in a CIF file). Ask TOPilot to “do a Rietveld fit of pattern.xy using the model in structure.cif”
7. Try any other powder-related commands you like.
8. Be critical of any analysis performed.