c
c  _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
c  _/                                                                _/
c  _/        Program to provide test output for h4bmkp.f:            _/
c  _/        ********************************************            _/
c  _/        surface 400s4369z H4 surface evaluation routines        _/
c  _/        (4004369.26), also known as the BMKP H4 surface         _/
c  _/        ---Arnold I. Boothroyd:  Version of 24 May 2002         _/
c  _/        ---Modified from original version of 6 July 2001        _/
c  _/            (for better extrapolation to short distances)       _/
c  _/                                                                _/
c  _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
c
c
c  Any QUESTIONS/PROBLEMS/COMMENTS concerning this programme can be
c  addressed to: boothroy@cita.utoronto.ca or pgmartin@cita.utoronto.ca
c
c
c**********************************************************************
c
c  This program calls the BMKP H4 surface routines in the file h4bmkp.f
c  and compares calculated H4 surface energies and derivatives against
c  stored values that are known to be accurate.  It outputs a message
c  to the standard output (Fortran unit 6) giving the largest of the
c  differences, and stating whether these lie in the acceptable range.
c
c  To compile and run this test program use, e.g., the commands
c
c    f77 -O -o h4bmkp_test h4bmkp_test.f h4bmkp.f
c    ./h4bmkp_test
c
c**********************************************************************
c
c  ALL VARIABLES ARE DOUBLE PRECISION (real*8)
c
c**********************************************************************
c
      program h4bmkp_test
c     ===================
c
      implicit double precision (a-h,o-z)
c
c***** set  n_full_out  below to the number of test conformations for
c      which you wish to produce full individual test output, up to 66
c      (NOTE that ALL the differences are CHECKED for ALL of the test
c      conformations, and a summary is output, regardless of the value
c      of n_full_out):
c
      parameter ( n_full_out = 0 )
c
c-all_individual_out;      parameter ( n_full_out = 66 )
c
      parameter ( ntry = 22, ntry_tot = 3 * ntry )
c
      dimension cc_try(4,3,ntry), f_red_cc(ntry), Vfit_val(ntry,3),
     $     dVdcc_val(4,3,ntry,3), derr_other(6,ntry,3),
     $     dVfit_lim(3), deriv_lim(3), Derr_lim(3), Derr_lo(3)
c
      dimension Vfit_get(ntry,3), derr_get(ntry,3),
     $     dVdcc_get(4,3,ntry,3), r_get(6,ntry,3),
     $     dmax_Vfit(3), dmax_dVdcc(3), Derr_max(3)
c
      dimension cc(4,3), r(6), dVdcc(4,3), dVdr(6)
c
c__Stored values for checking the H4 BMKP energies and derivatives:
c
      data ( ( ( cc_try(i,j,k), i = 1, 4 ), j = 1, 3 ), k = 1, 6 ) /
     $  0.000000000d0,  0.000000000d0,  0.000000000d0,  0.000000000d0,
     $  0.000000000d0,  0.000000000d0,  0.000000000d0,  0.000000000d0,
     $ -0.500000000d0,  0.500000000d0,  3.100000000d0, -3.100000000d0,
     $  0.116940549d0, -0.116940549d0, -0.725031403d0,  0.725031403d0,
     $  0.137051579d0, -0.137051579d0, -0.849719790d0,  0.849719790d0,
     $ -0.466413736d0,  0.466413736d0,  2.891765161d0, -2.891765161d0,
     $  0.000000000d0,  0.000000000d0,  0.000000000d0,  0.000000000d0,
     $  0.000000000d0,  0.000000000d0,  1.724094000d0,  3.474094000d0,
     $ -0.300000000d0,  0.300000000d0,  0.000000000d0,  0.000000000d0,
     $ -0.059672307d0,  0.059672307d0, -1.388902004d0, -2.798673460d0,
     $  0.293813509d0, -0.293813509d0, -0.317185782d0, -0.639137554d0,
     $ -0.010622514d0,  0.010622514d0, -0.971001814d0, -1.956593768d0,
     $  0.000000000d0,  0.000000000d0,  0.000000000d0,  0.000000000d0,
     $  0.000000000d0,  0.000000000d0,  0.000000000d0,  1.750000000d0,
     $ -0.500000000d0,  0.500000000d0,  1.900000000d0,  1.900000000d0,
     $ -0.262504312d0,  0.262504312d0,  0.997516385d0,  0.146728450d0,
     $  0.407968814d0, -0.407968814d0, -1.550281495d0, -1.644830021d0,
     $ -0.121049299d0,  0.121049299d0,  0.459987335d0,  1.986329521d0 /
c
      data ( ( ( cc_try(i,j,k), i = 1, 4 ), j = 1, 3 ), k = 7, 12 ) /
     $  0.000000000d0,  0.000000000d0,  0.000000000d0,  0.000000000d0,
     $  0.000000000d0,  0.000000000d0,  1.996078000d0,  3.814731000d0,
     $ -0.500000000d0,  0.500000000d0,  1.152436000d0,  2.202436000d0,
     $ -0.344380059d0,  0.344380059d0,  0.624689154d0,  1.193851930d0,
     $  0.131941929d0, -0.131941929d0,  1.483857208d0,  2.835818993d0,
     $  0.337629534d0, -0.337629534d0, -1.649353620d0, -3.152101703d0,
     $  0.000000000d0,  0.000000000d0,  0.000000000d0,  1.515544000d0,
     $  0.000000000d0,  0.000000000d0,  1.212436000d0,  0.337435000d0,
     $ -0.700000000d0,  0.700000000d0,  0.000000000d0,  0.000000000d0,
     $ -0.054721165d0,  0.054721165d0, -0.823042406d0,  0.877465257d0,
     $  0.209158325d0, -0.209158325d0,  0.827777467d0,  1.240905109d0,
     $ -0.665776531d0,  0.665776531d0,  0.327699127d0,  0.317718788d0,
     $  0.000000000d0,  0.000000000d0,  0.000000000d0,  0.000000000d0,
     $  0.000000000d0,  0.000000000d0,  1.093216000d0, -1.093216000d0,
     $ -0.560273000d0,  0.560273000d0,  0.806247000d0,  1.434846000d0,
     $  0.057256454d0, -0.057256454d0,  0.875696431d0, -1.104722351d0,
     $  0.089005673d0, -0.089005673d0, -0.654363398d0,  0.298340547d0,
     $ -0.550186807d0,  0.550186807d0,  0.806300038d0,  1.394448174d0 /
c
      data ( ( ( cc_try(i,j,k), i = 1, 4 ), j = 1, 3 ), k = 13, 18 ) /
     $  0.000000000d0,  0.000000000d0,  0.000000000d0,  1.974336000d0,
     $  0.000000000d0,  0.000000000d0,  0.697136000d0,  0.935898000d0,
     $ -0.563175000d0,  0.563175000d0,  1.666967000d0,  1.951857000d0,
     $ -0.004023890d0,  0.004023890d0,  0.553700523d0,  1.983655886d0,
     $ -0.115419841d0,  0.115419841d0, -0.088532760d0,  1.322558920d0,
     $  0.551206086d0, -0.551206086d0, -1.717659821d0, -1.702821390d0,
     $  0.000000000d0,  0.000000000d0,  0.000000000d0,  1.368548000d0,
     $  0.000000000d0,  0.000000000d0,  2.172190000d0,  3.477432000d0,
     $ -1.122129000d0,  1.122129000d0,  2.733512000d0,  4.289816000d0,
     $ -0.690060433d0,  0.690060433d0,  0.720924558d0,  1.994829760d0,
     $  0.707616370d0, -0.707616370d0, -1.242380023d0, -0.916615187d0,
     $ -0.531290094d0,  0.531290094d0,  3.182335135d0,  5.248661647d0,
     $  0.000000000d0,  0.000000000d0,  0.000000000d0,  6.013498000d0,
     $  0.000000000d0,  0.000000000d0,  0.519615000d0, 11.448340000d0,
     $ -0.300000000d0,  0.300000000d0,  0.000000000d0, 12.288553000d0,
     $ -0.098656340d0,  0.098656340d0, -0.443078038d0, -3.280063428d0,
     $ -0.137830716d0,  0.137830716d0,  0.270180851d0, 15.928892591d0,
     $ -0.247527009d0,  0.247527009d0,  0.026151641d0,  7.331217261d0 /
