[Wien] makesupercell.m

sjalali at phys.ui.ac.ir sjalali at phys.ui.ac.ir
Thu May 20 22:56:04 CEST 2010


Would the following line in makesupercell.m:
poso(:)=s.pos(i,:)+[i1 i2 i3]
be changed to:
poso(i,:)=s.pos(i,:)+[i1 i2 i3]?

for example the s.pos(1,:) of the loaded GaN is a vector like:
octave:2> s.pos(1,:)
ans =

0.333333330000000 0.666666660000000 0.500000000000000

and similarly the [i1 i2 i3] is a vector.

so the left hand side, poso, should be also a vector.

For a=[1 0 0; 1 1 0; 0 0 2] we have:
octave:5> a=[1 0 0; 1 1 0; 0 0 2]
a =

1 0 0
1 1 0
0 0 2

re
but the makesupercell.m results in the following mismatch:

octave:6> sout=makesupercell (s,a)
error: A(I) = X: X must have the same size as I

Although by changing the poso(:) to poso(i,:) the error disappears,  
the problem is not completely fixed. The other parts of the  
makesupercell.m and copyatom2.m should be also changed. But, I am sure  
Robert Laskowski can give us better solutions.

Any comments are welcome.

Your,
S. Jalali.







----------------------------------------------------------------
University of Isfahan (http://www.ui.ac.ir)



More information about the Wien mailing list