Stop the calculations if the SOAP array size will be large compared to the available RAM.
Something like
dtype = np.float32 # or np.float64
mem_bytes = n_atoms * n_frames * soap_dim * np.dtype(dtype).itemsize
mem_MB = mem_bytes / 1024**2
mem_GB = mem_bytes / 1024**3
?
Stop the calculations if the SOAP array size will be large compared to the available RAM.
Something like
?