[ase-users] jacapo exception "can only specify Z or sym!"
Marcin Dulak
Marcin.Dulak at fysik.dtu.dk
Tue Feb 8 10:07:19 CET 2011
Hi,
Sharon H Chou wrote:
> (PLEASE IGNORE MY PREVIOUS MESSAGE WITH SUBJECT "[ase-users] jacapo path
> error?")
>
> John - thank you for helping me troubleshoot!
>
> I ran the script below:
>
> #!/usr/bin/env python
> from ase.lattice.surface import *
> from ase.calculators.jacapo import *
>
> slab = fcc111('Al', size=(2,2,3), vacuum=10.0)
> slab.center()
>
> calc = Jacapo('3.2.1-Al-norelax.nc',
> pw=300,
> kpts=(2,2,1),
> atoms=slab)
>
> print slab.get_potential_energy()
> print slab.get_forces()
>
>
most likely you run the script twice, with the restart file
(3.2.1-Al-norelax.nc) existing.
Please remove the restart file and try again.
This problem is a result of the way jacapo handles restart files.
Marcin
> and also the script below:
>
> #!/usr/bin/env python
> from ase import *
> from ase.calculators.jacapo import *
> np.set_printoptions(precision=3,suppress=True)
>
> for d in [1.05, 1.1, 1.15, 1.2, 1.25]: #possible bond lengths
>
> co = Atoms([Atom('C',[0,0,0]),
> Atom('O',[d,0,0])],
> cell=(6,6,6))
>
> calc = Jacapo('1.3.1-co_%1.2f.nc' % d,
> pw=350,
> ft=0.01,
> atoms=co)
>
> print 'd = %1.2f ang' % d
> print 'energy = %f eV' % co.get_potential_energy()
> print 'forces = (eV/ang)\n', co.get_forces()
> print '' #blank line
>
> calc.strip() #removes large variables we don't need now.
>
> * * *
>
> Both times I got the error below:
>
> Traceback (most recent call last):
> File "geometry.py", line 15, in <module>
> atoms=co)
> File
> "/usr/lib/python2.6/dist-packages/ase/calculators/jacapo/jacapo.py",
> line 231, in __init__
> self.set_nc(nc)
> File
> "/usr/lib/python2.6/dist-packages/ase/calculators/jacapo/jacapo.py",
> line 1135, in set_nc
> self.update_input_parameters()
> File
> "/usr/lib/python2.6/dist-packages/ase/calculators/jacapo/jacapo.py",
> line 383, in update_input_parameters
> self.pars[key] = eval(getf)
> File "<string>", line 1, in <module>
> File
> "/usr/lib/python2.6/dist-packages/ase/calculators/jacapo/jacapo.py",
> line 2257, in get_psp
> raise Exception, 'You can only specify Z or sym!'
> Exception: You can only specify Z or sym!
>
> I couldn't see how the Z and sym parameters are both specified... please
> explain?
>
> Thanks!
> Sharon
>
>
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>
>
--
***********************************
Marcin Dulak
Technical University of Denmark
Department of Physics
Building 307, Room 229
DK-2800 Kongens Lyngby
Denmark
Tel.: (+45) 4525 3157
Fax.: (+45) 4593 2399
email: Marcin.Dulak at fysik.dtu.dk
***********************************
More information about the ase-users
mailing list