/SPINNER

SPINNER (Structure Prediction of Inorganic crystals using Neural Network potentials with Evolutionary and Random searches)

Primary LanguageC++GNU General Public License v3.0GPL-3.0

SPINNER

SPINNER(Structure Prediction of Inorganic crystals using Neural Network potentials with Evolutionary and Random searches)

If you use SPINNER, please cite this paper: S. Kang et al. Accelerated identification of equilibrium structures of multicomponent inorganic crystals using machine learning potentials (arXiv:2107.02594).

Here we describe minimal instructions for running SPINNER. If you want more information such as tuning parameters, please visit our online manual(https://spinner-csp.readthedocs.io)

Installation

Download SPINNER

git clone https://github.com/MDIL-SNU/SPINNER.git

Python requirements

SPINNER supports Python 3.6 or higher version. SPINNER utilizes Python modules in the following:

You can download these modules by

  pip3 install mpi4py PyYAML numpy pybind11

or directly downloading the source codes from the webpages.

C++ compilers

SPINNER supports CMAKE 3.20 or higher version and gcc version 7.3.1 or higer version.

Python binding of randSpg and LAMMPS (important)

SPINNER utilizes python binding of randSpg (https://github.com/xtalopt/randSpg) and LAMMPS code (https://www.lammps.org). However, those codes are slightly modified to be incorporated with SPINNER, so you need to comiple with source codes provided in this page, not with the original ones.

Install randSpg

To install randSpg, do

  cd /SPINNER-directory/randSpg-vspinner/
  mkdir build
  cd build
  cmake ..
  make -j3

to bind randSpg with python, do

  cd /SPINNER-directory/randSpg-vspinner/python
  mkdir build
  cd build
  cmake ..
  make –j3
  cp pyrandspg.cpython* /directory-where-your-python-is/lib/python3/site-packages/

Install LAMMPS

This is the most tricky part of the installation steps. You can install python-lammps by following steps below but it may not work depending on your environment. Please look into LAMMPS forum (https://www.lammps.org/forum.html) or LAMMPS manual Ch. 2 (https://docs.lammps.org/Python_run.html) for detailed discussion.

  cd /SPINNER-directory/lammps-vspinner
  cd src
  make yes-python
  make XXX mode=shlib
  make install-python

Here, XXX is the name of the make file (Makefile.XXX in src/MAKE directory). Note that LAMMPS have to be installed with serial version (not mpi version). The optimization is recommended for your system but default serial option is likely to be sufficient.

Usage

To use SPINNER, 1 file (XXX.yaml) and 2 directories (input directory and src) are required.

input file (XXX.yaml; XXX is named by the user)

Parameter list to control SPINNER code is listed in XXX.yaml. The simplest form of input.yaml is described below:

# XXX.yaml

  input_dir:        input_directory_name
  output_dir:       output_directory_name
  initial_volume:   326.0
  structure:
      generation: 400
  material:
      Li:  4
      Hf:  2
      N:   4

input directory

In input directory (input_dir: in input file), LAMMPS potential file should be located. (Potential file have to be named potential.) Potential should be SIMPLE-NN format (https://github.com/MDIL-SNU/SIMPLE-NN).

src directory

src directory should be in the running directory. You can copy and paste the src directory to each running directory or you can run multiple calculations in one running folder.

Running code

  cd src
  mpirun -np core_number python3 main.py XXX.yaml

Example

See examples directory.

  sh run.sh