c
      data ( ( ( cc_try(i,j,k), i = 1, 4 ), j = 1, 3 ),
     $     k = 19, ntry ) /
     $  0.000000000d0,  0.000000000d0,  0.000000000d0,  0.000000000d0,
     $  0.000000000d0,  0.000000000d0,  0.000000000d0,  0.000000000d0,
     $ -0.500000000d0,  0.500000000d0,  4.900000000d0,  6.100000000d0,
     $  0.396861455d0, -0.396861455d0, -3.889242263d0, -4.841709756d0,
     $  0.303859319d0, -0.303859319d0, -2.977821328d0, -3.707083695d0,
     $  0.013057538d0, -0.013057538d0, -0.127963875d0, -0.159301966d0,
     $  0.000000000d0,  0.000000000d0,  0.000000000d0,  0.000000000d0,
     $  0.000000000d0,  0.000000000d0,  1.585248000d0, -1.585248000d0,
     $ -0.820061000d0,  0.820061000d0,  1.240761000d0,  2.039482000d0,
     $  0.556274676d0, -0.556274676d0, -0.735047519d0, -1.490050506d0,
     $  0.047921939d0, -0.047921939d0,  1.493260493d0, -1.684948190d0,
     $ -0.600634678d0,  0.600634678d0,  1.132421002d0,  1.270116978d0 /
c
      data ( f_red_cc(i), i = 1, ntry ) /
     $     0.4d0, 0.47d0, 0.75d0, 0.55d0, 0.45d0, 0.43d0, 0.5d0, 1.d0,
     $     0.29d0, 0.29d0, 0.42d0, 0.42d0, 0.37d0, 0.37d0, 1.d0, 1.d0,
     $     0.7d0, 0.8d0, 0.41d0, 0.41d0, 0.22d0, 1.d0 /
c
      data ( Vfit_val(i,1), i = 1, ntry ) /
     $     -0.1145894318207002d0, -0.1145894321354934d0,
     $      0.1595032527364794d0,  0.1595032521845400d0,
     $     -0.1049414539407332d0, -0.1049414538272130d0,
     $     -0.2203523042998047d0, -0.2203523042362174d0,
     $      0.1359865545069838d0,  0.1359865544080732d0,
     $      0.1049489152802334d0,  0.1049489159370148d0,
     $     -0.1277804215196289d0, -0.1277804213644124d0,
     $     -0.2108973430354903d0, -0.2108973430826130d0,
     $      1.2111161593142743d0,  1.2111161599798568d0,
     $     -0.2892814146805858d0, -0.2892814144114505d0,
     $     -0.0937999222353495d0, -0.0937999222785219d0 /
c
      data ( Vfit_val(i,2), i = 1, ntry ) /
     $      1.1608979973075244d0,  0.7393303884881179d0,
     $      0.7218043622233759d0,  1.7427292804373284d0,
     $      1.7057305408988210d0,  1.8768433166732426d0,
     $      0.6819762558686329d0, -0.2203523042362174d0,
     $      5.3880974826144312d0,  5.3880974813432738d0,
     $      2.6336682096406974d0,  2.6336682111630898d0,
     $      2.3193722015125124d0,  2.3193722020736920d0,
     $     -0.2108973430354903d0, -0.2108973430826130d0,
     $      3.0460509596025775d0,  1.6489222751127826d0,
     $      1.4440617632700443d0,  1.4440617647406122d0,
     $      4.7012096229494471d0, -0.0937999222785219d0 /
c
      data ( Vfit_val(i,3), i = 1, ntry ) /
     $      1.1664103575999150d0,  0.7315705344563390d0,
     $      0.6790414631504047d0,  1.4827772614162331d0,
     $      1.7502789989996170d0,  1.9507816104595708d0,
     $      0.6819762558686329d0, -0.2203523042362174d0,
     $      4.9113612976990719d0,  4.9113612966302798d0,
     $      2.6573255669716183d0,  2.6573255689119151d0,
     $      2.2971966922171232d0,  2.2971966924603571d0,
     $     -0.2108973430354903d0, -0.2108973430826130d0,
     $      1.4701054477657551d0,  1.5350314659499769d0,
     $      1.3828226261801866d0,  1.3828226275610755d0,
     $      4.6598519844282169d0, -0.0937999222785219d0 /
c
      data ( ( ( dVdcc_val(i,j,k,1), i = 1, 4 ), j = 1, 3 ),
     $     k = 1, 3 ) /
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.3641959592425535d0, -0.3641959592425532d0,
     $       0.0028787786242286d0, -0.0028787786242289d0,
     $      -0.0851785504619496d0,  0.0851785504619495d0,
     $      -0.0006732919130239d0,  0.0006732919130239d0,
     $      -0.0998272620991175d0,  0.0998272620991174d0,
     $      -0.0007890823181898d0,  0.0007890823181899d0,
     $       0.3397319944655610d0, -0.3397319944655607d0,
     $       0.0026854038140340d0, -0.0026854038140344d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0731715881999339d0,  0.0731715881999354d0,
     $      -0.1840789071829420d0,  0.0377357307830727d0,
     $       1.8842487630156801d0, -1.8842487630156803d0,
     $       0.0000000000000002d0,  0.0000000000000000d0 /
c
      data ( ( ( dVdcc_val(i,j,k,1), i = 1, 4 ), j = 1, 3 ),
     $     k = 4, 6 ) /
     $       0.3158457302202721d0, -0.4337374059777970d0,
     $       0.1482909648397974d0, -0.0303992890822726d0,
     $      -1.8588540216215321d0,  1.8319309101490753d0,
     $       0.0338654460412856d0, -0.0069423345688289d0,
     $       0.0255082939168938d0, -0.1079280982749290d0,
     $       0.1036723946462075d0, -0.0212525902881724d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0483077863489647d0,  0.0297833983009436d0,
     $      -0.1006967969141166d0,  0.0226056122642085d0,
     $       0.3946983431500792d0, -0.1146118009133662d0,
     $      -0.1900091451745207d0, -0.0900773970621922d0,
     $       0.1837345019207104d0, -0.0746518163891927d0,
     $      -0.0508012282994714d0, -0.0582814572320462d0,
     $      -0.3246591905138607d0,  0.0919069520870093d0,
     $       0.1604760305741973d0,  0.0722762078526543d0,
     $       0.1376897511627959d0, -0.0017704096770743d0,
     $      -0.1338282441391430d0, -0.0020910973465785d0 /
c
      data ( ( ( dVdcc_val(i,j,k,1), i = 1, 4 ), j = 1, 3 ),
     $     k = 7, 9 ) /
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0161978998101192d0,  0.0307576769611837d0,
     $      -0.1157536393984290d0,  0.0687980626271413d0,
     $       0.3325071429405617d0, -0.3099343136771939d0,
     $      -0.0613167156171234d0,  0.0387438863537555d0,
     $       0.2276457377793037d0, -0.2160754928420770d0,
     $      -0.0324284653204257d0,  0.0208582203832028d0,
     $      -0.0732341646011780d0,  0.1093375372537623d0,
     $      -0.0875046478379234d0,  0.0514012751853429d0,
     $      -0.2315978140640523d0,  0.1958621914385994d0,
     $       0.0919237503930063d0, -0.0561881277675610d0,
     $       0.0960848673819874d0,  0.0960848673819632d0,
     $       0.1420229294531681d0, -0.3341926642171189d0,
     $       0.0515312861407129d0,  0.0515312861407354d0,
     $      -0.1422731863212768d0,  0.0392106140398286d0,
     $       0.1307146969003774d0, -0.1307146969003823d0,
     $       0.0000000000000163d0, -0.0000000000000113d0 /
