Re: [Wien] Problem with structeditor for slabs

2014-02-21 Thread Michael Sluydts

Thanks Robert,

All slabs have now generated succesfully without any holes.


Kind regards,

Michael Sluydts


Robert Laskowski schreef op 21/02/2014 3:18:


Hi,

cp attached file to $WIENROOT/SRC_structeditor/bin.

thanks

Robert

On 20 February 2014 PM 10:17:55 Michael Sluydts wrote:

Hello everyone,

I'm trying to generate a series of (110) surface slabs of varying 
thickness for a zincblende crystal. I'm doing this using the 
structeditor functions in an octave script (and have done this with 
both wien2k (11), 12 and 13).


At certain thicknesses of the slab a problem occurs, which I've seen 
in the past for other systems, where it appears to make a diagonal cut 
at the bottom of the slab along a {001} direction. Does anyone by any 
chance have a patch to resolve this? I know ways around it myself but 
being able to use the provided functions directly would be nice.


I've added the bulk struct and octave script needed to reproduce the 
problem below.



Thanks,

Michael Sluydts

bulk.struct
blebleble
F   LATTICE,NONEQUIV.ATOMS   2  216 F-43m
MODE OF CALC=RELA unit=bohr
 10.847217 10.847217 10.847217 90.00 90.00 90.00
ATOM  -1: X=0. Y=0. Z=0.
  MULT= 1  ISPLIT=15
Zn NPT=  781  R0=.5 RMT=   2.0   Z: 30.0
LOCAL ROT MATRIX:1.000 0.000 0.000
 0.000 1.000 0.000
 0.000 0.000 1.000
ATOM  -2: X=0.2500 Y=0.2500 Z=0.2500
  MULT= 1  ISPLIT=15
Se NPT=  781  R0=.5 RMT=   2.0   Z: 34.0
LOCAL ROT MATRIX:1.000 0.000 0.000
 0.000 1.000 0.000
 0.000 0.000 1.000
   0  NUMBER OF SYMMETRY OPERATIONS

script.m
bulk = makeconventional(loadstruct('bulk.struct'));
surf = makesurface(bulk,[1 1 0],2,(bulk.a(3)/2*sin(pi/4))*10+0.01,37.8);
savestruct(makeprimitive(surf),['bug.struct'],0);



--

==

Dr. Robert Laskowski

Senior Scientist, Materials Science  Engineering Department

Institute of High Performance Computing, A*STAR

1 Fusionopolis Way, #16-16, Connexis, Singapore 138632

Tel(Off): +65. 64191493 Fax: +65. 64632536

=


IHPC Values :: Impact :: Honesty :: Performance :: Co-operation
This email is confidential and may be privileged. If you are not the 
intended recipient, please delete it and notify us immediately. Please 
do not copy or use it for any purpose, or disclose its contents to any 
other person. Thank you.



___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html


___
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html


Re: [Wien] Problem with structeditor for slabs

2014-02-20 Thread Robert Laskowski
Hi,



cp attached file to $WIENROOT/SRC_structeditor/bin.



thanks



Robert



On 20 February 2014 PM 10:17:55 Michael Sluydts wrote:

Hello everyone,

I'm trying to generate a series of (110) surface slabs of varying thickness for 
a zincblende crystal. I'm doing this using the structeditor functions in an 
octave script (and have done this with both wien2k (11), 12 and 13).

At certain thicknesses of the slab a problem occurs, which I've seen in the 
past for other systems, where it appears to make a diagonal cut at the bottom 
of the slab along a {001} direction. Does anyone by any chance have a patch to 
resolve this? I know ways around it myself but being able to use the provided 
functions directly would be nice.

I've added the bulk struct and octave script needed to reproduce the problem 
below.


Thanks,

Michael Sluydts

bulk.struct
blebleble
F   LATTICE,NONEQUIV.ATOMS   2  216 F-43m
MODE OF CALC=RELA unit=bohr
 10.847217 10.847217 10.847217 90.00 90.00 90.00
ATOM  -1: X=0. Y=0. Z=0.
  MULT= 1  ISPLIT=15
