      subroutine oneout (title,dmax,conang,conver,isearc,iatom,vez,cel, ONEO001
     &     isystm,isyst,igr,icent,ibravl,ispa,t,cosi,revdat,icomp,avern)ONEO002
c ----------------------------------------------------------------------ONEO003
c     write first part of output from SEXIE, decode control parameters  ONEO004
c ----------------------------------------------------------------------ONEO005
c     This program module is part of the PhysiSoft X-ray Library        ONEO006
c     and may not be sold or reproduced for commercial purposes.        ONEO007
c     Although it has been tested carefully, there is no warranty       ONEO008
c     regarding accuracy or freedom from side-effects.                  ONEO009
c                   (C) 1986-1994 Bernhard Rupp                         ONEO010
c     Last revison december 94 : import version number as a parameter   ONEO011
c ----------------------------------------------------------------------ONEO012
                                                                        ONEO013
      character sys$*12,bra$*13,nul*7,f*13,bcc*15,fmt3*5,revdat*8       ONEO014
      character rh*30,tv*22,title*60,lv,an,de,fms1*26,fmt1*10,fmt2*8    ONEO015
      character avern*3                                                 ONEO016
      character icomp*4                                                 ONEO017
      integer igr(36)                                                   ONEO018
      dimension cel(6),sys$(7),bra$(7),f(3)                             ONEO019
                                                                        ONEO020
      data (sys$(i),i=1,7)/ 'monoclinic  ', 'orthorhombic',             ONEO021
     &'rhombohedral', 'tetragonal  ',  'cubic       ',                  ONEO022
     &'hexagonal   ', 'triclinic   '/                                   ONEO023
                                                                        ONEO024
      data (bra$(i),i=1,7)/ 'primitive    ',  'body centered',          ONEO025
     &'rhombohedral ', 'face centered', 'A-centered   ',                ONEO026
     &'B-centered   ', 'C-centered   '/                                 ONEO027
      data nul/'(0,0,0)'/                                               ONEO028
      data (f(i),i=1,3)/', (0,1/2,1/2)',', (1/2,0,1/2)',', (1/2,1/2,0)'/ONEO029
      data bcc/', (1/2,1/2,1/2)'/                                       ONEO030
      data rh/', (1/3,2/3,2/3), (2/3,1/3,1/3)'/                         ONEO031
      data tv/' Translation vectors : '/                                ONEO032
                                                                        ONEO033
      fmt1='(1x,a1,a,i'                                                 ONEO034
      fmt2=',a,12a1,'                                                   ONEO035
      fmt3='x,a1)'                                                      ONEO036
                                                                        ONEO037
      if (icomp.eq.'IBM ') then                                         ONEO038
         lv=char(179)                                                   ONEO039
         an=char(143)                                                   ONEO040
         de=char(248)                                                   ONEO041
      elseif (icomp.eq.'VAX ') then                                     ONEO042
         lv='|'                                                         ONEO043
         an=char(197)                                                   ONEO044
         de=char(176)                                                   ONEO045
      else                                                              ONEO046
         lv='|'                                                         ONEO047
         an='A'                                                         ONEO048
         de=' '                                                         ONEO049
      end if                                                            ONEO050
                                                                        ONEO051
      call clrscr (icomp)                                               ONEO052
                                                                        ONEO053
      do 9001 ipr=6,7                                                   ONEO054
      call frames (ipr,1,icomp)                                         ONEO055
      write(ipr,'(1x,a1,26x,a,26x,a1)')lv,'P R O G R A M   S E X I E',lvONEO056
      call frames (ipr,2,icomp)                                         ONEO057
      write(ipr,'(1x,a1,8x,a,a,8x,a1)')lv,'Calculation of Coordination',ONEO058
     & ' Shells and Interatomic Distances ',lv                          ONEO059
      write(ipr,'(1x,a1,25x,a,26x,a1)')lv,'       Bernhard Rupp      ', ONEO060
     & lv                                                               ONEO061
      write(ipr,'(1x,a1,23x,a,a,a,a,24x,a1)')lv,'Version ',avern,       ONEO062
     & ', Revision ',revdat   ,lv                                       ONEO063
      write(ipr,'(1x,a1,11x,a,a,12x,a1)')lv,'Proprietary code of Physi',ONEO064
     & 'Soft Corporation (C) 1988-93 ',lv                               ONEO065
      call frames (ipr,2,icomp)                                         ONEO066
      write(ipr,'(1x,a1,a,a60,8x,a1)')lv,' Title : ',title,lv           ONEO067
      write(ipr,'(1x,a1,a,55x,a1)')lv,' Control parameters : ',lv       ONEO068
                                                                        ONEO069
      if (iatom.gt.0.and.dmax.gt.0) then                                ONEO070
         write(ipr,'(1x,a1,a,f5.2,1x,a1,30x,a1)') lv,                   ONEO071
     &   ' Maximum distance range for calculation ', dmax, an,lv        ONEO072
         write(ipr,'(1x,a1,a,a,f6.3,1x,a1,3x,a1)') lv,                  ONEO073
     &   ' Maximum deviation for considering atoms to be in a common',  ONEO074
     &   ' shell :',conver,an,lv                                        ONEO075
         if (isearc.eq.1) then                                          ONEO076
         write(ipr,'(1x,a1,a,f6.2,1x,a1,12x,a1)') lv,                   ONEO077
     &   ' Maximum deviation for considering angles to be special :',   ONEO078
     &   conang, de,lv                                                  ONEO079
         write(ipr,'(1x,a1,a,36x,a1)') lv,                              ONEO080
     &   ' Search for coordination geometry enabled',lv                 ONEO081
         else                                                           ONEO082
         write(ipr,'(1x,a1,a,35x,a1)') lv,                              ONEO083
     &   ' Search for coordination geometry disabled',lv                ONEO084
         end if                                                         ONEO085
      elseif (iatom.eq.0) then                                          ONEO086
         write(ipr,'(1x,a1,a,28x,a1)') lv,                              ONEO087
     &   ' No atom card detected - space group decoding only',lv        ONEO088
      end if                                                            ONEO089
                                                                        ONEO090
      call frames (ipr,2,icomp)                                         ONEO091
      write(ipr,'(1x,a1,a,a1,a,a1,a,a1,a,29x,a1)') lv,                  ONEO092
     &' Unit cell dimensions in ',an,', deg(',de,') and cubic ',        ONEO093
     & an,' :',lv                                                       ONEO094
      call frames (ipr,2,icomp)                                         ONEO095
      write(ipr,'(1x,a1,a,5x,a1)') lv,                                  ONEO096
     & '      a         b         c       alpha     beta      gamma     ONEO097
     & volume ',lv                                                      ONEO098
      write (ipr,'(1x,a1,3(1x,f9.4),3(1x,f9.3),f12.3,5x,a1)') lv,       ONEO099
     & (cel(i),i=1,6), vez, lv                                          ONEO100
                                                                        ONEO101
      call tensor (cel,t,cosi,ipr,icomp)                                ONEO102
      write (ipr,'(/,2x,a,/)') 'Space group decoding follows'           ONEO103
                                                                        ONEO104
      call frames (ipr,1,icomp)                                         ONEO105
      if (ispa.ne.0) then                                               ONEO106
         izap=int(ilog10(ispa))+1                                       ONEO107
         write(fms1,'(a10,i1,a8,i2,a5)') fmt1,izap,fmt2,45-izap,fmt3    ONEO108
         write(ipr,fms1) lv,                                            ONEO109
     &         ' Space group Nr. ',ispa,' : ',(igr(i),i=1,12),lv        ONEO110
      else                                                              ONEO111
         write(ipr,'(1x,a1,a,12a1,50x,a1)') lv,                         ONEO112
     &         ' Space group : ',(igr(i),i=1,12),lv                     ONEO113
      end if                                                            ONEO114
      call frames (ipr,2,icomp)                                         ONEO115
                                                                        ONEO116
      isy=isystm                                                        ONEO117
      if (isy.eq.3) isy=6                                               ONEO118
      write (ipr,'(1x,a1,a,a,18x,a1)') lv,                              ONEO119
     & ' System as decoded from unit cell dimensions : ',sys$(isystm),lvONEO120
      if (isyst.eq.isy) then                                            ONEO121
         write (ipr,'(1x,a1,a,12a1,33x,a1)') lv,                        ONEO122
     &    ' is consistent with space group ',(igr(i),i=1,12) ,lv        ONEO123
      else                                                              ONEO124
         write (ipr,'(1x,a1,a,12a1,29x,a1)') lv,                        ONEO125
     &    ' is not consistent with space group ',(igr(i),i=1,12) ,lv    ONEO126
      end if                                                            ONEO127
      if (icent.eq.1) then                                              ONEO128
         write(ipr,'(1x,a1,a,30x,a1)') lv,                              ONEO129
     &   ' Centrosymmetric structure (X,Y,Z) = (-X,-Y,-Z)',lv           ONEO130
      else                                                              ONEO131
         write(ipr,'(1x,a1,a,47x,a1)') lv,                              ONEO132
     &   ' Non centrosymmetric structure',lv                            ONEO133
      end if                                                            ONEO134
                                                                        ONEO135
      write(ipr,'(1x,a1,a,a,43x,a1)') lv,                               ONEO136
     &' Bravais translation ',bra$(ibravl),lv                           ONEO137
      if (ibravl.eq.2) then                                             ONEO138
         write(ipr,'(1x,a1,a,a,a,33x,a1)') lv,tv,nul,bcc,lv             ONEO139
      elseif (ibravl.eq.3) then                                         ONEO140
         write(ipr,'(1x,a1,a,a,a,18x,a1)') lv,tv,nul,rh,lv              ONEO141
      elseif (ibravl.eq.4) then                                         ONEO142
         write(ipr,'(1x,a1,a,a,a,a,a,9x,a1)')lv,tv,nul,(f(i),i=1,3),lv  ONEO143
      else                                                              ONEO144
         do 0001,i=5,7                                                  ONEO145
            if (ibravl.eq.i) write(ipr,'(1x,a1,a,a,a,35x,a1)')          ONEO146
     &          lv,tv,nul,f(i-4),lv                                     ONEO147
 0001    continue                                                       ONEO148
      end if                                                            ONEO149
      call frames (ipr,2,icomp)                                         ONEO150
 9001 continue                                                          ONEO151
      return                                                            ONEO152
      end                                                               ONEO153