c
      data ( ( ( dVdcc_val(i,j,k,1), i = 1, 4 ), j = 1, 3 ),
     $     k = 10, 12 ) /
     $       0.0453922816058142d0,  0.0249528267837693d0,
     $       0.2002727987998690d0, -0.2706179071894523d0,
     $       0.0601903549681170d0,  0.1383080343512173d0,
     $      -0.0024380945062549d0, -0.1960602948130791d0,
     $       0.1526122895780458d0, -0.0960366841478243d0,
     $      -0.0172243905938670d0, -0.0393512148363545d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $      -0.1138051554567477d0,  0.1948489192808096d0,
     $      -0.2932428340423058d0,  0.2121990702182470d0,
     $       0.2918226125773686d0, -0.2064428443634595d0,
     $       0.0675250122642139d0, -0.1529047804781231d0,
     $      -0.1295608364621694d0,  0.1918619637603684d0,
     $      -0.2638974305245209d0,  0.2015963032263189d0,
     $       0.0084273068859410d0, -0.0610058907972989d0,
     $       0.1304420855715090d0, -0.0778635016601542d0,
     $       0.2850526639609660d0, -0.2001300011537076d0,
     $       0.0624018875586412d0, -0.1473245503659032d0 /
c
      data ( ( ( dVdcc_val(i,j,k,1), i = 1, 4 ), j = 1, 3 ),
     $     k = 13, 15 ) /
     $       0.0415203128936102d0,  0.0180695567892375d0,
     $      -0.0972435971548035d0,  0.0376537274719559d0,
     $       0.0241186172735699d0,  0.1064314908402089d0,
     $      -0.1140625578120253d0, -0.0164875503017534d0,
     $       0.2335166447772300d0,  0.0012304460385811d0,
     $      -0.1831783327902256d0, -0.0515687580255857d0,
     $       0.0465395297297433d0,  0.0940940438578326d0,
     $      -0.1511453832349020d0,  0.0105118096473259d0,
     $       0.0645213287213622d0, -0.0516929505826490d0,
     $      -0.0410413239535460d0,  0.0282129458148328d0,
     $      -0.2247370414720783d0, -0.0113945124156511d0,
     $       0.1774586397463491d0,  0.0586729141413802d0,
     $       0.0004079653773869d0,  0.0002405754209715d0,
     $      -0.0465124748115438d0,  0.0458639340131854d0,
     $       0.0019682044371518d0,  0.0010160025425091d0,
     $      -0.0456971985023930d0,  0.0427129915227321d0,
     $      -0.0839649980578223d0,  0.0880889245381234d0,
     $      -0.0548474646983627d0,  0.0507235382180615d0 /
c
      data ( ( ( dVdcc_val(i,j,k,1), i = 1, 4 ), j = 1, 3 ),
     $     k = 16, 18 ) /
     $      -0.0522382990819662d0,  0.0538789052597310d0,
     $      -0.0439067495351914d0,  0.0422661433574266d0,
     $       0.0536880787973887d0, -0.0551449246932068d0,
     $      -0.0101357609762936d0,  0.0115926068721116d0,
     $      -0.0379856745131246d0,  0.0426245189287530d0,
     $      -0.0723142610014645d0,  0.0676754165858360d0,
     $       0.0000004799204965d0,  0.0000005347148537d0,
     $       0.0000005493873178d0, -0.0000015640226680d0,
     $       1.2836252164480295d0,  1.2843879288492752d0,
     $      -2.5680102152234308d0, -0.0000029300738738d0,
     $       2.3199842909341046d0, -2.3204225124539772d0,
     $       0.0004414148587813d0, -0.0000031933389089d0,
     $      -0.3317086089393586d0, -1.8582586491137583d0,
     $       2.1899664445369291d0,  0.0000008135161876d0,
     $       1.7333387262812996d0, -0.3981963942847120d0,
     $      -1.3351382150645481d0, -0.0000041169320392d0,
     $       1.9787529779380448d0, -1.8498291463726013d0,
     $      -0.1289219294679681d0, -0.0000019020974753d0 /
c
      data ( ( ( dVdcc_val(i,j,k,1), i = 1, 4 ), j = 1, 3 ),
     $     k = 19, 21 ) /
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.3221196173787135d0, -0.3215481420448263d0,
     $       0.1067337331273343d0, -0.1073052084612214d0,
     $      -0.2556737215124750d0,  0.2552201284475440d0,
     $      -0.0847170090433984d0,  0.0851706021083294d0,
     $      -0.1957580962481054d0,  0.1954108000370365d0,
     $      -0.0648640788223095d0,  0.0652113750333784d0,
     $      -0.0084121783358202d0,  0.0083972542134201d0,
     $      -0.0027873595232886d0,  0.0028022836456887d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $      -0.0474310011573739d0,  0.0370536015855411d0,
     $      -0.0323692121583439d0,  0.0427466117301769d0,
     $       0.0204533985060403d0, -0.0271565433333195d0,
     $       0.0400338508167241d0, -0.0333307059894449d0 /
c
      data ( ( ( dVdcc_val(i,j,k,1), i = 1, 4 ), j = 1, 3 ),
     $     k = 22, ntry ) /
     $      -0.0170637776892405d0,  0.0209129029221461d0,
     $      -0.0293330016588773d0,  0.0254838764259717d0,
     $      -0.0480433579568721d0,  0.0381851981879590d0,
     $      -0.0343108868585068d0,  0.0441690466274205d0,
     $       0.0082888256607240d0, -0.0146624819033966d0,
     $       0.0247550634454580d0, -0.0183814072027853d0 /
c
      data ( ( ( dVdcc_val(i,j,k,2), i = 1, 4 ), j = 1, 3 ),
     $     k = 1, 3 ) /
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       5.1875103251858157d0, -5.1875103251858157d0,
     $      -0.4283319771054663d0,  0.4283319771054663d0,
     $      -0.9756361817812074d0,  0.9756361817812066d0,
     $       0.0550737351655662d0, -0.0550737351655656d0,
     $      -1.1434227078674652d0,  1.1434227078674646d0,
     $       0.0645451252612269d0, -0.0645451252612262d0,
     $       3.8912945113817603d0, -3.8912945113817576d0,
     $      -0.2196598768255055d0,  0.2196598768255027d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.2100690941364967d0,  0.2100690941364961d0,
     $      -0.2850839920386369d0, -0.1350541962343559d0,
     $       4.9916988449790614d0, -4.9916988449790614d0,
     $       0.0000000000000000d0, -0.0000000000000001d0 /
c
      data ( ( ( dVdcc_val(i,j,k,2), i = 1, 4 ), j = 1, 3 ),
     $     k = 4, 6 ) /
     $       1.2303056529348539d0, -2.0509649978215316d0,
     $       0.3919438329027421d0,  0.4287155119839356d0,
     $      -8.1718404703776439d0,  7.9844251774815920d0,
     $       0.0895088427443254d0,  0.0979064501517274d0,
     $       0.0051887676571791d0, -0.5789237829455790d0,
     $       0.2740136970468195d0,  0.2997213182415804d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.1221353748838929d0,  0.3430815275340600d0,
     $       0.7882789899091540d0, -1.2534958923271071d0,
     $       2.3013108177748287d0,  0.0415807966320541d0,
     $      -1.9009264496817244d0, -0.4419651647251584d0,
     $       1.6063243551632607d0, -0.4321202401572207d0,
     $      -1.6388880823928433d0,  0.4646839673868034d0,
     $      -2.5859998515674469d0,  0.3803405277173140d0,
     $       1.7697987647104148d0,  0.4358605591397187d0,
     $       0.8619929354644238d0,  0.1951358850640094d0,
     $       0.2968532412991456d0, -1.3539820618275789d0 /
