Fourier or MEM map of quasi-crystals and semi-quasicrystals

      This program generates a mem map, fourier map or patterson map
            (********isys=0 does not work at present*****)

       input format as follows
          key=value where key is key work shown below
          for character value it should be enclosed by '
            as file1='filename1'
          for numerical value it is like ndm=1 or f000=123.4


                            input data
     (00) file1
         file1:name for hkl-fo-fc-phase-sig file
     (01) file2
         file2: file name for nD density file (iplot=0)
                file name for 2D density file (iplot>0)
                file name for 3D density file (iplot<0) (.win file)
     (1) title
     (2) isys,a,c             for quasicrystals (isys>0)
         isys: 1:icosahedral 2:icosahedral (cubic)
               3:decagonal 4:octagonal 5: dodecagonal
         a: lattice parameter (in angstrom)
         c: lattice parameter (in angstrom) for dihedral lattice
     (3) nsymo,icent,brv
         nsymo: number of generators in symmetry operations
         icent: give 1 for centrosymmetryc
                give 0 otherwise
         brv  : 'p','i' or 'f'
              ****** see (10) ******
     (4) symmetry operator in the format of i.t.
             for example x,y,z,t,u,v; x+1/2,y,z+1/2,t,u,v etc.
             ********    repeat (4) nsymo times
     (5) f000,sg00,sg0,sg1, fmag
            f000: fc at the origin
            if observed structure factor includes f000, this is replaced
            sg00: sigma for f000  (sg0 : sigma=sqrt(f000)*sg00 is used)
            sg0: sigma=sg0     (sg0 : sigma=sqrt(fo)*sg0 is used)
            sg1: sigma=sg1   for strongest (Fcal) reflections
         fmag: f000,sg00,sg0,sg1,fobs,fcal are
               magnifiled by this factor
     (6) jbc
         jbc: kind of map  1 : axes are unit vectors for ext. and int. spaces
                          -1 : axes specified in (7) (lattice vectors)


         **if jbc=-1 or jbc=-2 then give (7) else skip (7)**
     (7)  s1, s2, s3, s4 : orthogonal transformation matrix for q1-q6
            ((s1(i,j),j=1,3),i=1,3) etc.
             s1, s2 etc. should be in different lines
             total 6x6 matrix is given by 
                     s1,s3
                     s4,s2
          for 3-fold map  (isys=2 external and internal spaces // x and y)
             s1= 0.5773 0.5773 0.5773 0.7071 -0.7071 0. 0.4082 0.4082 -0.8165
             s2= 0.5773 0.5773 0.5773 0.7071 -0.7071 0. 0.4082 0.4082 -0.8165
             s3= 0. 0. 0. 0. 0. 0. 0. 0. 0.
             s4= 0. 0. 0. 0. 0. 0. 0. 0. 0.
          other possiblilities
          for 5-fold map (sys=1 two 5-fold axes in 6D // x and y)
             s1=1. 0. 0. 0. 1. 0. 0. 0. 0.7071
             s2=1. 0. 0. 0. 1. 0. 0. 0. 0.7071
             s3=0. 0. 0. 0. 0. 0. 0. 0. -0.7071
             s4=0. 0. 0. 0. 0. 0. 0. 0. 0.7071
          for 2-fold map (sys=2 two 2-fold axes in 6D // x and y)
             s1=0.8506 0. 0. 0. 1. 0. 0. 0. 1.
             s2=0.8506 0. 0. 0. 1. 0. 0. 0. 1.
             s3=-0.5257 0. 0. 0. 0. 0. 0. 0. 0.
             s4=0.5257 0. 0. 0. 0. 0. 0. 0. 0.
          for 3-fold map (sys=2 two 3-fold axes in 6D // x and y)
             t1=0.8650 t2=0.5257 
             s1=0.4994 0.4994 0.4994 0.7071 -0.7071 0. 0.4082 0.4082 -0.8165
             s2=0.4994 0.4994 0.4994 0.7071 -0.7071 0. 0.4082 0.4082 -0.8165
             s3=-0.3034 -0.3034 -0.3034 0. 0. 0. 0. 0. 0.
             s4= 0.3034  0.3034  0.3034 0. 0. 0. 0. 0. 0.
               (see  (13))

          if jbc=-2 then give (7') else skip (7') (for projected structures)
     (7')  t1, t2, t3, t4 : orthogonal transformation matrix for q1'-q6'
           which is transformed by s matrix defined by (7) (q'=sq)
           for 5-fold map   24.095 = arctan(1/sqrt(5))
                            cost=cos(24.095) sint=sin(24.095)
           t1= 1 0 0 0 1 0 0 0  cost
           t2= 1 0 0 0 1 0 0 0  cost
           t3= 0 0 0 0 0 0 0 0 -sint
           t4= 0 0 0 0 0 0 0 0  sint

           for 2-fold or 3-fold  axis
           cost=     sint=   (2-fold)
           cost=     sint=   (3-fold)

           t1= cost 0 0 0 1 0 0 0 1
           t2= cost 0 0 0 1 0 0 0 1
           t3= sint 0 0 0 0 0 0 0 0
           t4=-sint 0 0 0 0 0 0 0 0

     (8) iplot, hmax, ismtr,pkmin,rwmin (for iplot=5)
         iplot =1, -1:  patterson map
               =2, -2:  fourier map
               =3, -3:  difference fourier map
               =4, -4:  Mem map starting from flat electron density
               =5, -5:  MEM and LDEM starting from the result of LDEM

          positive and negative iplot generate a 2D and 3D maps
          if iplot < 0 .win and .rho file is generated

          hmax(1-6): number of points along principal axes
          ismtr : order of similarity transformations
              qext => qext*tau**ismtr
              qint => qint*tau**-ismtr
              xext => xext*tau**-ismtr
              xint => xint*tau**ismtr
          pkmin : minimum peak height fraction to be printed in  Fourier
                           or Difference Fourier map
         (real minimum peak hekgit is given by pkmax*pkmin
          where pkmax is the maximum peak density)      
                  abs(peak density) > pkmax*pkmin is printed
          rwmin  : rw factor below which LEM method works
                  ******(pkmin > 0)********        
           
     ***** if abs(iplot)=1,2,3  skip (9)*****
     (9) ex1,ex2,nex1,nex2
            ex1,ex2:  constants needed for smooth convergence
            nex1: number of iterations in imode=1 (Yamamoto)
            nex2: number of iterations in imode=2 (Sakata)
     ***** imode=1 mode is dangerous for accurate electron density map
     ***** imode=2 mode should be used for MEM

     (9') icont
            icont: iteration is continued from the previous result
     (10) qimax, frmt
          qimax: maximum q vector to be used to draw map
          frmt: file format for hkl, fobs, fcal, phase, sig 

     (11) ldev iwhkl iprj
          ldev : 1: B&W Postscript printer 2: color Postscript printer
          iwhkl  : 0 no output, 1: output of hkl fo fc obtained from MEM
                 : -1: output of hkl fc fc for all calculated points
                 ******  fo=fc in the present version ******
          iprj  : 0 for a map in a cut plane, iprj=n means nD projection
               ******  if iprj=0 skip (11')
     (11') h 
           h : Miller indices for projection axis
          ****** repeat (11') iprj times *****
          for 5-fold projection in external space iprj=2
          h=1 0 0 0 0 0 and h=0 1 1 1 1 1   (isys=1)
          for 2-fold projection in external space iprj=2
          h=0 0 0 -1 0 1 and h=0 1 -1 0 0 0 (isys=2)

     (12)  ng   :    number of graphs in a sheet  (ng < 10)
                  ****if ng=0 no map is written****
     (13) iax ipers
         iax(1),iax(2),,,iax(6) : q coordinates
         ipers : 0 no perspective veiw 1 add psespective view 

         density in 3D space spanned by iax(1),iax(2),iax(3) axes is calculated

         if jbc > 0 or jbc < 0
         for drawing 3D density map.
         for 5-fold map iax=3 6 1 2 4 5 (isys=1)
         for 2-fold map iax=1 4 2 3 5 6 (isys=2)
         for 3-fold map iax=1 4 2 3 5 6 (isys=2) (see (7))
         for 5-fold map in external space iax=1 2 3 4 5 6 (isys=1)
         for 2-fold map in external space iax=1 2 3 4 5 6 (isys=2)
           
      
     (14) iaver, ismth
 ****** note that iaver or ismth >0 takes much time for 3D maps (iplot<0)*****
          iaver : 0 noaverage 1 average 2 equivalent points in the unit cell
                    in the calculation of the density
          ismth : 0 no smoothing
                  1 3 point smoothing (average)
                  2 5 point smoothing (average)
     (11) x       :coordinates of origin
     (12) xe, u   :coordinates of origin and displacement
     (13) xi, v   :coordinates of origin and displacement

     (14) q       :origin shift in external and internal spaces

           
            iplot > 0      
     (15) xmin,xmax,ymin,ymax,hscl,xdiv,ydiv 
          xmin:  minimum coordinate along x-axis (in a)
          xmax:  maximum coordinate along x-axis (in a)
          ymin:  minimum coordinate along y-axis (in a)
          ymax:  maximum coordinate along y-axis (in a)
            unit vectors (ax,.. bx.. ) in the external and internal spaces
            are as follows
            1) for icosahedral case
                  ax=a*a1 ay=a*a2 az=a*a3 bx=a*a4 by=a*a5 bz=a*a6
            2) for decagonal case
                  ax=2a*a1/sqrt(5) ay=2a*a2/sqrt(5) az=c*a5
                  bx=2a*a3/sqrt(5) by=2a*a4/sqrt(5) 
            3) for octagonal case
                  ax=a*a1 ay=a*a2 az=c*a5
                  bx=a*a3 by=a*a4 
            4) for dodecagonal case
                  ax=2a*a1/sqrt(6) ay=2a*a2/sqrt(6) az=c*a5
                  bx=2a*a3/sqrt(6) by=2a*a4/sqrt(6) 
                xmin=1 means ax A
          hscl: hight scale
          xdiv: length of a mesh edge in the unit of ax, etc.
          ydiv: length of a mesh edge in the unit of ax, etc.
          hscl: scale factor for the electron density

           if iplot < 0 
     (15) xmin,xmax,ymin,ymax,zmin,zmax,hscl,xdiv,ydiv,zdiv
         xmin,..,zmax:coordinate reanges along x,y and z axes
         hscl : scale for F
         xdiv, ydiv, zdiv : intervals of the scale in x and y axes

          if iplot < 0 skip (16)-(18)
     (16) hmin,div,lf
         hmin: minimum hight (density) in the division
         div : interval of hight
         lf  : number of contour lines

     (17) amagx,amagy,shftxb,shftyb,shftxa,shftya
          amagx:  magnification for x
          amagy:  magnification for y
          shftxb: shift of origin along x before plot in cm
          shftyb: shift of origin along y before plot in cm
          shftxa: shift of origin along x after each plot in cm
          shftya: shift of origin along y after each plot in cm
      **0*****repeat (9)-(18) ng times********




File translated from TEX by TTH, version 3.02.
On 10 Aug 2005, 11:48.