jkitchin / vasp

New ASE compliant Python interface to VASP
122 stars 58 forks source link

raise child_exception #49

Closed StevenAlice93 closed 2 years ago

StevenAlice93 commented 6 years ago

Dear John, I had meet some problems when I ran some scripts. For example, I ran the scripts

dft-scripts/scripts-107.py: from ase.lattice.hexagonal import HexagonalClosedPacked from vasp import Vasp import matplotlib.pyplot as plt atoms = HexagonalClosedPacked(symbol='Ru', latticeconstant={'a': 2.7, 'c/a': 1.584}) a_list = [2.5, 2.6, 2.7, 2.8, 2.9] covera_list = [1.4, 1.5, 1.6, 1.7, 1.8] for a in a_list: energies = [] for covera in covera_list: atoms = HexagonalClosedPacked(symbol='Ru', latticeconstant={'a': a, 'c/a': covera}) wd = 'bulk/Ru/{0:1.2f}-{1:1.2f}'.format(a, covera) calc = Vasp(wd, xc='PBE',

the c-axis is longer than the a-axis, so we use

                # fewer kpoints.
                kpts=[6, 6, 4],
                encut=350,
                atoms=atoms)
    energies.append(atoms.get_potential_energy())
if not None in energies:
    plt.plot(covera_list, energies, label=r'a={0} $\AA$'.format(a))

plt.xlabel('$c/a$') plt.ylabel('Energy (eV)') plt.legend() plt.savefig('images/Ru-covera-scan.png')

the exception was thrown: Unhandled exception in Vasp Traceback (most recent call last): File "/home/geniusshaoming/VASP/vasp-master/vasp/vasp.py", line 48, in inner return func(self, *args, *kwargs) File "/home/geniusshaoming/VASP/vasp-master/vasp/runner.py", line 157, in calculate stderr=subprocess.PIPE) File "/home/geniusshaoming/VASP/vasp-master/vasp/runner.py", line 25, in getstatusoutput p = subprocess.Popen(args, kwargs) File "/home/geniusshaoming/anaconda3/envs/VASP/lib/python2.7/subprocess.py", line 390, in init errread, errwrite) File "/home/geniusshaoming/anaconda3/envs/VASP/lib/python2.7/subprocess.py", line 1025, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory**

I need your help and Thanks!

jkitchin commented 6 years ago

do some scripts work, but not this one?

vsumaria commented 6 years ago

I am getting a similar error when I ran the example CO script.

File "/u/local/apps/python/2.7.13/lib/python2.7/subprocess.py", line 1024, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory

The error appears when I use the "get_potential_energy" or "get_forces" function. The code creates the INCAR, KPOINTS, POSCAR and POTCAR files correctly.

jkitchin commented 6 years ago

I guess this means you do not have vasp installed correctly or in the location that vaspy is looking for.

vsumaria commented 6 years ago

Yes, that's correct. I was able to fix it. Thank you.

oync520 commented 4 years ago

Yes, that's correct. I was able to fix it. Thank you.

I have the same problem with you,could you please tell me how to fix it?