[gpaw-users] ValueError: Array has wrong length: 2 != 10.
Punit Kumar
ip.punit.2016 at gmail.com
Fri Sep 29 13:29:19 CEST 2017
Thank You Jens for your reply. As you mention in your mail that I have to
make my crystal in some other way so I make my crystal using crystal
function from spacegroup module. But when I run my new script to find
lattice constant of La2O3, I encountered an error regarding exchange
correlation. The error is
Traceback (most recent call last):
File "la2o3_lattice_parameter.py", line 25, in <module>
la2o3.get_potential_energy()
File "/home/punit/.local/lib/python2.7/site-packages/ase/atoms.py", line
682, in get_potential_energy
energy = self._calc.get_potential_energy(self)
File
"/home/punit/.local/lib/python2.7/site-packages/ase/calculators/calculator.py",
line 422, in get_potential_energy
energy = self.get_property('energy', atoms)
File
"/home/punit/.local/lib/python2.7/site-packages/ase/calculators/calculator.py",
line 461, in get_property
self.calculate(atoms, [name], system_changes)
File "/home/punit/.local/lib/python2.7/site-packages/gpaw/calculator.py",
line 249, in calculate
self.initialize(atoms)
File "/home/punit/.local/lib/python2.7/site-packages/gpaw/calculator.py",
line 489, in initialize
self.create_setups(mode, xc)
File "/home/punit/.local/lib/python2.7/site-packages/gpaw/calculator.py",
line 684, in create_setups
xc, filter, self.world)
File "/home/punit/.local/lib/python2.7/site-packages/gpaw/setup.py", line
1227, in __init__
filter=filter, world=world)
File "/home/punit/.local/lib/python2.7/site-packages/gpaw/setup.py", line
87, in create_setup
world=world)
File "/home/punit/.local/lib/python2.7/site-packages/gpaw/setup_data.py",
line 118, in __init__
self.read_xml(world=world)
File "/home/punit/.local/lib/python2.7/site-packages/gpaw/setup_data.py",
line 136, in read_xml
PAWXMLParser(self).parse(source=source, world=world)
File "/home/punit/.local/lib/python2.7/site-packages/gpaw/setup_data.py",
line 451, in parse
setup.filename, source = search_for_file(setup.stdfilename, world)
File "/home/punit/.local/lib/python2.7/site-packages/gpaw/setup_data.py",
line 436, in search_for_file
raise RuntimeError('%s\n%s' % (err, helpful_message))
RuntimeError: Could not find required PAW dataset file "La.PBE".
You need to set the GPAW_SETUP_PATH environment variable to point to
the directories where PAW dataset and basis files are stored. See
https://wiki.fysik.dtu.dk/gpaw/install.html#install-paw-datasets
for details.
I have attached my script below. Any help regarding this error is very
helpful for me.
Thank You
Punit
Ph.D student
IIT Bombay
On 27 September 2017 at 11:24, Jens Jørgen Mortensen <jjmo at dtu.dk> wrote:
> On 09/26/2017 04:27 PM, Punit Kumar via gpaw-users wrote:
>
>> Hello GPAW Users
>>
>> I am trying to calculate the lattice constant for La2O3 crystal after
>> reading the tutorial given in ase tutorial page
>> https://wiki.fysik.dtu.dk/ase/tutorials/lattice_constant.html.
>>
>> I have modify it accordingly and attached my script file below. When I
>> run my script I got the following error
>>
>> Traceback (most recent call last):
>> File "la2o3_lattice_parameter_2.py", line 11, in <module>
>> la2o3 = bulk('La2O3', 'hcp', a=a0, covera=np.sqrt(8/3))
>> File "/home/punit/.local/lib/python2.7/site-packages/ase/build/bulk.py",
>> line 94, in bulk
>> pbc=True)
>> File "/home/punit/.local/lib/python2.7/site-packages/ase/atoms.py",
>> line 220, in __init__
>> self.new_array('positions', positions, float, (3,))
>> File "/home/punit/.local/lib/python2.7/site-packages/ase/atoms.py",
>> line 403, in new_array
>> (len(a), len(b)))
>> ValueError: Array has wrong length: 2 != 10.
>>
>> Can someone help me in figuring out this error. It will be a great help
>> for me.
>>
>
> The bulk() function is not that clever. You must build your La2O3 crystal
> in some other way.
>
> Atoms('La2O3', positions=..., cell=..., pbc=True)
>
> I've improved the error message so that you now get:
>
> ValueError: Please specify 1 atom for hcp and not 5
>
> Jens Jørgen
>
> Thank You
>>
>> Punit
>>
>>
>>
>> _______________________________________________
>> gpaw-users mailing list
>> gpaw-users at listserv.fysik.dtu.dk
>> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/gpaw-users/attachments/20170929/9ee01f63/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: la2o3_lattice_parameter.py
Type: text/x-python
Size: 767 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/gpaw-users/attachments/20170929/9ee01f63/attachment.py>
More information about the gpaw-users
mailing list