-
Notifications
You must be signed in to change notification settings - Fork 97
Description
After getting unknown keyword arguements for k1, k2 ,etc, I was reccomened to downgrade to describe 1.2.2 which is the version I have on another computer, in which my code runs fine. However, during the installation process I have encountered errors with the following error occurring during instillation
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for dscribe
Running setup.py clean for dscribe
Failed to build dscribe
ERROR: Failed to build installable wheels for some pyproject.toml based projects (describe)
My current code that is giving errors is as follows
import os
import numpy as np
import pandas as pd
from ase.io import read
from dscribe.descriptors import MBTR
def create_mbtr_descriptors(path, species_list):
# Initialize MBTR
mbtr = MBTR(
species=species_list,
periodic=True,
k1={
"geometry": {"function": "atomic_number"},
"grid": {"min": 0, "max": 82, "sigma": 0.1, "n": 82},
},
k2={
"geometry": {"function": "inverse_distance"},
"grid": {"min": 0, "max": 1, "sigma": 0.02, "n": 30},
"weighting": {"function": "exp", "scale": 1.0, "threshold": 1e-3},
},
k3 = {
"geometry": {"function": "angle"},
"grid": {"min": 0, "max": 180, "sigma": 5, "n": 50},
"weighting" : {"function": "exp", "scale": 0.5, "cutoff": 1e-3}
}
flatten=True,
normalization="n_atoms",
sparse=False
)
atoms = [read(os.path.join(path, f)) for f in os.listdir(path) if f.endswith('.cif')]
descriptors = [mbtr.create(atom) for atom in atoms]
return descriptors
This returns the following error
TypeError: MBTR.init() got an unexpected keyword argument 'k1'
Any help is appreciated, thanks