Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.
/ SIMPLE-NN Public archive

SIMPLE-NN(SNU Interatomic Machine-learning PotentiaL packagE – version Neural Network)

License

Notifications You must be signed in to change notification settings

MDIL-SNU/SIMPLE-NN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

New version release!

A new version of SIMPLE-NN has been released.

It provides faster training speed and more convenient usage with Pytorch.

You can download and enjoy the new SIMPLE-NN from https://github.com/MDIL-SNU/SIMPLE-NN_v2.git

SIMPLE-NN on this page will be deprecated soon.

SIMPLE-NN

SIMPLE-NN(SNU Interatomic Machine-learning PotentiaL packagE – version Neural Network)

If you use SIMPLE-NN, please cite this article:

K. Lee, D. Yoo, W. Jeong, S. Han, SIMPLE-NN: An efficient package for training and executing neural-network interatomic potentials, Computer Physics Communications (2019), https://doi.org/10.1016/j.cpc.2019.04.014.

Here do we describe minimal instruction to run the example of SIMPLE-NN If you want more information such as tuning parameters, please visit our online manual(https://simple-nn.readthedocs.io)

Installation

SIMPLE-NN use Tensorflow and mpi4py(optional). You need to install Tensorflow and mpi4py to use SIMPLE-NN

install Tensorflow: https://www.tensorflow.org/install/

install mpi4py:

pip install mpi4py

From github

git clone https://github.com/MDIL-SNU/SIMPLE-NN.git
cd SIMPLE-NN
python setup.py install

Install LAMMPS' module

Currently, we support the module for symmetry_function - Neural_network model. Copy the source code to LAMMPS src directory.

cp /directory/of/simple-nn/features/symmetry_function/pair_nn.* /directory/of/lammps/src/
cp /directory/of/simple-nn/features/symmetry_function/symmetry_function.h /directory/of/lammps/src/

And compile LAMMPS code. Only LAMMPS whose version is 29Oct2020 or later is supported.

Usage

To use SIMPLE-NN, 3 types of files (input.yaml, params_XX, str_list) are required.

input.yaml

Parameter list to control SIMPLE-NN code is listed in input.yaml. The simplest form of input.yaml is described below:

# input.yaml
generate_features: true
preprocess: true
train_model: true
atom_types:
 - Si
 - O

symmetry_function:
  params:
    Si: params_Si
    O: params_O
  # GDF setting
  #atomic_weights:
  #  type: gdf
  
neural_network:
  method: Adam
  nodes: 30-30

params_XX

params_XX (XX means atom type that is included your target system) indicates the coefficients of symmetry functions. Each line contains coefficients for one symmetry function. detailed format is described below:

2 1 0 6.0 0.003214 0.0 0.0
2 1 0 6.0 0.035711 0.0 0.0
4 1 1 6.0 0.000357 1.0 -1.0
4 1 1 6.0 0.028569 1.0 -1.0
4 1 1 6.0 0.089277 1.0 -1.0

First one indicates the type of symmetry function. Currently G2, G4 and G5 is available.

Second and third indicates the type index of neighbor atoms which starts from 1. For radial symmetry function, 1 neighbor atom is need to calculate the symmetry function value. Thus, third parameter is set to zero. For angular symmtery function, 2 neighbor atom is needed. The order of second and third do not affect to the calculation result.

Fourth one means the cutoff radius for cutoff function.

The remaining parameters are the coefficients applied to each symmetry function.

str_list

str_list contains the location of reference calculation data. The format is described below:

/location/of/calculation/data/oneshot_output_file :
/location/of/calculation/data/MDtrajectory_output_file 100:2000:20
/location/of/calculation/data/same_folder_format{1..10}/oneshot_output_file :

Script for running SIMPLE-NN

After preparing input.yaml, params_XX and str_list, one can run SIMPLE-NN using the script below:

"""
Run the code below:
    python run.py

run.py:
"""

from simple_nn import Simple_nn
from simple_nn.features.symmetry_function import Symmetry_function
from simple_nn.models.neural_network import Neural_network

model = Simple_nn('input.yaml', 
                   descriptor=Symmetry_function(), 
                   model=Neural_network())
model.run()

Example

In examples folder, one can find MD trajectories of bulk SiO2, corresponding input files (input.yaml, params_Si, params_O and str_list) and python script run.py. To use this example, one simply change the location in the 'str_list' file and run 'Python run.py' command.

About

SIMPLE-NN(SNU Interatomic Machine-learning PotentiaL packagE – version Neural Network)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •