Installation Instructions
We recommend that you install the required software through conda, using the echem_min.yml file provided (download here). The computers should already have conda installed. Open a terminal and see if the prompt contains (base) on the left hand side of the terminal window. If this is not the case, you can install conda using the minimal conda installe miniconda. Please download the appropriate installer for Linux and follow the installation instructions on the miniconda website.
Once ready, you can install, run, and control Jupyter using a command prompt. Download the echem_min.yml file and navigate to the folder with the prompt command:
cd /path/to/echem_min.yml
Check which type of solver your conda is using by running the following command:
conda info
Check the information printed on the line starting with user-agent. If you see "conda-libmamba-solver" on this line, you are all set. If you see a different solver name, please run the following commands:
conda update -n base conda
conda install -n base conda-libmamba-solver
conda config --set solver libmamba
Now you are ready to install the software indicated in the echem_min.yml file by running the following command:
conda env create -f echem_min.yml
Once the installation is finished, activate the new conda environment:
conda activate echem-min
To see that the installation worked correctly, start a Jupyter notebook by running the command:
jupyter-lab
Creat a new notebook using the Python3 ipykernel and run the following Python code in the first cell:
import veloxchem as vlx
If you get two warnings, but no errors, then the installation worked correctly.
Once you are ready with the installation, download the zip-file required for the tutorial, 16dec.zip: here. Create a folder with your name and unzip the file in that folder:
mkdir my_name_here
cd my_name_here
cp /path/to/16dec.zip ./
unzip 16dec.zip
ls
You should see four files listed: (1) quantum_mechanics_greenhouse_gases_student.ipynb, (2) im.py, (3) forcing, and (4) hessian.h5. These are all needed for the tutorial, but the main file which you need to open is the Jupyter notebook file called quantum_mechanics_greenhouse_gases_student.ipynb. Open it with jupyter-lab and you are ready to start!
jupyter-lab quantum_mechanics_greenhouse_gases_student.ipynb
Troubleshooting Tips
1. For Windows users:
- After activating the conda environment, the environment variable KMP_DUPLICATE_LIB_OK should have been automatically set to TRUE. You can check it by,
- in Anaconda prompt: echo %KMP_DUPLICATE_LIB_OK%
- in Anaconda Powershell prompt: $env:KMP_DUPLICATE_LIB_OK
2. For ARM mac users:
-
Make sure that the arch command returns arm64 in terminal.
-
Make sure that the "Miniconda3 macOS Apple M1 64-bit" installer was used to install miniconda.
-
Make sure that, after activating base or any other conda environment, the following command also returns arm64: python -c 'import platform; print(platform.machine())'.
3. For all users:
- Python 3.11 might print some warnings about frozen modules. To suppress those warnings, set the environment variable PYDEVD_DISABLE_FILE_VALIDATION to 1.
- If the user does not want to use all threads on the laptop, set OMP_NUM_THREADS to a suitable number.
Useful Tutorials
We have chosen to use Python as the high-level programming and interfacing layer on account of its flexibility, ease of use, and extensive ecosystem. As the framework for carrying out the calculation and for analysis, as well as enabling the intermingling of calculation and text, we use Jupyter. If you are unfamiliar in the use of these software packages, there is a wealth of resources which can help you get better accommodated with these tools, such as:
-
For those unfamiliar with using Jupyter, you can try an online version, and tutorials such as this one for creating and running a notebook for calculating π with Monte Carlo.
-
For Python you can look at W3Schools, which hosts comprehensive tutorials for a large number of programming languages and modules.
-
There exists a plethora of different Jupyter books, such as this one dedicated to teaching scientific computing for chemists.
The main quantum chemical software which will be used is VeloxChem.