Skip to content

JiaweiZhan/qcat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QCAT

QCAT (Quantum Chemistry Analysis Toolkit) is a tool for analyzing data from quantum chemistry softwares, mainly Quantum Espresso and Qbox.

Features

  • Directly read the binary output generated by Quantum Espresso / Qbox
  • Support multi-kpoints, spin-polarized calculation
  • Paralleled by using multiprocessing
  • Support HDF5
  • Optimized with Cython

Installation

# loading a system-provided MPI module (openmpi or intelmpi)
module load intelmpi/2019.up7+intel-19.1.1
conda create -n qcat python=3.10
conda activate qcat
pip install .

To update the package, please run:

pip install qcat --upgrade

To uninstall the package, please run:

pip uninstall qcat

Documentation

  • class_ldos.py has the main class for computing local band edge (local CBM and VBM)
  • qe_io.py is a general I/O class to parse Quantum Espresso's binary output
  • utils.py includes some useful functions to output/analyze local band edge

......

  • browse qcat for more information

Example:

Computing local density of states by analyzing wavefunctions generated by Quantum Espresso

How to use

Compute LDOS

  1. ssh to interactive session to utilize computing node (1 node is enough)
sinteractive --exclusive --partition=broadwl --nodes=1 --ntasks=28 --gres=gpu:0 --time=2:00:00
# loading a system-provided MPI module (openmpi or intelmpi)
module load intelmpi/2019.up7+intel-19.1.1
  1. Create a python file to call functions from qcat
    from qcat.pp import class_ldos
    from qcat.io_kernel import qe_io, qbox_io
    from qcat.utils import utils
    from mpi4py import MPI

    comm = MPI.COMM_WORLD
    rank = comm.Get_rank()

    # delta is the parameter to control the location of LCBM/LVBM
    # saveFileFolder: the location of folder for *.save (QE) or XML sample and qbox.out (QBOX) 
    # comm: MPI COMM_WORLD

    # choose abinitio software
    abinitioRead = qbox_io.QBOXRead(comm)
    # abinitioRead = qe_io.QERead(comm)

    storeFolder = './wfc/'
    localDensityOfState = LDOS(read_obj=abinitioRead, delta=delta, saveFolder=saveFileFolder, comm=comm)
    localDensityOfState.computeLDOS(storeFolder)
    lcbm, lvbm = localDensityOfState.localBandEdge()

    if rank == 0:
        utils.writeLocalBandEdge(lcbm=lcbm, lvbm=lvbm, fileName='ldos.txt')

see example/ldos_example.py for reference

  1. Run:
mpirun [-np NTASKS] python3 ldos_example.py [-h] [-a ABINITIO] [-s SAVEFILEFOLDER] [-d DELTA]
  1. Configuration:
optional arguments:
  -h, --help            show this help message and exit
  -a ABINITIO, --abinitio ABINITIO
                        abinitio software: qe/qbox. Default: qe
  -s SAVEFILEFOLDER, --saveFileFolder SAVEFILEFOLDER
                        *.save folder generated by QE or the folder that store qbox output. Default:
                        ./scf.save
  -d DELTA, --delta DELTA
                        delta that control local VB/CB. Default: 0.001

Requirements

version of Quantum Espresso >= 5.4

TODO

About

Analyze data from quantum chemistry softwares

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published