This lesson is still being designed and assembled (Pre-Alpha version)

4. Nonadiabatic Dynamics and Trajectory Surface Hopping with Libra

Overview

Teaching: min
Exercises: min
Questions
  • How do I activate and run libra environment?

  • How do I set up Jupyter on the OOD knowing libra environment?

  • How do I conduct TSH calculations with analytic (model) Hamiltonians using Libra code?

  • How do I conduct exact quantum calculations on the grid using Lbira code?

  • How do I conduct atomistic NBRA calculations using Libra and CP2K/MOPAC/DFTB+ codes?

  • How do I conduct atomistic on-the-fly calculations using Libra/DFTB+ interface?

  • How do I compute properties of interest that characterize NA-MD

Objectives
  • Activate libra Conda environment

  • Install Jupyter kernel for libra environment

  • Learn theory and machniery behind TSH calculations with Libra

  • Conduct TSH calculations for spin-boson and other model Hamiltonians using a variety of TSH schemes

  • Conduct a 4-steps workflow for NBRA calculations with Libra/CP2K

  • Compute time-overlaps, NACs for NBRA calculations using MOPAC or DFTB+

  • Execute on-the-fly TSH calculations for small molecules using Libra/DFTB+ interface

  • Compute descriptive properties such as population dynamics, influence spectra, NAC distributions, etc.

1. Setting up individual Jupyter kernel for using Libra on the OOD (Open On Demand)

1.1. Add this in your .bashrc:

module use /projects/academic/cyberwksp21/MODULES
module load libra_ava/devel

Restart your terminal or reload your .bashrc:

source ~/.bashrc

1.2. Activate libra environment and install jupyter kernel in user location:

conda activate libra 
python -m ipykernel install     --user     --name libra     --display-name "Python (libra)"

1.3. Update the kernel.json file in /user/<your username>/.local/share/jupyter/kernels/libra to be like this:

{
 "argv": [
  "/user/<your username>/.local/share/jupyter/kernels/libra/launcher.sh",
  "-f",
  "{connection_file}"
 ],
 "display_name": "Python (libra)",
 "language": "python",
 "metadata": {
  "debugger": true
 }
}

Note: Replace <your username> with your actual user name e.g. alexeyak

1.4. Create the file launcher.sh in /user/<your username>/.local/share/jupyter/kernels/libra to be like this:

#!/bin/bash
# ======================================================
# HARD CLEAN (CRITICAL on CCR)
# ======================================================
unset PYTHONPATH
unset PYTHONHOME
unset EBPYTHONPREFIXES
# Prevent user site leakage
export PYTHONNOUSERSITE=1
# ======================================================
# Load module environment (ONLY ONE layer)
# ======================================================
module use /projects/academic/cyberwksp21/MODULES
module load libra_ava/devel
# ======================================================
# Activate Conda environment (must match module!)
# ======================================================
source /projects/academic/cyberwksp21/SOFTWARE/Conda/etc/profile.d/conda.sh
conda activate libra
# ======================================================
# Libra runtime libraries
# ======================================================
export LD_LIBRARY_PATH=/projects/academic/cyberwksp21/SOFTWARE/libra/_build/src:$LD_LIBRARY_PATH
# ======================================================
# Launch kernel
# ======================================================
exec /projects/academic/cyberwksp21/SOFTWARE/Conda/envs/libra/bin/python \
     -m ipykernel_launcher "$@"

And make it executable:

chmod +x .local/share/jupyter/kernels/libra/launcher.sh

1.5. Launch Jupyter on the OOD without any additional modules load needed

1.6. In the started Jupyter select “Python (libra)” kernel

2. Starting tutorials

The Libra tutorials are available at https://github.com/compchem-cybertraining/Tutorials_Libra

it is advisable that you just clone this repository to your local working directory and go from there.

2.1. Go to your working directory, e.g.:

cd /projects/academic/cyberwksp21/Students/alexeyak/libra_examples`

or go to your home directory:

cd

2.2. Clone the Tutorials_Libra repository:

git clone https://github.com/compchem-cybertraining/Tutorials_Libra.git

2.3. Start your Jupyter app on the OOD and open the desired tutorial/example

2.4. Keep in mind that Jupyter app run on the OOD can “see” only your home directory.

If you keep your examples elsewhere, e.g. on the /projects/academic/cyberwksp21/Students/alexeyak,

you need to create a symlink (symbolic link) to that directory in your home directory, e.g.:

cd
ln -s /projects/academic/cyberwksp21/Students/<my working folder> workshop

Note: replace <my working folder> with the actual name

This will create a link (that would appear as a folder) in your home directory called workshop. It will point to the actual folder located at /projects/academic/cyberwksp21/Students/<my working folder>

WARNING: Link behaves the same way as the actual folder, so if you try to delete the link like this rm -r workshop, it will delete your actual tutorials folder. If you no longer need the link, use rm workshop (no -r option!)

3. Lesson plan

3.1. Abstract model Hamiltonians (morning session)

3.1.1. Abstract (model Hamiltonian) NA-MD:

3.1.2. Exact dynamics with PyTorch:

3.2. Atomistic Hamiltonians (afternoon session)

3.2.1. Maing course: NBRA workflow with CP2K

3.2.2. Additional modules

A. Computing time-overlaps

B. Pre-NAMD analysis

C. Running NA-MD

D. Post-NAMD analysis

4. Presentations and Videorecordings

4.1. Presentations

Libra Overview, simplified introduction into TSH methods

Algorithms, methods and options for Libra

4.2. Classroom recording

4.3. Zoom recordings

Key Points

  • TBD