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.000000 90.000000 90.000000
ATOM  -1: X=0.00000000 Y=0.00000000 Z=0.00000000
          MULT= 1          ISPLIT=15
Zn         NPT=  781  R0=.000050000 RMT=   2.00000   Z:  30.00000
LOCAL ROT MATRIX:    1.0000000 0.0000000 0.0000000
                     0.0000000 1.0000000 0.0000000
                     0.0000000 0.0000000 1.0000000
ATOM  -2: X=0.25000000 Y=0.25000000 Z=0.25000000
          MULT= 1          ISPLIT=15
Se         NPT=  781  R0=.000050000 RMT=   2.00000   Z:  34.00000
LOCAL ROT MATRIX:    1.0000000 0.0000000 0.0000000
                     0.0000000 1.0000000 0.0000000
                     0.0000000 0.0000000 1.0000000
   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.99999999) & (posn >= -0.00001) )
                            jest=0;  

                            for j=1:sr.nat

                                vec=sr.pos(j,1:3)-posn(1:3);
                                dd=sqrt(vec*vec');
                                
                                if (dd < 0.000001) 
                                   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;
      sr.alpha(3)=180.0d0*acos((sr.brlat(2,1:3)*sr.brlat(1,1:3)')/(sr.a(2)*sr.a(1)))/pi;

      sr.lattic='P';

     else
        printf("makesupercell:  remove centering with makeprimitive or makeconventional\n")
        sr=s;        
     endif
     
 end

         
_______________________________________________
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

Reply via email to