c
      data ( ( ( dVdcc_val(i,j,k,2), i = 1, 4 ), j = 1, 3 ),
     $     k = 7, 9 ) /
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.1820919390382091d0,  0.4356932155231534d0,
     $      -0.2320119550507989d0, -0.3857731995105641d0,
     $       2.9638719049093880d0, -2.6692295100993597d0,
     $      -0.0735502615235220d0, -0.2210921332865057d0,
     $       0.2276457377793037d0, -0.2160754928420770d0,
     $      -0.0324284653204257d0,  0.0208582203832028d0,
     $      -0.0732341646011780d0,  0.1093375372537623d0,
     $      -0.0875046478379234d0,  0.0514012751853429d0,
     $      -0.2315978140640523d0,  0.1958621914385994d0,
     $       0.0919237503930063d0, -0.0561881277675610d0,
     $       2.8426207502316498d0,  2.8426207502316498d0,
     $       2.6335580156772793d0, -8.3187995161405794d0,
     $       5.0728815520148904d0,  5.0728815520148904d0,
     $     -10.4004349786614654d0,  0.2546718746316848d0,
     $       9.0609890830363895d0, -9.0609890830363895d0,
     $      -0.0000000000000001d0,  0.0000000000000001d0 /
c
      data ( ( ( dVdcc_val(i,j,k,2), i = 1, 4 ), j = 1, 3 ),
     $     k = 10, 12 ) /
     $      -0.6598658846065050d0, -2.0765169690580425d0,
     $       8.9829764707875359d0, -6.2465936171229890d0,
     $       2.6514377971589180d0,  8.0662415082199672d0,
     $      -5.3447961454614132d0, -5.3728831599174720d0,
     $      10.4139616710829817d0, -6.8220208361204895d0,
     $      -2.4174290828392375d0, -1.1745117521232558d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.4328807064734226d0, -0.0179275486315164d0,
     $      -2.6857040748966172d0,  2.2707509170547131d0,
     $       2.8569662075708888d0, -0.0058470422344152d0,
     $      -1.0412524907728775d0, -1.8098666745635961d0,
     $       0.0874104639610425d0, -0.0151140847526876d0,
     $      -2.2473301977712965d0,  2.1750338185629432d0,
     $      -0.6622531076745682d0,  0.0095593108726564d0,
     $       1.4583318028732590d0, -0.8056380060713472d0,
     $       2.8113025270342655d0, -0.0059806701258725d0,
     $      -1.0582951258502795d0, -1.7470267310581133d0 /
c
      data ( ( ( dVdcc_val(i,j,k,2), i = 1, 4 ), j = 1, 3 ),
     $     k = 13, 15 ) /
     $       0.1233077281548994d0,  0.3457030873658711d0,
     $       0.9858818758267766d0, -1.4548926913475471d0,
     $       0.2423625382044050d0,  1.9659131372238188d0,
     $      -1.8667241803126957d0, -0.3415514951155279d0,
     $       4.6151216122828576d0, -0.7733459957662477d0,
     $      -3.2992831408029639d0, -0.5424924757136455d0,
     $       0.2989229732631978d0,  1.7398499024180498d0,
     $      -0.8539551730280088d0, -1.1848177026532389d0,
     $       0.8899803602940475d0, -1.1089103981556470d0,
     $       1.2247341719786093d0, -1.0058041341170099d0,
     $      -4.5267948851137598d0,  0.5706392610991916d0,
     $       3.6211432284076421d0,  0.3350123956069258d0,
     $       0.0004079653773869d0,  0.0002405754209715d0,
     $      -0.0465124748115438d0,  0.0458639340131854d0,
     $       0.0019682044371518d0,  0.0010160025425091d0,
     $      -0.0456971985023930d0,  0.0427129915227321d0,
     $      -0.0839649980578223d0,  0.0880889245381234d0,
     $      -0.0548474646983627d0,  0.0507235382180615d0 /
c
      data ( ( ( dVdcc_val(i,j,k,2), i = 1, 4 ), j = 1, 3 ),
     $     k = 16, 18 ) /
     $      -0.0522382990819662d0,  0.0538789052597310d0,
     $      -0.0439067495351914d0,  0.0422661433574266d0,
     $       0.0536880787973887d0, -0.0551449246932068d0,
     $      -0.0101357609762936d0,  0.0115926068721116d0,
     $      -0.0379856745131246d0,  0.0426245189287530d0,
     $      -0.0723142610014645d0,  0.0676754165858360d0,
     $      -0.0000001159263098d0, -0.0000001765045631d0,
     $      -0.0000001992935967d0,  0.0000004917244696d0,
     $       4.1408349746444797d0,  4.1476367710138193d0,
     $      -8.2884726645698841d0,  0.0000009189115840d0,
     $       7.1698609569328964d0, -7.1737886388718630d0,
     $       0.0039266801245935d0,  0.0000010018143734d0,
     $      -1.2094165631140519d0, -6.4446242503606079d0,
     $       7.6540083142820645d0,  0.0000324991925952d0,
     $       5.9876618655798870d0, -1.3213775642211576d0,
     $      -4.6661197893435018d0, -0.0001645120152277d0,
     $       6.7895499110552979d0, -6.3391511023225950d0,
     $      -0.4503228103105796d0, -0.0000759984221228d0 /
c
      data ( ( ( dVdcc_val(i,j,k,2), i = 1, 4 ), j = 1, 3 ),
     $     k = 19, 21 ) /
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       5.1403692986987144d0, -4.9385203139265972d0,
     $       3.0699938306968608d0, -3.2718428154689794d0,
     $      -4.0800288870037953d0,  3.9198167232596908d0,
     $      -2.4367244362051586d0,  2.5969365999492631d0,
     $      -3.1238982357202558d0,  3.0012308455268091d0,
     $      -1.8656924705993758d0,  1.9883598607928226d0,
     $      -0.1342411352210136d0,  0.1289698335404864d0,
     $      -0.0801731214855676d0,  0.0854444231660948d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.7524257621341207d0,  3.1805407917842667d0,
     $      -8.9797987714752097d0,  5.0468322175568225d0,
     $       9.4903185104965111d0, -2.4465711002893396d0,
     $      -3.1615698912641106d0, -3.8821775189430601d0 /
c
      data ( ( ( dVdcc_val(i,j,k,2), i = 1, 4 ), j = 1, 3 ),
     $     k = 22, ntry ) /
     $      -0.0170637776892405d0,  0.0209129029221461d0,
     $      -0.0293330016588773d0,  0.0254838764259717d0,
     $      -0.0480433579568721d0,  0.0381851981879590d0,
     $      -0.0343108868585068d0,  0.0441690466274205d0,
     $       0.0082888256607240d0, -0.0146624819033966d0,
     $       0.0247550634454580d0, -0.0183814072027853d0 /
c
      data ( ( ( dVdcc_val(i,j,k,3), i = 1, 4 ), j = 1, 3 ),
     $     k = 1, 3 ) /
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       4.9472533022140830d0, -4.9472533022140794d0,
     $      -0.4191614876620833d0,  0.4191614876620809d0,
     $      -0.8281431615178236d0,  0.8281431615178229d0,
     $       0.0559757491477930d0, -0.0559757491477924d0,
     $      -0.9705643495036701d0,  0.9705643495036694d0,
     $       0.0656022644914845d0, -0.0656022644914838d0,
     $       3.3030231956579326d0, -3.3030231956579299d0,
     $      -0.2232575314987700d0,  0.2232575314987674d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.1916473274536022d0,  0.1916473274536016d0,
     $      -0.2194918307574733d0, -0.1638028241497300d0,
     $       3.4887344464274896d0, -3.4887344464274896d0,
     $       0.0000000000000001d0, -0.0000000000000001d0 /
