[gpaw-users] Problems running GPAW
Augustus Low
mrspiko at gmail.com
Thu Apr 7 12:31:39 CEST 2011
Hi all,
I'm new to programming on GPAW and I need some help on this. I'm trying to
calculate the potential energy of this simple bcc structure using both EMT
and GPAW. Here is my script:
from ase import Atoms
from ase.visualize import view
from ase.calculators.emt import EMT
from ase.constraints import FixAtoms
from ase.optimize import QuasiNewton
from ase.lattice.cubic import BodyCenteredCubic
a = 3.61
bcc = BodyCenteredCubic(size=(1,1,1), symbol='Cu', pbc=(1,1,0),
latticeconstant=3.61)
bcc.append(29)
bcc.positions[2]=(a,a,a)
bcc.append(29)
bcc.positions[3]=(a,0,0)
bcc.append(29)
bcc.positions[4]=(0,0,a)
bcc.append(29)
bcc.positions[5]=(a,0,a)
- Hide quoted text -
bcc.append(29)
bcc.positions[6]=(0,a,0)
bcc.append(29)
bcc.positions[7]=(0,a,a)
bcc.append(29)
bcc.positions[8]=(a,a,0)
constraint = FixAtoms(mask=[a.symbol !='Cu' for a in bcc])
bcc.set_constraint(constraint)
view(bcc)
bcc.set_calculator(EMT())
dyn = QuasiNewton(bcc)
dyn.run(fmax=0.05)
print bcc.get_potential_energy()
- Hide quoted text -
from gpaw import GPAW
calc = GPAW(nbands=-10)
bcc.set_calculator(calc)
print bcc.get_potential_energy()
However, this was returned to me:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/lowt0008/ase/ase/atoms.py", line 494, in get_potential_energy
return self.calc.get_potential_energy(self)
File
"/home/lowt0008/python-2.7/lib/python2.7/site-packages/gpaw/aseinterface.py",
line 32, in get_potential_energy
self.calculate(atoms, converge=True)
File "/home/lowt0008/python-2.7/lib/python2.7/site-packages/gpaw/paw.py",
line 226, in calculate
self.set_positions(atoms)
File "/home/lowt0008/python-2.7/lib/python2.7/site-packages/gpaw/paw.py",
line 301, in set_positions
spos_ac = self.initialize_positions(atoms)
File "/home/lowt0008/python-2.7/lib/python2.7/site-packages/gpaw/paw.py",
line 293, in initialize_positions
self.wfs.set_positions(spos_ac)
File
"/home/lowt0008/python-2.7/lib/python2.7/site-packages/gpaw/wavefunctions/fd.py",
line 45, in set_positions
FDPWWaveFunctions.set_positions(self, spos_ac)
File
"/home/lowt0008/python-2.7/lib/python2.7/site-packages/gpaw/wavefunctions/fdpw.py",
line 41, in set_positions
WaveFunctions.set_positions(self, spos_ac)
File
"/home/lowt0008/python-2.7/lib/python2.7/site-packages/gpaw/wavefunctions/base.py",
line 226, in set_positions
rank_a = self.gd.get_ranks_from_positions(spos_ac)
File
"/home/lowt0008/python-2.7/lib/python2.7/site-packages/gpaw/domain.py", line
102, in get_ranks_from_positions
assert (rnk_ac >= 0).all() and (rnk_ac < self.parsize_c).all()
AssertionError
Anyone had any idea where the problem could lie? Your help is greatly
appreciated.
Regards,
Augustus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.fysik.dtu.dk/pipermail/gpaw-users/attachments/20110407/e059f485/attachment.html
More information about the gpaw-users
mailing list