/ Модель

Характеристики

Лицензия
MIT
Опубликована
4 июл 2026

MagNET

Языковая модель

MagNET — семейство моделей Equiformer-V2 для предсказания химических сдвигов ¹H и ¹³C по молекулярной структуре с учётом геометрии и растворителя.

0скачиваний за 30 дней2лайкавеса обновлены16 сен 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

MagNET — семейство нейронных сетей для предсказания химических сдвигов ЯМР, разработанное авторами статьи «Chemical Shift Prediction Beyond the Electronic Structure Limit». Модели предназначены для получения сдвигов ¹H и ¹³C по молекулярной структуре и её геометрии; в репозитории также представлены наборы данных и код для воспроизведения результатов статьи.

Модели построены на архитектуре Equiformer-V2 и содержат около 10 млн весов; для предсказаний ¹H и ¹³C используются отдельные веса. Семейство включает варианты для равновесных геометрий, газофазных растворённых веществ и поправок на неявный или явный растворитель. Поддерживаются атомы H, C, N, O, F, Cl и S. Для MagNET-Zero, MagNET-PCM и MagNET-x указаны требования к геометриям и условиям расчёта, включая AIMNet2-оптимизацию или классическую молекулярную динамику.

Модель предназначена для химических и вычислительных исследований, в том числе для ускорения оценки ЯМР-сдвигов молекул в растворителях. Она не поддерживает структуры с элементами за пределами указанного списка. Код, веса и наборы данных выпущены под лицензией MIT; для перераспространённых литературных данных сохраняются условия исходных публикаций.

Сценарии применения

  • предсказание сдвигов ¹H для молекулярных структур
  • предсказание сдвигов ¹³C для молекулярных структур
  • расчёт ЯМР-сдвигов молекулы в газовой фазе
  • оценка поправок к сдвигам при моделировании растворителя
  • ускорение вычислительной интерпретации спектров ЯМР

Ограничения

Поддерживаются только атомы H, C, N, O, F, Cl и S; отдельные варианты модели рассчитаны на заданные типы геометрий и условия растворителя. Для литературных данных, включённых в репозиторий, могут действовать условия исходных публикаций.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

MagNET

MagNET is a family of neural networks for predicting NMR chemical shifts. This repository contains all models, datasets, and code to reproduce the data in the MagNET paper.

Contents

itemcontents
magnet/the importable model package
data/the sigma datasets and other auxiliary datasets
analysis/scripts for reproducing figures and tables
model_checkpoints/weights for the four MagNET models

MagNET Models

ModelDescriptionDetails
MagNETfoundation modelfor near-equilibrium geometriestrained on PBE0/pcSseg-1/gas shieldings
MagNET-Zerohigh-quality gas-phase solute shieldingsuse AIMNet2-optimized geometriesWP04/pcSseg-2 (1H shieldings)ωB97X-D/pcSseg-2 (13C shieldings)
MagNET-PCMimplicit solvent correctionsshielding(PCM) - shielding(gas)use AIMNet2-optimized geometriescomputed at B3LYP-D3(BJ)/pcSseg-2/chloroform
MagNET-xexplicit solvent correctionsshielding(solute+solvent) - shielding(solute)supports chloroform, benzene, methanol, and wateruse classical MD geometriestrained at PBE0/pcSseg-1

All models use Equiformer-V2 and have approximately 10M weights. Separate weights are given for 1H and 13C prediction. Input structures can contain H, C, N, O, F, Cl, and S (inference should not be performed on structures with unsupported elements).

sigma Datasets

DatasetDetails
sigma-shake4.4M solutes from GDB-13/17 with functional group augmentationstationary and quasiclassically perturbed structures at B3LYP-D3(BJ)/6-31G*PBE0/pcSseg-1/gas shieldings
sigma-fresh10K representative natural product, drug-like, sugar, and peptide solutes dissolved in benzene, chloroform, methanol, and water~10 computed poses/solute with many more solvated geometries available462K poses have computed PBE0/pcSseg-1 shieldings
sigma-pepper (part 1)GDB molecules with ≤ 10 heavy atomsAIMNet2 stationary structuresPBE0/pcSseg-1 shieldings
sigma-pepper (part 2)GDB molecules with ≤ 9 heavy atomsAIMNet2 stationary structuresWP04/pcSseg-2/gas (1H shieldings)ωB97X-D/pcSseg-2/gas (13C shieldings)
sigma-concentrate50K random structures from sigma-shakePCM(chloroform) corrections at B3LYP/pcSseg-2

