https://github.com/choderalab/espaloma

Extensible Surrogate Potential of Ab initio Learned and Optimized by Message-passing Algorithm ๐Ÿนhttps://arxiv.org/abs/2010.01196

https://github.com/choderalab/espaloma

Science Score: 46.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • โ—‹
    CITATION.cff file
  • โœ“
    codemeta.json file
    Found codemeta.json file
  • โœ“
    .zenodo.json file
    Found .zenodo.json file
  • โ—‹
    DOI references
  • โœ“
    Academic publication links
    Links to: arxiv.org
  • โœ“
    Committers with academic emails
    2 of 12 committers (16.7%) from academic institutions
  • โ—‹
    Institutional organization owner
  • โ—‹
    JOSS paper metadata
  • โ—‹
    Scientific vocabulary similarity
    Low similarity (13.9%) to scientific vocabulary

Keywords

forcefield-parameterization graph-learning

Keywords from Contributors

molecular-dynamics free-energy-calculations molecular-simulations openmm graph-theory molecular-modeling tensorflow-gpu
Last synced: 5 months ago · JSON representation

Repository

Extensible Surrogate Potential of Ab initio Learned and Optimized by Message-passing Algorithm ๐Ÿนhttps://arxiv.org/abs/2010.01196

Basic Info
Statistics
  • Stars: 239
  • Watchers: 14
  • Forks: 27
  • Open Issues: 64
  • Releases: 9
Topics
forcefield-parameterization graph-learning
Created about 6 years ago · Last pushed 9 months ago
Metadata Files
Readme License

README.md

espaloma: Extensible Surrogate Potential Optimized by Message-passing Algorithms ๐Ÿน

CI Documentation Status

Source code for Wang Y, Fass J, and Chodera JD "End-to-End Differentiable Construction of Molecular Mechanics Force Fields."

abstract

Documentation: https://docs.espaloma.org

Paper Abstract

Molecular mechanics (MM) potentials have long been a workhorse of computational chemistry. Leveraging accuracy and speed, these functional forms find use in a wide variety of applications in biomolecular modeling and drug discovery, from rapid virtual screening to detailed free energy calculations. Traditionally, MM potentials have relied on human-curated, inflexible, and poorly extensible discrete chemical perception rules atom types for applying parameters to small molecules or biopolymers, making it difficult to optimize both types and parameters to fit quantum chemical or physical property data. Here, we propose an alternative approach that uses graph neural networks to perceive chemical environments, producing continuous atom embeddings from which valence and nonbonded parameters can be predicted using invariance-preserving layers. Since all stages are built from smooth neural functions, the entire process---spanning chemical perception to parameter assignment---is modular and end-to-end differentiable with respect to model parameters, allowing new force fields to be easily constructed, extended, and applied to arbitrary molecules. We show that this approach is not only sufficiently expressive to reproduce legacy atom types, but that it can learn and extend existing molecular mechanics force fields, construct entirely new force fields applicable to both biopolymers and small molecules from quantum chemical calculations, and even learn to accurately predict free energies from experimental observables.

Installation

We recommend using mamba which is a drop-in replacement for conda and is much faster.

bash $ mamba create --name espaloma -c conda-forge "espaloma=0.3.2"

Example: Deploy espaloma 0.3.2 pretrained force field to arbitrary MM system

```python

imports

import os import torch import espaloma as esp

define or load a molecule of interest via the Open Force Field toolkit

from openff.toolkit.topology import Molecule molecule = Molecule.from_smiles("CN1C=NC2=C1C(=O)N(C(=O)N2C)C")

create an Espaloma Graph object to represent the molecule of interest

molecule_graph = esp.Graph(molecule)

load pretrained model

espalomamodel = esp.getmodel("latest")

apply a trained espaloma model to assign parameters

espalomamodel(moleculegraph.heterograph)

create an OpenMM System for the specified molecule

openmmsystem = esp.graphs.deploy.openmmsystemfromgraph(molecule_graph) ```

If using espaloma from a local .pt file, say for example espaloma-0.3.2.pt, then you would need to run the eval method of the model to get the correct inference/predictions, as follows:

```python import torch ...

load local pretrained model

espalomamodel = torch.load("espaloma-0.3.2.pt") espalomamodel.eval() ... ```

The rest of the code should be the same as in the previous code block example.

Compatible models

Below is a compatibility matrix for different versions of espaloma code and espaloma models (the .pt file).

| Model ๐Ÿงช | DOI ๐Ÿ“ | Supported Espaloma version ๐Ÿ’ป | Release Date ๐Ÿ—“๏ธ | Espaloma architecture change ๐Ÿ“? | |---------------------|-------|------------------------------|----------------|----------------------------------| | espaloma-0.3.2.pt | | 0.3.1, 0.3.2, 0.4.0 | Sep 22, 2023 | โœ… No | | espaloma-0.3.1.pt | | 0.3.1, 0.3.2, 0.4.0 | Jul 17, 2023 | โš ๏ธ Yes | | espaloma-0.3.0.pt | | 0.3.0 | Apr 26, 2023 | โš ๏ธYes |

[!NOTE]
espaloma-0.3.1.pt and espaloma-0.3.2.pt are the same model.

Using espaloma to parameterize small molecules in relative free energy calculations

An example of using espaloma to parameterize small molecules in relative alchemical free energy calculations is provided in the scripts/perses-benchmark/ directory.