c
      data ( ( ( dVdcc_val(i,j,k,3), i = 1, 4 ), j = 1, 3 ),
     $     k = 4, 6 ) /
     $       0.6906433058519568d0, -1.0323624863986294d0,
     $      -0.2135163279332369d0,  0.5552355084799095d0,
     $      -4.2808730517708158d0,  4.2028340937891659d0,
     $      -0.0487610668638076d0,  0.1268000248454582d0,
     $       0.0339092395933672d0, -0.2728101437707665d0,
     $      -0.1492724036074732d0,  0.3881733077848722d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.1609958815213953d0,  0.4077694171263040d0,
     $       0.7228458472690467d0, -1.2916111459167459d0,
     $       3.8998442486474727d0, -1.5249360599706390d0,
     $      -1.8278983031750193d0, -0.5470098855018142d0,
     $       2.1706046869118634d0, -1.0934567132434343d0,
     $      -1.4931499341205750d0,  0.4160019604521457d0,
     $      -3.4953354258680047d0,  1.3076920684697699d0,
     $       1.6224730668324860d0,  0.5651702905657487d0,
     $       1.1660296140462174d0,  0.0262167484133546d0,
     $       0.2568405302905476d0, -1.4490868927501193d0 /
c
      data ( ( ( dVdcc_val(i,j,k,3), i = 1, 4 ), j = 1, 3 ),
     $     k = 7, 9 ) /
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.1820919390382091d0,  0.4356932155231534d0,
     $      -0.2320119550507989d0, -0.3857731995105641d0,
     $       2.9638719049093880d0, -2.6692295100993597d0,
     $      -0.0735502615235220d0, -0.2210921332865057d0,
     $       0.2276457377793037d0, -0.2160754928420770d0,
     $      -0.0324284653204257d0,  0.0208582203832028d0,
     $      -0.0732341646011780d0,  0.1093375372537623d0,
     $      -0.0875046478379234d0,  0.0514012751853429d0,
     $      -0.2315978140640523d0,  0.1958621914385994d0,
     $       0.0919237503930063d0, -0.0561881277675610d0,
     $       2.1683676236736567d0,  2.1683676236736598d0,
     $       1.8121351628375924d0, -6.1488704101849070d0,
     $       4.5288023370283943d0,  4.5288023370283961d0,
     $      -9.1382713003173368d0,  0.0806666262605466d0,
     $       8.1446406083830283d0, -8.1446406083830301d0,
     $       0.0000000000000002d0,  0.0000000000000017d0 /
c
      data ( ( ( dVdcc_val(i,j,k,3), i = 1, 4 ), j = 1, 3 ),
     $     k = 10, 12 ) /
     $      -0.8544639134908180d0, -2.1278194390352625d0,
     $       7.5264498268318398d0, -4.5441664743057579d0,
     $       2.1042212672009422d0,  6.9713853357696021d0,
     $      -5.0307751421908851d0, -4.0448314607796592d0,
     $       9.2945889025852519d0, -6.1982825992743242d0,
     $      -2.1990861986555341d0, -0.8972201046553953d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.4219780837817429d0,  0.5510855746799440d0,
     $      -3.2607179530691162d0,  2.2876542946074325d0,
     $       3.4463508101566185d0, -0.4683823215269991d0,
     $      -1.1570173742083860d0, -1.8209511144212329d0,
     $       0.0176239716303804d0,  0.5308348738859238d0,
     $      -2.7394394752472357d0,  2.1909806297309333d0,
     $      -0.7506348852489824d0, -0.1908887252939589d0,
     $       1.7535381353764878d0, -0.8120145248335463d0,
     $       3.3899315750513197d0, -0.4526070398772769d0,
     $      -1.1796381501697022d0, -1.7576863850043398d0 /
c
      data ( ( ( dVdcc_val(i,j,k,3), i = 1, 4 ), j = 1, 3 ),
     $     k = 13, 15 ) /
     $       0.1804750358679665d0,  0.4437613337450682d0,
     $       0.9800112171366147d0, -1.6042475867496493d0,
     $      -0.0520897990039762d0,  1.8367056236733383d0,
     $      -1.3701924397571323d0, -0.4144233849122297d0,
     $       3.8248426891378524d0, -1.1480923635899845d0,
     $      -1.9933107982703915d0, -0.6834395272774768d0,
     $       0.1004110890118651d0,  1.6984604306704933d0,
     $      -0.4624308088404628d0, -1.3364407108418956d0,
     $       0.9531429021703079d0, -1.0314836755311227d0,
     $       1.1815403244767178d0, -1.1031995511159032d0,
     $      -3.7075790495131038d0,  0.9694335138516853d0,
     $       2.2806265500522094d0,  0.4575189856092092d0,
     $       0.0004079653773869d0,  0.0002405754209715d0,
     $      -0.0465124748115438d0,  0.0458639340131854d0,
     $       0.0019682044371518d0,  0.0010160025425091d0,
     $      -0.0456971985023930d0,  0.0427129915227321d0,
     $      -0.0839649980578223d0,  0.0880889245381234d0,
     $      -0.0548474646983627d0,  0.0507235382180615d0 /
c
      data ( ( ( dVdcc_val(i,j,k,3), i = 1, 4 ), j = 1, 3 ),
     $     k = 16, 18 ) /
     $      -0.0522382990819662d0,  0.0538789052597310d0,
     $      -0.0439067495351914d0,  0.0422661433574266d0,
     $       0.0536880787973887d0, -0.0551449246932068d0,
     $      -0.0101357609762936d0,  0.0115926068721116d0,
     $      -0.0379856745131246d0,  0.0426245189287530d0,
     $      -0.0723142610014645d0,  0.0676754165858360d0,
     $       0.0000682855728546d0,  0.0000886832059770d0,
     $       0.0000948984563114d0, -0.0002518672351430d0,
     $       0.2632875530098760d0,  0.2632858898161496d0,
     $      -0.5261021445764210d0, -0.0004712982496046d0,
     $       0.7481417738034504d0, -0.7477986462847862d0,
     $       0.0001705443206017d0, -0.0005136718392659d0,
     $       0.1489129090641798d0,  0.3164755592706076d0,
     $      -0.4654265354201059d0,  0.0000380670853186d0,
     $      -0.2618930907225215d0, -0.0228759830126250d0,
     $       0.2849617707366342d0, -0.0001926970014878d0,
     $      -0.2277557434700518d0,  0.1989446696751669d0,
     $       0.0289000925983300d0, -0.0000890188034451d0 /
c
      data ( ( ( dVdcc_val(i,j,k,3), i = 1, 4 ), j = 1, 3 ),
     $     k = 19, 21 ) /
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       4.8273769168972125d0, -4.6498097530517759d0,
     $       2.8956113862088002d0, -3.0731785500542350d0,
     $      -3.8315996667794270d0,  3.6906605405503847d0,
     $      -2.2983130943602954d0,  2.4392522205893377d0,
     $      -2.9336869347608010d0,  2.8257760598113384d0,
     $      -1.7597170090566880d0,  1.8676278840061507d0,
     $      -0.1260673152916968d0,  0.1214301350554559d0,
     $      -0.0756191101333063d0,  0.0802562903695471d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       0.0000000000000000d0,  0.0000000000000000d0,
     $       1.0934167607597840d0,  2.8744552129396217d0,
     $     -10.8067953394344318d0,  6.8389233657350239d0,
     $      11.4736344953044522d0, -2.2188697860680007d0,
     $      -3.9966384313402723d0, -5.2581262778961797d0 /
