-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add noncovalent-interactions #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
66036c4
feat: benchmark class
leonwehrhan 7c87dae
Merge branch 'main' of https://github.com/instadeepai/mlipaudit-open …
leonwehrhan 0dfd34c
feat: unit test run model
leonwehrhan 7303b80
feat: unit test for analyze
leonwehrhan 1a25ad3
docs: add noncovalent interactions
leonwehrhan 9bb9e9c
fix: add license to conftest
leonwehrhan 44aab17
feat: update main
leonwehrhan c9ea6ee
feat: number of skipped structures as attribute
leonwehrhan 5855640
feat: refactor nci output
leonwehrhan edd18e3
feat: refactor benchmark output
leonwehrhan a6241fa
feat: ui
leonwehrhan 1055fea
feat: ui skipped structures
leonwehrhan dfd79c5
Merge branch 'main' of https://github.com/instadeepai/mlipaudit-open …
leonwehrhan 036f108
chore: smaller test data
leonwehrhan 5d9b2e5
chore: unit tests for unallowed elements
leonwehrhan 67a3fa0
chore: update tests
leonwehrhan 0e8e08a
chore: update benchmark class
leonwehrhan d43a56a
chore: update docs
leonwehrhan 3da026e
chore: update ui
leonwehrhan a8a5b43
Merge branch 'main' into noncovalent-interactions
leonwehrhan 6bc1130
Merge branch 'main' into noncovalent-interactions
leonwehrhan 055bb93
chore: linters
leonwehrhan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
app_data/noncovalent_interactions/n_systems_per_subset.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| { | ||
| "Dispersion: NobleGases": 140, | ||
| "Dispersion: PS": 103, | ||
| "Dispersion: HCNO": 79, | ||
| "Dispersion: Halogens": 94, | ||
| "Dispersion: Boron": 26, | ||
| "Hydrogen bonds: NH-O": 65, | ||
| "Hydrogen bonds: noHB": 113, | ||
| "Hydrogen bonds: CH-N": 20, | ||
| "Hydrogen bonds: OH-O": 60, | ||
| "Hydrogen bonds: NH-N": 53, | ||
| "Hydrogen bonds: OH-N": 45, | ||
| "Hydrogen bonds: CH-O": 19, | ||
| "Hydrogen bonds: XH-Cl": 32, | ||
| "Hydrogen bonds: XH-I": 19, | ||
| "Hydrogen bonds: XH-O": 51, | ||
| "Hydrogen bonds: XH-S": 54, | ||
| "Hydrogen bonds: XH-P": 52, | ||
| "Hydrogen bonds: XH-N": 34, | ||
| "Hydrogen bonds: XH-F": 41, | ||
| "Hydrogen bonds: XH-Br": 17, | ||
| "Ionic hydrogen bonds: NH(+)-O": 15, | ||
| "Ionic hydrogen bonds: OH-O(-)": 15, | ||
| "Ionic hydrogen bonds: OH-N(-)": 3, | ||
| "Ionic hydrogen bonds: CH-O(-)": 15, | ||
| "Ionic hydrogen bonds: NH(+)-N": 15, | ||
| "Ionic hydrogen bonds: NH-N(-)": 6, | ||
| "Ionic hydrogen bonds: CH-N(-)": 3, | ||
| "Ionic hydrogen bonds: NH-O(-)": 15, | ||
| "Ionic hydrogen bonds: NH-C(-)": 5, | ||
| "Ionic hydrogen bonds: NH(+)-C": 4, | ||
| "Ionic hydrogen bonds: OH-C(-)": 2, | ||
| "Ionic hydrogen bonds: OH(+)-O": 1, | ||
| "Ionic hydrogen bonds: CH-C(-)": 1, | ||
| "Repulsive contacts: NobleGases": 180, | ||
| "Repulsive contacts: Halogens": 235, | ||
| "Repulsive contacts: HCNO": 170, | ||
| "Repulsive contacts: PS": 154, | ||
| "Sigma hole: Cl": 29, | ||
| "Sigma hole: P": 33, | ||
| "Sigma hole: Br": 36, | ||
| "Sigma hole: S": 31, | ||
| "Sigma hole: Se": 44, | ||
| "Sigma hole: I": 42, | ||
| "Sigma hole: As": 35 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
docs/source/api_reference/small_molecules/noncovalent_interactions.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| .. _noncovalent_interactions_api: | ||
|
|
||
| Noncovalent Interactions | ||
| ======================== | ||
|
|
||
| .. module:: mlipaudit.noncovalent_interactions.noncovalent_interactions | ||
|
|
||
| .. autoclass:: NoncovalentInteractionsBenchmark | ||
|
|
||
| .. automethod:: __init__ | ||
|
|
||
| .. automethod:: run_model | ||
|
|
||
| .. automethod:: analyze | ||
|
|
||
| .. autoclass:: NoncovalentInteractionsResult | ||
|
|
||
| .. autoclass:: NoncovalentInteractionsSystemResult | ||
|
|
||
| .. autoclass:: NoncovalentInteractionsModelOutput | ||
|
|
||
| .. autoclass:: NoncovalentInteractionsSystemModelOutput |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
docs/source/benchmarks/small_molecules/noncovalent_interactions.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| .. _noncovalent_interactions: | ||
|
|
||
| Non-covalent interactions | ||
| ========================= | ||
|
|
||
| Purpose | ||
| ------- | ||
| This benchmark tests if the **MLIP** can reproduce interaction energies of molecular complexes driven by non-covalent interactions. | ||
| Non-covalent interactions are of highest importance for the structure and function of every biological molecule. This benchmark | ||
| assesses a broad range of interaction types: London dispersion, hydrogen bonds, ionic hydrogen bonds, repulsive contacts and sigma | ||
| hole interactions. | ||
|
|
||
|
|
||
| Description | ||
| ----------- | ||
| The benchmark runs energy inference on all structures of the distance scans of bi-molecular complexes in the dataset. The key | ||
| metric is the **RMSE of the interaction energy**, which is the minimum of the energy well in the distance scan, relative to the | ||
| energy of the dissociated complex - compared to the reference data. For repulsive contacts, the maximum of the energy profile is | ||
| used instead. Some of the molecular complexes in the benchmark dataset contain exotic elements (see *dataset section*). In case that | ||
| the **MLIP** has never seen an element of a molecular complex, this complex will be skipped in the benchmark. | ||
|
|
||
| .. list-table:: | ||
| :widths: 25 45 | ||
| :header-rows: 0 | ||
|
|
||
leonwehrhan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| * - .. figure:: img/butadiene_diazomethane.png | ||
| :width: 100% | ||
| :align: center | ||
| :figclass: align-center | ||
|
|
||
| - .. figure:: img/pes.png | ||
| :width: 100% | ||
| :align: center | ||
| :figclass: align-center | ||
|
|
||
| Dataset | ||
| ------- | ||
| This benchmark uses the datasets from the `NCI Atlas <http://www.nciatlas.org/>`_, with dissociation energy profiles. | ||
| These datasets contain **QM** optimized geometries, along with **CCSD(T)/CBS** level interaction energies. The molecular complexes of | ||
| these datasets contain typical organic small molecules, but also more exotic species and elements. Here is a summary of the | ||
| datasets used in this benchmark: | ||
|
|
||
| .. list-table:: NCI Atlas Datasets | ||
| :widths: 20 30 50 | ||
| :header-rows: 1 | ||
|
|
||
| * - Dataset Name | ||
| - Type of interaction | ||
| - Subsets | ||
| * - D442x10 | ||
| - London dispersion | ||
| - Noble Gases, Boron, HCNO, Halogens | ||
| * - HB375x10 | ||
| - Hydrogen bonds | ||
| - OH-N, OH-O, OH-C, NH-N, NH-O, … | ||
| * - HB300SPXx10 | ||
| - Hydrogen bonds extended to S, P and halogens | ||
| - XH-S, XH-P, XH-Cl, XH-Br | ||
| * - IHB100x10 | ||
| - Ionic hydrogen bonds | ||
| - O, N, C with cationic donors and anionic acceptors | ||
| * - R739x5 | ||
| - Repulsive contacts | ||
| - HCNO, halogens, PS | ||
| * - SH250x10 | ||
| - Sigma hole interactions | ||
| - P, S, Br, Cl, I | ||
|
|
||
| Interpretation | ||
| -------------- | ||
| The **RMSE** of the interaction energies should be **as low as possible**. This metric is likely to be very different for the different | ||
| interaction types and data subsets. The **RMSE** in interaction error **should be compared per interaction type** and then in a more | ||
| fine-grained visualization for the data subsets to identify areas of weakness for the **MLIP**. Within these areas of weakness, | ||
| individual dissociation energy profiles can be visually inspected to see how they compare to the reference. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Copyright 2025 InstaDeep Ltd | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| from mlipaudit.noncovalent_interactions.noncovalent_interactions import ( | ||
| NoncovalentInteractionsBenchmark, | ||
| NoncovalentInteractionsResult, | ||
| ) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.