A suite of scripts that perform menial, tedious and repetitive tasks and operations on VASP files that were hurriedly and haphazardly put together by some intern.
Project description
VASP Tools is a set of modules and scripts that automate routine tasks involving VASP files using a very intuitive CLI. The /scripts directory contains the scripts that implement the /vasp module to perform routine tasks on VASP files. This project is still a WIP and new scripts/modules will be added regularly over the next few weeks.
Requirements
As of now, this package is only supported on Python>=3.5. Since support for Python 2.7 is set to be pulled by 2020, updates in the near future extending support to Python<=3.0 seems unlikely.
The following libraries are required to run all the scripts and modules. - numpy - argparse - sympy - ujson - jsonschema - tabulate
For a full list of requirements, read requirements.txt. If not already present within the environment, they’ll be installed as dependencies during setup.
Installation
The installation process is quite simple, ensure you have a working version of Python>=3.5 installed and type the following into the console,
pip install vasp-tools
Any required libraries that aren’t installed in the current environment will be automatically installed. This will also automatically install the scripts and add them to $PATH for easy access.
Compatibility
The package, so far, was only tested within a Linux environment and isn’t officially compatible with Windows yet. The scripts can be compiled into executables using PyInstaller to work independently of python on any system, though it should be run in an environment with an identical OS. Use of VMs/Containers is suggested, though not tested as of yet.
Usage
The code present in /vasp can be imported in the form of standard modules. However, the primary purpose of this project was the creation of scripts (present in /scripts) to automate daily tasks faced by the Computational Chemist/Material Scientist. With this in mind, the scripts were designed to be extremely modular and user-friendly by implementing a `dplyr <https://style.tidyverse.org/pipes.html>`__-esque piping paradigm. For example, the process of:
Importing a molecule from a POSCAR file.
Rotating it into a certain configuration (90 degrees wrt the x-axis)
Positioning it at a specified point above a crystal taken from another POSCAR file
Fixing atomic positions within the crystal below a certain cutoff height
Converting the coordinates to Direct from Cartesian or vice versa
Save to a new POSCAR file.
can be implemented in a single line like so.
cat POSCAR1 | ./rotate.py -x 90 -y 10 | ./place-at.py "POSCAR2" 0.5 0.5 2.0 | ./fix-upto.py 10.0 | ./cart-direct > POSCARnew
Alternatively, you can also call each script individually or pass “POSCAR1” as one of the positional arguments. For example,
./place-at.py "POSCAR2" "POSCAR1" 0.5 0.5 2.0
is perfectly equivalent to
cat POSCAR1 | ./place-at.py "POSCAR2" 0.5 0.5 2.0
Detailed instructions on how to use the scripts are available in docs.
Written with `StackEdit <https://stackedit.io/>`__
History
0.1.0 (2019-07-19)
First release on PyPI.
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
Hashes for vasp_tools-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a77b85e57e2d987d4e56abc92af4289a2f6f518216b45ab34234083c53f7581 |
|
MD5 | 89f3d8908201b73bf71030b10b2ed32d |
|
BLAKE2b-256 | 413cf6eb794baae7ccf1b12a21309597cb652117485c60e529ca49f0e514b67a |