# 原子模拟环境

原子模拟环境（Atomic Simulation Environment，ASE）是一套Python工具和模块，用于设置、操纵、运行、可视化和分析原子模拟，在GNU宽通用公共许可证（LGPL）下免费分发。<sup>[1](https://docs.ase-lib.org/)</sup> 它充当用户与众多独立模拟代码之间的脚本层：研究者无需为每个程序编写静态输入文件，而是编写一次描述原子系统的Python代码，即可通过通用接口驱动不同的能量和力引擎。<sup>[4](https://kitchingroup.cheme.cmu.edu/papers/hjorthlarsen2017/)</sup>

| 关键事实 | 详情 |
|---|---|
| 是什么 | 一个用于设置、驱动、可视化和分析原子模拟的Python包，在GNU LGPL下免费<sup>[1](https://docs.ase-lib.org/)</sup> |
| 核心抽象 | `Atoms`对象（原子种类、位置、晶胞、边界条件）与返回能量和力的`Calculator`配对<sup>[4](https://kitchingroup.cheme.cmu.edu/papers/hjorthlarsen2017/)</sup> |
| 覆盖范围 | 与65种文件格式和约30个模拟代码的接口<sup>[5](https://members.cecam.org/storage/booklet_files/BOOKLET-TO-PUBLISH_The-atomic-simulation-environment-ecosystem-Present-and-perspectives-1750408836.pdf)</sup> |
| 起源 | 约2000年在丹麦技术大学，作为Fortran DFT代码DACAPO的面向对象包装器<sup>[4](https://kitchingroup.cheme.cmu.edu/papers/hjorthlarsen2017/)</sup> |
| 参考论文 | 约尔特·拉森（Hjorth Larsen）等，《物理学杂志：凝聚态》**29**，273002（2017）；过去5年每年被引用超过500次<sup>[5](https://members.cecam.org/storage/booklet_files/BOOKLET-TO-PUBLISH_The-atomic-simulation-environment-ecosystem-Present-and-perspectives-1750408836.pdf)</sup> |
| 单位与依赖 | 基于NumPy的纯Python，使用eV和埃作为单位；在LGPLv2.1或更新版本下许可<sup>[4](https://kitchingroup.cheme.cmu.edu/papers/hjorthlarsen2017/)</sup> |
| 当前版本 | 版本3.29.0，标记于2026年6月21日<sup>[6](https://gitlab.com/ase/ase/-/tags)</sup> |

## 目的与设计

ASE的诞生是为了解决计算物理、化学和材料科学中的一个实际问题。过去，原子模拟代码以单体式编译程序的形式出现，依赖静态输入文件，这使得每次运行都局限于代码本身所实现的功能，而串联操作或将一个代码与另一个代码进行基准对比，则需要手动重写输入文件。<sup>[4](https://kitchingroup.cheme.cmu.edu/papers/hjorthlarsen2017/)</sup> ASE提供了一层脚本层，为众多计算能量和力的代码提供一致的接口，使得复杂的模拟任务可以轻松表达：运行一系列计算只需一个基本的for循环，无需更改代码。<sup>[3](https://docs.ase-lib.org/about.html)</sup>

该项目提出了三个设计目标：易用性，即通过图形用户界面、命令行工具或Python脚本，可以直截了当地设置总能量计算或分子动力学运行；灵活性，因为Python脚本无需修改代码即可完成复杂任务；以及可定制性，代码按不同用途组织成模块。<sup>[3](https://docs.ase-lib.org/about.html)</sup> ASE是基于NumPy包进行数值计算的纯Python实现，推荐配合SciPy和matplotlib使用，采用eV和Å作为单位。<sup>[4](https://kitchingroup.cheme.cmu.edu/papers/hjorthlarsen2017/)</sup>

## Atoms对象与计算器

核心数据结构是`Atoms`对象，它保存原子种类、位置、晶胞、周期性边界条件，以及可选的速度、质量或磁矩，全部由NumPy数组支撑。<sup>[4](https://kitchingroup.cheme.cmu.edu/papers/hjorthlarsen2017/)</sup> 单个原子由`Atom`类表示，可根据化学符号或原子序数连同位置创建，修改后的原子会将变更回传给父级`Atoms`对象。<sup>[7](https://ase.gitlab.io/ase/ase/atom.html)</sup>

**计算器。** 对ASE而言，计算器是一个黑箱，它从`Atoms`对象中获取原子序数和原子位置，计算能量和力，有时也计算应力。<sup>[2](https://ase.gitlab.io/ase/ase/calculators/calculators.html)</sup> 要计算任何量，必须将计算器对象附加到原子上；没有计算器而请求势能会引发运行时错误。<sup>[2](https://ase.gitlab.io/ase/ase/calculators/calculators.html)</sup> 通常的做法是计算器写入输入文件、运行外部代码并读取其输出，这种方法直截了当，但带来沉重的输入输出开销；像GPAW这样在进程内运行的计算器，允许数据无需复制即可共享，波函数可以逐步复用，而CP2K则通过管道进行操作。<sup>[4](https://kitchingroup.cheme.cmu.edu/papers/hjorthlarsen2017/)</sup>

计算器列表涵盖了原子模拟的主要方法。2017年的综述列出了约30个计算器，从VASP、GPAW、Quantum ESPRESSO、CP2K、FHI-aims、NWChem和Gaussian等密度泛函理论（DFT）代码，到EMT、EAM、Lennard-Jones、LAMMPS、QUIP和OpenKIM等紧束缚与经典势，外加添加色散校正的包装器。<sup>[4](https://kitchingroup.cheme.cmu.edu/papers/hjorthlarsen2017/)</sup> 网格投影增强波（GPAW）包是一个独立的DFT计算器，依赖ASE，必须单独安装，而不是开箱即用地随ASE附带。<sup>[8](https://iclr-blogposts.github.io/2026/blog/2026/mlip-practical/)</sup><sup> • </sup><sup>[18](https://gpaw.readthedocs.io/install.html)</sup> 文档中的一份计算器提案设定了通用的行为标准：计算器在计算能量、力、应力、磁矩或偶极矩时应存储系统的副本，如果系统未发生变化则返回缓存值，而当平面波截断或交换关联泛函等参数改变时则丢弃缓存。<sup>[9](https://ase-deploy-c805d8.gitlab.io/development/proposals/calculators.html)</sup>

## 算法与工作流工具

ASE中的算法仅作用于`Atoms`对象，且与计算器无关，因此同一优化器或动力学例程可与任何附加的引擎配合使用。<sup>[4](https://kitchingroup.cheme.cmu.edu/papers/hjorthlarsen2017/)</sup> 该库提供NVE、NVT（Berendsen、Langevin和Nosé-Hoover）以及NpT系综下的分子动力学；BFGS、L-BFGS、MDMin和FIRE等局部优化算法，其中在固体上测试时，带预条件的L-BFGS运行速度可达普通L-BFGS的十倍；约束和过滤器，允许固定原子或弛豫晶胞；微动弹性带计算，具有爬升图像、IDPP生成的初始路径，以及据基准测试报告可将开销降低50%至70%的变体；二聚体方法；以及盆地跳跃和极小值跳跃等全局优化器。<sup>[4](https://kitchingroup.cheme.cmu.edu/papers/hjorthlarsen2017/)</sup>

结构工具涵盖230个空间群、带吸附位点的表面、沃尔夫纳米颗粒以及65种文件格式。<sup>[4](https://kitchingroup.cheme.cmu.edu/papers/hjorthlarsen2017/)</sup> ASE还有自己的数据库模块，用于存储和检索原子及相关数据，有五种后端：JSON和SQLite3开箱即用，而PostgreSQL、MySQL和MariaDB需要服务器；一个名为`ase db`的命令行工具用于查询和操作数据库。<sup>[10](https://ase.gitlab.io/ase/ase/db/db.html)</sup> 基于该数据库构建的检查点模块使长脚本能够跨队列墙钟时间限制恢复运行。<sup>[4](https://kitchingroup.cheme.cmu.edu/papers/hjorthlarsen2017/)</sup> 可视化通过`ase.visualize.view`提供，它可对接`ase.gui`、RasMol、VMD、gOpenMol、Avogadro、ParaView或NGLView，结构也可直接写入eps、png和pov图形文件。<sup>[11](https://ase.gitlab.io/ase/ase/visualize/visualize.html)</sup>

## 在机器学习原子间势中的作用

ASE已成为机器学习原子间势（MLIPs）的通用接口，这类快速原子间势基于量子力学参考数据训练，能以极低的成本接近第一性原理精度。<sup>[12](https://www.scm.com/amsterdam-modeling-suite/machine-learning-potentials/)</sup> 欧洲原子与分子计算中心（CECAM）的研讨会提案指出，ASE正日益成为MLIP拟合与评估的通用语：GAP、ACE、MACE、CHGNet、M3GNet、ALIGNN-FF和NequIP代码均使用ASE，原子间模型知识库OpenKIM也与其紧密对接。<sup>[5](https://members.cecam.org/storage/booklet_files/BOOKLET-TO-PUBLISH_The-atomic-simulation-environment-ecosystem-Present-and-perspectives-1750408836.pdf)</sup> 原因在于计算器接口本身：它接收包含位置、原子种类、晶胞矢量和边界条件的`ase.Atoms`对象，输出计算所得的势能和力，因此任何势或动力学框架只需实现该接口即可集成。<sup>[8](https://iclr-blogposts.github.io/2026/blog/2026/mlip-practical/)</sup> MACE、CHGNet、MatterSim和Orb等现代通用势均以ASE计算器的形式发布，这意味着一旦模型被包装，弛豫、分子动力学、微动弹性带和声子工作流便可直接使用。<sup>[13](https://aiforsciencehub.org/tools/ase)</sup> 基准测试平台在此基础上构建：CHIPS-FF将ASE与JARVIS-Tools集成，在104种半导体相关材料上评估16种基于图的机器学习力场，覆盖近200万个原子结构，以检验力预测精度。<sup>[14](https://doi.org/10.1021/acsmaterialslett.5c00093)</sup>

ASE的Python本质是其在此领域吸引力的一部分。大多数研究者因成熟度、速度和社区而偏好GROMACS或LAMMPS，但由于大多数机器学习模型也用Python编写，ASE的简洁性使其成为ML研究者的首选。<sup>[8](https://iclr-blogposts.github.io/2026/blog/2026/mlip-practical/)</sup> 权衡在于性能：TorchSim是一个基于PyTorch的批处理模拟引擎，在小系统上比ASE实现了一个数量级的加速，因为批处理模拟更高效地利用可用硬件，不过当系统尺寸接近内存限制时，TorchSim的性能会接近ASE中运行的串行模拟。<sup>[15](https://doi.org/10.1088/3050-287X/ae1799)</sup>

## 历史与社区

ASE的起源可追溯到约2000年的丹麦技术大学（Technical University of Denmark），当时是Fortran DFT代码DACAPO的面向对象包装器，随后为版本2和3进行了重写，有意降低了对象化程度，将位置变为纯坐标数组而非对象，同时保留了附加到动力学的观察者等设计模式。<sup>[4](https://kitchingroup.cheme.cmu.edu/papers/hjorthlarsen2017/)</sup> 当前代码库始于2007年，拥有超过500名贡献者；Python 2支持已于2019年放弃。<sup>[5](https://members.cecam.org/storage/booklet_files/BOOKLET-TO-PUBLISH_The-atomic-simulation-environment-ecosystem-Present-and-perspectives-1750408836.pdf)</sup>

由阿斯克·约尔特·拉森（Ask Hjorth Larsen）、延斯·约恩·莫滕森（Jens Jørgen Mortensen）及其同事撰写的参考论文发表于《物理学杂志：凝聚态》（*Journal of Physics: Condensed Matter*）**29**，273002（2017），过去5年每年被引用超过500次。<sup>[5](https://members.cecam.org/storage/booklet_files/BOOKLET-TO-PUBLISH_The-atomic-simulation-environment-ecosystem-Present-and-perspectives-1750408836.pdf)</sup> 发布活动一直稳定：版本3.19.0于2019年12月16日发布，3.22.0于2021年6月24日，3.23.0于2024年5月31日，3.29.0于2026年6月21日。<sup>[16](https://ase.gitlab.io/ase/)</sup> 社区研讨会曾在哥德堡（Gothenburg）的查尔姆斯理工大学（Chalmers University of Technology，2019年）、达斯伯里实验室（Daresbury Laboratory，2023年）、洛桑联邦理工学院（EPFL）的CECAM（2025年）以及美因茨（Mainz）的CECAM（2026年）举办。<sup>[16](https://ase.gitlab.io/ase/)</sup> 围绕它的依赖包生态系统已经成长起来，包括用于电子显微镜模拟的abTEM、用于催化剂建模的ACAT、用于全局优化的AGOX，以及用于断裂和摩擦学等材料科学应用的matscipy。<sup>[17](https://wiki.fysik.dtu.dk/ase/ecosystem.html)</sup> 由于ASE发展迅速，维护核心已成为开发团队的挑战，一条已确定的出路是构建可互操作的包生态系统，而非单体式代码库，目前已经确定了24个这样的包。<sup>[5](https://members.cecam.org/storage/booklet_files/BOOKLET-TO-PUBLISH_The-atomic-simulation-environment-ecosystem-Present-and-perspectives-1750408836.pdf)</sup>

## References

1. [Atomic Simulation Environment, ASE documentation](https://docs.ase-lib.org/)
2. [Calculators, ASE documentation](https://ase.gitlab.io/ase/ase/calculators/calculators.html)
3. [About, ASE documentation](https://docs.ase-lib.org/about.html)
4. [The atomic simulation environment, A Python library for working with atoms (Kitchin Research Group summary of Hjorth Larsen et al. 2017)](https://kitchingroup.cheme.cmu.edu/papers/hjorthlarsen2017/)
5. [The atomic simulation environment ecosystem: Present and perspectives, CECAM workshop proposal (2025)](https://members.cecam.org/storage/booklet_files/BOOKLET-TO-PUBLISH_The-atomic-simulation-environment-ecosystem-Present-and-perspectives-1750408836.pdf)
6. [Tags, ase/ase, GitLab](https://gitlab.com/ase/ase/-/tags)
7. [The Atom object, ASE documentation](https://ase.gitlab.io/ase/ase/atom.html)
8. [Evaluating Machine-Learned Inter-Atomic Potentials for a Practical Simulation Workflow, ICLR Blogposts 2026](https://iclr-blogposts.github.io/2026/blog/2026/mlip-practical/)
9. [Calculator interface proposal, ASE documentation](https://ase-deploy-c805d8.gitlab.io/development/proposals/calculators.html)
10. [A database for atoms, ASE documentation](https://ase.gitlab.io/ase/ase/db/db.html)
11. [Visualization, ASE documentation](https://ase.gitlab.io/ase/ase/visualize/visualize.html)
12. [Machine Learning Potentials for Chemistry & Materials Modeling, Amsterdam Modeling Suite (SCM)](https://www.scm.com/amsterdam-modeling-suite/machine-learning-potentials/)
13. [Atomic Simulation Environment: What It Does and How Researchers Use It, AI for Science Hub](https://aiforsciencehub.org/tools/ase)
14. [CHIPS-FF: Evaluating Universal Machine Learning Force Fields for Material Properties, ACS Materials Letters (2025)](https://doi.org/10.1021/acsmaterialslett.5c00093)
15. [TorchSim: an efficient atomistic simulation engine in PyTorch, IOPscience](https://doi.org/10.1088/3050-287X/ae1799)
16. [Atomic Simulation Environment, ASE documentation (news archive)](https://ase.gitlab.io/ase/)
17. [ASE ecosystem, ASE documentation](https://wiki.fysik.dtu.dk/ase/ecosystem.html)
18. [Installation, GPAW](https://gpaw.readthedocs.io/install.html)

---
*Initially written Oct 22, 2026*

Topic: 物质世界与数学 › 物理学 › 物理学方法、实践与学术共同体 › Applied and interdisciplinary physics › Computational and simulation physics › Physics simulation software and engines › Scientific simulation packages › Molecular and particle simulation codes

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/atomic-simulation-environment

English original: https://www.edgepedia.org/atomic-simulation-environment
