微软正式发布MatterSimV1-1M and MatterSimV1-5M模型

B站影视 2024-12-04 13:08 2

摘要:import torchfrom ase.build import bulkfrom ase.units import GPafrom mattersim.forcefield import MatterSimCalculatordevice = "cuda"

MatterSim是微软开发的材料大模型,对全周期表元素以及广泛温度压力区间都有较好的描述。更多详细介绍参考:MatterSim:人工智能解锁材料设计的无限可能。

https://github.com/microsoft/mattersimimport torch
from ase.build import bulk
from ase.units import GPa
from mattersim.forcefield import MatterSimCalculator

device = "cuda" if torch.cuda.is_available else "cpu"
print(f"Running MatterSim on {device}")

si = bulk("Si", "diamond", a=5.43)
si.calc = MatterSimCalculator(device=device)
print(f"Energy (eV) = {si.get_potential_energy}")
print(f"Energy per atom (eV/atom) = {si.get_potential_energy/len(si)}")
print(f"Forces of first atom (eV/A) = {si.get_forces[0]}")
print(f"Stress[0][0] (eV/A^3) = {si.get_stress(voigt=False)[0][0]}")
print(f"Stress[0][0] (GPa) = {si.get_stress(voigt=False)[0][0] / GPa}")

来源:小象科技论

相关推荐