      function g (xfm,n)
      Implicit  Real*8   (a-h,o-z)
c *** see RH Landau, Program lpott, 1981
c
c     thomas s sep pots for pin interactn 2 b used in Pauli
c
      q=xfm*xfm
      If(n.eq.4) GoTo 10
      If(n.eq.1) GoTo 20
      If(n.eq.5) GoTo 30
      If(n.eq.2) GoTo 40
      If(n.eq.6) GoTo 50
      If(n.eq.3) GoTo 60
c     set g=0 for d,f waves, i.e. no Pauli mod
      g=0.
      GoTo 101
c
c     s11
 10   qq=q+10.16245
      g=1.782555/qq
      qq=q+0.6765392
      g=g+0.0893673/qq
      GoTo 101
c
c     s31
 20   qq=q+11.43562
      g=6.078618/qq
      qq=q+1.226003
      g=g-.166086/qq
      GoTo 101
c
c     p11
 30   qq=q+1.152918
      g=.3959393/(qq*qq)
      g=g*xfm
      GoTo 101
c
c     p31
 40   qq=q+4.240288
      g=4.289725/(qq*qq)
      g=g*xfm
      GoTo 101
c
c     p13
 50   qq=q+1.546665
      g=1.556884/(qq*qq)
      qq=q+3.783998
      g=g+3.659448*q/(qq*qq)
      g=g*xfm
      GoTo 101
c
c     p33
 60   Continue
      qq=q+2.175711
      gg=.5403217/(qq*qq)
      qq=q+11.55941
      gg=gg+q*1.05832/(qq*qq)
      g=xfm*gg
      GoTo 101
 101  Continue
      Return
      End
