Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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, see the CXASAP extended installation guide here for instructions.

Pre-setup

You will need the CXASAP extended installation guide, which you can access here.

You will also need platon, 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.

https://drive.google.com/file/d/1IFYNBWvGWjxl38sy5I2iooEj5QUcDmo8/view?usp=sharing

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

Go to https://visualstudio.microsoft.com/  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.

...

Step

...

Go to https://visualstudio.microsoft.com/  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.

...

Video tutorial

...

2. Make a folder in your C drive called

...

CXASAP

Step 3. Download and install Python 3.11

Go to https://www.python.org/downloads/windows/  

...

. Scroll down and select “Python3.11.6 - Oct 2. 2023”.

Scroll to the bottom and select the Windows Installer (64-bit).

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:

Code Block
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

Code Block
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:

Code Block
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.

Step 5Restart your computer

Step 6. Download code

Download the MX_teaching branch of CXASAP from github: https://github.com/cx-asap/CX-ASAP/tree/main

On the top left, click the button that says “main” and select “MX_teaching”. This will change to the MX teaching branch.

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.

Code Block
python3 -m venv cxasap_venv
.\cxasap_venv\Scripts\activate
pip install -e .
python .\cx_asap\system_files\setup_sys_yaml.py

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

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

Code Block
Set-ExecutionPolicy RemoteSigned

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:

Code Block
cxasap test

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 CXASAP for photochemistry experiments for instructions.

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