https://github.com/jcwang587/xdatbus
A Python package for enhancing VASP AIMD simulations and analysis
https://github.com/jcwang587/xdatbus
aimd metadynamics python vasp
Last synced: about 1 year ago
JSON representation
A Python package for enhancing VASP AIMD simulations and analysis
- Host: GitHub
- URL: https://github.com/jcwang587/xdatbus
- Owner: jcwang587
- License: mit
- Created: 2023-02-09T09:13:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-05T00:37:13.000Z (about 1 year ago)
- Last Synced: 2025-04-05T01:25:27.324Z (about 1 year ago)
- Topics: aimd, metadynamics, python, vasp
- Language: Python
- Homepage: https://xdatbus.readthedocs.io/en/latest/
- Size: 42 MB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# xdatbus 🚌
[](https://github.com/jcwang587/xdatbus/actions/workflows/build.yml)
[](https://github.com/jcwang587/xdatbus/releases)
[](https://pepy.tech/projects/xdatbus)
[](https://codecov.io/gh/jcwang587/xdatbus)
[](https://github.com/psf/black)
Xdatbus is a Python package designed specifically for Vienna Ab-initio Simulation Package (VASP) users conducting
ab-initio molecular dynamics (AIMD) simulations, as well as biased MD simulations. The name of the package is derived
from the MD trajectory file (XDATCAR) generated by VASP. The documentation for
the package can be accessed [here](https://xdatbus.readthedocs.io/en/latest/), and a collection of
Jupyter Notebook [tutorial](https://github.com/jcwang587/xdatbus/tree/main/examples) is also available.
## Installation
Make sure you have a Python interpreter, preferably version 3.10 or higher. Then, you can simply install xdatbus from
PyPI using `pip`:
```bash
pip install xdatbus
```
If you'd like to use the latest unreleased version on the main branch, you can install it directly from GitHub:
```bash
pip install git+https://github.com/jcwang587/xdatbus
```
The package is also available from conda-based installation. It is generally recommended you first create a separate
environment, then you can install via the xdatbus channel on Anaconda cloud:
```bash
conda install --channel xdatbus xdatbus
```
If you plan to use PLUMED to analyze enhanced sampling AIMD results, you can also install the conda version of PLUMED
together:
```bash
conda install -c xdatbus -c conda-forge xdatbus plumed
```
## Get Started
This is a brief example demonstrating how to use the basic function of xdatbus to aggregate multiple xdatcar files into
a single file and unwrap the coordinates into an `.xyz` file.
As is often the case when you have submitted a continuous AIMD job, it is likely that you would have subfolders for each
submission. `XDATCAR` files can be first gathered in a separate directory by:
```bash
$ mkdir xdc_files && for i in {01..10}; do cp RUN$i/XDATCAR xdc_files/XDATCAR_$i; done
```
Then, try aggregating and unwrapping the coordinate data from the `XDATCAR` files:
```python
import os
from xdatbus import xdc_aggregate, xdc_unwrap
xdc_dir = "./xdc_files"
xdb_dir = os.path.dirname(xdc_dir)
xdb_path = os.path.join(xdb_dir, "XDATBUS")
xyz_path = os.path.join(xdb_dir, "XDATBUS_unwrap.xyz")
xdc_aggregate(xdc_dir=xdc_dir, output_dir=xdb_dir)
xdc_unwrap(xdc_path=xdb_path, output_path=xyz_path)
```
There are also entry points included with the installation for the Command Line Interface (CLI) to perform similar
tasks:
```bash
$ xdc_aggregate --xdc_dir ./xdc_files --output_dir ./
```
```bash
$ xdc_unwrap --xdc_path ./XDATBUS --output_path ./XDATBUS_unwrap.xyz
```
## Visualization
[](https://github.com/BradyAJohnston/MolecularNodes)
[](https://docs.blender.org/api/current/)
This is testing functionality for visualizing the molecular dynamics trajectory with Blender. There is a strict Python version required for compatibility with Blender. Please check the compatible version of Python for `bpy` to ensure there are no conflicts in your environment.
```bash
pip install molecularnodes bpy
```
## Major Changelog
`0.3.8` Added functions for locating minima and running NEB in a 2D FES.
`0.2.5` Enabled a command-line interface that runs through the `rich` package.
`0.2.0` Added a function to generate [extxyz](https://github.com/libAtoms/extxyz) data for training machine learning interatomic potentials.