**************************************************************
           parallel and perspective projection of a cluster
                    in crystals and quasicrystals
           In quasicrystals, all atom positions in 3D space
           have been given, while in crystals, those for
           independent atoms and symmetry operations should
           be given
    **************************************************************

                             by A. Yamamoto
                             Jan. 30, 2004


     (0) icase itempf
         icase: 0 for qcstrc output format for (9) (no symmetry operators)
                1 for iatom output file for    (9) (use symmetry operators)
                for icase=0, cartesian coordinates with the unit
                vectors of 1A are used
                for icase=1 unit vectors given in (2) are used
         itempf: 1 anisotropic temperature factor
         itempf: 0 and icase=0 see (9)
         
     (1) title
          ****** if icase=0 skip (2) *****
     (2) a,b,c,cosa,cosb,cosc
         (lattice constants a,b,c in angstrome)
     (3) na,ne,ng,ip,iat
         na  number of independent atoms ( <= 20000)
         ne  number of elements (1<=ne<=200)  (OD number)
         ng  number of pages (default: 1)
         ip  0: atom position is given in this file
             1: atom position is read from another file
         iat 0: occupation domain number in the second data in (9) for quasicrystals
             1: element name 'Na' etc. in the second data in (9) for crystals

         ****** if icase=0 skip (4)-(6) *****
     (4) ns,ig,ic,brv
         ns  number of symmetry operators or their generators  (ns<=1<=48)
         ig  0: symmetry operator  1: generator
         ic  1:centrocymmetric, 0:noncentrosymmetric
         brv bravais lattice ('p', 'a', 'b', 'c', 'i', 'f', 'r')
             or non periodic structure (' ')
     (5) symmetry operator   (header)
     (6) symmetry operations in the format of I.T.
                for example x,y,z  1/2-x, y, 1/2+z etc.
                repeat (6) ns times

     (7) ldev,iww,iwb,iwc,iwa,ips,ccol,jmod,iornt
         ldev : 1 black and white, 2 color
         iww  : 1  print out x y z coordinates and bonded pairs
         iwb 0: write bonds                  1: no bond
         iwc 0: write unit cell              1: no unit cell
         iwa 0: write atoms joined by bond   1: all atoms
         ips 0: parallel projection          1: perspective projection
         ccol : unit cell color (color display) or pen number (plotter)
            for display
            1:blue,2:red,3:purple,4:green,5:sky blue,6:yellow,7:white
                  (default: white)
         jmod : 0 non-shaded atoms  without atom number
                1 shaded atoms
                2 non-shaded atoms with atom number
                3 bs-file output for using xbs
                4 mld-file output for using vics
