      subroutine getctr (dmax,cona,conv,isearc,disoct,iwater)           GETC001
c ----------------------------------------------------------------------GETC002
c     get the control parameters for SEXIE                              GETC003
c ----------------------------------------------------------------------GETC004
c     This program module is part of the PhysiSoft X-ray Library        GETC005
c     and may not be sold or reproduced for commercial purposes.        GETC006
c     Although it has been tested carefully, there is no warranty       GETC007
c     regarding accuracy or freedom from side-effects.                  GETC008
c                   (C) 1986-1990 Bernhard Rupp                         GETC009
c ----------------------------------------------------------------------GETC010
      parameter (ipr=6)                                                 GETC011
      character answ                                                    GETC012
                                                                        GETC013
 7001 write(ipr,'(/a$)')'  Enter the maximum coordination distance to beGETC014
     & calculated in A : '                                              GETC015
      read (*,'(f6.0)',err=7001) dmax                                   GETC016
      if (dmax.lt.3.0) then                                             GETC017
         write(ipr,*)' That does not make much sense, ehh ? ',dmax      GETC018
         goto 7001                                                      GETC019
      elseif (dmax.gt.15.0) then                                        GETC020
         write(ipr,*)' Beyond 20 A coordination shells tend to converge GETC021
     &into a continuum of distances'                                    GETC022
         write (ipr,'(a$)')'  Really use that value (Y/N) : '           GETC023
         call inkey (answ)                                              GETC024
         if (answ.ne.'Y') goto 7001                                     GETC025
      end if                                                            GETC026
                                                                        GETC027
c --- range (width) of shell -                                          GETC028
 7002 write(ipr,'(/a)')'  Maximum deviation for considering atoms to be GETC029
     &in a common shell'                                                GETC030
      write(ipr,'(a$)')'  (i.e. coordination shell width) in Angstroem :GETC031
     & '                                                                GETC032
      read (*,'(f6.0)',err=7002) conv                                   GETC033
      if (conv.lt.0.0001) then                                          GETC034
         write (ipr,*)' Coordination shell range set to 0.0001 A'       GETC035
         conv=0.0001                                                    GETC036
      elseif (conv.gt.0.5) then                                         GETC037
         write(ipr,*)' Seems somewhat wide, or ? ',conv                 GETC038
         write(ipr,*)' You might merge a lot of distinguishable shells iGETC039
     &nto one broad range'                                              GETC040
         write (ipr,'(a$)')'  Really use that value (Y/N) : '           GETC041
         call inkey (answ)                                              GETC042
         if (answ.ne.'Y') goto 7002                                     GETC043
      end if                                                            GETC044
                                                                        GETC045
c --- number of coordination shells                                     GETC046
      write(ipr,'(/a$)')'  Search for coordination polyhedra (Y/N) : '  GETC047
      call inkey(answ)                                                  GETC048
      if (answ.eq.'Y') then                                             GETC049
         isearc=1                                                       GETC050
c ---    range of angles -                                              GETC051
 7003    write(ipr,'(/a$)')'  Maximum deviation for considering angles tGETC052
     &o be equal (deg) eg., 0.5 : '                                     GETC053
         read (*,'(f6.0)',err=7003) cona                                GETC054
         if (cona.lt.0.1.and.cona.ne.0.0) then                          GETC055
            write(ipr,*)' Seems a little bit small, ehh ? ',cona        GETC056
            write(ipr,*)' You might get a pretty long list of not reallyGETC057
     & different coordination angles'                                   GETC058
            write (ipr,'(a$)')'  Really use that value (Y/N) : '        GETC059
            call inkey (answ)                                           GETC060
            if (answ.ne.'Y') goto 7003                                  GETC061
         elseif (cona.gt.10.0) then                                     GETC062
            write(ipr,*) ' Pretty wide solid angle, isn''t it ? ',cona  GETC063
            write(ipr,'(a$)')'  Use that value (Y/N) : '                GETC064
            call inkey (answ)                                           GETC065
            if (answ.ne.'Y') goto 7003                                  GETC066
         end if                                                         GETC067
c ---    distorted octahedron search --                                 GETC068
 7004    write(ipr,'(/a$)')'  Distorted octahedron search cutoff (1 to aGETC069
     &bout 10 A make sense) : '                                         GETC070
         read (*,'(f6.0)',err=7004) disoct                              GETC071
      else                                                              GETC072
         isearc=0                                                       GETC073
         cona=0.05                                                      GETC074
         disoct=6.0                                                     GETC075
      end if                                                            GETC076
c --- no water search enabled                                           GETC077
      iwater=0                                                          GETC078
      return                                                            GETC079
      end                                                               GETC080
