[ase-users] Ase-espresso error during script run

Navneeth Rajiv navneethrajiv824 at gmail.com
Tue May 26 08:00:45 CEST 2020


Hi ase users,
I am new to Quantum espresso and ASE. I installed and tested both ASE and
espresso independently using example codes from tutorials.But I am unable
to execute a code with ase-espresso combination in python. I thought the
error was related to path of directories.But even after entering path
through bashrc and displaying it with echo command(attachment) I am getting
the same error. Any help to resolve the issue is appreciated and I can
provide more information if needed.

Here is my input:
from ase.build import bulk
from ase.calculators.espresso import Espresso
from ase.constraints import UnitCellFilter
from ase.optimize import LBFGS
pseudopotentials = {'Na': 'Na_pbe_v1.uspp.F.UPF',
                    'Cl': 'Cl.pbe-n-rrkjus_psl.1.0.0.UPF'}

rocksalt = bulk('NaCl', crystalstructure='rocksalt', a=6.0)
calc = Espresso(pseudopotentials=pseudopotentials,
                tstress=True, tprnfor=True, kpts=(3, 3, 3))
rocksalt.calc = calc

ucf = UnitCellFilter(rocksalt)
opt = LBFGS(ucf)
opt.run(fmax=0.005)

# cubic lattic constant
print((8*rocksalt.get_volume()/len(rocksalt))**(1.0/3.0))

Output:
Traceback (most recent call last):
  File "/home/navneeth/sample_rocksalt.py", line 14, in <module>
    opt = LBFGS(ucf)
  File
"/home/navneeth/.local/lib/python3.8/site-packages/ase/optimize/lbfgs.py",
line 67, in __init__
    Optimizer.__init__(self, atoms, restart, logfile, trajectory, master,
  File
"/home/navneeth/.local/lib/python3.8/site-packages/ase/optimize/optimize.py",
line 237, in __init__
    self.set_force_consistent()
  File
"/home/navneeth/.local/lib/python3.8/site-packages/ase/optimize/optimize.py",
line 321, in set_force_consistent
    self.atoms.get_potential_energy(force_consistent=True)
  File
"/home/navneeth/.local/lib/python3.8/site-packages/ase/constraints.py",
line 2416, in get_potential_energy
    atoms_energy = self.atoms.get_potential_energy(
  File "/home/navneeth/.local/lib/python3.8/site-packages/ase/atoms.py",
line 697, in get_potential_energy
    energy = self._calc.get_potential_energy(
  File
"/home/navneeth/.local/lib/python3.8/site-packages/ase/calculators/calculator.py",
line 642, in get_potential_energy
    energy = self.get_property('energy', atoms)
  File
"/home/navneeth/.local/lib/python3.8/site-packages/ase/calculators/calculator.py",
line 695, in get_property
    self.calculate(atoms, [name], system_changes)
  File
"/home/navneeth/.local/lib/python3.8/site-packages/ase/calculators/calculator.py",
line 874, in calculate
    raise CalculationFailed(msg)
ase.calculators.calculator.CalculationFailed: Calculator "espresso" failed
with command "pw.x -in espresso.pwi > espresso.pwo" failed in
/home/navneeth with error code 127
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20200526/13371300/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4 paths completed.PNG
Type: image/png
Size: 73421 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20200526/13371300/attachment-0001.png>


More information about the ase-users mailing list