This fit is a perfect fit for NMA. The force field used is the
parm99.dat force field. Note, this test also acts as a stress
test since the fit is done against a total of 1,000 structures!

The energy file has been generated by taking the amber energy for
each step and as such the simplex routine should be able to fit
this data perfectly.

Note: I had to modify sander slightly to get it to write me more
decimal places for the energies and mdcrd file. Otherwise you get
rounding errors that propogate. Also note that the MDCRD file is
actually slightly out of step with the output file. So structure
1 of the mdcrd file is actually step 2 of the output file. And
structure 2000 of mdcrd is 2001 of output file.

In extracting the amber energies I have corrected for this.

K = 0.0  - adjustment to the bond+angle data has been made.

So, energy file: adjusted_bond+angle.dat = bond energy + angle energy
+dihedral energy + 1-4VDW + 1-4EEL + VDW + EEL - K
 
Fit for bond+angle+dihedral amber standard

For bonds KR and REQ are fit.
For angles KT and THEQ are fit.
For dihedrals only KP is fit. NP and PHASE are kept constant.
 
See how the program fits the data

Since I used the amber energies the data should be fit perfectly.

In the interests of speed since this is a test of the program working
correctly the initial parameters are set very very close to the
final parameters.

Final R2 for fit should be 1.00000

Final parameters should be (There will be minor differences due to rounding
errors):

(CT  -HC  )*Kr = 340.0000 kcal/(mol A)^2,*r_eq =   1.0900 A
(CT  -H1  )*Kr = 340.0000 kcal/(mol A)^2,*r_eq =   1.0900 A
(N   -H   )*Kr = 434.0000 kcal/(mol A)^2,*r_eq =   1.0100 A
(C   -O   )*Kr = 570.0000 kcal/(mol A)^2,*r_eq =   1.2290 A
(C   -N   )*Kr = 490.0000 kcal/(mol A)^2,*r_eq =   1.3350 A
(CT  -C   )*Kr = 317.0000 kcal/(mol A)^2,*r_eq =   1.5220 A
(N   -CT  )*Kr = 337.0000 kcal/(mol A)^2,*r_eq =   1.4490 A
(C   -N   -H   )*Kt =  50.0000 kcal/(mol rad)^2,*th_eq = 120.0001 deg
(HC  -CT  -C   )*Kt =  50.0000 kcal/(mol rad)^2,*th_eq = 109.5000 deg
(HC  -CT  -HC  )*Kt =  35.0000 kcal/(mol rad)^2,*th_eq = 109.5000 deg
(H1  -CT  -H1  )*Kt =  35.0000 kcal/(mol rad)^2,*th_eq = 109.5000 deg
(H   -N   -CT  )*Kt =  50.0000 kcal/(mol rad)^2,*th_eq = 118.0401 deg
(N   -CT  -H1  )*Kt =  50.0000 kcal/(mol rad)^2,*th_eq = 109.5000 deg
(O   -C   -N   )*Kt =  80.0000 kcal/(mol rad)^2,*th_eq = 122.9001 deg
(C   -N   -CT  )*Kt =  50.0000 kcal/(mol rad)^2,*th_eq = 121.9001 deg
(CT  -C   -O   )*Kt =  80.0000 kcal/(mol rad)^2,*th_eq = 120.4001 deg
(CT  -C   -N   )*Kt =  70.0000 kcal/(mol rad)^2,*th_eq = 116.6000 deg
(O   -C   -N   -H   )*Kp =   2.0000 kcal/mol, Np = 1.0000, Phase =   0.0000 Deg
(O   -C   -N   -H   )*Kp =   2.5000 kcal/mol, Np = 2.0000, Phase = 180.0001 Deg
(C   -N   -CT  -H1  )*Kp =   0.0000 kcal/mol, Np = 2.0000, Phase =   0.0000 Deg
(HC  -CT  -C   -O   )*Kp =   0.8000 kcal/mol, Np = 1.0000, Phase =   0.0000 Deg
(HC  -CT  -C   -O   )*Kp =   0.0800 kcal/mol, Np = 3.0000, Phase = 180.0001 Deg
(HC  -CT  -C   -N   )*Kp =   0.0000 kcal/mol, Np = 2.0000, Phase =   0.0000 Deg
(HC  -CT  -C   -O   )*Kp =   0.0000 kcal/mol, Np = 2.0000, Phase =   0.0000 Deg
(CT  -C   -N   -H   )*Kp =   2.5000 kcal/mol, Np = 2.0000, Phase = 180.0001 Deg
(H   -N   -CT  -H1  )*Kp =   0.0000 kcal/mol, Np = 2.0000, Phase =   0.0000 Deg
(C   -CT  -N   -H   )*Kp =   1.1000 kcal/mol, Np = 2.0000, Phase = 180.0001 Deg
(O   -C   -N   -CT  )*Kp =   2.5000 kcal/mol, Np = 2.0000, Phase = 180.0001 Deg
(CT  -C   -N   -CT  )*Kp =   2.5000 kcal/mol, Np = 2.0000, Phase = 180.0001 Deg
(CT  -N   -C   -O   )*Kp =  10.5000 kcal/mol, Np = 2.0000, Phase = 180.0001 Deg

