https://github.com/choderalab/espaloma
Extensible Surrogate Potential of Ab initio Learned and Optimized by Message-passing Algorithm ๐นhttps://arxiv.org/abs/2010.01196
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
Keywords from Contributors
Repository
Extensible Surrogate Potential of Ab initio Learned and Optimized by Message-passing Algorithm ๐นhttps://arxiv.org/abs/2010.01196
Basic Info
- Host: GitHub
- Owner: choderalab
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://docs.espaloma.org/en/latest/
- Size: 13.4 MB
Statistics
- Stars: 239
- Watchers: 14
- Forks: 27
- Open Issues: 64
- Releases: 9
Topics
Metadata Files
README.md
espaloma: Extensible Surrogate Potential Optimized by Message-passing Algorithms ๐น
Source code for Wang Y, Fass J, and Chodera JD "End-to-End Differentiable Construction of Molecular Mechanics Force Fields."

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.ptandespaloma-0.3.2.ptare 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.pybase modules for graphs.molecule_graph.pyprovide APIs to various molecular modelling toolkits.homogeneous_graph.pysimplest graph representation of a molecule.heterogeneous_graph.pygraph representation of a molecule that contains information regarding membership of lower-level nodes to higher-level nodes.parametrized_graph.pygraph representation of a molecule with all parameters needed for energy evaluation.
nn/neural network models that facilitates translation between graphs.dgl_legacy.pyAPI 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.pybond energyangle.pyangle energytorsion.pytorsion energynonbonded.pynonbonded energy
ii/energy terms used in Class-II force field.coupling.pycoupling termspolynomial.pyhigher 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
- Website: http://choderalab.org
- Repositories: 269
- Profile: https://github.com/choderalab
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
Top Committers
| Name | 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
Pull Request Labels
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
conda-forge.org: espaloma
- Homepage: https://github.com/choderalab/espaloma
- License: MIT
-
Latest release: 0.2.4
published over 3 years ago
Rankings
Dependencies
- dgl *
- matplotlib *
- numpy *
- pandas *
- qcportal *
- torch *
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- conda-incubator/setup-miniconda v2 composite
- actions/checkout v3 composite
- 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
- mambaorg/micromamba 1.4.9 build