Manifest

  • espaloma/ core code for graph-parametrized potential energy functions.
    • graphs/ data objects that contain various level of information we need.
      • graph.py base modules for graphs.
      • molecule_graph.py provide APIs to various molecular modelling toolkits.
      • homogeneous_graph.py simplest graph representation of a molecule.
      • heterogeneous_graph.py graph representation of a molecule that contains information regarding membership of lower-level nodes to higher-level nodes.
      • parametrized_graph.py graph representation of a molecule with all parameters needed for energy evaluation.
    • nn/ neural network models that facilitates translation between graphs.
      • dgl_legacy.py API to dgl models for atom-level message passing.
    • mm/ molecular mechanics functionalities for energy evaluation.
      • i/ energy terms used in Class-I force field.
        • bond.py bond energy
        • angle.py angle energy
        • torsion.py torsion energy
        • nonbonded.py nonbonded energy
      • ii/ energy terms used in Class-II force field.
        • coupling.py coupling terms
        • polynomial.py higher order polynomials.

License

This software is licensed under MIT license.

Copyright

Copyright (c) 2020, Chodera Lab at Memorial Sloan Kettering Cancer Center and Authors: Authors: - Yuanqing Wang - Josh Fass - John D. Chodera

Owner

  • Name: Chodera lab // Memorial Sloan Kettering Cancer Center
  • Login: choderalab
  • Kind: organization
  • Email: john.chodera@choderalab.org
  • Location: Memorial Sloan-Kettering Cancer Center, Manhattan, NY

GitHub Events

Total
  • Create event: 4
  • Release event: 1
  • Issues event: 7
  • Watch event: 27
  • Delete event: 4
  • Issue comment event: 9
  • Push event: 12
  • Pull request review comment event: 1
  • Pull request review event: 2
  • Pull request event: 7
  • Fork event: 4
Last Year
  • Create event: 4
  • Release event: 1
  • Issues event: 7
  • Watch event: 27
  • Delete event: 4
  • Issue comment event: 9
  • Push event: 12
  • Pull request review comment event: 1
  • Pull request review event: 2
  • Pull request event: 7
  • Fork event: 4

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 613
  • Total Committers: 12
  • Avg Commits per committer: 51.083
  • Development Distribution Score (DDS): 0.261
Past Year
  • Commits: 24
  • Committers: 6
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.625
Top Committers
Name Email Commits
Yuanqing Wang w****q@w****t 453
Josh Fass j****s@c****g 102
John Chodera j****a@c****g 17
kaminow b****w@c****g 15
Mike Henry 1****y@u****m 14
Josh Horton J****n@n****k 3
kt k****r@g****m 3
Yuanqing Wang w****1@l****g 2
kaminow 5****w@u****m 1
yuanqing-wang w****q@u****u 1
Kenichiro Takaba t****k@l****e 1
Yuanqing Wang w****h@w****t 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 50
  • Total pull requests: 84
  • Average time to close issues: 4 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 26
  • Total pull request authors: 14
  • Average comments per issue: 1.9
  • Average comments per pull request: 2.68
  • Merged pull requests: 64
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 2
  • Pull requests: 2
  • Average time to close issues: 14 days
  • Average time to close pull requests: less than a minute
  • Issue authors: 2
  • Pull request authors: 1
  • Average comments per issue: 1.5
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • kntkb (8)
  • mikemhenry (7)
  • jchodera (6)
  • LeifSeute (3)
  • GhermanProteic (3)
  • ijpulidos (3)
  • maxentile (2)
  • exYuan (1)
  • tueboesen (1)
  • simonaxelrod (1)
  • mganahl (1)
  • niccolo93 (1)
  • chrisiacovella (1)
  • yuanqing-wang (1)
  • chabi-fin (1)
Pull Request Authors
  • yuanqing-wang (39)
  • mikemhenry (18)
  • kntkb (7)
  • jchodera (5)
  • maxentile (4)
  • ijpulidos (2)
  • gianscarpe (2)
  • kaminow (2)
  • jstaker7 (1)
  • mattwthompson (1)
  • amin-sagar (1)
  • jthorton (1)
  • pmorerio (1)
  • jeherr (1)
  • lgtm-com[bot] (1)
Top Labels
Issue Labels
question :question: (3) enhancement :magic_wand: (2) bug (1) installation :hammer_and_wrench: (1) reproducibility :microscope: (1) paper :roll_of_paper: (1) testing :test_tube: (1) bug :bug: (1)
Pull Request Labels
bug (1) high-priority (1) installation :hammer_and_wrench: (1) bug :bug: (1)

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
conda-forge.org: espaloma
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 30.3%
Dependent repos count: 34.0%
Average: 38.9%
Forks count: 40.0%
Dependent packages count: 51.2%
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • dgl *
  • matplotlib *
  • numpy *
  • pandas *
  • qcportal *
  • torch *
.github/workflows/CI.yaml actions
  • actions/checkout v2 composite
  • codecov/codecov-action v1 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/clean_cache.yaml actions
  • actions/checkout v3 composite
.github/workflows/docker.yaml actions
  • actions/checkout v3 composite
  • docker/build-push-action ad44023a93711e3deb337508980b4b5e9bcdc5dc composite
  • docker/build-push-action v4 composite
  • docker/login-action f054a8b539a109f9f41c372932f1ae047eff08c9 composite
  • docker/metadata-action 98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 composite
  • eWaterCycle/setup-apptainer v2 composite
devtools/conda-recipe/meta.yml cpan
docker/Dockerfile docker
  • mambaorg/micromamba 1.4.9 build
setup.py pypi