Mandatory:
Recommended:
Moreover, xmolecule uses libcint for the gaussian integrals. It will be automatically downloaded and installed by cmake below.
The xmolecule repository is located at https://gitlab.desy.de/CDT/xraypac.
Please clone the repository using
git clone https://gitlab.desy.de/CDT/xraypac.git
It is recommended to setup a separate python environment. To do so, you may install miniconda.
Create and activate a new python environment and install pip using
conda create -n xmol
conda activate xmol
conda install pip
Enter the main repository folder and install the required python packages using
cd xmolecule
pip install -r requirements.txt
If you want to use the intel compiler, make sure that you load the appropriate environment variables.
Depending on where your intel compiler is installed this can be done via
. /opt/intel/2024/oneapi/setvars.sh intel64 --force
Next, create a build directory and cd into the build directory and run cmake.
To use the intel compiler and prepare for installing xmolecule locally in your home directory, you use
mkdir build; cd build
CC=icx FC=ifx cmake .. -DCMAKE_INSTALL_PREFIX=$HOME
or, if you prefer the gnu compiler, use
mkdir build; cd build
CC=gcc FC=gfortran cmake .. -DCMAKE_INSTALL_PREFIX=$HOME
Moreover, you can employ the following combinations of options
-DWITH_DEBUG=true # to create binarys for debugging
-DWITH_OPENMP=true # to create binarys for parallel computation (openmp)
-DCMAKE_INSTALL_PREFIX=$HOME # to prepare installation in your home directory (or anywhere else)
After cmake has completed, you can run
make
Before you run tests, you have to setup the path to the xatom binary. For example, you may setup the path using
export XATOM_PATH=$HOME/XATOM/src/xatom
and replace $HOME/XATOM/src/xatom
with the path to your xatom binary.
You can run tests using
make test
For installing binarys, you have to run
make install
To run xmolecule, remember to set the following environment variables:
export XATOM_PATH=$HOME/bin/xatom
# the path to the xatom binary
export XMOLECULE_BASIS_DIR=$HOME/XMOLECULE/basis_sets
# the path to the gaussian basis set specifications
Also activate the respective conda environment:
conda activate xmol
In case you compiled with intel compilers, you need to set the intel-compiler vairables:
. /opt/intel/2024/oneapi/setvars.sh intel64