Installing MagNET

  1. Install MagNET and its dependencies.

    Option A: Model Only via PyPI (won't work until publication)

    pip install torch==2.5.0 --index-url https://download.pytorch.org/whl/cpu
    pip install magnet-nmr
    pip install torch_scatter torch_cluster --find-links https://data.pyg.org/whl/torch-2.5.0+cpu.html
    

    Option B: Full Installation

    git clone https://github.com/ekwan/MagNET
    cd MagNET
    pip install torch==2.5.0 --index-url https://download.pytorch.org/whl/cpu
    pip install -r magnet/requirements.txt
    pip install --no-deps ./magnet
    
  2. Fetch Model Weights

    pip install "huggingface_hub[cli]"
    hf download ekwan16/MagNET --local-dir . --include "model_checkpoints/*"
    

    The model weights will be downloaded into the working directory. No repository cloning is needed, as MagNET will automatically check the current directory for weights. Alternatively, you may pass the checkpoints_dir parameter to the inference methods.

  3. Check the Installation

    python -c "import magnet"

    This should work with no errors.

Your First Prediction

Let's predict the 1H and 13C shifts of acetone in chloroform. predict_shifts takes an AIMNet2-optimized geometry and runs MagNET-Zero, MagNET-PCM, and the paper's scaling for you.

import numpy as np
import magnet

# acetone, (CH3)2C=O, on an AIMNet2-optimized geometry (Angstrom)
atomic_numbers = np.array([6, 6, 8, 6, 1, 1, 1, 1, 1, 1])   # supported elements: H C N O F Cl S
geometry = np.array([
    [ 1.2913, -0.5947, -0.0016],   # C  methyl
    [ 0.0029,  0.1931, -0.0010],   # C  carbonyl
    [-0.0174,  1.3994, -0.0003],   # O
    [-1.2743, -0.6189,  0.0004],   # C  methyl
    [-1.0822, -1.6899,  0.0014],   # H
    [-1.8597, -0.3513,  0.8791],   # H
    [-1.8605, -0.3530, -0.8783],   # H
    [ 1.3415, -1.2208,  0.8916],   # H
    [ 1.3170, -1.2669, -0.8614],   # H
    [ 2.1415,  0.0788, -0.0298],   # H
])

shifts = magnet.predict_shifts(atomic_numbers, geometry, solvent="chloroform")   # per-atom ppm

shifts has one value per atom (NaN where the atom is neither 1H nor 13C). Averaging acetone's chemically-equivalent atoms by index:

sites = {
    "carbonyl 13C": [1],
    "methyl 13C":   [0, 3],
    "methyl 1H":    [4, 5, 6, 7, 8, 9],
}
for name, indices in sites.items():
    print(f"{name:<13} {shifts[indices].mean():6.2f} ppm")

The predictions are close to experiment:

siteMagNETexperiment (CDCl3)
carbonyl 13C207.6207.07
methyl 13C30.730.92
methyl 1H2.202.17

Notes:

  • Passes and mirror averaging. n_passes (default 10) averages out equivariance error over the specified number of forward passes. If mirror_average (default True) is set, an additional n_passes are also performed on the mirror image of the input geometry (for a total of 2*n_passes). The passes are run as a single batch per head rather than one forward pass each, so raising n_passes costs far less than it used to; max_batch_graphs caps how many run at once and does not change the answer. mirror_average was called symmetrize before, and that name still works but warns: the option averages over the mirror image, not over symmetry-equivalent nuclei.
  • Geometry. MagNET-Zero and MagNET-PCM require AIMNet2-optimized geometries. Do not use other geometries.
  • Components. Pass return_components=True to also get the MagNET-Zero shielding, the MagNET-PCM correction, and the scaling coefficients behind each shift, as a dict.
  • Other models. For raw shieldings and solvent corrections, see the API documentation.

Getting the datasets

The supporting datasets for this paper are large (42 GB) and are archived on Hugging Face. To fetch everything:

hf download ekwan16/MagNET --local-dir .

If you only want to download a single dataset, add --include "data/<name>/*" with one of the names below.

datasetsizecontents
sigma-shake2.2 GB4.4M GDB solutes, perturbed geometries, PBE0/pcSseg-1 shieldings
sigma-fresh30 GB10K solutes in explicit benzene, chloroform, methanol, and water
sigma-pepper501 MBAIMNet2 GDB structures used to train MagNET-Zero and MagNET-PCM
sigma-concentrate17 MBPCM corrections on 50K sigma-shake structures
delta222.5 GBexperimental 1H/13C shifts with matched DFT and MagNET predictions
dft8k12 MBexternal benchmark of 7111 organics
gdb_qcd291 MBquasiclassical dynamics of 2461 GDB molecules
magnet_test_predictions822 MBMagNET predictions and DFT targets
applications5.1 GBnatural product MD geometries and experimental shifts
supertestset_magnet_x1.2 MBexplicit solvent test set for MagNET-x

Reproducing Figures and Tables

Each figure and table in the paper is produced by a notebook under analysis/.

  1. Use the Option B checkout.
  2. Download the datasets.
  3. Install the analysis dependencies: pip install -r requirements.txt
  4. Run the analysis scripts: python reproduce.py

If you want to reproduce specific items: python reproduce.py fig3 s10

The notebooks are stored without outputs. Running a notebook outputs its figures into figures/ and its tables into documents/.

Running the Tests

pip install -r requirements.txt "pytest>=7"
pytest

The tests use small synthetic fixtures. If the large files are present, then more comprehensive tests will run. The magnet package tests need the Option B checkout with the inference stack installed (pip install -r magnet/requirements.txt); without PyTorch they are skipped.

API Documentation

You can render the API docs with pdoc:

pip install pdoc
python build_api_docs.py

Most people will only want to look at api_docs/magnet.html (the public API), though the other functions are documented as well.

How to Cite

"Chemical Shift Prediction Beyond the Electronic Structure Limit."

Adams, K.; Wagen, C.C.; Wolford, J.; Sak, M.H.; Saurí, J.; Feng, Z.; Bhadauria, A.S.; Bailey, M.A.; Downs, J.S.; Li, S.Z.; Liu, A.I.; Smidt, T.; Paton, R.S.; Liu, R.Y.; Coley, C.W.*; Kwan, E.E.*

submitted, July 2026.

License

  • The original code, model weights, and datasets in this repository are released under the MIT License (see LICENSE).
  • Third-party literature data redistributed here remains subject to its original publications' terms and should be cited accordingly: CP3 (data/cp3/, Smith and Goodman), NS372 (data/ns372/, Schattenberg and Kaupp), DFT8K (data/dft8k/, Guan and Paton), and DELTA50 (data/delta50/, Cohen et al.).

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

У модели не указана задача.

Ревизия весов
fe222d1

0 моделей