c
      data ( ( ( dVdcc_val(i,j,k,3), i = 1, 4 ), j = 1, 3 ),
     $     k = 22, ntry ) /
     $      -0.0170637776892405d0,  0.0209129029221461d0,
     $      -0.0293330016588773d0,  0.0254838764259717d0,
     $      -0.0480433579568721d0,  0.0381851981879590d0,
     $      -0.0343108868585068d0,  0.0441690466274205d0,
     $       0.0082888256607240d0, -0.0146624819033966d0,
     $       0.0247550634454580d0, -0.0183814072027853d0 /
c
      data ( ( derr_other(i,k,1), i = 1, 6 ), k = 1, 10 ) /
     $     1.998d-15,6.592d-17,7.806d-16,7.806d-17,1.110d-16,5.551d-17,
     $     1.015d-11,1.483d-11,1.483d-11,1.483d-11,1.017d-11,1.017d-11,
     $     7.494d-16,7.410d-16,1.783d-15,5.551d-16,1.610d-15,1.610d-15,
     $     4.132d-10,4.132d-10,4.132d-10,4.132d-10,4.132d-10,4.132d-10,
     $     6.998d-15,1.050d-15,9.992d-15,2.554d-15,3.213d-15,3.109d-15,
     $     2.655d-13,9.554d-13,7.349d-13,5.474d-13,1.489d-12,1.488d-12,
     $     1.038d-10,2.221d-11,1.895d-07,9.870d-10,4.990d-07,4.990d-07,
     $     6.134d-10,1.420d-07,3.277d-09,1.420d-07,1.311d-10,1.311d-10,
     $     3.886d-16,2.058d-16,4.718d-16,4.718d-16,5.274d-16,5.274d-16,
     $     1.943d-16,2.522d-16,8.882d-16,4.441d-16,2.706d-16,2.776d-16/
c
      data ( ( derr_other(i,k,1), i = 1, 6 ), k = 11, ntry ) /
     $     3.427d-05,2.296d-07,3.427d-05,6.355d-06,6.501d-06,6.501d-06,
     $     1.809d-05,2.762d-06,2.275d-05,2.762d-06,1.048d-05,1.048d-05,
     $     1.138d-15,5.388d-16,1.249d-15,1.249d-15,1.471d-15,1.471d-15,
     $     7.078d-16,3.082d-16,1.443d-15,8.049d-16,9.298d-16,9.298d-16,
     $     1.388d-17,1.397d-17,1.388d-17,1.388d-17,1.388d-17,1.388d-17,
     $     6.939d-18,6.851d-18,6.939d-18,1.388d-17,1.388d-17,1.388d-17,
     $     4.441d-16,1.122d-16,0.000d+00,2.220d-16,0.000d+00,0.000d+00,
     $     5.551d-17,1.141d-16,0.000d+00,5.551d-17,0.000d+00,0.000d+00,
     $     4.843d-15,4.077d-17,4.843d-15,1.388d-17,4.136d-15,4.052d-15,
     $     9.807d-13,9.807d-13,9.807d-13,9.807d-13,9.807d-13,9.807d-13,
     $     5.611d-06,2.687d-06,6.998d-06,1.900d-06,2.720d-06,2.720d-06,
     $     1.741d-07,1.204d-07,1.741d-07,1.741d-07,2.767d-07,2.767d-07/
c
      data ( ( derr_other(i,k,2), i = 1, 6 ), k = 1, 10 ) /
     $     0.000d+00,6.939d-17,0.000d+00,0.000d+00,0.000d+00,0.000d+00,
     $     1.955d-10,1.955d-10,1.955d-10,1.955d-10,1.955d-10,1.955d-10,
     $     8.882d-16,4.747d-16,8.882d-16,8.882d-16,1.277d-15,1.277d-15,
     $     0.000d+00,3.322d-16,0.000d+00,0.000d+00,0.000d+00,0.000d+00,
     $     3.451d-13,7.048d-16,5.135d-13,1.603d-15,3.965d-13,2.257d-13,
     $     4.214d-12,1.393d-12,5.600d-12,1.289d-12,3.380d-12,3.381d-12,
     $     1.002d-10,4.949d-08,9.975d-09,4.949d-08,2.627d-08,2.627d-08,
     $     6.134d-10,1.420d-07,3.277d-09,1.420d-07,1.311d-10,1.311d-10,
     $     1.776d-15,1.128d-15,1.776d-15,1.776d-15,0.000d+00,0.000d+00,
     $     8.882d-16,8.179d-16,8.882d-16,1.776d-15,1.776d-15,1.776d-15/
c
      data ( ( derr_other(i,k,2), i = 1, 6 ), k = 11, ntry ) /
     $     2.574d-05,3.674d-06,2.574d-05,3.674d-06,2.034d-05,2.034d-05,
     $     8.852d-05,7.964d-05,6.397d-05,7.964d-05,8.874d-05,8.874d-05,
     $     4.441d-16,5.816d-16,8.882d-16,4.441d-16,5.551d-16,5.551d-16,
     $     8.882d-16,1.834d-16,2.220d-16,2.220d-16,8.882d-16,8.882d-16,
     $     1.388d-17,1.397d-17,1.388d-17,1.388d-17,1.388d-17,1.388d-17,
     $     6.939d-18,6.851d-18,6.939d-18,1.388d-17,1.388d-17,1.388d-17,
     $     8.882d-16,6.176d-16,8.882d-16,1.776d-15,8.882d-16,8.882d-16,
     $     8.882d-16,6.345d-16,1.355d-20,8.882d-16,0.000d+00,0.000d+00,
     $     8.882d-16,6.870d-16,8.882d-16,0.000d+00,8.882d-16,8.882d-16,
     $     4.459d-12,4.459d-12,4.459d-12,4.459d-12,4.459d-12,4.459d-12,
     $     0.000d+00,4.051d-16,0.000d+00,0.000d+00,0.000d+00,0.000d+00,
     $     1.741d-07,1.204d-07,1.741d-07,1.741d-07,2.767d-07,2.767d-07/
c
      data ( ( derr_other(i,k,3), i = 1, 6 ), k = 1, 10 ) /
     $     2.665d-15,6.106d-16,1.166d-15,8.882d-16,3.553d-15,2.665d-15,
     $     2.303d-10,2.303d-10,2.303d-10,2.303d-10,2.303d-10,2.303d-10,
     $     1.804d-15,9.449d-16,1.915d-15,1.804d-15,1.749d-15,1.749d-15,
     $     4.658d-10,4.658d-10,4.658d-10,4.658d-10,4.658d-10,4.658d-10,
     $     5.240d-14,1.323d-15,3.286d-14,3.331d-15,1.494d-13,1.728d-13,
     $     9.956d-12,3.809d-12,5.760d-12,8.876d-12,1.369d-11,1.365d-11,
     $     1.002d-10,4.949d-08,9.975d-09,4.949d-08,2.627d-08,2.627d-08,
     $     6.134d-10,1.420d-07,3.277d-09,1.420d-07,1.311d-10,1.311d-10,
     $     1.776d-15,7.850d-16,1.776d-15,1.776d-15,1.776d-15,3.553d-15,
     $     2.665d-15,1.129d-15,1.776d-15,1.776d-15,2.220d-15,1.776d-15/
c
      data ( ( derr_other(i,k,3), i = 1, 6 ), k = 11, ntry ) /
     $     3.505d-05,5.004d-06,3.505d-05,5.004d-06,2.770d-05,2.770d-05,
     $     1.206d-04,1.085d-04,8.713d-05,1.085d-04,1.209d-04,1.209d-04,
     $     1.998d-15,1.290d-15,3.109d-15,1.776d-15,5.995d-15,5.995d-15,
     $     2.220d-15,2.185d-15,1.332d-15,2.220d-15,2.220d-15,2.220d-15,
     $     1.388d-17,1.397d-17,1.388d-17,1.388d-17,1.388d-17,1.388d-17,
     $     6.939d-18,6.851d-18,6.939d-18,1.388d-17,1.388d-17,1.388d-17,
     $     1.110d-16,8.945d-17,4.441d-16,1.110d-16,4.441d-16,4.441d-16,
     $     5.551d-17,3.036d-17,6.939d-18,5.551d-17,2.711d-20,2.711d-20,
     $     3.553d-15,4.499d-15,8.882d-15,7.105d-15,8.882d-15,8.438d-15,
     $     6.216d-10,6.216d-10,6.216d-10,6.216d-10,6.216d-10,6.216d-10,
     $     3.573d-05,8.200d-06,1.425d-05,1.686d-05,1.492d-05,1.492d-05,
     $     1.741d-07,1.204d-07,1.741d-07,1.741d-07,2.767d-07,2.767d-07/
