C #AQMLP   V1A   15-FEB-72.
C  LAST UPDATE:
C
      FUNCTION AQMLP(N,ME,LE,K)
C
C *PURPOSE.
C	TO EVALUATE TRANSFORMATION COEFFICIENTS BETWEEN SPHERICAL
C HARMONIC OSCILLATOR STATES AND CYLINDRICAL OSCILLATOR STATES.
C THIS ROUTINE IS USED IN PARTICULAR BY "TBMOS3" IN THE CALCULATION
C OF THE GENERAL MOSHINSKY BRACKET IN 3-DIMENSIONS.
C
C *PARAMETERS:
C
C  N   - INTEGER RADIAL QUANTUM NUMBER.
C  ME  - INTEGER AZIMUTHAL COMPONENT OF ANGULAR MOMENTUM.
C  LE  - INTEGER ANGULAR MOMENTUM QU-NR.
C  K   - ADDITIONAL QUANTUM NUMBER - SEE BELOW.
C
C NOTE!!  BY CONVENTION ALL ANGULAR MOMENTUM QUANTUM NUMBERS ARE
C INTEGERS WITH TWICE THEIR PHYSICAL VALUES.  THIS APPLIES TO "ME"
C AND "LE" ABOVE.  ALSO RADIAL QUANTUM NUMBERS ARE DEFINED SO "N"=0
C IS THE LOWEST STATE.
C
C  NOTE:  THE COEFFICIENTS ARE DEFINED BY THE PROPERTY:
C
C	I N,L,M > = SIGMA [ A(Q,M,L,K) * I Q,M,K > ]
C
C WHERE THE SUM IS OVER "K" FROM "-M" TO "(Q-M)/2" EXCLUDING
C NEGATIVE VALUES.  THE STATE  I N,L,M > IS A SPHERICAL OSCILLATOR
C STATE WITH QU-NRS AS GIVEN ABOVE.  THE STATE  I Q,M,K > IS A
C NORMALIZED CYLINDRICAL STATE BEING A PRODUCT OF 1-DIMENSIONAL
C STATES AS:
C	IN THE Z DIRECTION (Q-M-2*K) QUANTA
C	IN THE (X+IY) DIRECTION  (M+K) QUANTA
C	IN THE (X-IY) DIRECTION  K  QUANTA
C THE QUANTUM NUMBER "Q" ABOVE IS "(2*N+L)" THE MAJOR SHELL NR.
C
C INPUT PARAMETERS:
C	N, ME, LE, K
C OUTPUT PARAMETERS:
C	(REAL FUNCTION VALUE ONLY)
C
C *METHOD.
C	A SINGLE SUMMATION FORMULA INVOLVING FACTORIALS HAS
C BEEN DERIVED BY D.M.BRINK.  SEE NOTES TO "TBMOS3" FOR REFERENCES.
C	THE SUM IS EVALUATED BY DOING THE FIRST TERM EXPLICITLY
C AND USING A SIMPLE RECURRENCE FOR SUCCESSIVE TERMS.
C
C *ACCURACY.
C	THIS HAS NOT BEEN TESTED IN DETAIL BUT IT IS BELIEVED THAT
C THE MACHINE SIGNIFICANCE IS THE LIMITING FACTOR AT LEAST FOR
C SMALL QUANTUM NUMBERS.
C
C *RESTRICTIONS.
C	THERE IS NO CHECK THAT THE QUANTUM NUMBERS MAKE PHYSICAL
C SENSE!
C
C *ERROR CONDITIONS.
C
C *NON STANDARD ROUTINES CALLED.
C	FCTOR - FACTORIAL OF INTEGER ARGUMENT - MRMLIB
C	PARITY- + OR -1 AS ARGUMENT EVEN OR ODD - MRMLIB.
C
C *TYPICAL TIMES.
C
C *ORIGIN.
C	SEE NOTE ON "TBMOS3".  THIS ROUTINE BY M.R.MANNING.
C
C *COMMENTS.
C	THE CYLINDRICAL STATES USED HERE IN THE DIMENSIONS X AND Y
C ARE SIMPLY RELATED TO THE NORMAL ONES EXPRESSED IN TERMS OF
C A RADIAL QU-NR AND THE AZIMUTHAL ONE "M".
C
C #END.
C
      INTEGER  Q,P,D,R
      AQMLP=0.
      L=LE/2
      Q=N+N+L
      P=K
      M=ME/2
      IF(M)  10,20,20
C  ENSURE M POSITIVE
10    P=P+M
      M=-M
20    IF(M-L)  21,21,100
21    COM=FLOAT((LE+1)*2**(Q-M) )*FCTOR(N+L)*FCTOR(L+M)
     X    *FCTOR(M+P)/FCTOR(Q+L+1)
      DIF=FCTOR(Q-M-P-P)*FCTOR(N)/(FCTOR(P)*FCTOR(L-M) )
      D=P-N
      IF(D)  30,30,40
C  TWO FORMS FOR FIRST TERM IN SERIES BEING SUMMED.
C  P.LE.N
30    TRM=PARITY(P)*SQRT(COM*DIF)/(FLOAT(2**(-D))*FCTOR(M)*FCTOR(-D) )
      R=0
      GO TO 50
C  P.GT.N
40    TRM=PARITY(N)*SQRT(COM/DIF)/(FLOAT(2**D)*FCTOR(D)*FCTOR(M+D) )
      R=D
50    AQMLP=AQMLP+TRM
      T=(P-R)*(R+R+M-L)*(R+R+1+M-L)
      IF(T)  100,100,55
55    R=R+1
      S= 4*(R - D)*(R + M)*R
      TRM= -TRM*T/S
      GO TO 50
C
100   RETURN
      END
�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������