A simple package to run and analyze VASP calculations
Project description
__ __ __ __
\ \ / / | \/ |
\ \ / /_ _ ___ _ __ | \ / | __ _ _ __ __ _ __ _ ___ _ __
\ \/ / _` / __| '_ \| |\/| |/ _` | '_ \ / _` |/ _` |/ _ \ '__|
\ / (_| \__ \ |_) | | | | (_| | | | | (_| | (_| | __/ |
\/ \__,_|___/ .__/|_| |_|\__,_|_| |_|\__,_|\__, |\___|_|
| | __/ |
|_| |___/ v1.1.1
Automatically run VASP
relaxation, static, bulk moduli, or elastic constant
calculations
How to Install
- Create a new environment with python version $\geq$ 3.10
- Clone this repository
- Run
pip install -e .
or optionallypip install -e .[dev]
to include packages needed for development/contribution
This package is also available on
PyPi. To install, run
pip install vasp-manager
.
User Guide
This package serves to automate VASP
calculations. VASP
input creation is
automatic, and so is job submission, queue monitoring, calculation analysis, and
storage of the results. Simply rerun the main script and any calculations that
are ready for the next type of calculation will be created and submitted.
VaspManager
The main class for handling all calculations is vasp_manager.VaspManager
,
which takes in a list of calculation types and material paths. See the class
documentation for more details. By default, results are exported to
calculations/results.json
.
The bulk moduli analysis is carried out in the backend using the open-source
pymatgen
software to fit an EOS and elastic constant analysis using custom
scripts.
Calculation Modes
We include calculation modes "rlx-coarse"
, "rlx"
, "static"
, "bulkmod"
,
"bulkmod_standalone"
, and "elastic"
. The desired modes to calculate are
specified when initializing a VaspManager
object.
rlx-coarse
: lower precision energy-based relaxationrlx
: tighter force-based relaxationstatic
: high accuracy static SCF calculationbulkmod
: bulk modulus calculation using an Equation of State (EOS) fit to an energy-volume curvebulkmod_standalone
: standalone (no relaxation required) bulk modulus calculation using an EOS (although this is not recommended unless you are sure the cell volume is very close to the equilibrium value)
elastic
: Determination of elastic constants using the strain/deformation method built intoVASP
I generally recommend starting from rlx-coarse
, although the functionality is
there to start a rlx
calculation from the initially provided POSCAR.
Most users' workflows follow rlx-coarse
→ rlx
→ static
. The
modes static
, bulkmod
, and elastic
require at least rlx
preceding it,
but can all be run independently of each other. For example, workflows might
look like rlx-coarse
→ rlx
→ static
→ bulkmod
, or
rlx
→ elastic
, or simply bulkmod_standalone
.
Usage Guide
In order to use this package, you MUST
- Create a calculations folder where you'd like to run your calculations. Each
subfolder of
calculations/
should have a unique name and contain aPOSCAR
. A sample method of creating the calculations folder from ajson
with names and cifs is available inrun_vasp_calculations.py
, and an example calculations folder is provided incalculations/
. - Configure
computing_config.json
and place it in thecalculations/
directory. You will need to specify youruser_id
, apotcar_directory
, aqueuetype
, yourallocation
and avasp_module
(VASP 6 strongly recommended). As of now, only Perlmutter at NERSC and QUEST at Northwestern University are supported. Any other SLURM based supercomputers can be easily added, but modifications could be made for other queue management systems. - If desired, make modifications to
calc_config.json
. This must also be placed in thecalculations/
directory. Each mode has its own configuration settings with sensible defaults, but these can be easily customized by the user.- To include spin polarization, set
"ispin": "auto"
incalc_config.json
; otherwise set"ispin": 1
With this setting, all elements with valence d or f electrons will start with initial magnetic moments of 5 and 7 $\mu_B$, respectively.VaspManager
also accepts an additional argumentmagmom_per_atom_cutoff
which defaults to 0. If this argument is passed,rlx
calculations that finish with a magmom per atom less than this value with be re-run without spin polarization. This argument only affectsrlx
calculations, and the spin setting for followingstatic
,bulkmod
, orelastic
calculations is inferred from the finalrlx
calculation. - To include DFT+U for transition metal oxides, set
"hubbards": "wang"
; otherwise, set"hubbards": null
. Currently, only"gga": "PE"
(PBE) is supported.
- To include spin polarization, set
To manually stop VaspManager
from processing a material, place a STOP
file
in that material's directory: e.g. calculations/NaCl/STOP
.
The module logger is also made available for information and debugging and can
be accessed through logging.getLogger("vasp_manager")
.
Notes
- The current implementation has only been tested on Linux and Mac OS.
- At this point, KPOINT generation is handled through the KSPACING tag in the INCAR, but future versions will be able to specify KPPRA or a manual grid instead. Spin-orbit coupling calculations are also not currently supported.
- For those using Quest, I recommend using you own pre-compiled version of
VASP
rather than the QuestVASP
module. For those in the Wolverton Group, consider using thequest-hotfix
branch.
\\ TODO: Implement band-structure
calculations and possibly phonopy
calculations
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file vasp_manager-1.1.1.tar.gz
.
File metadata
- Download URL: vasp_manager-1.1.1.tar.gz
- Upload date:
- Size: 6.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77d23effca498ed92853c3a64da96b2daf3995a57f078c6521afec823e39cea5 |
|
MD5 | 3f2351d3236eb935965cd4d2a29fd187 |
|
BLAKE2b-256 | ce6f277fb9e1d0fe7773f6873b908e91d1e55900c277398ad1d6abaf30b8211d |
File details
Details for the file vasp_manager-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: vasp_manager-1.1.1-py3-none-any.whl
- Upload date:
- Size: 7.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bff34fce3c3c8d4e3bb2c13c0a7aee2a683153bb1dee4ac9a56a0e1334f68f33 |
|
MD5 | 9c64da157d0a81dc569ed7674172a72b |
|
BLAKE2b-256 | 13cf3981e4cf65e6e652431a9596c91adec9b5c812087538213ffe9af115668c |