13d12
<       PARAMETER (ONE12=1.0/12.0D0)
15,16c14,16
<       SAVE ED0,ED20
<       DATA ED0,ED20 /2*0.0D0/
---
>       SAVE ACC0,DER0
>       REAL*8  ACC0(3),DER0(3)
>       DATA ACC0,DER0 /6*0.0D0/
24d23
<       ZMU = M*ETA
35a35
>       A25 = A25/CLIGHT**3
38a39
>       B25 = B25/CLIGHT**3
40c41
< *       Set the standard PN2.5 acceleration scaled by M/R**2/C**5.
---
> *       Set the standard PN2.5 perturbing acceleration for VDOT.
45c46
< *       Form terms for the first time derivative of A & B.
---
> *       Note ACC scaled by M/R**2/C**5 for actual perturbing force.
53,54c54
< *
< *       Obtain d2R/dt**2 from dR/dt & d(R*V)/dt and absorb 1/R in ADOT.
---
> *       Form d2R/dt**2 from dR/dt & d(R*V)/dt and absorb 1/R in ADOT.
66c66
< *       Note that M/R2 is omitted in all terms (set in final scaling).
---
> *       Note that M/R2 is omitted in all terms (see final scaling).
72c72
< *       Scale derivative by the leading term M/R**2 and also by 1/C**2.
---
> *       Scale the acceleration and derivative by the leading term M/R**2.
73a74,75
>       A = A25
>       B = B25
75a78
> ***       ACC(K) = GMC*(A*X(K)/R + B*V(K))
80,99c83,100
< *       Employ Hermite 4th-order integration for the energy equation.
<       ED = 0.0
<       ED2 = 0.0
< *       Form the first and second energy derivative.
<       DO 40 K = 1,3
<           ED = ED + ACC(K)*V(K)
<           ED2 = ED2 + ACC(K)*VDOT(K) + DER(K)*V(K)
<    40 CONTINUE
< *
< *       Construct standard Hermite third and fourth-order derivatives.
<       ED3 = 2.0*(-3.0*(ED0 - ED) - (2.0*ED20 + ED2)*DT)/DT**2
<       ED4 = 6.0*(2.0*(ED0 - ED) + (ED20 + ED2)*DT)/DT**3
< *
< *       Get final result from Keigo's Hermite version.
<       DE = 0.5*(ED0 + ED)*DT + ONE12*(ED20 - ED2)*DT**2
<       DEGR = DEGR + ZMU*DE
< *
< *       Save the two derivatives for next step.
<       ED0 = ED
<       ED20 = ED2
---
>       DIFF = 0.0
>       AVJ = 0.0
>       DO 35 K = 1,3
>           DA = (ACC(K) - ACC0(K))/DT
>           AV = (DER(K) + DER0(K))/2.0
>           DIFF = DIFF + DA**2
>           AVJ = AVJ + AV**2
>    35 CONTINUE
> *     IF (MOD(IC,100).EQ.0) THEN
>       IF (IC.GT.100000.AND.IC.LT.101000) THEN
>       WRITE (12,36)  IC, SQRT(DIFF), SQRT(AVJ)
>    36 FORMAT (' IC DA AVJ  ',I10,1P,2E12.4)
>       END IF
>       DO 38 K = 1,3
> *         DER(K) = (ACC(K) - ACC0(K))/DT
>           ACC0(K) = ACC(K)
>           DER0(K) = DER(K)
>    38 CONTINUE
102d102
< *       Define relative perturbation for time-step reduction (no dyn pert).
104c104
< *     IF (MOD(IC,100).EQ.0) THEN
---
>       IF (MOD(IC,100).EQ.0) THEN
106,109c106,108
<       WRITE (6,60)  IC, GAM, R, DD, A, B, DEGR
<    60 FORMAT (' IC GAM R DD A B DEGR ',I9,1P,6E10.2)
< *     END IF
< *
---
>       WRITE (6,40)  IC, GAM, R, DD, A, B
>    40 FORMAT (' IC GAM R DD A B ',I8,1P,6E10.2)
>       END IF
