Thanks to visit codestin.com
Credit goes to gitHub.com

Skip to content
/ NNPOps Public

High-performance operations for neural network potentials

License

Notifications You must be signed in to change notification settings

openmm/NNPOps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GH Actions Status Conda Anaconda Cloud Badge

NNPOps

The goal of this project is to promote the use of neural network potentials (NNPs) by providing highly optimized, open source implementations of bottleneck operations that appear in popular potentials. These are the core design principles.

  1. Each operation is entirely self contained, consisting of only a few source files that can easily be incorporated into any code that needs to use it.

  2. Each operation has a simple, clearly documented API allowing it to be easily used in any context.

  3. We provide both CPU (pure C++) and CUDA implementations of all operations.

  4. The CUDA implementations are highly optimized. The CPU implementations are written in a generally efficient way, but no particular efforts have been made to tune them for optimum performance.

  5. This code is designed for inference (running simulations), not training (creating new potential functions). It computes gradients with respect to particle positions, not model parameters.

Installation

Install with Conda

A conda package can be installed from the conda-forge channel:

conda install -c conda-forge nnpops

If you don't have conda, we recommend installing Miniconda.

Build from source

Prerequisites

Build & install

  • Get the source code
$ git clone https://github.com/openmm/NNPOps.git
  • Create and activate a Conda environment
$ cd NNPOps
$ conda env create -n nnpops -f environment.yml
$ conda activate nnpops
  • Configure, build, and install (note: for some older PyTorch versions, you may need to add -DTorch_DIR=$(python -c 'import torch.utils; print(torch.utils.cmake_prefix_path)')/Torch as an argument to cmake; for newer PyTorch versions, this is unnecessary, and may actually cause CMake configuration to fail)
$ mkdir build && cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
$ make install
  • Run the tests
$ ctest --verbose

Operations

The following optimized operations are present in NNPOps and accessible from Python using the listed classes or functions:

  • ANI symmetry functions: NNPOps.SymmetryFunctions.ANISymmetryFunctions
  • Continuous filter convolution (CFConv): NNPOps.CFConv.CFConv, NNPOps.CFConv.CFConvNeighbors
  • Neighbor pair enumeration: NNPOps.neighbors.getNeighborPairs()
  • Particle mesh Ewald (PME): NNPOps.pme.PME