This program generates a mem map, fourier map or patterson map
          for crystals including modulated and composite crystals

       input format as follows
          key=value where key is key work shown below
          for character value it should be enclosed by '
            as flnm1='filename'
          for numerical value it is like ndm=1 or f000=123.4
     
     (01) iwflag :
     (02) flnm1 :  file name of hkl,Fobs,Fcal,phase,sig  for MEM
                   file name of hkl,Fobs,Fcal,phase for Fourier
     (03) flnm2 :  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) a,b,c,cosa,cosb,cosc
         a,b,c in angstrome
     (2') nsub,  zmtrx
         nsub : number of subsystems
         zmtrx: z matrix (permutation matrix for nsub >=2)
     (3) ndm,nsymo,icent,ige,nctr
         ndm: order of modulations  1 for one-dimensional modulation etc
         (or extra dimension)
         nsymo: number of symmetry operators
         icent: 1 for centrosymmetric 0 for noncentrosymmetric
         ige:   1 when generating elements are given else 0
         nctr:  number of centering translation (excluding 0,0,0,0,0,0)
         ********if ndm=0 skip (4)********
     (4)  a*,b*,c* components of the wave vector icorc, ilm (*)
         if incommensurate icorc=1, commensurate icorc=0
         ilm  number of divisions of gauss integrals in structure
         factor formula in incommensurate cases     3<=ilm<=100
         ******caution:  satellite with order greater than****
         *******ilm/5 is not calculated.  This means that ****
         *******if second order satellite intensity must be***
         *******necessary ilm >= 10 is necessary *************
         =========== repeat (4) ndm times ============
     
         if nctr > 0 then (5)
     (5) 'centering translation'
         in the format of I.T.  1/2,1/2,1/2,0,0,0 etc
     (6) 'symmetry operator'
         in the format of I.T. x,y,z,t,u,v etc
     (7) f000, sg00, sg0, sg1, fmag
         f000: fc at the origin
         (number of electrons in the unit cell of the first substructure)
         sg00: sigma for f000
         sg0:  average sigma
         sg1:  sigma for strongest (Fcal) reflection
         fmag: f000,sg00,sg0,sg1,fobs,fcal are
               magnifiled by this factor
         (fmag is the scale factor for the given structure factor)
         if observed structure factor includes f000, this is replaced

     (8) lgr: laue group: m3m,m3,4/mmm,4/m,mmm,2/m,-1,6/mmm,6/m,-3m,-31
         laue group (number of equivalent positions)
         m3m(48),m3(24),4/mmm(16),4/m(8),mmm(8),2/m(4),-1(2)
         6/mmm(24),6/m(12),-3m(12),-31(6)
         when lgr=2/m,(h2>=0 or h2<=0) and (h3>=0 or h3<=0) are assumed
         when lgr=-1, h3>=0 or h3<=0 is assumed
     
     (9) jbc
         jbc: kind of map  1 : no axis transformation
                          -1: see (10) 
                          -2: see (10')
         (this program only write a plane normal to a*, b* or c*.
         to write arbitrary plane, give jbc < 0 and 
         specify transformation matrix (10) which defines
         new a*,b*,c* from old ones.)

         **if jbc !=-1 skip (10_1) (10_2)**
     (10_1) transformation matrix for miller index itr(6,6) 
                        (for superstructures)
         itr(i,j),j=1,6 (*)
         repeat 6 times
         which is equal to transformation matrix for
         unit vectors in direct space
     (10_2) 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

         **if jbc !=-2  skip (10'_1)-(10'_3)**
     (10'_1)  isetting
           isetting : 1 c axis unique, 2 b axis unique, 3 a axis unique
     (10'_2)  v
           v : matrix ((v(i,j),j=1,3),i=1,6)
           6x3 U matrix, which gives the a1-a3 coefficient of
           6 unit vectors in reciprocal space, is calculated from
           iseging and a*,b*,c*,cosa*,cosb*,cosc* and k1,k2,k3
           6x3 V matrix, which gives the  a4-a6 coefficient of
           6 unit vectors in reciprocal space, should be given
           here

           first 6x3 part of 6x6 R matrix is U while
           second 6x3 part is V

           in the standard setting for modulated structure
           first 3x3 part of V is zero matrix while second 3x3
           part is unit matrix for many cases, but may be
           different for triclinic,monoclinic,hexagonal system
           in idm=5
           for example, k1 and k2 are in the a*-b* plane in hexagonal system,
           we may take v(4,1)=a*,    v(4,2)=0,           v(4,3)=0
                       v(5,1)=-a*/2, v(5,2)=sqrt(3)a*/2, v(5,3)=0
                       v(6,1)=v(6,2)=v(6,3)=0
           the best v(1,1)-v(3,3) are sample-dependent for which
           the modulation wave should be parallel to the internal space
           v(1,1)=v(1,2)=...=v(3,3)=0 gives the standard setting for
           modulated structure but this is not appropriate for
           semi-quasicrystals      
     (10'_3) 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

     (11) iplot,hmax,pkmin,rwmin (for iplot=5)
         iplot=1, -1:  Patterson map
              =2, -2:  Fourier map
              =3, -3:  difference Fourier map
              =4, -4:  MEM map (starting flat electronndensity)
              =5, -5:  MEM and LDEM starting from the result of LDEM
              =6, -6:  MEM and LDEM starting from the result of LDEM
                       f000 should be includel in observed structure factor
                       calculated f is not normalized by f000
             *****************new***************
         for negative iplot, 3D density function is saved in a file flnm2

         hmax(1-6): number of grid points along principal axes
         (these sould be the multiple of the power of prime numbers
         up to 21)
         hmax(1)*hmax(2)*..*hmax(6) <=256*256*256
         *****hmax(i) >= 1  (for i=1,2,..,6)******
         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 (12)
     (12) ex1,ex2,nex1,nex2,icont
         ex1,ex2:  constants needed for smooth convergence
         nex1: number of iterations in imode=1 (Yamamoto)
         nex2: number of iterations in imode=2 (Sakata)
         icont : 1 continue from former results
     ***** imode=1 mode is dangerous for accurate electron density map
     ***** imode=2 mode should be used for MEM
         data for plotter
     (12') frmt
         frmt: file format for hkl, fobs, fcal, phs, sig(f)
         phs : phase in degree      
         sig(f) is necessary only for MEM
     (13) ldev,iwhkl
         ldev : 1: B&W Postscript printer 2: color Postscript printer
         iwhkl  : 0 no output, 1: output of hkl fo fc
         obtained from MEM or Fourier map
     
         write strongest positive peak positions
         for difference fourier (abs(iplot)=3)
     
     
     (14) nsh: number of sheets for electron density map output
     
         *********if nsh=0 skip (15)-(23)*******
     (15) ng ismth
               ng : number of graphs in a sheet
                ismth : 0=no smoothing
                        1=3 point average
                        2=5 point average
     (16) xs: origin coordinate in each map (xs(1)-xs(6))
         (coordinates of the map origin in the new coordinate system
         specified at (10))
     (17) iax: selection of axes (iax(1)-iax(6))
         write (electron) density in iax(1)-iax(2) plane

           if iplot > 0
     (18) ax,bx,coscx (length of axes in cm and cos angles)
         default ax,bx: a,b,c for iax=1,2,3, d=5 for iax=4
         coscx,: cosc,cosa,cosb for ax,bx=1,2;2,3;3,1
         coscx: calculated from k1,k2,k3 for ax=a,b,c and bx=d
         to use default falues, give ax=bx=0
     (19) xmin,xmax,ymin,ymax,hscl,xdiv,ydiv
         xmin,..,ymax:coordinate reanges along x and y axes
         hscl : scale for F
         xdiv, ydiv : intervals of the scale in x and y axes

           if iplot < 0
     (18) ax,bx,cx,cosax,cosbx,coscx (length of axes in cm and cos angles)
         default ax,bx,cx: a,b,c for iax=1,2,3, d=5 for iax=4
         cosax,cosbx,coscx,: cosc,cosa,cosb for ax,bx=1,2;2,3;3,1
         cosax,cosbx,coscx: calculated from k1,k2,k3 for ax=a,b,c and bx=d
         to use default falues, give ax=bx=0
     (19) 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 (20)-(23)      
     (20) hmin,div,lf
         hmin: minimum hight (density) in the division
         div : interval of hight
         lf  : number of contour lines
     (21) amagx,amagy,shftxb,shftyb,shftxa,shftya
         amagx:  magnification for x
         amagy:  magnification for y
         shftxb,shftyb: shifts before each copy
         shftxa,shftya: shifts after each copy
     (22) iwtitl,wx,wy,ws,angl
         if iwtitl=1, title is written
         wx,wy: coordinates for the title
         ws size of letter in cm, angle is the angle
         from the x axis in degree
     (23) wtitle : title for the figure
     ****************repeat (16)-(23) ng times****************
     ****************repeat (15)-(24) nsh times***************




File translated from TEX by TTH, version 3.02.
On 15 Mar 2005, 15:34.