[ase-users] jacapo exception "can only specify Z or sym!"
Sharon H Chou
cnorahs at stanford.edu
Tue Feb 8 05:45:53 CET 2011
(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()
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
More information about the ase-users
mailing list