[ase-users] Bug in ASE package
SHIBU MEHER
sm58 at iitbbs.ac.in
Sat May 9 12:15:52 CEST 2020
Hello,
I found a bug in ase.lattice.hexagonal.find_direction.
Using the given code. Following error is occurring.
ValueError: not enough values to unpack (expected 4, got 3)
To correct replace the for loop with following chunk.
for obj in zip(directions,miller):
if obj[1] is not None:
a = obj[0][0]
b = obj[0][1]
c = obj[0][2]
d = obj[1]
if a + b + c != 0:
raise ValueError(
("(%d,%d,%d,%d) is not a valid hexagonal Miller " +
"index, as the sum of the first three numbers " +
"should be zero.") % (a,b,c,d))
x = 4*a + 2*b
y = 2*a + 4*b
z = 3*d
obj[i] = (x,y,z)
Am I correct? This code now is working fine.
Sincerely,
Shibu Meher
Third-year undergraduate
School of Mineral, Metallurgical, and Material Engineering
IIT Bhubaneswar
Mobile no -
+919556142413, +918917529970
[image: Mailtrack]
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&>
Sender
notified by
Mailtrack
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&>
09/05/20,
15:44:36
--
*Disclaimer: *This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify the
system manager. This message contains confidential information and is
intended only for the individual named. If you are not the named addressee
you should not disseminate, distribute or copy this e-mail. Please notify
the sender immediately by e-mail if you have received this e-mail by
mistake and delete this e-mail from your system. If you are not the
intended recipient you are notified that disclosing, copying, distributing
or taking any action in reliance on the contents of this information is
strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20200509/ed116eee/attachment.html>
More information about the ase-users
mailing list