vasp-manager


Namevasp-manager JSON
Version 1.1.4 PyPI version JSON
download
home_page
SummaryA simple package to run and analyze VASP calculations
upload_time2024-01-17 23:50:29
maintainer
docs_urlNone
author
requires_python>=3.10.0
licenseMIT
keywords vasp dft high-throughput
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ```text
 __      __             __  __
 \ \    / /            |  \/  |
  \ \  / /_ _ ___ _ __ | \  / | __ _ _ __   __ _  __ _  ___ _ __
   \ \/ / _` / __| '_ \| |\/| |/ _` | '_ \ / _` |/ _` |/ _ \ '__|
    \  / (_| \__ \ |_) | |  | | (_| | | | | (_| | (_| |  __/ |
     \/ \__,_|___/ .__/|_|  |_|\__,_|_| |_|\__,_|\__, |\___|_|
                 | |                              __/ |
                 |_|                             |___/ v1.1.4
```

<hr/>

<h4 align="center">

[![Tests](https://github.com/dgaines2/vasp_manager/actions/workflows/tests.yml/badge.svg)](https://github.com/dgaines2/vasp_manager/actions/workflows/tests.yml)
[![codecov](https://codecov.io/github/dgaines2/vasp_manager/graph/badge.svg?token=CQH3BRGYCR)](https://codecov.io/github/dgaines2/vasp_manager)
[![PyPI Version](https://img.shields.io/pypi/v/vasp-manager)](https://pypi.org/project/vasp-manager)
[![Requires Python 3.10+](https://img.shields.io/badge/python-3.10+-blue)](https://python.org/downloads)

Automatically run `VASP` relaxation, static, bulk moduli, or elastic constant
calculations

</h4>

## How to Install

1. Create a new environment with python version $\geq$ 3.10
2. Clone this repository
3. Run `pip install -e .` or optionally `pip install -e .[dev]` to include
packages needed for development/contribution

This package is also available on
[PyPi](https://pypi.org/project/vasp-manager/#description). 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"`,
and `"elastic"`.  The desired modes to calculate are specified when
initializing a `VaspManager` object.

* `rlx-coarse`: lower precision energy-based relaxation
* `rlx`: tighter force-based relaxation
* `static`: high accuracy static SCF calculation
* `bulkmod`: bulk modulus calculation using an Equation of State (EOS) fit to an
energy-volume curve
  * Can be run as a standalone (no relaxation required) calculation of bulk
    modulus 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 into `VASP`

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` &#8594; `rlx` &#8594; `static`. The
modes `static`, `bulkmod`, and `elastic` can all be run independently of each
other. For example, workflows might look like `rlx-coarse` &#8594; `rlx` &#8594;
`static` &#8594; `bulkmod`, or `rlx` &#8594; `elastic`, or simply `bulkmod`.
The `elastic` mode requires at least `rlx` preceding it in order to guarantee
converged lattice parameters and atomic positions.

## Usage Guide

In order to use this package, you MUST

1. Create a calculations folder where you'd like to run your calculations.  Each
subfolder of `calculations/` should have a unique name and contain a `POSCAR`. A
sample method of creating the calculations folder from a `json` with names and
cifs is available in `run_vasp_calculations.py`, and an example calculations
folder is provided in `calculations/`.
2. Configure `computing_config.json` and place it in the `calculations/`
directory.  You will need to specify your `user_id`, a `potcar_directory`, a
`queuetype`, your `allocation` and a `vasp_module` (VASP 6 strongly
recommended). As of now, only Perlmutter and Bridges2 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.
3. If desired, make modifications to `calc_config.json`. This must also be
placed in the `calculations/` 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"` in
    `calc_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 argument `magmom_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 affects `rlx` calculations, and the spin setting for following
    `static`, `bulkmod`, or `elastic` calculations is inferred from the final
    `rlx` calculation.
    * To include DFT+U for transition metal oxides, set `"hubbards": "wang"`;
    otherwise, set `"hubbards": null`.  Currently, only `"gga": "PE"` (PBE) is
    supported.

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 Quest `VASP` module. For those in the Wolverton Group,
  consider using the `quest-hotfix` branch.*

\\\ TODO: Implement `band-structure` calculations and possibly `phonopy`
calculations

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "vasp-manager",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10.0",
    "maintainer_email": "Dale Gaines II <dalegainesii@gmail.com>",
    "keywords": "vasp,dft,high-throughput",
    "author": "",
    "author_email": "Dale Gaines II <dalegainesii@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/61/09/eacefe43fca780aa7f7d4105add3fc7cff797d97aba24d01f1209a050716/vasp_manager-1.1.4.tar.gz",
    "platform": null,
    "description": "```text\n __      __             __  __\n \\ \\    / /            |  \\/  |\n  \\ \\  / /_ _ ___ _ __ | \\  / | __ _ _ __   __ _  __ _  ___ _ __\n   \\ \\/ / _` / __| '_ \\| |\\/| |/ _` | '_ \\ / _` |/ _` |/ _ \\ '__|\n    \\  / (_| \\__ \\ |_) | |  | | (_| | | | | (_| | (_| |  __/ |\n     \\/ \\__,_|___/ .__/|_|  |_|\\__,_|_| |_|\\__,_|\\__, |\\___|_|\n                 | |                              __/ |\n                 |_|                             |___/ v1.1.4\n```\n\n<hr/>\n\n<h4 align=\"center\">\n\n[![Tests](https://github.com/dgaines2/vasp_manager/actions/workflows/tests.yml/badge.svg)](https://github.com/dgaines2/vasp_manager/actions/workflows/tests.yml)\n[![codecov](https://codecov.io/github/dgaines2/vasp_manager/graph/badge.svg?token=CQH3BRGYCR)](https://codecov.io/github/dgaines2/vasp_manager)\n[![PyPI Version](https://img.shields.io/pypi/v/vasp-manager)](https://pypi.org/project/vasp-manager)\n[![Requires Python 3.10+](https://img.shields.io/badge/python-3.10+-blue)](https://python.org/downloads)\n\nAutomatically run `VASP` relaxation, static, bulk moduli, or elastic constant\ncalculations\n\n</h4>\n\n## How to Install\n\n1. Create a new environment with python version $\\geq$ 3.10\n2. Clone this repository\n3. Run `pip install -e .` or optionally `pip install -e .[dev]` to include\npackages needed for development/contribution\n\nThis package is also available on\n[PyPi](https://pypi.org/project/vasp-manager/#description). To install, run\n`pip install vasp-manager`.\n\n## User Guide\n\nThis package serves to automate `VASP` calculations. `VASP` input creation is\nautomatic, and so is job submission, queue monitoring, calculation analysis, and\nstorage of the results. Simply rerun the main script and any calculations that\nare ready for the next type of calculation will be created and submitted.\n\n### VaspManager\n\nThe main class for handling all calculations is `vasp_manager.VaspManager`,\nwhich takes in a list of calculation types and material paths. See the class\ndocumentation for more details. By default, results are exported to\n`calculations/results.json`.\n\nThe bulk moduli analysis is carried out in the backend using the open-source\n`pymatgen` software to fit an EOS and elastic constant analysis using custom\nscripts.\n\n### Calculation Modes\n\nWe include calculation modes `\"rlx-coarse\"`, `\"rlx\"`, `\"static\"`, `\"bulkmod\"`,\nand `\"elastic\"`.  The desired modes to calculate are specified when\ninitializing a `VaspManager` object.\n\n* `rlx-coarse`: lower precision energy-based relaxation\n* `rlx`: tighter force-based relaxation\n* `static`: high accuracy static SCF calculation\n* `bulkmod`: bulk modulus calculation using an Equation of State (EOS) fit to an\nenergy-volume curve\n  * Can be run as a standalone (no relaxation required) calculation of bulk\n    modulus using an EOS (although this is not recommended unless you are sure\n    the cell volume is very close to the equilibrium value)\n* `elastic`: Determination of elastic constants using the strain/deformation\nmethod built into `VASP`\n\nI generally recommend starting from `rlx-coarse`, although the functionality is\nthere to start a `rlx` calculation from the initially provided POSCAR.\n\nMost users' workflows follow `rlx-coarse` &#8594; `rlx` &#8594; `static`. The\nmodes `static`, `bulkmod`, and `elastic` can all be run independently of each\nother. For example, workflows might look like `rlx-coarse` &#8594; `rlx` &#8594;\n`static` &#8594; `bulkmod`, or `rlx` &#8594; `elastic`, or simply `bulkmod`.\nThe `elastic` mode requires at least `rlx` preceding it in order to guarantee\nconverged lattice parameters and atomic positions.\n\n## Usage Guide\n\nIn order to use this package, you MUST\n\n1. Create a calculations folder where you'd like to run your calculations.  Each\nsubfolder of `calculations/` should have a unique name and contain a `POSCAR`. A\nsample method of creating the calculations folder from a `json` with names and\ncifs is available in `run_vasp_calculations.py`, and an example calculations\nfolder is provided in `calculations/`.\n2. Configure `computing_config.json` and place it in the `calculations/`\ndirectory.  You will need to specify your `user_id`, a `potcar_directory`, a\n`queuetype`, your `allocation` and a `vasp_module` (VASP 6 strongly\nrecommended). As of now, only Perlmutter and Bridges2 at NERSC and QUEST at\nNorthwestern University are supported. Any other SLURM based supercomputers can\nbe easily added, but modifications could be made for other queue management\nsystems.\n3. If desired, make modifications to `calc_config.json`. This must also be\nplaced in the `calculations/` directory. Each mode has its own configuration\nsettings with sensible defaults, but these can be easily customized by the user.\n    * To include spin polarization, set `\"ispin\": \"auto\"` in\n    `calc_config.json`; otherwise set `\"ispin\": 1`. With this setting, all\n    elements with valence *d* or *f* electrons will start with initial magnetic\n    moments of 5 and 7 $\\mu_B$, respectively. `VaspManager` also accepts an\n    additional argument `magmom_per_atom_cutoff` which defaults to 0. If this\n    argument is passed, `rlx` calculations that finish with a magmom per atom\n    less than this value with be re-run without spin polarization. This argument\n    only affects `rlx` calculations, and the spin setting for following\n    `static`, `bulkmod`, or `elastic` calculations is inferred from the final\n    `rlx` calculation.\n    * To include DFT+U for transition metal oxides, set `\"hubbards\": \"wang\"`;\n    otherwise, set `\"hubbards\": null`.  Currently, only `\"gga\": \"PE\"` (PBE) is\n    supported.\n\nTo manually stop `VaspManager` from processing a material, place a `STOP` file\nin that material's directory: e.g. `calculations/NaCl/STOP`.\n\nThe module logger is also made available for information and debugging and can\nbe accessed through `logging.getLogger(\"vasp_manager\")`.\n\n### Notes\n\n* *The current implementation has only been tested on Linux and Mac OS.*\n* *At this point, KPOINT generation is handled through the KSPACING tag in the\n  INCAR, but future versions will be able to specify KPPRA or a manual grid\n  instead. Spin-orbit coupling calculations are also not currently supported.*\n* *For those using Quest, I recommend using you own pre-compiled version of\n `VASP` rather than the Quest `VASP` module. For those in the Wolverton Group,\n  consider using the `quest-hotfix` branch.*\n\n\\\\\\ TODO: Implement `band-structure` calculations and possibly `phonopy`\ncalculations\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A simple package to run and analyze VASP calculations",
    "version": "1.1.4",
    "project_urls": {
        "repository": "https://github.com/dgaines2/vasp_manager"
    },
    "split_keywords": [
        "vasp",
        "dft",
        "high-throughput"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d5401e95a063caf378efad7a48754664f5b6a56b5f03ca0de49e4508f09a7a9c",
                "md5": "32b5f11c09a5e562e2a03741d2509b93",
                "sha256": "b48085a4134e373b3cc4fa76ac5293d8aa6d618f596b23589934bae8cec7672a"
            },
            "downloads": -1,
            "filename": "vasp_manager-1.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "32b5f11c09a5e562e2a03741d2509b93",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10.0",
            "size": 8177941,
            "upload_time": "2024-01-17T23:50:25",
            "upload_time_iso_8601": "2024-01-17T23:50:25.453009Z",
            "url": "https://files.pythonhosted.org/packages/d5/40/1e95a063caf378efad7a48754664f5b6a56b5f03ca0de49e4508f09a7a9c/vasp_manager-1.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6109eacefe43fca780aa7f7d4105add3fc7cff797d97aba24d01f1209a050716",
                "md5": "da8ef872f737733de5fcb8ebc4f70150",
                "sha256": "e018aa9da59719c50189f06cc65317acac3bbc4d527ecb5b763734c45b9f48ac"
            },
            "downloads": -1,
            "filename": "vasp_manager-1.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "da8ef872f737733de5fcb8ebc4f70150",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10.0",
            "size": 7716116,
            "upload_time": "2024-01-17T23:50:29",
            "upload_time_iso_8601": "2024-01-17T23:50:29.541630Z",
            "url": "https://files.pythonhosted.org/packages/61/09/eacefe43fca780aa7f7d4105add3fc7cff797d97aba24d01f1209a050716/vasp_manager-1.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-17 23:50:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dgaines2",
    "github_project": "vasp_manager",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "vasp-manager"
}
        
Elapsed time: 4.01973s