      SUBROUTINE ARCOI(L,R,V,VP,VPP)
      COMMON/CORREL/FAC
      COMMON/POTTST/KTEST
      COMMON/DTTA/RQ(3,12),Q(3,12),X(3,12),VC(3),VPC(3),VPPC(3)
     1  ,VL(3),VPL(3),VPPL(3),SCALEC
      DIMENSION RM(3,12)
      DIMENSION B(3,12)
      DIMENSION VCOR(3),VPCOR(3),VPPCOR(3)
      DIMENSION V(3),VP(3),VPP(3)
      DIMENSION VS(3),VPS(3),VPPS(3)
      DIMENSION EXC(12,3),C(5,12,3)
      DIMENSION C60(3),C62(3),C71(3),C73(3),C80(3),C82(3),C84(3)
      DIMENSION EXS(12,3),S(5,12,3)
      DIMENSION X12(12)
      COMMON/STRL/LLAST,RLAST,SAVE1(3),SAVE2(3),SAVE3(3)
      DATA SCALES/1.00/
      DATA B(1, 1)/ -.11276906122606E-01/,B(1, 2)/ -.14458243568950E+00/
      DATA B(1, 3)/ -.40742509878452E+00/,B(1, 4)/ -.83384327130929E+00/
      DATA B(1, 5)/ -.14191140046515E+01/,B(1, 6)/ -.19884527042476E+01/
      DATA B(1, 7)/ -.22592256644652E+01/,B(1, 8)/ -.21723563896740E+01/
      DATA B(1, 9)/ -.18924797621546E+01/,B(1,10)/ -.16170089540245E+01/
      DATA B(1,11)/ -.14198293194560E+01/,B(1,12)/ -.13132389094324E+01/
      DATA B(2, 1)/ -.78746112467578E+00/,B(2, 2)/ -.14538895396808E+01/
      DATA B(2, 3)/ -.32981591443978E+01/,B(2, 4)/ -.79347983685970E+01/
      DATA B(2, 5)/ -.13176603700320E+02/,B(2, 6)/ -.84029070203097E+01/
      DATA B(2, 7)/ -.44671426196573E+01/,B(2, 8)/ -.29060074651483E+01/
      DATA B(2, 9)/ -.22791518614406E+01/,B(2,10)/ -.20031441098636E+01/
      DATA B(2,11)/ -.18617381071683E+01/,B(2,12)/ -.17881364480132E+01/
      DATA B(3, 1)/  .45249123854298E+00/,B(3, 2)/  .28921454568906E+00/
      DATA B(3, 3)/  .55204879433078E-01/,B(3, 4)/ -.78378306371742E-01/
      DATA B(3, 5)/ -.33509818190108E-01/,B(3, 6)/  .11858467094965E-01/
      DATA B(3, 7)/ -.17903672762819E+00/,B(3, 8)/ -.40807133627468E+00/
      DATA B(3, 9)/ -.35661793330034E+00/,B(3,10)/ -.12260350539555E+00/
      DATA B(3,11)/  .65854979621024E-01/,B(3,12)/  .17146435165617E+00/
      DATA C60(1)/  78.22562/,C60(2)/  48.10180/,C60(3)/   4.76138/
      DATA C62(1)/   6.54362/,C62(2)/   9.49120/,C62(3)/   4.76138/
      DATA C71(1)/ -17.50678/,C71(2)/  34.97501/,C71(3)/ -10.88860/
      DATA C73(1)/  -3.06935/,C73(2)/  27.94994/,C73(3)/  -7.25906/
      DATA C80(1)/1442.42572/,C80(2)/ 843.01321/,C80(3)/  34.18866/
      DATA C82(1)/ 461.26965/,C82(2)/ 437.38328/,C82(3)/  28.10687/
      DATA C84(1)/  66.23255/,C84(2)/ -70.94023/,C84(3)/ -12.02524/
      DATA RM(1, 1)/  .6819111365835E+01/,RM(1, 2)/  .6729385731646E+01/
      DATA RM(1, 3)/  .6625923918661E+01/,RM(1, 4)/  .6484536022393E+01/
      DATA RM(1, 5)/  .6296843129122E+01/,RM(1, 6)/  .6113044927472E+01/
      DATA RM(1, 7)/  .6008307173794E+01/,RM(1, 8)/  .5995143030618E+01/
      DATA RM(1, 9)/  .6029586736751E+01/,RM(1,10)/  .6071794176296E+01/
      DATA RM(1,11)/  .6106583023358E+01/,RM(1,12)/  .6128641375208E+01/
      DATA RM(2, 1)/  .6299441355665E+01/,RM(2, 2)/  .6265054916878E+01/
      DATA RM(2, 3)/  .6183111185764E+01/,RM(2, 4)/  .6111525294376E+01/
      DATA RM(2, 5)/  .6410774608456E+01/,RM(2, 6)/  .6950904376501E+01/
      DATA RM(2, 7)/  .7027636599473E+01/,RM(2, 8)/  .6958847829994E+01/
      DATA RM(2, 9)/  .6857780503251E+01/,RM(2,10)/  .6744275183440E+01/
      DATA RM(2,11)/  .6638204432941E+01/,RM(2,12)/  .6575557047274E+01/
      DATA RM(3, 1)/  .7484001949789E+01/,RM(3, 2)/  .7425579604264E+01/
      DATA RM(3, 3)/  .7763115231019E+01/,RM(3, 4)/  .8080951128892E+01/
      DATA RM(3, 5)/  .8214262575706E+01/,RM(3, 6)/  .8279213271941E+01/
      DATA RM(3, 7)/  .8348865351320E+01/,RM(3, 8)/  .8301953256715E+01/
      DATA RM(3, 9)/  .7845580132143E+01/,RM(3,10)/  .7288828291337E+01/
      DATA RM(3,11)/  .6910802527061E+01/,RM(3,12)/  .6748255111830E+01/
      DATA X12( 1)/ -.98156063424670E+00/,X12( 2)/ -.90411725637040E+00/
      DATA X12( 3)/ -.76990267419430E+00/,X12( 4)/ -.58731795428660E+00/
      DATA X12( 5)/ -.36783149899810E-00/,X12( 6)/ -.12523340851140E-00/
      DATA X12( 7)/  .12523340851140E-00/,X12( 8)/  .36783149899810E-00/
      DATA X12( 9)/  .58731795428660E+00/,X12(10)/  .76990267419430E+00/
      DATA X12(11)/  .90411725637040E+00/,X12(12)/  .98156063424670E+00/
      DATA EXS( 1,1)/-.187575E+01/,S(1, 1,1)/ .386482E+04/,
     1      S(2, 1,1)/-.253935E+04/,S(3, 1,1)/ .577566E+03/,
     2      S(4, 1,1)/-.348016E+02/
      DATA EXS( 2,1)/-.178806E+01/,S(1, 2,1)/ .173624E+04/,
     1      S(2, 2,1)/-.113170E+04/,S(3, 2,1)/ .272300E+03/,
     2      S(4, 2,1)/-.178768E+02/
      DATA EXS( 3,1)/-.177521E+01/,S(1, 3,1)/ .785621E+03/,
     1      S(2, 3,1)/-.517340E+03/,S(3, 3,1)/ .136738E+03/,
     2      S(4, 3,1)/-.953945E+01/
      DATA EXS( 4,1)/-.177438E+01/,S(1, 4,1)/ .308862E+03/,
     1      S(2, 4,1)/-.199927E+03/,S(3, 4,1)/ .622422E+02/,
     2      S(4, 4,1)/-.477048E+01/
      DATA EXS( 5,1)/-.123455E+01/,S(1, 5,1)/ .307468E+02/,
     1      S(2, 5,1)/-.196513E+01/,S(3, 5,1)/-.652121E+00/,
     2      S(4, 5,1)/ .548185E-01/
      DATA EXS( 6,1)/-.120683E+01/,S(1, 6,1)/ .327742E+02/,
     1      S(2, 6,1)/-.626913E+01/,S(3, 6,1)/ .171647E+00/,
     2      S(4, 6,1)/ .133892E-01/
      DATA EXS( 7,1)/-.121061E+01/,S(1, 7,1)/ .377807E+02/,
     1      S(2, 7,1)/-.852362E+01/,S(3, 7,1)/ .480709E+00/,
     2      S(4, 7,1)/ .208289E-06/
      DATA EXS( 8,1)/-.136482E+01/,S(1, 8,1)/ .389481E+02/,
     1      S(2, 8,1)/ .220126E+01/,S(3, 8,1)/-.192353E+01/,
     2      S(4, 8,1)/ .133305E+00/
      DATA EXS( 9,1)/-.144338E+01/,S(1, 9,1)/ .372108E+02/,
     1      S(2, 9,1)/ .183703E+02/,S(3, 9,1)/-.523101E+01/,
     2      S(4, 9,1)/ .304293E+00/
      DATA EXS(10,1)/-.190322E+01/,S(1,10,1)/ .195814E+03/,
     1      S(2,10,1)/-.928989E+02/,S(3,10,1)/ .574070E+02/,
     2      S(4,10,1)/-.547606E+01/
      DATA EXS(11,1)/-.194650E+01/,S(1,11,1)/ .629890E+03/,
     1      S(2,11,1)/-.390852E+03/,S(3,11,1)/ .141202E+03/,
     2      S(4,11,1)/-.115658E+02/
      DATA EXS(12,1)/-.200174E+01/,S(1,12,1)/ .140838E+04/,
     1      S(2,12,1)/-.952578E+03/,S(3,12,1)/ .289597E+03/,
     2      S(4,12,1)/-.217978E+02/
      DATA EXS( 1,2)/-.198413E+01/,S(1, 1,2)/ .747964E+04/,
     1      S(2, 1,2)/-.470944E+04/,S(3, 1,2)/ .986342E+03/,
     2      S(4, 1,2)/-.570021E+02/
      DATA EXS( 2,2)/-.194056E+01/,S(1, 2,2)/ .312621E+04/,
     1      S(2, 2,2)/-.204233E+04/,S(3, 2,2)/ .454729E+03/,
     2      S(4, 2,2)/-.277914E+02/
      DATA EXS( 3,2)/-.194438E+01/,S(1, 3,2)/ .993374E+03/,
     1      S(2, 3,2)/-.717505E+03/,S(3, 3,2)/ .177931E+03/,
     2      S(4, 3,2)/-.115534E+02/
      DATA EXS( 4,2)/-.130931E+01/,S(1, 4,2)/-.173513E+02/,
     1      S(2, 4,2)/ .125509E+02/,S(3, 4,2)/-.211839E+01/,
     2      S(4, 4,2)/ .104745E+00/
      DATA EXS( 5,2)/-.138307E+01/,S(1, 5,2)/-.273867E+02/,
     1      S(2, 5,2)/ .130556E+02/,S(3, 5,2)/-.188608E+01/,
     2      S(4, 5,2)/ .859869E-01/
      DATA EXS( 6,2)/-.128664E+01/,S(1, 6,2)/-.215085E+02/,
     1      S(2, 6,2)/ .939752E+01/,S(3, 6,2)/-.127936E+01/,
     2      S(4, 6,2)/ .556801E-01/
      DATA EXS( 7,2)/-.127477E+01/,S(1, 7,2)/-.224390E+02/,
     1      S(2, 7,2)/ .106657E+02/,S(3, 7,2)/-.149097E+01/,
     2      S(4, 7,2)/ .647944E-01/
      DATA EXS( 8,2)/-.171657E+01/,S(1, 8,2)/ .141892E+02/,
     1      S(2, 8,2)/-.315263E+02/,S(3, 8,2)/ .122369E+02/,
     2      S(4, 8,2)/-.986982E+00/
      DATA EXS( 9,2)/-.176813E+01/,S(1, 9,2)/ .723980E+02/,
     1      S(2, 9,2)/-.737228E+02/,S(3, 9,2)/ .258939E+02/,
     2      S(4, 9,2)/-.203638E+01/
      DATA EXS(10,2)/-.183607E+01/,S(1,10,2)/ .304576E+03/,
     1      S(2,10,2)/-.225308E+03/,S(3,10,2)/ .659629E+02/,
     2      S(4,10,2)/-.483817E+01/
      DATA EXS(11,2)/-.191555E+01/,S(1,11,2)/ .102312E+04/,
     1      S(2,11,2)/-.686229E+03/,S(3,11,2)/ .175164E+03/,
     2      S(4,11,2)/-.119731E+02/
      DATA EXS(12,2)/-.201173E+01/,S(1,12,2)/ .255422E+04/,
     1      S(2,12,2)/-.169433E+04/,S(3,12,2)/ .405076E+03/,
     2      S(4,12,2)/-.260782E+02/
      DATA EXS( 1,3)/-.225714E+01/,S(1, 1,3)/-.279774E+04/,
     1      S(2, 1,3)/ .512405E+04/,S(3, 1,3)/-.192092E+04/,
     2      S(4, 1,3)/ .218163E+03/
      DATA EXS( 2,3)/-.238685E+01/,S(1, 2,3)/-.147394E+05/,
     1      S(2, 2,3)/ .140230E+05/,S(3, 2,3)/-.421435E+04/,
     2      S(4, 2,3)/ .417913E+03/
      DATA EXS( 3,3)/-.232771E+01/,S(1, 3,3)/-.464127E+04/,
     1      S(2, 3,3)/ .413504E+04/,S(3, 3,3)/-.120517E+04/,
     2      S(4, 3,3)/ .116436E+03/
      DATA EXS( 4,3)/-.114608E+01/,S(1, 4,3)/-.576925E+01/,
     1      S(2, 4,3)/ .165673E+01/,S(3, 4,3)/-.111229E+00/,
     2      S(4, 4,3)/ .168217E-06/
      DATA EXS( 5,3)/-.781688E+00/,S(1, 5,3)/-.192129E+01/,
     1      S(2, 5,3)/ .728871E+00/,S(3, 5,3)/-.905517E-01/,
     2      S(4, 5,3)/ .370025E-02/
      DATA EXS( 6,3)/-.147690E+01/,S(1, 6,3)/ .155634E+02/,
     1      S(2, 6,3)/-.116623E+02/,S(3, 6,3)/ .228503E+01/,
     2      S(4, 6,3)/-.130891E+00/
      DATA EXS( 7,3)/-.151264E+01/,S(1, 7,3)/ .170979E+02/,
     1      S(2, 7,3)/-.129520E+02/,S(3, 7,3)/ .256920E+01/,
     2      S(4, 7,3)/-.148023E+00/
      DATA EXS( 8,3)/-.149225E+01/,S(1, 8,3)/ .963932E+01/,
     1      S(2, 8,3)/-.924442E+01/,S(3, 8,3)/ .207320E+01/,
     2      S(4, 8,3)/-.127491E+00/
      DATA EXS( 9,3)/-.104632E+01/,S(1, 9,3)/-.515922E+01/,
     1      S(2, 9,3)/ .232575E+01/,S(3, 9,3)/-.316608E+00/,
     2      S(4, 9,3)/ .136169E-01/
      DATA EXS(10,3)/-.160691E+01/,S(1,10,3)/ .246209E+02/,
     1      S(2,10,3)/-.215968E+02/,S(3,10,3)/ .605239E+01/,
     2      S(4,10,3)/-.421917E+00/
      DATA EXS(11,3)/-.185331E+01/,S(1,11,3)/ .478666E+03/,
     1      S(2,11,3)/-.307887E+03/,S(3,11,3)/ .670335E+02/,
     2      S(4,11,3)/-.407085E+01/
      DATA EXS(12,3)/-.203052E+01/,S(1,12,3)/ .185453E+04/,
     1      S(2,12,3)/-.114165E+04/,S(3,12,3)/ .232442E+03/,
     2      S(4,12,3)/-.126903E+02/
      DATA EXC( 1,1)/-.967571E+00/,C(1, 1,1)/ .145161E+00/,
     1      C(2, 1,1)/-.324837E+00/,C(3, 1,1)/ .245149E-01/,
     2      C(4, 1,1)/-.200570E-07/
      DATA EXC( 2,1)/-.944952E+00/,C(1, 2,1)/ .636886E-01/,
     1      C(2, 2,1)/-.250800E+00/,C(3, 2,1)/ .208450E-01/,
     2      C(4, 2,1)/-.386089E-08/
      DATA EXC( 3,1)/-.944122E+00/,C(1, 3,1)/-.103811E-02/,
     1      C(2, 3,1)/-.186535E+00/,C(3, 3,1)/ .162921E-01/,
     2      C(4, 3,1)/-.260977E-08/
      DATA EXC( 4,1)/-.948544E+00/,C(1, 4,1)/-.686979E-01/,
     1      C(2, 4,1)/-.126975E+00/,C(3, 4,1)/ .119182E-01/,
     2      C(4, 4,1)/-.122340E-08/
      DATA EXC( 5,1)/-.964599E+00/,C(1, 5,1)/-.113809E+00/,
     1      C(2, 5,1)/-.911290E-01/,C(3, 5,1)/ .935599E-02/,
     2      C(4, 5,1)/-.348910E-08/
      DATA EXC( 6,1)/-.908613E+00/,C(1, 6,1)/-.151712E+00/,
     1      C(2, 6,1)/-.554769E-01/,C(3, 6,1)/ .107693E-01/,
     2      C(4, 6,1)/-.401012E-03/
      DATA EXC( 7,1)/-.889767E+00/,C(1, 7,1)/-.179343E+00/,
     1      C(2, 7,1)/-.383528E-01/,C(3, 7,1)/ .993613E-02/,
     2      C(4, 7,1)/-.453786E-03/
      DATA EXC( 8,1)/-.103565E+01/,C(1, 8,1)/-.153974E+00/,
     1      C(2, 8,1)/-.101526E+00/,C(3, 8,1)/ .107340E-01/,
     2      C(4, 8,1)/-.125777E-07/
      DATA EXC( 9,1)/-.103783E+01/,C(1, 9,1)/-.169138E+00/,
     1      C(2, 9,1)/-.117633E+00/,C(3, 9,1)/ .121790E-01/,
     2      C(4, 9,1)/-.194267E-08/
      DATA EXC(10,1)/-.104030E+01/,C(1,10,1)/-.184460E+00/,
     1      C(2,10,1)/-.140914E+00/,C(3,10,1)/ .142408E-01/,
     2      C(4,10,1)/-.829778E-08/
      DATA EXC(11,1)/-.104408E+01/,C(1,11,1)/-.201288E+00/,
     1      C(2,11,1)/-.165265E+00/,C(3,11,1)/ .163650E-01/,
     2      C(4,11,1)/-.478481E-08/
      DATA EXC(12,1)/-.105054E+01/,C(1,12,1)/-.210671E+00/,
     1      C(2,12,1)/-.186644E+00/,C(3,12,1)/ .180482E-01/,
     2      C(4,12,1)/-.348974E-08/
      DATA EXC( 1,2)/-.158390E+01/,C(1, 1,2)/ .247643E+00/,
     1      C(2, 1,2)/-.296678E+00/,C(3, 1,2)/ .197667E+00/,
     2      C(4, 1,2)/-.849536E-01/
      DATA EXC( 2,2)/-.134716E+01/,C(1, 2,2)/-.523045E+00/,
     1      C(2, 2,2)/ .625767E+00/,C(3, 2,2)/-.234584E+00/,
     2      C(4, 2,2)/ .138727E-01/
      DATA EXC( 3,2)/-.133426E+01/,C(1, 3,2)/-.296954E+00/,
       
     1      C(2, 3,2)/ .392204E+00/,C(3, 3,2)/-.147664E+00/,
     2      C(4, 3,2)/ .985158E-02/
      DATA EXC( 4,2)/-.130593E+01/,C(1, 4,2)/-.884868E-01/,
     1      C(2, 4,2)/ .169399E+00/,C(3, 4,2)/-.679917E-01/,
     2      C(4, 4,2)/ .504641E-02/
      DATA EXC( 5,2)/-.119492E+01/,C(1, 5,2)/ .418662E-01/,
     1      C(2, 5,2)/ .187575E-01/,C(3, 5,2)/-.151307E-01/,
     2      C(4, 5,2)/ .123259E-02/
      DATA EXC( 6,2)/-.916728E+00/,C(1, 6,2)/ .610198E-01/,
     1      C(2, 6,2)/-.268615E-01/,C(3, 6,2)/ .195779E-02/,
     2      C(4, 6,2)/-.194384E-09/
      DATA EXC( 7,2)/-.870655E+00/,C(1, 7,2)/ .538191E-01/,
     1      C(2, 7,2)/-.280550E-01/,C(3, 7,2)/ .212213E-02/,
     2      C(4, 7,2)/-.890382E-09/
      DATA EXC( 8,2)/-.876295E+00/,C(1, 8,2)/ .529804E-01/,
     1      C(2, 8,2)/-.360241E-01/,C(3, 8,2)/ .283525E-02/,
     2      C(4, 8,2)/-.489843E-09/
      DATA EXC( 9,2)/-.909398E+00/,C(1, 9,2)/ .539710E-01/,
     1      C(2, 9,2)/-.505903E-01/,C(3, 9,2)/ .404958E-02/,
     2      C(4, 9,2)/-.456655E-09/
      DATA EXC(10,2)/-.948747E+00/,C(1,10,2)/ .504471E-01/,
     1      C(2,10,2)/-.701885E-01/,C(3,10,2)/ .562829E-02/,
     2      C(4,10,2)/-.112388E-08/
      DATA EXC(11,2)/-.984107E+00/,C(1,11,2)/ .408586E-01/,
     1      C(2,11,2)/-.916156E-01/,C(3,11,2)/ .728258E-02/,
     2      C(4,11,2)/-.123008E-08/
      DATA EXC(12,2)/-.101548E+01/,C(1,12,2)/ .342815E-01/,
     1      C(2,12,2)/-.111437E+00/,C(3,12,2)/ .851016E-02/,
     2      C(4,12,2)/-.707952E-09/
      DATA EXC( 1,3)/-.143140E+01/,C(1, 1,3)/ .182132E+01/,
     1      C(2, 1,3)/-.150756E+01/,C(3, 1,3)/ .448994E+00/,
     2      C(4, 1,3)/-.513049E-01/
      DATA EXC( 2,3)/-.146421E+01/,C(1, 2,3)/ .108768E+01/,
     1      C(2, 2,3)/-.996378E+00/,C(3, 2,3)/ .344348E+00/,
     2      C(4, 2,3)/-.428059E-01/
      DATA EXC( 3,3)/-.962099E+00/,C(1, 3,3)/-.254814E-01/,
     1      C(2, 3,3)/ .469986E-01/,C(3, 3,3)/-.130462E-01/,
     2      C(4, 3,3)/ .801322E-03/
      DATA EXC( 4,3)/-.901304E+00/,C(1, 4,3)/-.214416E-01/,
     1      C(2, 4,3)/ .319938E-01/,C(3, 4,3)/-.780921E-02/,
     2      C(4, 4,3)/ .462827E-03/
      DATA EXC( 5,3)/-.886656E+00/,C(1, 5,3)/-.228872E-01/,
     1      C(2, 5,3)/ .279223E-01/,C(3, 5,3)/-.629072E-02/,
     2      C(4, 5,3)/ .361458E-03/
      DATA EXC( 6,3)/-.887094E+00/,C(1, 6,3)/-.166035E-01/,
     1      C(2, 6,3)/ .221340E-01/,C(3, 6,3)/-.497804E-02/,
     2      C(4, 6,3)/ .284097E-03/
      DATA EXC( 7,3)/-.934997E+00/,C(1, 7,3)/-.148012E-01/,
     1      C(2, 7,3)/ .221394E-01/,C(3, 7,3)/-.499693E-02/,
     2      C(4, 7,3)/ .277455E-03/
      DATA EXC( 8,3)/-.101580E+01/,C(1, 8,3)/-.131048E-01/,
     1      C(2, 8,3)/ .244978E-01/,C(3, 8,3)/-.572373E-02/,
     2      C(4, 8,3)/ .293783E-03/
      DATA EXC( 9,3)/-.129100E+01/,C(1, 9,3)/ .106424E-01/,
     1      C(2, 9,3)/ .755519E-02/,C(3, 9,3)/ .379221E-02/,
     2      C(4, 9,3)/-.145068E-02/
      DATA EXC(10,3)/-.138456E+01/,C(1,10,3)/ .149661E+00/,
     1      C(2,10,3)/-.110478E+00/,C(3,10,3)/ .388231E-01/,
     2      C(4,10,3)/-.600307E-02/
      DATA EXC(11,3)/-.143295E+01/,C(1,11,3)/ .329414E+00/,
     1      C(2,11,3)/-.271483E+00/,C(3,11,3)/ .842731E-01/,
     2      C(4,11,3)/-.118894E-01/
      DATA EXC(12,3)/-.143829E+01/,C(1,12,3)/ .501778E+00/,
     1      C(2,12,3)/-.412692E+00/,C(3,12,3)/ .116163E+00/,
     2      C(4,12,3)/-.151331E-01/
