Skip to content

Latest commit

 

History

History
73 lines (50 loc) · 3.12 KB

File metadata and controls

73 lines (50 loc) · 3.12 KB

So3krates Neural Network Potential

This folder contains a neural network potentials for several material. They were trained on reference data created with the harmonic stochastic sampling scheme implemented in TDEP for a variety of conditions.

Install

The so3krates potential requires python >=3.8. Older versions are not supported by jax.

Please follow the detailed instruction below if you want a working environment that is not optimized for speed.

The requirements should be straightforward to install. We generally recommend to create a virtual (conda) environment for testing. Please note that the potential is implemented in JAX and there are different ways to use hardware acceleration on your platform of interest. Please consider the JAX docs.

Please install the following repositories in this order:

Detailed instructions

  • Make sure you are using python 3.8-3.11. If you are on older versions, you can use conda to create e.g. a python3.10 environment via

    conda create -n py310 python=3.10
    conda activate py310
  • Go to the tutorials folder (the folder in which you find this README) and cd into the test directory:

    cd .../tdep-tutorials/00_preparation/potential_energy_surfaces/pes_gan/test
  • create a virtual environment and activate it:

    python -m venv venv
    # for bash:
    source venv/bin/activate
    # in in other shells:
    # source venv/bin/activate.fish
    # source venv/bin/activate.csh
  • install glp, mlff, tdeptools, and mlfftools:

    pip install https://github.com/sirmarcel/glp/archive/main.zip
    pip install https://github.com/flokno/mlff/archive/v0.2.1.zip
    pip install https://github.com/flokno/tools.tdep/archive/v0.0.5.zip
    pip install https://github.com/flokno/tools.mlff/archive/v0.0.2.zip

Test

You can check your installation for GaN in the folder pes_gan, see instructions there.

Use

You can predict energy, forces, and stress for a set of structures with the command sokrates_compute. For example, the command test in the pes_gan/test folder runs the command

sokrates_compute --folder-model ../module/ samples/*/*/*/geometry.in (--format aims)

which will compute energy, forces, and stress for all samples saved as geometry.in files (these could be POSCAR, positions.xyz', ..., as well. When you are using a default name that ase.io.read, then you do not need to specify the --format), and save them to a dataset predictions.nc which is a HDF5 file that can be read easily using , e.g., xarray.

sokrates_compute can also write TDEP input directly by using the --tdep flag.

References

Background: