Skip to content

[Bug]: ValueError: Buffer dtype mismatch, expected 'const int64_t' but got 'long' #112

@S1owFade

Description

@S1owFade

Contact Details

No response

Bug Description

D:\Anaconda\envs\mattersim\python.exe "D:\python object\learn\mattersim\test.py"
2025-04-18 13:47:05.278 | INFO | main::8 - Running MatterSim on cuda
2025-04-18 13:47:05.279 | INFO | mattersim.forcefield.potential:from_checkpoint:877 - Loading the pre-trained mattersim-v1.0.0-1M.pth model
Traceback (most recent call last):
File "D:\python object\learn\mattersim\test.py", line 12, in
logger.info(f"Energy (eV) = {si.get_potential_energy()}")
File "D:\Anaconda\envs\mattersim\lib\site-packages\ase\atoms.py", line 772, in get_potential_energy
energy = self._calc.get_potential_energy(self)
File "D:\Anaconda\envs\mattersim\lib\site-packages\ase\calculators\abc.py", line 26, in get_potential_energy
return self.get_property(name, atoms)
File "D:\Anaconda\envs\mattersim\lib\site-packages\ase\calculators\calculator.py", line 515, in get_property
self.calculate(atoms, [name], system_changes)
File "D:\python object\learn\mattersim\src\mattersim\forcefield\potential.py", line 1357, in calculate
dataloader = build_dataloader(
File "D:\python object\learn\mattersim\src\mattersim\datasets\utils\build.py", line 75, in build_dataloader
graph = convertor.convert(graph.copy(), energy, force, stress, **kwargs)
File "D:\python object\learn\mattersim\src\mattersim\datasets\utils\convertor.py", line 243, in convert
) = get_fixed_radius_bonding(atoms, self.twobody_cutoff, pbc=pbc)
File "D:\python object\learn\mattersim\src\mattersim\datasets\utils\convertor.py", line 131, in get_fixed_radius_bonding
) = find_points_in_spheres( # noqa: E501
File "src\pymatgen\optimization\neighbors.pyx", line 46, in pymatgen.optimization.neighbors.find_points_in_spheres
ValueError: Buffer dtype mismatch, expected 'const int64_t' but got 'long'

MatterSim Version

1.1.3.dev7+dirty

Python Version

3.10.16

Reproduction Steps

1.Install with:
conda create -n mattersim python=3.10
conda activate mattersim
git clone https://github.com/microsoft/mattersim.git
cd .\mattersim\
pip install -e .
2.Test
After installing MatterSim, i confirmed by "pip show mattersim":
Name: mattersim
Version: 1.1.3.dev7+dirty
Summary: MatterSim: A Deep Learning Atomistic Model Across Elements, Temperatures and Pressures.
Home-page: https://github.com/microsoft/mattersim
Author:
Author-email: Han Yang [email protected], Hongxia Hao [email protected], Jielan Li [email protected], Ziheng Lu [email protected]
License:
Location: d:\anaconda\envs\mattersim\lib\site-packages
Editable project location: D:\python object\learn\mattersim
Requires: ase, atomate2, azure-identity, azure-storage-blob, deprecated, e3nn, emmet-core, loguru, mp-api, numpy, opt_einsum_fx, phonopy, pydantic, pymatgen, scikit-learn, seekpath, torch, torch-ema, torch_geometric, torch_runstats, torchaudio, torchmetrics, torchvision, wandb
Required-by:

To test if it can work by using the example: "A minimal example using ASE calculator"

Expected Behavior

conducted without error

Actual Behavior

An error came out:
ValueError: Buffer dtype mismatch, expected 'const int64_t' but got 'long'

Error Logs

Code of Conduct

  • I agree to follow the project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions