EspressoProfile not working

Hello. I am trying to perform an adsorption study on calcite by hydrogen. I want to use the espresso calculator. But when I try to import EspressoProfile it shows an error.

from ase.calculators.espresso import Espresso, EspressoProfile
espresso_profile = EspressoProfile([“pw.x”])
calc = Espresso(profile=espresso_profile)

--------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[2], line 1 ----> 1 from ase.calculators.espresso import Espresso, EspressoProfile 3 espresso_profile = EspressoProfile([“pw.x”]) 4 calc = Espresso(profile=espresso_profile) ImportError: cannot import name ‘EspressoProfile’ from ‘ase.calculators.espresso’ (/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/ase/calculators/espresso.py)

How to solve this? I am using Jupyter Lab for compiling. Kindly help me to solve the problem.

Hi Saiyed,

you are probably using the last release version of ASE, installed with pip install ase. Unfortunately this is a bit out of date; people are working towards a new release but it has taken longer than hoped.

The EspressoProfile was added a little after the last release version was made. To install a “bleeding-edge” version of ASE from source, see the instructions here.