An open API service indexing awesome lists of open source software.

https://github.com/keisukeyamashita/hdnnp

Python Implementation of High Dimentional Neural Network Potential πŸπŸš€βœ¨
https://github.com/keisukeyamashita/hdnnp

hdnnp neural-networks numerical-analysis

Last synced: 7 months ago
JSON representation

Python Implementation of High Dimentional Neural Network Potential πŸπŸš€βœ¨

Awesome Lists containing this project

README

          

# High Dimensional Neural Network Potential(HDNNP)

[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/)
[![Python 3.3](https://img.shields.io/badge/python->3.3-blue.svg)](https://www.python.org/downloads/release/python-330/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/dwyl/esta/issues)

> This is a implementation of High Dimensional Neural Network Potential(HDNNP) designed to reproduce Density Function Theory(DFT) calculation *effectively* with high *flexibility*, *reactivity*. Based on ogura-edu/HDNNP.

**Table of Contents**

- [Install](#install)
- [Setup](#setup)
- [By Pipenv(Prefered)](#by-pipenvprefered)
- [By Anaconda](#by-anaconda)
- [Usage](#usage)
- [vasp2xyz: Convert VASP OUTCAR to xyz file](#vasp2xyz-convert-vasp-outcar-to-xyz-file)
- [merge-xyz: Merge multi xyz files into one](#merge-xyz-merge-multi-xyz-files-into-one)
- [Maintainer](#maintainer)
- [Reference](#reference)

## Install

Install this project by `git`.

```shell
$ git clone https://github.com/ogura-edu/HDNNP.git

# or if using ssh

$ git clone git@github.com:ogura-edu/HDNNP.git
```

This project uses [Pipenv](https://github.com/pypa/pipenv) for development workflow. If you don't have it, run this command to install.

**macOS**

```shell
$ brew install pipenv
```

**other**

```shell
# please run after installing python
$ pip install pipenv
```

## Setup

### By Pipenv(Prefered)

Same as by anaconda, but you need to install python rather than installing anaconda.

This bug will be fixed in near future release(ref: [pythonfinder + pyenv + anaconda issue](https://github.com/pypa/pipenv/issues/3044)).

Set environmental variable `PIPENV_VENV_IN_PROJECT` to `1` to create your VM into this project dir(`/path/to/HDNNP/.venv`).

```shell
export PIPENV_VENV_IN_PROJECT = 1
```

For macOS users, you need to install `mpich` before installing dependencies.

```shell
# Only for macOS users.
#
# NOTE: Installing both mpich and openmpi will conflict
#
$ brew install mpich

# or

$ brew install openmpi
```

Setup your enviroments.

```shell
# Install dependencies
$ pipenv install

# activate your VM
$ pipenv shell

# For example...
(HDNNP) $ hdnnpy training

# deactivate
(HDNNP) $ exit
```

### By Anaconda

Using anaconda is prefered because it is basically faster than Pipenv.

Install anaconda and activate your VM.

```shell
$ ANACONDA_VERSION = [YOUR_ANACODA_VERSION]
$ pyenv install $ANACONDA_VERSION
$ pyenv local $ANACONDA_VERSION
$ conda env create -n HDNNP --file condaenv.yaml
$ echo ". ${HOME}/.pyenv/versions//etc/profile.d/conda.sh" > ~/.bashrc

# activate
$ conda activate HDNNP

# install this program using pip
(HDNNP) $ pip install --editable .

# For example...
(HDNNP) $ hdnnpy training

# deactivate
(HDNNP) $ conda deactivate
```

**NOTE**

There is no

- ChainerMN
- Chainer v5

on the Anaconda Cloud, so you still have to install these packages by `pip`.

And these is a bug that if you install anaconda by `pyenv`, `pipenv` will fail to start(ref: [pythonfinder + pyenv + anaconda issue](https://github.com/pypa/pipenv/issues/3044)).

## Usage

### vasp2xyz: Convert VASP OUTCAR to xyz file

Use `vasp2xyz` command to convert OUTCAR to xyz file.

```shell
hdnnpy vasp2xyz [PREFIX] [PATH_TO_OUTCAR] [OUTPUT_FILE]
```

### merge-xyz: Merge multi xyz files into one

```shell
hdnnpy merge-xyz [STEPS] [PATH_TO_XYZ_FILES_DIR] [OUTPUT_FILE]
```

## Maintainer

- KeisukeYamashita: maintainer and creator

## Reference

- JΓΆrg Behler. First Principle Neural Network Potentials for Reactive Simulations of Large Molecular and Condensed System, 2007