[ase-users] Problem with ASE-Vasp
Gaël Donval
gael.donval at cnrs-imn.fr
Wed Mar 26 17:40:31 CET 2014
> I would like to post a new thread with a question of mine:
>
> I have some problem with getting ASE running with Vasp as calculator.
>
> For simplicity I have just used the example of the manual to make a fit with the equation of state and just changed the calculator and setting the environment variables as described in the manual:
>
>
> #!/usr/bin/env python
>
> import numpy as np
>
> from ase import Atoms
> from ase.io.trajectory import PickleTrajectory
> from ase.calculators.vasp import Vasp
>
>
> a = 4.0 # approximate lattice constant
> b = a / 2
> ag = Atoms('Ag',
> cell=[(0,b,b), (b,0,b), (b,b,0)],
> pbc=1,
> calculator=Vasp(xc='PBE')) # use VASP potential
> cell = ag.get_cell()
> traj = PickleTrajectory('Ag.traj', 'w')
> for x in np.linspace(0.95, 1.05, 5):
> ag.set_cell(cell * x, scale_atoms=True)
> traj.write(ag)
>
> Unfortunately, it does not work, I get the following output in the commandline when running the script:
>
> Traceback (most recent call last):
> File "EOS_test.py", line 20, in <module>
> traj.write(ag)
> File "/usr/lib/python2.7/dist-packages/ase/io/trajectory.py", line 176, in write
> d['energy'] = atoms.get_potential_energy()
> File "/usr/lib/python2.7/dist-packages/ase/atoms.py", line 548, in get_potential_energy
> return self._calc.get_potential_energy(self)
> File "/usr/lib/python2.7/dist-packages/ase/calculators/vasp.py", line 583, in get_potential_energy
> self.update(atoms)
> File "/usr/lib/python2.7/dist-packages/ase/calculators/vasp.py", line 307, in update
> self.calculate(atoms)
> File "/usr/lib/python2.7/dist-packages/ase/calculators/vasp.py", line 447, in calculate
> self.run()
> File "/usr/lib/python2.7/dist-packages/ase/calculators/vasp.py", line 502, in run
> execfile(vasp, {}, locals)
> IOError: [Errno 2] No such file or directory: '/home/siaufung/VASP/run_vasp.py:'
>
>
> Can anyone help me with this issue? I actually have a file "run_vasp.py" in the specified path. Why does the script return me the IOError?
If it is really there, then your script is not executable.
chmod u+x /home/siaufung/VASP/run_vasp.py
should make it work. As an alternative approach, you can specify the
interpreter in the environment variable (i.e.
VASP_COMMAND="python /home/siaufung/VASP/run_vasp.py").
Note that you can also define the "VASP_COMMAND" variable on the fly
within your script. This is particularly interesting if you want to pass
options to your script that you only know at runtime.
Cheers,
Gael
>
> Many thanks.
>
> With kind regards,
>
> Siaufung Dang
>
>
>
>
> ------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------
> Forschungszentrum Juelich GmbH
> 52425 Juelich
> Sitz der Gesellschaft: Juelich
> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
> Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
> Prof. Dr. Sebastian M. Schmidt
> ------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
More information about the ase-users
mailing list