c
      data dVfit_lim / 1.d-10, 1.d-10, 1.d-9 /
c
      data deriv_lim / 1.d-9, 1.d-9, 1.d-8 /
c
      data Derr_lim / 1.d-4, 5.d-4, 1.d-3 /
c
      data Derr_lo / 1.d-7, 1.d-7, 1.d-6 /
c
c__Check the BMKP H4 surface program against all the stored values:
c
      write(6,10) ntry
 10   format(' '/'BMKP H4 surface test of',i3,' conformations:',
     $     '  Check energy  "Vfit"  and its'/
     $     '=========================================',
     $     '  cartesian derivatives  "dVdcc".')
c
      ideriv = 2
c
      do n = 1, 3
c
         call h4bmkp_set_err( 3 - n )
c
         dmax_Vfit(n) = 0.d0
         dmax_dVdcc(n) = 0.d0
         Derr_max(n) = 0.d0
c
         do k = 1, ntry
c
            if ( n .eq. 1 ) then
               f = 1.d0
            else
               f = f_red_cc(k)
            endif
c
            do i = 1, 4
               cc(i,1) = f * cc_try(i,1,k)
               cc(i,2) = f * cc_try(i,2,k)
               cc(i,3) = f * cc_try(i,3,k)
            enddo
c
            call h4bmkp( cc, Vfit, r, dVdcc, dVdr, Derr, ideriv )
c
            Vfit_get(k,n) = Vfit
c
            dmax_Vfit(n) = max( dmax_Vfit(n) ,
     $           abs( Vfit - Vfit_val(k,n) ) )
c
            derr_get(k,n) = Derr
c
            Derr_max(n) = max( Derr_max(n) , Derr )
c
            do j = 1, 3
               do i = 1, 4
                  dVdcc_get(i,j,k,n) = dVdcc(i,j)
                  dmax_dVdcc(n) = max( dmax_dVdcc(n) ,
     $                 abs( dVdcc(i,j) - dVdcc_val(i,j,k,n) ) )
               enddo
            enddo
c
            do i = 1, 6
               r_get(i,k,n) = r(i)
            enddo
c-debug[
c-debug;            write(6,3) k + ( n - 1 ) * ntry, Vfit, Derr, (r(i),i=1,6)
c-debug; 3          format(i2,':V',f20.16,' D',1p,e10.3,' r',0p,6f20.16)
c-debug]
c
         enddo
c
      enddo
c-debug[
c-debug;      do n = 1, 3
c-debug;         do k = 1, ntry
c-debug;            write(6,4) k + ( n - 1 ) * ntry,
c-debug;     $           ((dVdcc_get(i,j,k,n),i=1,4),j=1,3)
c-debug; 4          format(i2,':d',12f20.16)
c-debug;         enddo
c-debug;      enddo
c-debug]
c
c__Output a summary of the above (full) check:
c
c
c BMKP H4 surface test of 22 conformations:  Check energy  "Vfit"  and its
c =========================================  cartesian derivatives  "dVdcc".
c
c Below:  "max{delta:Vfit}"  is the maximum absolute difference between the
c  22 calculated Vfit values and the corresponding correct stored values,
c  "max{delta:dVdcc}"  is the similar maximum absolute difference over the
c  derivatives with respect to each point's 12 cartesian coordinates, and
c  "max{Derr}" is the maximum returned value of the calculated error in the
c  derivatives  "dVdr"  with respect to the 6 distances.  All are in atomic
c  units (energy in hartrees, distance in bohrs).  The max{...} values should
c  be small but non-zero, and should lie within the limits quoted underneath:
c
c  For our tests of several different machine types, operating systems, fortran
c  compilers, and optimization levels: the max{...} values lay in the ranges:
c
c**Main test:
c           max{delta:Vfit}      max{delta:dVdcc}          max{Derr}
c         5.551E-17:2.305E-13   5.551E-17:2.668E-11   2.762E-06:3.875E-05
c
c Limits  1.000E-17:1.000E-10   1.000E-17:1.000E-09   1.000E-07:1.000E-04
c
c**Compact:
c           max{delta:Vfit}      max{delta:dVdcc}          max{Derr}
cLevel=1: 2.776E-17:5.009E-13   5.551E-17:1.798E-11   7.964E-05:8.874E-05
c
c Limits  1.000E-17:1.000E-10   1.000E-17:1.000E-09   1.000E-07:5.000E-04
c
c**Compact,BAD-extrap:
c           max{delta:Vfit}      max{delta:dVdcc}          max{Derr}
cLevel=0: 2.776E-17:2.109E-12   5.551E-17:1.877E-11   1.085E-04:1.209E-04
c
c Limits  1.000E-17:1.000E-09   1.000E-17:1.000E-08   1.000E-07:1.000E-03
c
      n = 1
c
      write(6,100) ntry, dmax_Vfit(n), dmax_dVdcc(n), Derr_max(n),
     $     dVfit_lim(n), deriv_lim(n), Derr_lo(n), Derr_lim(n)
 100  format(' '/' Below:  "max{delta:Vfit}"  is the maximum absolute',
     $     ' difference between the'/i4,' calculated Vfit values and',
     $     ' the corresponding correct stored values,'/'  "max{delta:',
     $     'dVdcc}"  is the similar maximum absolute difference over',
     $     ' the'/'  derivatives with respect to each point''s 12',
     $     ' cartesian coordinates, and'/'  "max{Derr}" is the',
     $     ' maximum returned value of the calculated error in the'/
     $     '  derivatives  "dVdr"  with respect to the 6 distances.',
     $     '  All are in atomic'/'  units (energy in hartrees,',
     $     ' distance in bohrs).  The max{...} values should'/
     $     '  be small but non-zero, and should lie within the',
     $     ' limits quoted underneath:'/' '/
     $     ' max{delta:Vfit}=',1p,e10.3,'  max{delta:dVdcc}=',e10.3,
     $     '  max{Derr}=',e10.3/' '/' Limits 1.000E-17:',e9.3,
     $     '          1.000E-17:',e9.3,e12.3,':',e9.3,/' ')
c
      do while ( n .le. 3 )
