# NequIP

**NequIP**（神经等变原子间势，Neural Equivariant Interatomic Potentials）是一种E(3)等变图神经网络方法，用于学习原子间势函数——即从原子位置和化学物种预测分子与材料势能和原子力的函数——以用于分子动力学模拟。<sup>[1](https://www.nature.com/articles/s41467-022-29939-5)</sup> 该方法由西蒙·巴茨纳、阿尔伯特·穆萨埃利安、孙立新、马里奥·盖格、乔纳森·P·迈洛阿、莫迪凯·科恩布鲁斯、尼古拉·莫利纳里、泰斯·E·斯密特和鲍里斯·科津斯基（当时任职于哈佛大学及合作机构）在2022年5月4日发表于*Nature Communications*的论文中提出。<sup>[1](https://www.nature.com/articles/s41467-022-29939-5)</sup> 其标志性主张是数据效率：作者报告称，NequIP以最多三个数量级更少的训练数据即可超越现有模型，使得仅用100次参考计算就能构建精确的势函数。<sup>[2](https://arxiv.org/abs/2101.03164)</sup> 该名称也用于指代由哈佛大学MIR课题组维护的开源软件框架，该框架实现了该模型及其扩展。<sup>[3](https://nequip.readthedocs.io/en/latest/index.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 一种E(3)等变消息传递图神经网络，将原子位置\(\{\vec{r}_i\}\)和物种\(\{Z_i\}\)映射为势能和力<sup>[1](https://www.nature.com/articles/s41467-022-29939-5)</sup> |
| 原始论文 | 巴茨纳等，*Nature Communications* 13, 2453（2022年5月4日发表）<sup>[1](https://www.nature.com/articles/s41467-022-29939-5)</sup> |
| 数据效率 | 用少于1000次、少至100次参考从头算即可获得精确势函数；以低至先前模型千分之一的训练数据量超越先前模型<sup>[2](https://arxiv.org/abs/2101.03164)</sup> |
| MD17力精度 | 力平均绝对误差约9 meV/Å（阿司匹林上约15 meV/Å），参数量约30万<sup>[4](https://pubs.rsc.org/da/content/articlepdf/2025/dd/d5dd00170f)</sup> |
| 基础模型 | NequIP-OAM模型在OMat24（约1.01亿帧）上预训练，在sAlex（约1050万帧）和MPtrj（约150万帧）上微调<sup>[5](https://zenodo.org/records/23472045)</sup> |
| 软件 | 开源（Python 3.10+）；集成LAMMPS、ASE、OpenMM和torch-sim<sup>[3](https://nequip.readthedocs.io/en/latest/index.html)</sup><sup> • </sup><sup>[6](https://hysenlabs.com/projects/mir-group-nequip)</sup> |
| 衍生模型 | Allegro（严格局域变体）和SevenNet（并行MD软件包）基于NequIP构建<sup>[7](https://nequip.readthedocs.io/projects/allegro/en/latest/index.html)</sup><sup> • </sup><sup>[8](https://sevennet.readthedocs.io/en/latest/)</sup> |

## 等变性与架构

原子体系中的物理量在原子被平移、旋转或反射时以明确的方式变换：如果分子被旋转，其力矢量也随之旋转。等变神经网络通过构造本身保持这些变换性质，因为它们由等变运算构建，而非寄望于从数据中学习这些性质。<sup>[1](https://www.nature.com/articles/s41467-022-29939-5)</sup> NequIP的目标是平移不变性以及旋转、反射和宇称下的等变性，即欧几里得群E(3)的对称性。<sup>[1](https://www.nature.com/articles/s41467-022-29939-5)</sup>

核心架构选择在于内部特征是几何张量，而不仅仅是标量。每个原子携带的特征由O(3)对称群的不可约表示（基于对称性的几何特征基本构建块）的直和构成，以旋转阶数\( l = 0, 1, 2, \ldots \)（标量\( l = 0 \)，矢量\( l = 1 \)，依此类推）和宇称\( p \in (1, -1) \)为索引。<sup>[1](https://www.nature.com/articles/s41467-022-29939-5)</sup> 大多数当代对称性感知模型使用仅作用于标量的不变卷积；NequIP则对几何张量的相互作用使用E(3)等变卷积，作者将其描述为信息更丰富、也更忠实的原子环境表示。<sup>[2](https://arxiv.org/abs/2101.03164)</sup>

在机制上，该网络遵循张量场网络（TFN）架构中建立的方案，其基本运算在e3nn库中实现。<sup>[1](https://www.nature.com/articles/s41467-022-29939-5)</sup> 交互块将卷积滤波器构建为原子间距离的径向函数与单位方向矢量的球谐函数之积，\( S^{(l)}_m(\vec{r}_{ij}) = R(r_{ij})\,Y^{(l)}_m(\hat{r}_{ij}) \)，并通过与Clebsch-Gordan系数收缩的张量积将其与邻近特征组合。<sup>[9](https://molssi-ai.github.io/e3nn-course/notebooks/08a_nequip_theory.html)</sup><sup> • </sup><sup>[1](https://www.nature.com/articles/s41467-022-29939-5)</sup> 宇称选择规则\( p_o = p_i \, p_f \)决定哪些滤波器和输入宇称对输出特征有贡献。非线性通过门控处理：标量通过普通激活函数（偶宇称用SiLU，奇宇称用tanh），而每个高阶张量乘以各自对应的经过激活的标量，该标量缩放张量的模而不改变其方向，因此不会破坏等变性。<sup>[9](https://molssi-ai.github.io/e3nn-course/notebooks/08a_nequip_theory.html)</sup> [卷积](https://www.edgepedia.org/zh/convolution)限制在截断半径\( r_c \)内的原子之间，模型在原子嵌入之后、输出块之前堆叠若干交互块。<sup>[1](https://www.nature.com/articles/s41467-022-29939-5)</sup>

## 能量与力

遵循Behler-Parrinello式势函数的思路，总能量是原子贡献之和，<sup>[9](https://molssi-ai.github.io/e3nn-course/notebooks/08a_nequip_theory.html)</sup>

\[ E_{\mathrm{pot}} = \sum_{i \in N_{\mathrm{atoms}}} E_{i,\mathrm{atomic}} \]

其中原子局域能量\( E_{i,\mathrm{atomic}} \)是图神经网络预测的标量输出。力由预测能量的负梯度获得，<sup>[1](https://www.nature.com/articles/s41467-022-29939-5)</sup>

\[ \vec{F}_i = -\nabla_i E_{\mathrm{pot}} \]

通过自动微分计算。这种构造同时提供三个性质：力场严格保守，因此分子动力学可以守恒能量；总能量在相同原子重新标记下不变；由于每个原子能量仅依赖于截断半径内的邻居，计算成本随原子数线性增长。<sup>[9](https://molssi-ai.github.io/e3nn-course/notebooks/08a_nequip_theory.html)</sup>

## 数据效率与基准测试

原始论文的首要成果是样本效率。在小分子数据集上，NequIP超越了其他神经网络势函数，并与基于核的方法具有竞争力——后者历史上以更大的训练和预测成本换取更好的小数据精度。作者展示了在小分子、不同相态的水、非晶固体、固/气界面反应以及锂超离子导体上的精度，并在耦合簇量子化学理论水平的分子数据上展示了最先进的结果。<sup>[1](https://www.nature.com/articles/s41467-022-29939-5)</sup>

后续比较研究将NequIP置于现代势函数的前列。2025年的一篇综述表格报告，在[MD17](https://www.edgepedia.org/zh/md17)上力平均绝对误差约9 meV/Å（阿司匹林上约15 meV/Å），参数量约30万，称该模型精确且数据高效，但训练缓慢且因消息传递而可扩展性有限；MACE以约50万参数达到约6至8 meV/Å。<sup>[4](https://pubs.rsc.org/da/content/articlepdf/2025/dd/d5dd00170f)</sup> 一项针对结构复杂固体Al-Cu-Zr和Si-O的用户视角基准测试发现，非线性ACE和等变消息传递模型NequIP与MACE在精度与计算成本的权衡中构成帕累托前沿；对于Si-O，NequIP是所测试的最精确的机器学习原子间势，作者将其归因于[消息传递](https://www.edgepedia.org/zh/message-passing)相对于严格局域等变模型Allegro提高了精度。<sup>[10](https://doi.org/10.1088/1361-651X/adf56d)</sup> 在针对六种等变图神经网络力场的EGraFFBench评估中，NequIP在大多数数据集上具有最小力误差，且NequIP和Allegro在大多数数据集上表现出最小的力违反。<sup>[11](https://doi.org/10.1039/D4DD00027G)</sup> 在氯化物钝化CdSe纳米团簇的动力学稳定性测试中，接受基准测试的机器学习势（包括NequIP）每步分子动力学需要6至66毫秒，而密度泛函理论约需20秒。<sup>[12](https://arxiv.org/abs/2609.15299)</sup>

这些精度数据是有代价的。同样的比较报告称，NequIP、Allegro和MACE在CPU上进行分子动力学时内存需求非常高，除非使用大量资源，否则限制了其只能用于相对较小的模拟；而非等变模型的推理速度通常约为其两倍。<sup>[10](https://doi.org/10.1088/1361-651X/adf56d)</sup><sup> • </sup><sup>[13](https://www.osti.gov/pages/servlets/purl/3006207)</sup>

## Allegro与衍生模型

消息传递使信息每层只能从一个原子跳到相邻原子，因此感受野随深度增长。Allegro由阿尔伯特·穆萨埃利安、西蒙·巴茨纳、安德斯·约翰松、孙立新、卡梅伦·J·欧文、莫迪凯·科恩布鲁斯和鲍里斯·科津斯基在*Nature Communications* 14, 579（2023）中提出，完全取消了消息传递：特征存在于有序原子对上而非原子上，环境之间不交换信息，感受野固定在截断半径处而与深度无关，多体特性通过迭代张量积显式构建。<sup>[14](https://molssi-ai.github.io/e3nn-course/notebooks/09a_allegro_theory.html)</sup><sup> • </sup><sup>[15](https://www.nature.com/articles/s41467-023-36329-y.pdf)</sup> 这使模型严格局域且高度可并行：论文展示了1亿原子的模拟，Molssi课程讲义报告在128块GPU上扩展到\( 10^8 \)个原子。<sup>[15](https://www.nature.com/articles/s41467-023-36329-y.pdf)</sup><sup> • </sup><sup>[14](https://molssi-ai.github.io/e3nn-course/notebooks/09a_allegro_theory.html)</sup> Allegro作为NequIP框架内的扩展包实现，LAMMPS配对样式`pair_nequip_allegro`涵盖两种模型。<sup>[7](https://nequip.readthedocs.io/projects/allegro/en/latest/index.html)</sup><sup> • </sup><sup>[6](https://hysenlabs.com/projects/mir-group-nequip)</sup>

其他软件包直接复用了该架构。SevenNet是为LAMMPS中高效多GPU并行分子动力学而构建的图神经网络势，其核心模型基于NequIP。<sup>[8](https://sevennet.readthedocs.io/en/latest/)</sup> 基于元素的机器学习势（EMLP）是一个经NequIP训练的模型，涵盖Ag、Pd、C、H和O，专为多相催化应用设计。<sup>[16](https://pmc.ncbi.nlm.nih.gov/articles/PMC12766320/)</sup>

## 基础势函数

该框架现在提供托管在nequip.net上的预训练基础势函数，覆盖元素周期表的大部分，可直接用于生产模拟或在用户数据上微调。<sup>[17](https://nequip.readthedocs.io/en/develop/guide/getting-started/foundation_potentials.html)</sup> 模型家族因训练数据而异：`OAM`模型在约1.01亿帧的[OMat24](https://www.edgepedia.org/zh/omat24)数据集上预训练，并在sAlex（约1050万帧）和[MPtrj](https://www.edgepedia.org/zh/mptrj)（约150万帧）数据集上微调；而`MP`模型仅在MPtrj上训练，推荐用于基准测试而非生产工作。<sup>[5](https://zenodo.org/records/23472045)</sup> 模型有消息传递（`NequIP-OAM-{S,M,L,XL}`）和严格局域（`Allegro-OAM-*`）两种风格，以精度与速度的权衡分为不同尺寸。<sup>[17](https://nequip.readthedocs.io/en/develop/guide/getting-started/foundation_potentials.html)</sup> 项目报告称，与其他领先基础模型相比，NequIP OAM模型位于[帕累托前沿](https://www.edgepedia.org/zh/pareto-front)的右上象限，展现出速度与精度的最佳平衡。<sup>[18](https://zenodo.org/records/21225418)</sup>

## 软件

NequIP由哈佛大学MIR课题组开发，为基于PyTorch的开源软件，位于`mir-group/nequip`。<sup>[3](https://nequip.readthedocs.io/en/latest/index.html)</sup><sup> • </sup><sup>[19](https://mir.g.harvard.edu/research/software)</sup> 该软件包需要Python 3.10或更新版本，提供名为`nequip-train`、`nequip-package`、`nequip-compile`和`nequip-prepare-lmp-mliap`的控制台脚本；训练好的模型通过LAMMPS（经由专用配对样式和ML-IAP接口）、[原子模拟环境](https://www.edgepedia.org/zh/atomic-simulation-environment)、OpenMM和torch-sim运行分子动力学。<sup>[6](https://hysenlabs.com/projects/mir-group-nequip)</sup><sup> • </sup><sup>[3](https://nequip.readthedocs.io/en/latest/index.html)</sup> 2025年4月23日发布了不向后兼容的重构版本0.7.0，此后不支持从早期版本导入或迁移模型和训练运行；后续标签包括v0.18.0、v0.19.0和v0.19.1。<sup>[6](https://hysenlabs.com/projects/mir-group-nequip)</sup><sup> • </sup><sup>[20](https://nequip.readthedocs.io/en/latest/guide/reference/faq.html)</sup> 对于推理，`nequip-compile`生成[TorchScript](https://www.edgepedia.org/zh/torchscript)（`.nequip.pth`）或AOTInductor（`.nequip.pt2`）文件，NequIP模型的GPU张量积核加速可通过OpenEquivariance获得，Allegro模型则通过CuEquivariance。<sup>[21](https://nequip.readthedocs.io/en/latest/guide/getting-started/workflow.html)</sup>

## References

1. [Batzner, S., Musaelian, A., Sun, L. et al. (2022). E(3)-equivariant graph neural networks for data-efficient and accurate interatomic potentials. Nature Communications 13, 2453.](https://www.nature.com/articles/s41467-022-29939-5)
2. [Batzner, S. et al. (2021). E(3)-Equivariant Graph Neural Networks for Data-Efficient and Accurate Interatomic Potentials. arXiv:2101.03164.](https://arxiv.org/abs/2101.03164)
3. [NequIP documentation.](https://nequip.readthedocs.io/en/latest/index.html)
4. [Performance comparison of modern neural potential models. Digital Discovery 4, 2298-2335 (2025).](https://pubs.rsc.org/da/content/articlepdf/2025/dd/d5dd00170f)
5. [NequIP & Allegro Foundation Potentials, version 0.2.1. Zenodo.](https://zenodo.org/records/23472045)
6. [NequIP review: E(3)-equivariant interatomic potentials for MD. Hysen Labs.](https://hysenlabs.com/projects/mir-group-nequip)
7. [Allegro documentation, NequIP readthedocs.](https://nequip.readthedocs.io/projects/allegro/en/latest/index.html)
8. [SevenNet documentation.](https://sevennet.readthedocs.io/en/latest/)
9. [Lesson 08a: Theory of NequIP as an E(3)-Equivariant Interatomic Potential. Molssi e3nn course.](https://molssi-ai.github.io/e3nn-course/notebooks/08a_nequip_theory.html)
10. [Leimeroth, N., Erhard, L. C., Albe, K., Rohrer, J. (2025). Machine-learning interatomic potentials from a users perspective. Modelling and Simulation in Materials Science and Engineering.](https://doi.org/10.1088/1361-651X/adf56d)
11. [EGraFFBench: evaluation of equivariant graph neural network force fields for atomistic simulations. Digital Discovery (2024).](https://doi.org/10.1039/D4DD00027G)
12. [Benchmarking Machine-Learning Interatomic Potentials for Dynamical Stability in Inorganic Semiconductor Nanocrystals: A CdSe Case Study. arXiv:2609.15299.](https://arxiv.org/abs/2609.15299)
13. [MS25: Materials Science Focused Benchmark Dataset. OSTI.](https://www.osti.gov/pages/servlets/purl/3006207)
14. [Lesson 09a: Allegro as a Strictly Local Equivariant Potential. Molssi e3nn course.](https://molssi-ai.github.io/e3nn-course/notebooks/09a_allegro_theory.html)
15. [Musaelian, A. et al. (2023). Learning local equivariant representations for large-scale atomistic dynamics. Nature Communications 14, 579.](https://www.nature.com/articles/s41467-023-36329-y.pdf)
16. [Node-equivariant message passing for efficient and accurate machine learning interatomic potentials. PMC.](https://pmc.ncbi.nlm.nih.gov/articles/PMC12766320/)
17. [Foundation Potentials, NequIP documentation.](https://nequip.readthedocs.io/en/develop/guide/getting-started/foundation_potentials.html)
18. [NequIP & Allegro Foundation Potentials, version 0.1a. Zenodo.](https://zenodo.org/records/21225418)
19. [MIR group @ Harvard: Software.](https://mir.g.harvard.edu/research/software)
20. [FAQs, NequIP documentation.](https://nequip.readthedocs.io/en/latest/guide/reference/faq.html)
21. [The NequIP Workflow, NequIP documentation.](https://nequip.readthedocs.io/en/latest/guide/getting-started/workflow.html)

---
*Initially written Oct 22, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Applied AI, people, and society › AI by application domain › AI in science and research

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/nequip

English original: https://www.edgepedia.org/nequip
