qcat

Analyze data from quantum chemistry softwares

https://github.com/jiaweizhan/qcat

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.1%) to scientific vocabulary

Keywords

python quantum-chemistry
Last synced: 6 months ago · JSON representation ·

Repository

Analyze data from quantum chemistry softwares

Basic Info
  • Host: GitHub
  • Owner: JiaweiZhan
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 15.6 MB
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
python quantum-chemistry
Created about 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

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

To install qcat, clone the repository and ```bash

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 cd qcat rm -rf .git # remove git track pip install . To update the package, please run: bash pip install qcat --upgrade To uninstall the package, please run: bash 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) bash 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
  2. Create a python file to call functions from qcat ```python from mpi4py import MPI import json

    from qcat.pp import classldos from qcat.iokernel import qeio, qboxio

    comm = MPI.COMMWORLD rank = comm.Getrank()

    delta : parameter to control the location of LCBM/LVBM (checkout eq.3 of https://doi.org/10.1063/1.4811481)

    outFolder : the location of folder for *.save (QE) or XML sample and qbox.out (QBOX)

    comm : MPI COMM_WORLD

    choose abinitio software

    outFolder = "./si.save"

    initialize reader instance

    abinitioRead = qbox_io.QBOXRead(outFolder=outFolder, comm=comm) # Qbox

    abinitioRead = qe_io.QERead(outFolder=outFolder, comm=comm) # QE

    initialize LDOS instance.

    localDensityOfState = LDOS(read_obj=abinitioRead, delta=delta, comm=comm)

    compute LDOS along z axis (can be 'x' or 'y')

    localDensityOfState.computeLDOS(axis='z')

    obtain lcbm and lvbm

    lcbm: local CBM

    lvbm: local VBM

    lcbm and lvbm are 1d numpy.ndarray with size of FFT grid along chosen axis (z in this case).

    lcbm, lvbm = localDensityOfState.localBandEdge()

    if rank == 0: # write lcbm and lvbm to json file data = {'lcbm': lcbm.tolist(), 'lvbm': lvbm.tolist()} fname = "ldos.json" with open(fname, 'w') as jsonfile: json.dump(data, jsonfile) logger.info(f"Data has been written to {fname}") `` see [example/ppexample/ldosexample.py`](./example/ppexample/ldosexample.py) for reference. Or simply run the example script:

mpirun [-np NTASKS] python3 example/pp_example/ldos_example.py [-h] [-a ABINITIO] [-s SAVEFILEFOLDER] [-d DELTA] [-o ORIENTATION] 3. Configuration of ldos_example.py: 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 -o ORIENTATION, --orientation ORIENTATION LDOS orientation. Default: z

Requirements

version of Quantum Espresso >= 5.4

TODO

Owner

  • Name: Jiawei Zhan
  • Login: JiaweiZhan
  • Kind: user
  • Location: Chicago, IL, USA
  • Company: The University of Chicago

Molecular Engineering, Applied physics

Citation (CITATION.cff)

cff-version: 1.2.0
message: If you use this software, please cite it as below.
authors:
  - family-names: Zhan
    given-names: Jiawei
    orcid: "https://orcid.org/0000-0001-5143-5467"
title: abinitioToolKit
version: 0.1.0
date-released: 2023-05-09
repository-code: https://github.com/JiaweiZhan/abinitioToolKit

GitHub Events

Total
  • Watch event: 3
  • Push event: 1
Last Year
  • Watch event: 3
  • Push event: 1

Dependencies

requirements.txt pypi
  • h5py ==3.7.0
  • lxml ==4.9.2
  • matplotlib ==3.6.2
  • mpi4py ==3.1.4
  • numpy ==1.23.5
  • scikit-learn >=0.18
  • scipy ==1.9.3
  • tqdm ==4.64.0
setup.py pypi
  • Cython *
  • PyYAML *
  • e3nn *
  • h5py *
  • lxml *
  • matplotlib *
  • mpi4py *
  • numpy *
  • pyscf *
  • scikit-learn *
  • scipy *
  • tqdm *