c-------------------------------------------------------
c      IF POINT HAS BEEN CALCULATED DO NOT RECALCULATE
c-------------------------------------------------------
      FAC=2.04
      IF(KTEST.NE.0)GO TO 20
      IF(R.NE.RLAST)GO TO 20
      IF(L.NE.LLAST)GO TO 20
      DO 10 M=1,3
      V(M)=SAVE1(M)
      VP(M)=SAVE2(M)
   10 VPP(M)=SAVE3(M)
      RETURN
   20 RLAST=R
      LLAST=L
c-------------------------------------------------------
c      DETERMINE THE SCF CONTRIBUTION
c-------------------------------------------------------
      IF(KTEST.NE.0)WRITE(6,100)
      DO 30 M=1,3
      IF(KTEST.EQ.1)R=RM(M,L)
      Z=EXS(L,M)
      Y=EXP(Z*R)
      C1=S(1,L,M)
      C2=S(2,L,M)
      C3=S(3,L,M)
      C4=S(4,L,M)
      C5=((3.0*C4*R+2.0*C3)*R+C2)*Y
      VS(M)=(((C4*R+C3)*R+C2)*R+C1)*Y
      VPS(M)=Z*VS(M)+C5
      VPPS(M)=Z*VPS(M)+Z*C5+(6.0*C4*R+2.0*C3)*Y
      VS(M)=VS(M)*SCALES
      VPS(M)=VPS(M)*SCALES
      VPPS(M)=VPPS(M)*SCALES
      IF(KTEST.NE.0)WRITE(6,90)M,L,R,VS(M),VPS(M),VPPS(M)
  30  CONTINUE
