QUANTXS - documentation ----------------------- R.J.Allan SERC, Daresbury Laboratory, Warrington, WA4 4AD, U.K. These notes are intended to contain helpful information for using the program QUANTXS. The program solves the close-coupled scattering equations in the diabatic formulation, and uses the log- derivative method as first described by Johnson (1973). Unfortunately Johnson never published the derivation of his algorithm, which used a difficult invariant-embedding method. Manolopoulos (1986) found a much simpler and illuminating derivation as part of his Ph.D. work at Cambridge. He was also able to propose a much improved family of algorithms, one of which is included in this code. The present code owes much to the work of K.-E. Thylwe who wrote the first version whilst working in Kaiserslautern in 1983. That was intended specifically for studying resonances in two and three state problems. Since then the propagator has been extended to work over a range of angular momenta (a batch) at each step of the integration by the present author. This greatly speeds up the solution. A maximum batch size of 200 was found useful, but larger cases can be treated by increasing the number of batches. The code driver is built to do this, and accumulates the sums over the S- matrix to compute total and differential cross sections. In addition a method of interpolation is used for larger cases. We have handled systems of up to 10,000 partial waves by computing, say, every ten for the higher batches and interpolating using the cubic spline method. Some suggestions in the literature of various fitting methods were tried and not found to be successful or indeed easy to implement. The main problem in separating the modulus and phase of the complex S-matrix is in the arbitrary number of rotations by 2 pi in the complex plane. We know that smooth functions could however be used to interpolate modulus and phase separately in the eigenphase representation of the S-matrix, as was done in a 2-state case and in the method of ??. In order to run the code you will need a workstation or computer running the UNIX operating system, and a standard Fortran- 77 compiler. The data must be prepared in a format as described below; this can be done using the EIKONXS program in some cases. You will find that the notes here are not entirely accurate. Please let me know of any discrepancies between what is written, and the actual code, and I will try to make corrections. Please also let me know of any improvements which you make to the code so that these may also be included. Introduction, Theory of Low-energy charge transfer The QUANTXS code solves the close-coupled scattering equations in the diabatic potential-coupling representation using the log- derivative method. Theory, Quantal wavefunctions and translation factor Transformation to Diabatic Basis Data which has been calculated in tha adiabatic basis, which is the usual case, may be transformed to the required diabatic basis using the EIKONXS program. To do this successfully the data must include a translation factor so that all coupling elements vanish asymptotically, otherwise the integral over R for the diabatisation will simply not converge. Note that this is just a numerical prescription, and no special physical significance should be attached to the diabatic states themselves. You can use any presciption to arrive at a set of coupled equations of the required first-order potential coupling form illustrated in Johnson's paper. Ad-hoc ways to calculate diabatic states from first principles, which do not relate to the equivalant adiabatic states, have not been found to work as the remaining diabatic coupling may be very sensitive to a number of interactions in a multi-channel system. Below is an example of input data to the DIAB module of program EIKONXS. This was for a 7-channel NaH+ calculation. The documentation should be consulted for further details. 2 diab DIAB 0. alpha -0.18848 -0.125 -0.125 -0.11051 -0.07159 -0.125 -0.11155 0 0 0 0 0 1 1 0 0 1 1 1 1 1 0.1 F 50.0 STOP Representation as Potential Scattering The Log-derivative Algorithm See Johnson (1973). The Improved Log-derivative Method See Manolopoulos (1985). I. General use of the Program ----------------------------- Makefile. The program is compiled using a makefile, typically as follows: #SUN-4 definitions FC= f77 FFLAGS= -O3 OBJECTS =\ coulfg.o\ matrix.o\ srdiag.o\ coupke.o\ sbesel.o\ spline8.o\ gamma.o\ bessik.o all: coupke.out coupke.out: $(OBJECTS) fc -o coupke.out $(OBJECTS) .f.o: ; $(FC) -c $(FFLAGS) $*.f The program uses a number of files for its input data, work data and output. These follow the same system and names as the EIKONXS program and the relevant ones are: lu = 2; tango.dat scattering matrix on output lu = 5; coupke.con control file lu = 6; lu = 8; diab.dat input data file lu = 9; copys.dat General format of input description file coupke.con nnodes, name i2,a30 ; number of processors and directory of data files version a8 ; COUPKE, COUPDB list l1 ; set to T for intermediate output step f12.5 ; step in R for propagator rstart f12.5 ; start of propagation rend f12.5 ; end of propagation rmabc r12.5 ; reduced mass in a.u. nopen, nclose 2i2 ; number of open and closed channels at this energy ve0 e12.5 ; in a.u., velocity relative to zero point vestep e12.5 ; ignored at present ne i2 ; ignored efin(i),i=1,ns 8g12.5 ; energies of states in a.u., relative to zero point zfin(i),i=1,ns 8g12.5 ; asymptotic charge state defines Coulomb potential dcsfl a8 ; next three lines only if this is DCS teta f12.5 ; first angle tstep f12.5 ; increment of angle nteta i2 ; number of angles nialt(i),lio(i),limax(i) 3i4 ;number of l, smallest and largest l ;repeat this until all done ! 0 ; a blank line or 0 Example input file 2 coupke COUPDB T 6.0 1.2 40.0 11.5 2 0 0.02 0.025 2 efin zfin TOTAL 20 0 200 0 II. Use of Specific subroutines ------------------------------- Module Purpose section bessik.f calculation of Bessel functions 1 coulfg.f calculation of Coulomb functions 2 coupke.f main program, Log-derivative propagator 3 gamma.f calculation of gamma and log gamma 4 matrix.f matrix utilities 5 sbesel.f calculation of semiclassical Bessel functions 6 spline8.f spline routines 7 srdiag.f diagonalisation routine 8 1 bessik.f A set of routines for calculating Bessel functions. Bessel wavefunctions are the correct asymptotic solution to the scattering problem with zero charges and are used to match the gradient and value of the log-derivative solutions to obtain the K-matrix. bessik.f:36: SUBROUTINE RBESI(DNU,N,X,BI,IER) bessik.f:287: SUBROUTINE CBESI(DNU,N,Z,BI,IER) bessik.f:326: SUBROUTINE CBESI1(DNU,N,Z,X,Y,RHO,BI,IER) bessik.f:440: SUBROUTINE CBESI2(DNU,N,Z,X,Y,RHO,BI,IER) bessik.f:617: SUBROUTINE RBESK(DNU,N,X,BK,IER) bessik.f:907: SUBROUTINE CBESK(DNU,N,Z,BK,IER) bessik.f:985: SUBROUTINE CBESK1(ENU,Z,X,RHO,BI1,BI2,BK1,BK2,MINF) bessik.f:1093: SUBROUTINE CBESK2(ENU,Z,X,RHO,BI1,BI2,BK1,BK2,MINF) bessik.f:1166: SUBROUTINE CBESK3(ENU,Z,X,RHO,BK1,BK2,MINF) 2 coulfg.f Routine for calculating Coulomb wavefunctions. This is the program of Barnett (1981) which uses an enhanced version of Steed's method in the previously published RCWFN program. Coulomb wavefunctions are the correct asymptotic solution to the scattering problem with non-zero charges and are used to match the gradient and value of the log-derivative solutions to obtain the K-matrix. coulfg.f:1: SUBROUTINE COULFG(XX,ETA1,XLMIN,XLMAX, FC,GC,FCP,GCP, coulfg.f:277: SUBROUTINE JWKB(XX,ETA1,XL,FJWKB,GJWKB,IEXP) 3 coupke.f This is the main driving program of the whole QUANTXS code. It takes the input data described above and invokes the other routines to perform the calculation. coupke.f:1: MAIN() coupke.f:262: SUBROUTINE LOGDEV(T,NTOT,NOPEN,NCLOSE,L10,L1MAX,LSTEP) coupke.f:453: SUBROUTINE LOGDB(T,NTOT,NOPEN,NCLOSE,L10,L1MAX,LSTEP) coupke.f:662: SUBROUTINE RMATRX(R,NOPEN,L,RMAT,ICMAX) coupke.f:722: SUBROUTINE SMATRX(NOPEN,RMAT,SMAT,A,B,NDIM,T,L1) coupke.f:796: SUBROUTINE POTM(RACT,NTOT,V) 4 gamma.f Assorted subroutines to calculate the real and complex gamma and log-gamma functions. SUBROUTINE GAMMA(N,X,Y,GR,GI) COMPLEX FUNCTION CLGAM(CZ) double precision function dgamma(x) double precision function dlgama(x) 5 matrix.f Assorted routines to perform real and complex matrix inversion and multiplication. matrix.f:1: SUBROUTINE MATINV(NORDER,A,DET,NDIM) matrix.f:74: SUBROUTINE CMATIN(NORDER,A,DET,NDIM) matrix.f:143: SUBROUTINE MATMUL(NSIGN,C,A,B,NDIM) matrix.f:158: SUBROUTINE MATMIN(NN,C,A,B,NDIM) 6 sbesel.f More routines to calculate Bessel functions. This can invoke a semiclassical method for certain ranges of arguments (i.e. uses the WKB method and Airy function). sbesel.f:1: SUBROUTINE SBESEL(SX,LMAX,SNEU,SBES) sbesel.f:84: SUBROUTINE SBESU(X,XL,XBES,XNEU,XBESP,XNEUP) sbesel.f:129: SUBROUTINE SNEUM(SX,LMAX,SNEU,KEY,LA,LI) sbesel.f:167: SUBROUTINE SBESS(SX,LMAX,SNEU,SBES,KEY,LA) sbesel.f:213: SUBROUTINE AIRY(X,AI,AIP,BII,BIIP) sbesel.f:225: SUBROUTINE DIAIRY (DX, AI, AIP, BI, BIP, PIGI, PIGIP, PIHI, PIHIP, AINT, 7 spline8.f Cubic Spline interpolation routines. These are the ones published by Gaussorgues et al. (1975) as part of the PAMPA program. spline8.f:1: SUBROUTINE SPLINE(N,X,Y,CM,ALPHA,BETA,B) spline8.f:107: SUBROUTINE TRIDIA(ALPHA,BETA,GAMMA,B,X,N) spline8.f:288: SUBROUTINE INITIN(N,X,Y,CM,CI) spline8.f: FUNCTION SPL(N,X,Y,M,T) spline8.f: FUNCTION SPLP(N,X,Y,M,T) spline8.f: FUNCTION SPLP2(N,X,Y,M,T) 8 srdiag.f Matrix diagonalisation routines. DIAG uses a QR transform method for real symmetric matrices. It is somewhat slower, but has been found to be more robust, than the previously used Givens- Householder method DGIVEN. The routine DGIVEN in this file is just an interface which uses the same calling arguments to invoke DIAG. You can replace it with the full DGIVEN routine to compare the results. srdiag.f:1: SUBROUTINE DIAG (M,N,A,D,X) srdiag.f:242: SUBROUTINE DGIVEN(NH,NV,NL,H,B,ROOT,VECT,WWW) References ---------- [1] B.R.Johnson "The Multichannel Log-derivative method for scattering calculations"J. Comp. Phys. 13 (1973) 445-449 [2] D.E.Manolopoulos "An improved Log-derivative method for Inelastic Scattering" J. Chem. Phys 85 (1986) 6425-9 [3] A.R.Barnett "COULFG: Coulomb and Bessel functions and their derivatives for real arguments, Steed's method" Comp. Phys. Comm. 27 (1982) 147 [4] R.J.Allan "Introduction to charge-transfer theory and calculations, and documentation for the EIKONXS program (parallel version)" Daresbury Laboratory () [5] F.T.Smith "Diabatic and Adiabatic representations for atomic collision problems" Phys. Rev. A 179 (1969) 111-23 [6] M.Gargaud 1980 These de 3e cycle de l'universite de Bordeaux [7] R.J.Allan and H.J.Korsch "Two-state curve-crossing Processes involving rotational Coupling in the Na2+ molecular Ion" Z. fur Physik A 310 (1985) 191-205 [8] R.J.Allan "He+(1s) -> He+(1s) charge-transfer Collisions" J. Phys. B 19 (1986) L683-9 [9] R.J.Allan and R.E.S.Clegg "MgH+ Charge Transfer and MgI line Strengths in Gaseous Nebulae" Mon. Not. R. astr. Soc. 235 (1988) 1245-55 [10] A.R.Barnett "COULFG: Coulomb and Bessel functions and their derivatives, for real arguments, by Steed's method" Computer Phys. Comm. 27 (1981) 147-66 [11] C.Gaussorgues, R.D.Piacentini and A.Salin "Multistate molecular treatment of atomic collisions in the impact-parameter approximation. I - integration of coupled equations and calculation of transition amplitudes for the straight-line case" Comp. Phys. Comm. 10 (1975) 223-233