MateriApps
A Portal Site of Materials Science Simulation

now 332 Apps

Inquiry / Application Request
    • JP
    • EN
  • What's MateriApps?
  • Call for reviews
Detailed search
  • News / Hands-on / Event
  • List of Apps
  • Search Apps
  • Keywords
  • Review
  • Research Showcase
  • Concierge
  • Try the app without installing
    「MateriApps LIVE!」

    MORE
  • What's MateriApps?
  • Call for reviews
  • Privacy Policy
  • Inquiry / Application Request
  • List of Apps
  • Atomic Simulation Environment (ASE)

Atomic Simulation Environment (ASE)

  • Openness:3 ★★★
  • Document quality:3 ★★★

A set of python modules for modeling atomic structures, running simulations, and visualizing results. These modules provide interfaces for various application of first-principles calculation, classical molecular dynamics, and quantum chemical calculation through GUI, command line, or python scripts. The source code is available under the LGPL.

Trying out universal machine learning potentials
Last Update:2025/10/29
You already voted!

MateriApps Developers

Machine learning potential–related techniques are attracting attention as a way to achieve fast, large-scale, and long-time molecular dynamics simulations while maintaining the accuracy of first-principles calculations. The approach involves preparing a dataset that maps structures to energies, interatomic forces, and stresses using first-principles calculations, then training a machine learning model to reproduce these quantities and employing it as a force field. This enables calculations that are orders of magnitude faster than first-principles methods.

Recently, so-called “universal” machine learning potentials—trained on data covering nearly all elements—have been gaining attention. Research groups not only in academia but also from major companies such as Google, Microsoft, and Meta are entering this field, and the Matbench Discovery leaderboard, where models compete in performance, is being updated almost monthly.

These machine learning potential models can be used conveniently through the Atomic Simulation Environment (ASE) calculator interface, allowing very simple execution of calculations. While careful consideration is still required—such as comparing and validating results against experiments or first-principles calculations for each target system—it appears that these models are now reaching the point where they can replace first-principles calculations in many applications.

In this context, we will perform in the following phonon calculations using ASE and phonopy for some of the top-performing models on the Matbench Discovery leaderboard, and compare their results.

Model installation

The machine learning potentials to be tested this time can all be easily installed in a Python environment. It is advisable to first create a separate Python virtual environment—using tools such as conda—for installation.

conda create -n umlip python=3.9
conda activate umlip

Here, we create a Python 3.9 virtual environment named umlip (short for universal machine-learning interatomic potential) and activate it. Next, MatterSim, Orb, DeePMD-kit, GRACE, and Sevennet are installed.

# MatterSim
pip install mattersim==1.1.1

# Orb
pip install orb-models==0.4.2
pip install "pynanoflann@git+https://github.com/dwastberg/pynanoflann#egg=af434039ae14bedcbb838a7808924d6689274168"

# DeePMD-kit
pip install deepmd-kit==3.0.1

# GRACE 
pip install tensorpotential==0.4.5

# SevenNet
pip install sevenn==0.11.2

# Pytorch
pip install torch==2.5.1

Dependency packages are also downloaded and installed automatically. TensorFlow and PyTorch are installed as well, but if GPU support is required, it is necessary to install the GPU-enabled versions in advance. A final conda activate umlip step is needed to ensure that the executable programs associated with the installed Python packages are added to the path.

Among the above packages, DeePMD-kit and GRACE require separate downloads of the latest model parameters, based on the information provided in Link 1 and Link 2. For the other packages, the model parameter files are downloaded at runtime as needed.

wget https://bohrium-api.dp.tech/ds-dl/dpa3openlam-74ng-v3.zip 
grace_models download GRACE_2L_OAM_28Jan25

unzip dpa3openlam-74ng-v3.zip

Running the calculations

Now, we need to prepare a Python script for phonon calculations (the completed script is available here). Below, we present excerpts from the final script with comments. The calculators for each model can be defined by importing each package and setting them up as follows. In addition to machine-learning potentials, we also import a classical force field based on EMT (effective medium theory) for comparison.

from ase.calculators.emt import EMT

from mattersim.forcefield.potential import MatterSimCalculator
from mattersim.applications.phonon import PhononWorkflow

from orb_models.forcefield import pretrained
from orb_models.forcefield.calculator import ORBCalculator

from deepmd.calculator import DP

from sevenn.calculator import SevenNetCalculator

device = "cpu"
# specify universal mlip calculators
calcs = [MatterSimCalculator(load_path="MatterSim-v1.0.0-5M.pth",device=device), 
         ORBCalculator(pretrained.orb_v2(device=device),device=device),
         DP(model="2025-01-10-dpa3-openlam.pth"),
         SevenNetCalculator(model='7net-l3i5', device=device),
         grace_fm("GRACE-1L-OAM_2Feb25"),
         EMT()
         ]

The materials to be calculated can be input by any file that can be read by ASE. Here, we download a cif file for copper from the Materials Project  (please download from DOI: 10.17188/1204433).

path_to_structure = "Cu.cif"
atoms_init = read(path_to_structure)

Each calculator is used to relax the cell parameters and perform phonon calculations. We used PhononWorkflow provided with Mattersim to automate the workflow.

# loop over calculators
e =[]
latcons = []
models = []
for calc in calcs:
    # Copy atoms object for each calculator
    atoms = atoms_init.copy()

    # attach the calculator to the atoms object
    atoms.calc = calc
    atoms.set_constraint(FixSymmetry(atoms))    
    ucf = StrainFilter(atoms)
    relax = BFGS(ucf)
    relax.run(fmax=0.01)
    latcons.append(atoms.cell.cellpar()[0])
    e.append(atoms.get_potential_energy())

    model_name = type(calc).__name__
    models.append(model_name)
    ph = PhononWorkflow(
        atoms=atoms,
        find_prim = True,
        work_dir = f"./{model_name}",
        amplitude = 0.01,
        supercell_matrix = np.diag([4,4,4]),
    )

    has_imag, phonons = ph.run()

Once the script is prepared, it can be run from the command line as follows.

python phon_umlip.py

If all works as expected, a directory is created for each model and phonon calculation results from phonopy  are output. The phonon bands according to each model can be visualized by

phonopy-bandplot */band.yaml --legend

Similar results are obtained except for ORBCalculator. According to Matbench, Orb-v2 has a relatively large error for phonon thermal conductivity (κSRME), so we can expect it to be unreliable for phonons. Other potential models also give slightly different phonon dispersions, meaning that depending on the required accuracy, further investigation may be necessary including performing first-principles reference calculations. However, the calculations can be performed in minutes using a laptop PC, meaning that it can be quite useful for screening purposes.

04 / 06

  • 01Information
  • 02Case / Article
  • 03Hands-on
  • 04Review
  • 05Developer's Voice
  • 06Inquiries about
    this App
TOP

MateriApps
A Portal Site of Materials Science Simulation

  • News / Hands-on / Event
  • List of Apps
  • Search Apps
  • Keywords
  • Research Showcase
  • Concierge
  • Privacy Policy
Inquiry / Application Request
  • The Institute for Solid State Physics
  • The University of Tokyo
  • CDMSI
  • CCMS

© MateriApps, 2013-2025. All rights reserved.