CXASAP Windows Installation Instructions

These instructions are to install CXASAP on Windows. You can also install it on a Linux virtual box, which will give you access to more functionality. But if you are just using CXASAP for refinement and structural analysis, this probably won’t be necessary. If you want to install it in a linux environment, or on a Mac, see the CXASAP installation guide here for instructions.

Pre-setup

You will need platon, pwt, shredcif and shelxl in your path environmental variable of your computer. 

Download them here: 

See here for how to add them to your PATH.

Video tutorial

Please download this tutorial video to see how to do various steps.

Step 1. Download the C++ development tools for Windows. 

Go to   and under Visual Studio 2022 select "Community 2022 from the dropdown menu, this will download VisualStudioSetup.exe

When you run VisualStudioSetup.exe, select “Desktop development with C++” and install it.

Select the “Desktop development with C++” option, and click “Install”

 

Step 2. Make a folder in your C drive called CXASAP

 

Step 3. Download and install Python 3.8.10

Important note: Although Python3.8 is not the most recent version, CXASAP will run into problems with different versions of Python due to compatibility with various python packages and their versions, so please install Python 3.8.10 unless you absolutely must use a different version.

Go to python archive website to find the installer for Python 3.8.10. Scroll down and select “3.8.10”.

Find the correct installer. It will likely be “python-3.8.10-amd64.exe”. If you have a 32bit computer, you will need this one: python-3.8.10-embed-win32.zip

Run the installer and in the first step make sure you tick the box that says "add python.exe to PATH" 

Take note of where python installs on your computer. It will probably install somewhere like this: “C:\Users\YOURNAME\AppData\Local\Programs\Python\Python311\python.exe”

If you can’t see AppData, in Windows Explorer, go to the View tab and check the box called “Hidden icons”

Step 4. Set your python3 alias. 

Open powershell in the CXASAP folder you made. To open powershell in a folder, open that folder in windows explorer, click in the address bar and type powershell and hit enter. 

Then run these commands:

New-Item -Type file -Force $profile notepad $profile

You then want to add to this document a line that tells powershell where to look for python

Set-Alias python3 "C:\Users\username\AppData\Local\Programs\Python\Python311\python.exe"

This was for where python was installed on my computer. But you will need to change it to where the python.exe executable is on yours. 

Save the file, close powershell.

 

Test that the alias has worked, open powershell in the CXASAP folder again and type:

python3

You should get something that looks like this:

Note that you need to type exit() to close python and get back to normal powershell operations. 

If this doesn’t work, go to where python is installed on your computer and find python.exe. Make a copy of it and name it python3.exe. Then test it again in powershell.

If you have another version of Python already on your computer and you want that to be the default when you run python, then you will need to set another alias, like this:

This means you will have two lines in the profile file, one fore python3 and one for python.

Step 5Restart your computer

Step 6. Download code

Download the main branch of CXASAP from github: 

Now download the data by clicking the green “Code” button and selecting “Download ZIP”

After it has downloaded, go to your downloads folder and extract everything in the ZIP folder into the CXASAP folder in your C drive that you made earlier. 

Step 7. Make virtual environment and activate

Open Powershell in the CX-ASAP-MX_teaching folder and run these commands (one line at a time) to make the virtual environment, activate it, install all the python packages and then make the sys.yaml file.

Your terminal should look like this:

The green text at the start of the line shows that the virtual environment is active. 

Please note: You need to activate the virtual environment every time you open a terminal to use CXASAP, by running this command:

If you get the error "...cannot be loaded because running scripts is disabled on this system", open Powershell as administrator and type the command:

Then type "y” to agree to the change when prompted.

Step 8. Check cxasap 

Check that is has installed correctly by running the cxasap command. You should see this:

Note: There are multiple more lines under this, so you may need to scroll up in your terminal to see this. 

Step 9. Run cxasap test

In powershell, run this command to test the installation:

Wait awhile...

If you see this, you have successfully installed CXASAP!

 

Now you can start your analysis.

If you would like to analyse photochemistry experiments, see for instructions.

If you would like to use CXASAP for high pressure experiments, see for instructions