Giter VIP home page Giter VIP logo

metatensor-lj-test's Introduction

Lennard-Jones potential as a metatensor atomistic model

This repository contains an implementation of the classic Lennard-Jones potential as a metatensor atomistic model.

This is intended to be used when testing the integration of metatensor atomistic models with various simulation engines; but can also serve as a relatively complete example of how to write your own models and use neighbor lists.

Installation

pip install git+https://github.com/Luthaf/metatensor-lj-test

# if you are working on Linux or Windows and DO NOT have a CUDA GPU
pip install --extra-index-url=https://download.pytorch.org/whl/cpu git+https://github.com/Luthaf/metatensor-lj-test

API

import metatensor_lj_test

# `with_extension` controls wether the model uses custom
# TorchScript operators defined in a C++ extension library
# or a pure PyTorch implementation
model = metatensor_lj_test.lennard_jones_model(
    atomic_type=12,
    cutoff=3.4,
    sigma=1.5,
    epsilon=23.0,
    length_unit="Angstrom",
    energy_unit="eV",
    with_extension=False,
)

model.export("lennard-jones.pt", collect_extensions="extensions/")

metatensor-lj-test's People

Contributors

luthaf avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.