SINGROUP / dscribe

DScribe is a python package for creating machine learning descriptors for atomistic systems.
https://singroup.github.io/dscribe/
Apache License 2.0
395 stars 88 forks source link

Segmentation fault in SOAP for l_max > 9 #131

Closed aminsakic closed 6 months ago

aminsakic commented 9 months ago

Hello,

I have been attempting to calculate SOAP descriptors for a large system=polycrystal (around 700k atoms), focusing on approximately 100k specific atoms. However, when I choose l_max > 9, I encounter a Segmentation Fault. I've tested this on both my local machine and an HCP cluster, utilizing different partitions with varying memory settings, yet the issue persists.

Could this be a problem in the Dscribe library or in my code?

from dscribe.descriptors import SOAP from ase.io.vasp import read_vasp from collections import Counter import numpy as np

Read the original whole pure iron polycrystal

poscar_initial = read_vasp("POSCAR") positions_fe = poscar_initial.get_positions()

gb_indices = np.load("gb_atom_indices.npy") gb_positions = positions_fe[gb_indices]

SOAP feature extraction

SOAP parameters

r_cut = 6 l_max = 9 # above 9 Segfault n_max = 12

Setting up the SOAP descriptor

soap = SOAP( species=poscar_initial.get_atomic_numbers(), periodic=True, r_cut=r_cut, n_max=n_max, l_max=l_max, )

x = soap.create(system=poscar_initial, centers=list(gb_positions), verbose=True) print(x, x.shape)

np.save("dscribe_features_gb_nmax_12_lmax_12.npy", x)

I would appreciate any kind of help!

lauri-codes commented 8 months ago

Thanks for your report @aminsakic!

Could you send the polycrystal structure that causes this problem? I could then try to reproduce the problem with your script locally.

lauri-codes commented 6 months ago

Closing as stale.