Zn NPT=  781  R0=.5 RMT=   2.0   Z:  30.0
LOCAL ROT MATRIX:1.000 0.000 0.000
 0.000 1.000 0.000
 0.000 0.000 1.000
ATOM  -2: X=0.2500 Y=0.2500 Z=0.2500
  MULT= 1  ISPLIT=15
Se NPT=  781  R0=.5 RMT=   2.0   Z:  34.0
LOCAL ROT MATRIX:1.000 0.000 0.000
 0.000 1.000 0.000
 0.000 0.000 1.000
   0  NUMBER OF SYMMETRY OPERATIONS

script.m
bulk = makeconventional(loadstruct('bulk.struct'));
surf = makesurface(bulk,[1 1 0],2,(bulk.a(3)/2*sin(pi/4))*10+0.01,37.8);
savestruct(makeprimitive(surf),['bug.struct'],0);



--

==

Dr. Robert Laskowski



Senior Scientist, Materials Science  Engineering Department

Institute of High Performance Computing, A*STAR

1 Fusionopolis Way, #16-16, Connexis, Singapore 138632

Tel(Off): +65. 64191493 Fax: +65. 64632536

=

IHPC Values :: Impact :: Honesty :: Performance :: Co-operation
This email is confidential and may be privileged. If you are not the intended 
recipient, please delete it and notify us immediately. Please do not copy or 
use it for any purpose, or disclose its contents to any other person. Thank you.
 function sr=makesupercell(s,a)

#   usage:  sr=makesupercell(s,a)
#
#  creates supercell based on structure s
#
#   s input structure 
#   a new brave lattice in the basis of old lattice vectors
# (rowwise), works only with non-centered WIEN structures
#   
#   example:  sr=makesupercell(s,[1 0 0; 0 1 0; 0 0 2]) 
#

 if (s.lattic == H | s.lattic == P)

  a1max=floor(sum(a(1:3,1))+1);
  a2max=floor(sum(a(1:3,2))+1);
  a3max=floor(sum(a(1:3,3))+1);
   
  a1min=floor(sum(a(1:3,1))-1);
  a2min=floor(sum(a(1:3,2))-1);
  a3min=floor(sum(a(1:3,3))-1);


  if (a1min = 0) 
 a1min=-1;
  endif
  if (a2min = 0) 
 a2min=-1;
  endif
  if (a3min = 0) 
 a3min=-1;
  endif
   
  if (a1max = 0) 
 a1max=1;
  endif
  if (a2max = 0) 
 a2max=1;
  endif
  if (a3max = 0) 
 a3max=1;
  endif
   
  inva=inv(a);
   
  sr.nat=0;

  for i=1:s.nat

  for i1=a1min:a1max
  for i2=a2min:a2max
  for i3=a3min:a3max

 poso(1:3)=s.pos(i,1:3)+[i1 i2 i3];  
 posn(1:3)=poso*inva;

 if ((posn = 0.)  (posn = -0.1) )
jest=0;  

for j=1:sr.nat

vec=sr.pos(j,1:3)-posn(1:3);
dd=sqrt(vec*vec');

if (dd  0.01) 
   jest=1;
   break
endif
end
if (!jest)
   sr=copyatom2(s,sr,i,0,posn);
endif
 endif
   
  end
  end
  end

  end

  sr.brlat=a*s.brlat;
  sr.lat2car=sr.brlat;

  sr.a(1)=sqrt(sr.brlat(1,1:3)*sr.brlat(1,1:3)');
  sr.a(2)=sqrt(sr.brlat(2,1:3)*sr.brlat(2,1:3)');
  sr.a(3)=sqrt(sr.brlat(3,1:3)*sr.brlat(3,1:3)');

  sr.alpha(1)=180.0d0*acos((sr.brlat(2,1:3)*sr.brlat(3,1:3)')/(sr.a(2)*sr.a(3)))/pi;
  sr.alpha(2)=180.0d0*acos((sr.brlat(1,1:3)*sr.brlat(3,1:3)')/(sr.a(1)*sr.a(3)))/pi;