c-------------------------------------------------------
c      DETERMINE THE SHORT RANGE CORRELATION ENERGY
c-------------------------------------------------------
      IF(KTEST.NE.0)WRITE(6,110)
      DO 40 M=1,3
      IF(KTEST.EQ.1)R=RM(M,L)
      Z=EXC(L,M)
      Y=EXP(Z*R)
      C1=C(1,L,M)
      C2=C(2,L,M)
      C3=C(3,L,M)
      C4=C(4,L,M)
      C5=((3.0*C4*R+2.0*C3)*R+C2)*Y
      VC(M)=(((C4*R+C3)*R+C2)*R+C1)*Y
      VPC(M)=Z*VC(M)+C5
      VPPC(M)=Z*VPC(M)+Z*C5+(6.0*C4*R+2.0*C3)*Y
      IF(KTEST.NE.0)WRITE(6,90)M,L,R,VC(M),VPC(M),VPPC(M)
   40 CONTINUE
c-------------------------------------------------------
c      CALCULATE THE LONG RANGE CORRELATION ENERGY
c-------------------------------------------------------
      IF(KTEST.NE.0)WRITE(6,120)
      DO 50 M=1,3
      IF(KTEST.EQ.1)R=RM(M,L)
      RSQ=R*R
      R6I=1.0/RSQ**3
      P1=X12(L)
      P2=0.5*(3.0*P1*P1-1.0)
      P3=0.5*P1*(5.0*P1*P1-3.0)
      P4=0.125*(35.0*P1**4-30.0*P1*P1+3.0)
      C1=-(C60(M)+C62(M)*P2)*R6I
      C2=-(C71(M)*P1+C73(M)*P3)*R6I/R
      C3=-(C80(M)+C82(M)*P2+C84(M)*P4)*R6I/RSQ
      C4=0.0
      VL(M)=(C1+C2+C3+C4)
      VPL(M)=(-6.0*C1-7.0*C2-8.0*C3-10.0*C4)/R
      VPPL(M)=(42.0*C1+56.0*C2+72.0*C3+110.0*C4)/RSQ
      VL(M)=VL(M)+B(M,L)*VC(M)
      VPL(M)=VPL(M)+B(M,L)*VPC(M)
      VPPL(M)=VPPL(M)+B(M,L)*VPPC(M)
      IF(KTEST.NE.0)WRITE(6,90)M,L,R,VL(M),VPL(M),VPPL(M)
   50 CONTINUE
      IF(KTEST.NE.0)WRITE(6,140)
      DO 60 M=1,3
      IF(KTEST.EQ.1)R=RM(M,L)
      BSR=1.0
      IF(R.GT.RM(M,L))BSR=0.0
      BLR=0.0
      IF(R.GT.RM(M,L))BLR=1.0
      VCOR(M)=VC(M)*BSR+VL(M)*BLR+FAC*VC(M)
      VPCOR(M)=VPC(M)*BSR+VPL(M)*BLR+FAC*VPC(M)
      VPPCOR(M)=VPPC(M)*BSR+VPPL(M)*BLR+FAC*VPPC(M)
      IF(KTEST.NE.0)WRITE(6,90)M,L,R,VCOR(M),VPCOR(M),VPPCOR(M)
   60 CONTINUE
      IF(KTEST.NE.0)WRITE(6,130)
      DO 70 M=1,3
      IF(KTEST.EQ.1)R=RM(M,L)
      V(M)=VS(M)+VCOR(M)
      VP(M)=VPS(M)+VPCOR(M)
      VPP(M)=VPPS(M)+VPPCOR(M)
      IF(KTEST.NE.0)WRITE(6,90)M,L,R,V(M),VP(M),VPP(M)
   70 CONTINUE
      DO 80 M=1,3
c-------------------------------------------------------
CC        V(M)=V(M)*2.930517265E+6
CC       VP(M)=VP(M)*2.930517265E+6*7.0
CC      VPP(M)=VPP(M)*2.930517265E+6*49.0
c-------------------------------------------------------
      SAVE1(M)=V(M)
      SAVE2(M)=VP(M)
   80 SAVE3(M)=VPP(M)
      RETURN
   90 FORMAT(1H ,2I5,F10.5,3E25.14)
  100 FORMAT(1H0,10HSCF ENERGY)
  110 FORMAT(1H0,23HSHORT RANGE CORRELATION )
  120 FORMAT(1H0,22HLONG RANGE CORRELATION )
  130 FORMAT(1H0,15HTOTAL POTENTIAL)
  140 FORMAT(1H0,18HCORRELATION ENERGY)
      END
