Skip to main content

Reference implementation of the GDML and sGDML force field models.

Project description

Symmetric Gradient Domain Machine Learning (sGDML)

For more details visit: sgdml.org
Documentation can be found here: docs.sgdml.org

Requirements:

  • Python 3.7+
  • PyTorch (>=1.8)
  • NumPy (>=1.19)
  • SciPy (>=1.1)

Optional:

  • ASE (>=3.16.2) (to run atomistic simulations)

Getting started

Stable release

Most systems come with the default package manager for Python pip already preinstalled. Install sgdml by simply calling:

$ pip install sgdml

The sgdml command-line interface and the corresponding Python API can now be used from anywhere on the system.

Development version

(1) Clone the repository

$ git clone https://github.com/stefanch/sGDML.git
$ cd sGDML

...or update your existing local copy with

$ git pull origin master

(2) Install

$ pip install -e .

Using the flag --user, you can tell pip to install the package to the current users's home directory, instead of system-wide. This option might require you to update your system's PATH variable accordingly.

Optional dependencies

Some functionality of this package relies on third-party libraries that are not installed by default. These optional dependencies (or "package extras") are specified during installation using the "square bracket syntax":

$ pip install sgdml[<optional1>]

Atomic Simulation Environment (ASE)

If you are interested in interfacing with ASE to perform atomistic simulations (see here for examples), use the ase keyword:

$ pip install sgdml[ase]

Reconstruct your first force field

Download one of the example datasets:

$ sgdml-get dataset ethanol_dft

Train a force field model:

$ sgdml all ethanol_dft.npz 200 1000 5000

Query a force field

import numpy as np
from sgdml.predict import GDMLPredict
from sgdml.utils import io

r,_ = io.read_xyz('geometries/ethanol.xyz') # 9 atoms
print(r.shape) # (1,27)

model = np.load('models/ethanol.npz')
gdml = GDMLPredict(model)
e,f = gdml.predict(r)
print(e.shape) # (1,)
print(f.shape) # (1,27)

Authors

  • Stefan Chmiela
  • Jan Hermann

We appreciate and welcome contributions and would like to thank the following people for participating in this project:

  • Huziel Sauceda
  • Igor Poltavsky
  • Luis Gálvez
  • Danny Panknin
  • Grégory Fonseca
  • Anton Charkin-Gorbulin

References

  • [1] Chmiela, S., Tkatchenko, A., Sauceda, H. E., Poltavsky, I., Schütt, K. T., Müller, K.-R., Machine Learning of Accurate Energy-conserving Molecular Force Fields. Science Advances, 3(5), e1603015 (2017)
    10.1126/sciadv.1603015

  • [2] Chmiela, S., Sauceda, H. E., Müller, K.-R., Tkatchenko, A., Towards Exact Molecular Dynamics Simulations with Machine-Learned Force Fields. Nature Communications, 9(1), 3887 (2018)
    10.1038/s41467-018-06169-2

  • [3] Chmiela, S., Sauceda, H. E., Poltavsky, I., Müller, K.-R., Tkatchenko, A., sGDML: Constructing Accurate and Data Efficient Molecular Force Fields Using Machine Learning. Computer Physics Communications, 240, 38-45 (2019) 10.1016/j.cpc.2019.02.007

  • [4] Chmiela, S., Vassilev-Galindo, V., Unke, O. T., Kabylda, A., Sauceda, H. E., Tkatchenko, A., Müller, K.-R., Accurate Global Machine Learning Force Fields for Molecules With Hundreds of Atoms. Science Advances, 9(2), e1603015 (2023) 10.1126/sciadv.adf0873

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sgdml-1.0.2.tar.gz (92.1 kB view details)

Uploaded Source

Built Distribution

sgdml-1.0.2-py3-none-any.whl (110.2 kB view details)

Uploaded Python 3

File details

Details for the file sgdml-1.0.2.tar.gz.

File metadata

  • Download URL: sgdml-1.0.2.tar.gz
  • Upload date:
  • Size: 92.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for sgdml-1.0.2.tar.gz
Algorithm Hash digest
SHA256 4c9f4fb1c6f4525b8ee5211752dc810181bee8778f741e849fec25b315970267
MD5 81d85868a3cadffb5dea02536e830e7c
BLAKE2b-256 c0717bd13fddb51dac61dc60c74cd56920032e620ecfd44c665a579471f37330

See more details on using hashes here.

File details

Details for the file sgdml-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: sgdml-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 110.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for sgdml-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b91b9d1cb0371dd44c0582f6029eb092d1c4e4c41f0d614065c3f19b5d434cf1
MD5 93ac78e8d7cfb10fdf6a3c439d84102e
BLAKE2b-256 20cfefbe8a69c6c46bbf54652fc458b491b692e97db88c3794f1a953be3d0b88

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page