Skip to main content

A script to do embedded cluster cutting and generate input files for calculations.

Project description

神秘的东方文字版

qemb

A toolscript to cut cluster for quantum embedding. Accept VASP structure (CONTCAR).

1. General

1.1 Installation

This project is now on PYPI, so a convenient way to install is like:

pip3 install qemb

or from git repo to get nightly update:

git clone https://github.com/Makarov3821/qemb
# if you are in China, gitee repo maybe faster
# git clone https://gitee.com/Marshall3821/qemb
cd qemb
pip3 install .

1.2 Basic usage

A help of input & output can be obtained by qemb -h:

$ qemb -h
usage: qemb [-h] --input INPUT_DIR --output OUTPUT_DIR -f CONTROL_FILE [-q QUEUE] [-p CORE_NUMBER] [--xc XC_FUNCTIONAL] [--basis BASIS_SET]

An embedding calculation tool from GGA@PBC to embedded hybrids

options:
  -h, --help           show this help message and exit
  --input INPUT_DIR    Input directory location
  --output OUTPUT_DIR  Output directory location
  -f CONTROL_FILE      control file location, must set
  -q QUEUE             Queue names. 'xp72mc10' is default.
  -p CORE_NUMBER       Core number used per node: 1/2/3/4/8/28...; 36 is default.
  --xc XC_FUNCTIONAL   Set xc if REST input generation is needed; b3lyp is default.
  --basis BASIS_SET    Set basis if REST input generation is needed; def2-SVP is default.

in which input_dir, output_dir, and control_file is a required field. We'll explain this three part in the following section.

Argument such as core_number, xc, is needed while using input file generation.

IMPORTANT NOTICE: This project is not intended for a pythonic package, so import qemb in Python will be void, only main program "qemb" is supported. This feature may be considered later in development.

2. Inputs and Outputs

2.1 Input_dir

For a classic catalytic procedure, you have to calculate both clean slab and absorbant on slab. So we suggest your folder is organized like:

root_dir/
├── absorb
│   ├── CO-bridge
│   │   └── VASP_CALCULATION_FILES
│   ├── CO-hollow
│   │   └── VASP_CALCULATION_FILES
│   └── CO-top
│       └── VASP_CALCULATION_FILES
└── clean
    └── VASP_CALCULATION_FILES

for best user experience, since some feature is upon this structure.

This script will obtain structure from CONTCAR, but POSCAR, POTCAR, KPOINTS, and a normal terminated OUTCAR will also be checked to assure it a true VASP running directory, not a dangling CONTCAR.

2.2 Output_dir

The script will find all possible dir from input dir, and reform them in a new output dir given. For example, if you use root_dir in 2.1 as your input_dir, your output_dir, maybe named root_dir_out, will be like:

root_dir_out/
├── absorb
│   ├── CO-bri
│   │   ├── ref
│   │   │   └── REGENERATED_FILES
│   │   └── run
│   │       └── INPUT_FILES
│   ├── CO-hollow
│   │   ├── ref
│   │   │   └── REGENERATED_FILES
│   │   └── run
│   │       └── INPUT_FILES
│   └── CO-top
│       ├── ref
│       │   └── REGENERATED_FILES
│       └── run
│           └── INPUT_FILES
└── clean
    ├── ref
    │   └── REGENERATED_FILES
    └── run
        └── INPUT_FILES

ref is designed to store original CONTCAR, and cluster generated. This design is meant to compatible for DFET method developed by Emily A. Carter, though this is not implemented at this time.

run is where to store input file of the cluster generated. Now we support REST program incar generation. More program support will be added in the future.

2.3 Control file

A full option template with detailed commemt is listed in emb.toml.template. We'll only explain modes of cutting in below.

2.3.1 Cutting_method

1: A sphere from the ori_point. Mostly hemisphere for surface slab.

2: A cylinder from the ori_point.

3: A near expanding. For surface like Cu(111) will be:

cutting3_cu(111)

For surface like Mgo(100) will be:

cutting_mgo(100)

6: Alternative way for NaCl-like system like:

another_cutting_mgo(100)

2.3.2 Some example

A Cu31 clutser:

jobtype = 1.1
cluster_cutting_major_method = 2
cluster_cutting_minor_method = 5
cluster_layers = 2
cluster_expand_num = 2

Cu31 cluster

A Mg-centered Mg9O9 cluster surrounded by a hemispherical pseudoes/point charges:

jobtype = 1.3
cluster_cutting_major_method = 2
cluster_cutting_minor_method = 7
cluster_layers = 2
cluster_expand_num = 1
charge_cutting = true
charge_cutting_sub_method = 1
charge_radius = 8.0

MgO cluster with surrouding point charges

Another interesting thing is this script will automatically supercell when your input exceeded the original cell. Thus we can make:

A huge plain (based on a 4x4, 3 layered MgO(100) slab):

jobtype = 1.1
cluster_cutting_major_method = 2
cluster_cutting_minor_method = 7
cluster_layers = 2
cluster_expand_num = 15

Big Mgo plain "cluster"

Or a big rod (based on a 4x4, 3 layered MgO(100) slab):

jobtype = 1.1
cluster_cutting_major_method = 2
cluster_cutting_minor_method = 7
cluster_layers = 20
cluster_expand_num = 1

Rod MgO "cluster"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qemb-0.1.3.tar.gz (26.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qemb-0.1.3-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file qemb-0.1.3.tar.gz.

File metadata

  • Download URL: qemb-0.1.3.tar.gz
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.10

File hashes

Hashes for qemb-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f7009424355c53abce10726fcf9d7da81addf350aa7690850a66149cca262810
MD5 339f1dee2664c061d4cf447674618ebf
BLAKE2b-256 5fc0f3e451fe090aa159b1cd9a639c10035e641d218b9817ef8578f31aecc225

See more details on using hashes here.

File details

Details for the file qemb-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: qemb-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 26.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.10

File hashes

Hashes for qemb-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 635f76c87b5578dd97f2edadcd2da2d9519656348dbb089493a1173a19496466
MD5 69c13b420686cd0adb8023519a631ae8
BLAKE2b-256 b38fb1ebcb057162ac1128e921c1350915c1489a317c9fbd5834f2657b84a92d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page