Skip to Content.
Sympa Menu

forum - [abinit-forum] little python program for generation of qpoints in anadbb input

forum@abinit.org

Subject: The ABINIT Users Mailing List ( CLOSED )

List archive

[abinit-forum] little python program for generation of qpoints in anadbb input


Chronological Thread 
  • From: marcel <marcel@physik.tu-berlin.de>
  • To: forum@abinit.org
  • Subject: [abinit-forum] little python program for generation of qpoints in anadbb input
  • Date: Wed, 3 Jan 2007 12:49:44 +0100 (CET)

Dear all,

I want to share my little python-program. It generates the q-points between specified 'corner'-points. This is needed in the anadbb input.
It also prints the number of generated q-points.

It needs python and the module numeric tu run.


snip<

# This program produces a list of q-points needed for anadbb. The total
amount of q-points is written.
# It connects the points <points> with <fineness> steps between. The first
entry of fineness governs the steps between the 1st
# and 2nd entry of points.

from Numeric import array, Float
import sys

points=array([ [0,0,0] , [0.33333,0.33333,0] , [0.5,0.5,0], [1,0,0] ], Float)
fineness=array([19,10,19])

counter=0
# check of fineness contains points-1 entries
if fineness.shape[0] != (points.shape[0]-1):
print ("The number of entries in fineness is wrong!")
sys.exit()

#produce q-points
for i in range(points.shape[0]-1):
divisor=float(fineness[i])
for j in range(int(divisor)):
jfloat=float(j)
punkt=points[i]+jfloat/divisor*(points[i+1]-points[i])
print "\t %5.5f \t %5.5f \t %5.5f \t 1.0" %
(punkt[0],punkt[1],punkt[2])
counter=counter+1
#last point
print "\t %5.5f \t %5.5f \t %5.5f \t 1.0" % (points[i+1][0],points[i+1][1],points[i+1][2])
#print number of qpoints
print counter+1

snip<
________________________________________________________________________
Marcel Mohr Institut für Festkörperphysik, TU Berlin
marcel@physik.tu-berlin.de Sekr. PN 5-4
TEL: +49-30-314 24442 Hardenbergstr. 36
FAX: +49-30-314 27705 10623 Berlin



  • [abinit-forum] little python program for generation of qpoints in anadbb input, marcel, 01/03/2007

Archive powered by MHonArc 2.6.16.

Top of Page