c               5 non-shaded atoms with color determined by p1,p2,p3
         iornt : orientation 1: portrait 2: landscape

       ****** if ip=0 skip (8)
     (8) flnm
         flnm : file name of file including data (9)
     (8') flnm1
         flnm1 : file name for x,y,z,ui output  (jmod=0,1,2,5)
                 prefix for bs files (nb files are created. see (16).)
                                   (jmod=3)
                 prefix of the file name for mld file  (jmod= 4)
                 
                 ****** bs file ******
                 prefix of the file name for atom species, x, y, z
                 spec name radius color
                 bonds name1 name2 min-length max-length radius color

                 ****** mld file ******
                 title
                 na (number of atoms)
                 atom species x,y,z en (en : element number, repeat na times)
                 nb (number of bonds)
                 atom number pair for a bond  (repeat nb times)
                        (en : 1 for H, 2 for He etc.)
                ****** skip (8") if jmod > 2 *****
     (8") flnm2
         flnm2 : prefix of the file name for bonds
         
       ****** if ip=1 skip (9) but the same date should be given
              as a separate file

          if icase=0 or iat=0  (for quasicrystals)
     (9)  atom number, od number, element number,x,y,z, p1, p2, p3 (*)
          if itempf=1 u11,u22,u33,u23,u31,u12 should be followed at
          the end of each line of (9) else p1,p2,p3 be followed
          p1,p2,p3 : partial occupation prb for the 1st, 2nd and 3rd atoms

          if iat=1   (for crystals)
     (9)  atom number, symbol, element number,x,y,z (*)
            if itempf=1 u11,u22,u33,u23,u31,u12 should be followed at
            the end of each line of (9)

        ******  repeat (9) na times

     (10) rad,acol,symbol
         rad:  atom radii (in angstrome)
         acol: atom color
         symbol: 'Al', 'Mn' etc.
         repeat (10) ne times

  ******* repeat (11)-(18) ng times ***********

     (11) (S(i,j),j=1,3),T(i)    (*)
            S :transformation matrix of the coordinate (integer)
            T :translation vector
             repeat (11) three times (i=1,2,3)
  ********************************************

     (12) atom selection   ias(1)-ias(na)   (80i1)
         ias(i):1 i-th atom is selected, :0 neglected
     (13) hp,xp,amgn,xvp
         hp(1)-hp(3) : projection axis
            hp = hp(1)a* + hp(2)b* + hp(3)c*
         xp(1)-xp(3) : y axis
         amgn  magnification of x,y,radius  (cm/angstrome)
               (default: 1.0)
          xvp  distance from visual point to origin (in angstrom)
               (default: 20.0)
     (14) lxmin,lxmax,lymin,lymax,lzmin,lzmax
          from a give atom with the coordinate x,y,z 
          atoms with the coordinates x+lx, y+ly, z+lz within the ranges
          lxmin<=lx<=lxmax,lymin<=ly<=lymax,lzmin<=lz<=lzmax are generated
          (for quasicrystals, lxmin=lxmax=lymin=lymax=lzmin=lzmax=0)
     (15) fxyz
          fxyz(1)-fxyz(3): fixed point for rotation etc.
                           (origin of the plotter system)
              ******* data for choosing shells in the cluster *********
              we can choose atoms which construct a cluster by rmin,rmax,
              zmin,zmax,iaslct,jaslct specified below
  
     (16) nb,nclc
          nb : number of shells   ( 0 < nb )
          nclc: number of cluster centers
     (17) hb
          hb(1)-hb(3): projection axis  
     (17') xo,rmin,rmax,jc,zmin,zmax,ns0
              hb = hb(1)a* + hb(2)b* + hb(3)c*
          xo(1)-xo(3): center of the cluster
              xo = xo(1)a  + xo(2)b  + xo(3)c
          rmin  minimum radius of the shell in angstrome
          rmax  maximum radius of the shell in angstrome
          jc : 0 place cluster center at the origin
               1 place cluster center at average of xo
             **** added
          ns0  : symmetry operator number which is applied to xo
                 if centrosymmetric and it is rotoinversion
                 give nsymo+ns for ns0
                 ns0=1 means identity operation
          ********** repeat (17') nclc times ************

     (18) shiftx,shifty
          sift of origin (in cm) before plot
  **************if iwb=1 skip (19,20)************
     (19)  np,iaslct
           np  number of element pairs to be joined by bonds(<=20)
           iaslct 0,1,2, or 3 for no selection,
                  select by element No, OD No  or serial No.
           iaslct=0 means all atoms are selected.
           for iaslct>0 give jaslct in (21) for choosing atoms or ODs
     (20) ie1,ie2,dmin,dmax,bwdt,bcol
         ie1,ie2  element pair to be joined by a line (bond)
         dmin     min. distance to be joined
         dmax     max. distance to be joined
         bwdt     bond width (pen number)
         bcol     bond color (for color display)
            ***** if iaslct=0 skip (21)
     (21)  jaslct (80i1)
           (for iaslct=1) 1 for selected element 0 others
           (for iaslct=2) 1 for selected OD 0 others
           (for iaslct=3) 1 for selected atom (serial No.) 0 others
           repeat (20) np times
           repeat (16)-(20) nb times
******************limiting conditions******************************
      maximum number of atoms in a unit cell   namax
      maximum number of atoms in each elements namax/ne
*******************************************************************




File translated from TEX by TTH, version 3.02.
On 16 Aug 2005, 08:50.