vossjo / ase-espresso

ase interface for Quantum Espresso
GNU General Public License v3.0
65 stars 55 forks source link

internal cell relaxation using vc-relax in ase-espresso #20

Closed karamadmr closed 7 years ago

karamadmr commented 7 years ago

Hi users, I have been trying to calculate unit cell parameters using vc-relax mode in ase-espresso. This is part of the script I used:

atoms = read('relax.traj') calc = espresso(pw=500., dw=5000., xc='BEEF', kpts=(10,10,10), nbands=-10, mode='vc-relax', cell_dynamics='bfgs', opt_algorithm='bfgs', cell_factor=5., spinpol=True, outdir='cellrelax') atoms.set_calculator(calc) energy = atoms.get_potential_energy() #trigger espresso to be launched print 'Optimized unit cell:' print calc.get_final_structure().cell print 'Residual stress:' print calc.get_final_stress() print 'Total energy (eV):' print energy

However, I got the following error when I tried to get the potential enetgy: Traceback (most recent call last): File "./test.py", line 83, in print slab.get_potential_energy() File "/project/projectdirs/jcap/bajdich/ase/3.6.1.2603/lib/python2.7/site-packages/ase/atoms.py", line 608, in get_potential_energy return self._calc.get_potential_energy(self) File "/project/projectdirs/jcap/bajdich/ase/3.6.1.2603/lib/python2.7/site-packages/espresso/init.py", line 1960, in get_potential_energy self.update(atoms) File "/project/projectdirs/jcap/bajdich/ase/3.6.1.2603/lib/python2.7/site-packages/espresso/init.py", line 1408, in update self.read(atoms) File "/project/projectdirs/jcap/bajdich/ase/3.6.1.2603/lib/python2.7/site-packages/espresso/init.py", line 1642, in read self.checkerror() File "/project/projectdirs/jcap/bajdich/ase/3.6.1.2603/lib/python2.7/site-packages/espresso/init.py", line 2077, in checkerror raise RuntimeError, msg[:len(msg)-1] RuntimeError: Error in routine diropn (10): can't open a connected unit

Any idea how to resolve the issue,

Thanks!

Reza

vossjo commented 7 years ago

The ase espresso interface tried to report an error back that the pw.x executable(s) has written to its output. In general, the above script should work. From what you're specifying here I can't tell if it's due to a problem of the installation or a problematic atomic structure.