Quantum-Dynamics-Hub / libra-code

https://quantum-dynamics-hub.github.io/libra/index.html
GNU General Public License v3.0
51 stars 47 forks source link
atomic-orbitals do-it-yourself dynamics electronic-structure library methodology-development molecular-dynamics nonadiabatic object-oriented quantum quantum-chemistry semiempirical-methods utilities

Libra

Build Status

This is the main page of the computational chemistry methodology discovery library, Libra The program website is here

Info

More:

Due to the increased volume of technical questions about installing and using the Libra, Libra-X, Pyxaid and Pyxaid2 codes, I have decided to create a convenient public forum for all users with the intent:

Installation Videotutorials (as of 5/16/2022)

Installation (as of after 3/23/2023)

1. Install miniconda (for Python 3.9) and activate Conda

1.1 Download and install

mkdir Conda
cd Conda/
wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh .
sh ./Miniconda3-py39_4.12.0-Linux-x86_64.sh -b -u -p <install_dir>

Here,

1.2 Update the conda

Actually, let's not do this:

conda update -n base -c defaults conda

1.3 Activate the environment

Add the following line to you .bashrc or .bash_profile scripts:

eval "$(<path to bin/conda> shell.bash hook)"

For instance,

eval "$(/projects/academic/cyberwksp21/SOFTWARE/Conda/bin/conda shell.bash hook)"

Restart your terminal or reload the .bashrc script:

source ~/.bashrc

When you do this, your command line should show up the (base) in front, indicating that the base environment is ready

Test it is working by doing:

which conda

2. Create the environment equipped with all Libra needs

2.1 Create the libra environment

In fact, you can call it whatever you like:

conda create -n libra python=3.7

2.2 Activate this environment

conda activate libra

This is very important step - when activated, all the installs will go into that folder.

In case you mess up with an environment, you can remove it with:

conda remove --name libra --all

2.3 Now, equip your environment with the required packages

Do this one by one, and in this order, (should not matter too much, but who knows...)

> To automate the below procedures, you can use `-y` option to accept prompts (sometimes this will override)
> previous packages/conflicts, so be careful
> 
> You can also use `-q` to get rid of all the messages to the output, although i'd keep it to keep track of what's going on

First let's install the most general packages:

conda install -y -c conda-forge numpy scipy matplotlib imageio

Next, all what we actually need:

conda install -y conda-build make
conda install -y anaconda::py-boost
conda install -y -c conda-forge gcc_linux-64=12.2.0 gxx_linux-64=12.2.0 cmake=3.24.2 python-devtools llvm-openmp
conda install -y -c conda-forge/label/gcc7 eigen mpfr
conda install -y -c psi4/label/dev libint2=2.7.1
conda install -y -c anaconda h5py gmp

Install Jupyter Lab or traditional Jupyter notebook as explainted here:

pip install -U jupyterlab

or 

pit install -U notebook

Install py3Dmol for viewing molecular structures:

pip install -U py3Dmol

Installation instruction of Scikit-learn from its official website:

pip install -U scikit-learn

>
>  YES - IT GOT SMALLER AND MORE COMPACT !
>

3. Download and build Libra

3.1 Get it from the GitHub and choose the right branch

Clone the repo from the GitHub

git clone https://github.com/Quantum-Dynamics-Hub/libra-code.git libra

and switch to the correct branch or tag - usually, it would be devel branch

cd libra
git checkout devel

3.2 Create the build directory and make the Makefiles

Then in the libra directory, create the build directory:

mkdir _build
cd _build
cmake ../

3.3 Compile the package

make -j4

4. Make it ready to use

Add the following exports to your .bash_profile file

export PYTHONPATH=<path to the ppackage>/libra/_build/src:$PYTHONPATH

Restart the terminal or source the bash profile and activate libra conda environment

source .bash_profile 
conda activate libra

And you should be ready to use Libra.

Developers and Contributors

References

This code is provided in the hope it will be useful.

If you use the code in your research, please cite the following paper(s):

Papers that describe Libra or its features