c
         if ( dmax_Vfit(n) .lt. 1.d-17 .or.
     $        dmax_Vfit(n) .gt. dVfit_lim(n) ) then
            write(6,110)
 110        format(' There is a problem with the Vfit values.'/' ')
            if ( dmax_dVdcc(n) .lt. 1.d-17 .or.
     $           dmax_dVdcc(n) .gt. deriv_lim(n) ) then
               write(6,120)
 120           format(' There is a problem with the dVdcc values.'/' ')
               if ( Derr_max(n) .lt. 1.d-17 .or.
     $              Derr_max(n) .gt. Derr_lim(n) ) then
                  write(6,130)
 130              format(' There is a problem with the dVdr values.'/
     $                 ' ')
               else if ( Derr_max(n) .lt. Derr_lo(n) ) then
                  write(6,135)
 135              format(' There may be a problem with the dVdr',
     $                 ' values: they should not work this well.'/' ')
               endif
            else if ( Derr_max(n) .lt. 1.d-17 .or.
     $              Derr_max(n) .gt. Derr_lim(n) ) then
               write(6,130)
            else if ( Derr_max(n) .lt. Derr_lo(n) ) then
               write(6,135)
            endif
         else if ( dmax_dVdcc(n) .lt. 1.d-17 .or.
     $           dmax_dVdcc(n) .gt. deriv_lim(n) ) then
            write(6,140)
 140        format(' Vfit is O.K.,',
     $           ' but there is a problem with the dVdcc values.'/' ')
            if ( Derr_max(n) .lt. 1.d-17 .or.
     $           Derr_max(n) .gt. Derr_lim(n) ) then
               write(6,130)
            else if ( Derr_max(n) .lt. Derr_lo(n) ) then
               write(6,135)
            endif
         else if ( Derr_max(n) .lt. 1.d-17 .or. 
     $           Derr_max(n) .gt. Derr_lim(n) ) then
            write(6,150)
 150        format(' Vfit and dVdcc are O.K., but there is',
     $           ' a problem with the dVdr values.'/' '/
     $           ' You should be able to use the BMKP surface,',
     $           ' as long as you do NOT use dVdr.'/' ')
         else if ( Derr_max(n) .lt. Derr_lo(n) ) then
            write(6,160)
 160        format(' Vfit and dVdcc are O.K., but there may be',
     $           ' a problem with the dVdr values.'/' '/
     $           ' You should be able to use the BMKP surface,',
     $           ' as long as you do not use dVdr.'/' ')
         else
            write(6,180) ntry
 180        format(' ***** Calculated values for the',i3,
     $           ' tested conformations are ALL CORRECT.'/' ')
         endif
c
         n = n + 1
c
         if ( n .eq. 2 ) then
c
            write(6,190) ntry, 3 - n,
     $           dmax_Vfit(n), dmax_dVdcc(n), Derr_max(n),
     $           dVfit_lim(n), deriv_lim(n), Derr_lo(n), Derr_lim(n)
 190        format(' '/' Same comparison:',i3,' more-compact points',
     $           ' with the (default) error level =',i2,':'/' '/
     $           ' max{delta:Vfit}=',1p,e10.3,'  max{delta:dVdcc}=',
     $           e10.3,
     $           '  max{Derr}=',e10.3/' '/' Limits 1.000E-17:',e9.3,
     $           '          1.000E-17:',e9.3,e12.3,':',e9.3,/' ')
c
         else if ( n .eq. 3 ) then
c
            write(6,200) ntry, 3 - n,
     $           dmax_Vfit(n), dmax_dVdcc(n), Derr_max(n),
     $           dVfit_lim(n), deriv_lim(n), Derr_lo(n), Derr_lim(n)
 200        format(' '/' Same comparison:',i3,' compact points',
     $           ' with (NOT-RECOMMENDED) error level =',i2,';'/
     $           '  you can ignore any problems here as long',
     $           ' as you do not change the'/
     $           '  default error level = 1 (or likewise if',
     $           ' you set the error level to -1):'/' '/
     $           ' max{delta:Vfit}=',1p,e10.3,'  max{delta:dVdcc}=',
     $           e10.3,
     $           '  max{Derr}=',e10.3/' '/' Limits 1.000E-17:',e9.3,
     $           '          1.000E-17:',e9.3,e12.3,':',e9.3,/' ')
c
         endif
c
      enddo
c
c__If no individual points should be output, then stop.
c
      n_full_do = min( n_full_out , ntry_tot )
c
      if ( n_full_do .le. 0 ) stop
c
c__Else, output differences for specified number of individual points:
c
      write(6,300) n_full_do
 300  format(' '/' Full comparison for',i3,' points:',
     $     ' for Vfit and dVdcc, calculated and stored'/
     $     ' values are output, as well as the difference;',
     $     ' for Derr, calculated value is'/
     $     ' output, as well as six stored values',
     $     ' (for six system/optimization-levels):')
c
      n = 1
      f = 1.d0
c
      do while ( n_full_do .gt. 0 .and. n .le. 3 )
c
         do k = 1, min( n_full_do , ntry )
c
            if ( n .gt. 1 ) f = f_red_cc(k)
c
            write(6,320) k + ( n - 1 ) * ntry, Vfit_get(k,n),
     $           Vfit_val(k,n), Vfit_get(k,n) - Vfit_val(k,n)
 320        format(' '/' ***Point',i3,': Vfit',f16.12,' Vstored',
     $           f16.12,' diff',f16.12)
c
            do i = 1, 4
               do j = 1, 3
                  write(6,330) i, j, f * cc_try(i,j,k),
     $                 dVdcc_get(i,j,k,n), dVdcc_val(i,j,k,n),
     $                 dVdcc_get(i,j,k,n) - dVdcc_val(i,j,k,n)
 330              format(' cc(',i1,',',i1,')',f13.9,' dVdcc',f13.9,
     $                 ' stored',f13.9,' diff',f13.9)
               enddo
            enddo
c
            write(6,340) (r_get(i,k,n),i=1,6), derr_get(k,n),
     $           ( derr_other(i,k,n), i = 1, 6 )
 340        format(' r',f12.9,5f13.9/' Derr',1p,e10.3,' cf.',6e10.3)
c
         enddo
c
         n_full_do = n_full_do - ntry
         n = n + 1
c
      enddo
c
c__And output the same summary (of the full check) again.
c
      n = 1
c
      write(6,100) ntry, dmax_Vfit(n), dmax_dVdcc(n), Derr_max(n),
     $     dVfit_lim(n), deriv_lim(n), Derr_lo(n), Derr_lim(n)
c
      do while ( n .le. 3 )
c
         if ( dmax_Vfit(n) .lt. 1.d-17 .or.
     $        dmax_Vfit(n) .gt. dVfit_lim(n) ) then
            write(6,110)
            if ( dmax_dVdcc(n) .lt. 1.d-17 .or.
     $           dmax_dVdcc(n) .gt. deriv_lim(n) ) then
               write(6,120)
               if ( Derr_max(n) .lt. 1.d-17 .or.
     $              Derr_max(n) .gt. Derr_lim(n) ) then
                  write(6,130)
               else if ( Derr_max(n) .lt. Derr_lo(n) ) then
                  write(6,135)
               endif
            else if ( Derr_max(n) .lt. 1.d-17 .or.
     $              Derr_max(n) .gt. Derr_lim(n) ) then
               write(6,130)
            else if ( Derr_max(n) .lt. Derr_lo(n) ) then
               write(6,135)
            endif
         else if ( dmax_dVdcc(n) .lt. 1.d-17 .or.
     $           dmax_dVdcc(n) .gt. deriv_lim(n) ) then
            write(6,140)
            if ( Derr_max(n) .lt. 1.d-17 .or.
     $           Derr_max(n) .gt. Derr_lim(n) ) then
               write(6,130)
            else if ( Derr_max(n) .lt. Derr_lo(n) ) then
               write(6,135)
            endif
         else if ( Derr_max(n) .lt. 1.d-17 .or. 
     $           Derr_max(n) .gt. Derr_lim(n) ) then
            write(6,150)
         else if ( Derr_max(n) .lt. Derr_lo(n) ) then
            write(6,160)
         else
            write(6,180) ntry
         endif
c
         n = n + 1
c
         if ( n .eq. 2 ) then
c
            write(6,190) ntry, 3 - n,
     $           dmax_Vfit(n), dmax_dVdcc(n), Derr_max(n),
     $           dVfit_lim(n), deriv_lim(n), Derr_lo(n), Derr_lim(n)
c
         else if ( n .eq. 3 ) then
c
            write(6,200) ntry, 3 - n,
     $           dmax_Vfit(n), dmax_dVdcc(n), Derr_max(n),
     $           dVfit_lim(n), deriv_lim(n), Derr_lo(n), Derr_lim(n)
c
         endif
c
      enddo
c
      stop
      end
