let

using .ProtoSyn.Calculators.Forcefield

if !isdefined(@__MODULE__, :ffamber03)
    ffamber03 = ProtoSyn.Calculators.Forcefield.ForcefieldSpec(
        name = "amber03",
        fudgeLJ = 0.5,
        fudgeQQ = 0.83333,
        genpairs = true,
        exclusion_depth = 3)
end

@ffspec ffamber03.components :atoms AtomType begin
    # type       Z        mass    sigma         epsilon
    ("H0",       1,      1.008,    2.47135e-01,   6.56888e-02),
    ("Br",      35,      79.90,    0.00000e+00,   0.00000e+00),
    ( "C",       6,      12.01,    3.39967e-01,   3.59824e-01),
    ("CA",       6,      12.01,    3.39967e-01,   3.59824e-01),
    ("CB",       6,      12.01,    3.39967e-01,   3.59824e-01),
    ("CC",       6,      12.01,    3.39967e-01,   3.59824e-01),
    ("CK",       6,      12.01,    3.39967e-01,   3.59824e-01),
    ("CM",       6,      12.01,    3.39967e-01,   3.59824e-01),
    ("CN",       6,      12.01,    3.39967e-01,   3.59824e-01),
    ("CQ",       6,      12.01,    3.39967e-01,   3.59824e-01),
    ("CR",       6,      12.01,    3.39967e-01,   3.59824e-01),
    ("CT",       6,      12.01,    3.39967e-01,   4.57730e-01),
    ("CV",       6,      12.01,    3.39967e-01,   3.59824e-01),
    ("CW",       6,      12.01,    3.39967e-01,   3.59824e-01),
    ("C0",      20,      40.08,    3.05240e-01,   1.92376e+00),
    ( "F",       9,      19.00,    3.11815e-01,   2.55224e-01),
    ( "H",       1,      1.008,    1.06908e-01,   6.56888e-02),
    ("HC",       1,      1.008,    2.64953e-01,   6.56888e-02),
    ("H1",       1,      1.008,    2.47135e-01,   6.56888e-02),
    ("H2",       1,      1.008,    2.29317e-01,   6.56888e-02),
    ("H3",       1,      1.008,    2.11499e-01,   6.56888e-02),
    ("HA",       1,      1.008,    2.59964e-01,   6.27600e-02),
    ("H4",       1,      1.008,    2.51055e-01,   6.27600e-02),
    ("H5",       1,      1.008,    2.42146e-01,   6.27600e-02),
    ("HO",       1,      1.008,    0.00000e+00,   0.00000e+00),
    ("HS",       1,      1.008,    1.06908e-01,   6.56888e-02),
    ("HW",       1,      1.008,    0.00000e+00,   0.00000e+00),
    ("HP",       1,      1.008,    1.95998e-01,   6.56888e-02),
    ( "I",      53,      126.9,    4.18722e-01,   1.67360e+00),
    ("Cl",      17,      35.45,    4.40104e-01,   4.18400e-01),
    ("Na",      11,      22.99,    3.32840e-01,   1.15897e-02),
    ("IB",       0,      131.0,    8.90899e-01,   4.18400e-01),
    ("MG",      12,     24.305,    1.41225e-01,   3.74342e+00),
    ( "N",       7,      14.01,    3.25000e-01,   7.11280e-01),
    ("NA",       7,      14.01,    3.25000e-01,   7.11280e-01),
    ("NB",       7,      14.01,    3.25000e-01,   7.11280e-01),
    ("NC",       7,      14.01,    3.25000e-01,   7.11280e-01),
    ("N2",       7,      14.01,    3.25000e-01,   7.11280e-01),
    ("N3",       7,      14.01,    3.25000e-01,   7.11280e-01),
    ( "O",       8,      16.00,    2.95992e-01,   8.78640e-01),
    ("OW",       8,      16.00,    3.15061e-01,   6.36386e-01),
    ("OH",       8,      16.00,    3.06647e-01,   8.80314e-01),
    ("OS",       8,      16.00,    3.00001e-01,   7.11280e-01),
    ("O2",       8,      16.00,    2.95992e-01,   8.78640e-01),
    ( "P",      15,      30.97,    3.74177e-01,   8.36800e-01),
    ( "S",      16,      32.06,    3.56359e-01,   1.04600e+00),
    ("SH",      16,      32.06,    3.56359e-01,   1.04600e+00),
    ("CU",      29,      63.55,    3.39967e-01,   3.59824e-01),
    ("FE",      26,      55.00,    0.00000e+00,   0.00000e+00),
    ( "K",      19,      39.10,    4.73602e-01,   1.37235e-03),
    ("Rb",      37,      85.47,    5.26699e-01,   7.11280e-04),
    ("Cs",      55,     132.91,    6.04920e-01,   3.37230e-04),
    ("OW_spc",   8,    15.9994,    3.16557e-01,   6.50629e-01),
    ("HW_spc",   1,     1.0080,    0.00000e+00,   0.00000e+00),
    ("Li",       3,       6.94,    2.02590e-01,   7.65672e-02),
    ("Zn",      30,       65.4,    1.95998e-01,   5.23000e-02)
end



@ffspec ffamber03.components :bonds HarmonicBondType begin
    ("CT", "H0",     0.1090,   284512.0),  #  03GLY changed from 331 bsd on NMA nmodes; AA, SUGARS
    ( "C",  "C",     0.1525,   259408.0),  #  new99
    ( "C", "OS",     0.1323,   376560.0),  #  new99
    ( "C", "H4",     0.1080,   307105.6),  #  new99
    ( "C", "H5",     0.1080,   307105.6),  #  new99
    ("CA", "OH",     0.1364,   376560.0),  #  new99
    ("CM", "OS",     0.1240,   401664.0),  #  new99
    ("Cl", "CT",     0.1766,   194137.6),  #  new99
    ("Br", "CT",     0.1944,   133051.2),  #  new99
    ( "I", "CT",     0.2166,   123846.4),  #  new99
    ( "F", "CA",     0.1359,   323004.8),  #  new99
    ("Cl", "CA",     0.1727,   161502.4),  #  new99
    ( "I", "CA",     0.2075,   143092.8),  #  new99
    ("Br", "CA",     0.1890,   143929.6),  #  new99
    ("OW", "HW",    0.09572,   462750.4),  #  P water
    ("HW", "HW",    0.15136,   462750.4),  #  P water
    ( "C", "CA",    0.14090,   392459.2),  #  7,(1986),230; TYR
    ( "C", "CB",    0.14190,   374049.6),  #  7,(1986),230; GUA
    ( "C", "CM",    0.14440,   343088.0),  #  7,(1986),230; THY,URA
    ( "C", "CT",    0.15220,   265265.6),  #  7,(1986),230; AA
    ( "C", "NA",    0.13880,   349782.4),  #  7,(1986),230; GUA.URA
    ( "C", "NC",    0.13580,   382417.6),  #  7,(1986),230; CYT
    ( "C",  "O",    0.12290,   476976.0),  #  7,(1986),230; AA,CYT,GUA,THY,URA
    ( "C", "O2",    0.12500,   548940.8),  #  7,(1986),230; GLU,ASP
    ( "C", "OH",    0.13640,   376560.0),  #  7,(1986),230; TYR
    ("CA", "CA",    0.14000,   392459.2),  #  7,(1986),230; BENZENE,PHE,TRP,TYR
    ("CA", "CB",    0.14040,   392459.2),  #  7,(1986),230; ADE,TRP
    ("CA", "CM",    0.14330,   357313.6),  #  7,(1986),230; CYT
    ("CA", "CT",    0.15100,   265265.6),  #  7,(1986),230; PHE,TYR
    ("CA", "HA",    0.10800,   307105.6),  #  ged from 340. bsd on C6H6 nmodes; PHE,TRP,TYR
    ("CA", "H4",    0.10800,   307105.6),  #  ged from 340. bsd on C6H6 nmodes; no assigned
    ("CA", "N2",    0.13400,   402500.8),  #  7,(1986),230; ARG,CYT,GUA
    ("CA", "NA",    0.13810,   357313.6),  #  7,(1986),230; GUA
    ("CA", "NC",    0.13390,   404174.4),  #  7,(1986),230; ADE,CYT,GUA
    ("CB", "CB",    0.13700,   435136.0),  #  7,(1986),230; ADE,GUA
    ("CB", "NB",    0.13910,   346435.2),  #  7,(1986),230; ADE,GUA
    ("CB", "NC",    0.13540,   385764.8),  #  7,(1986),230; ADE,GUA
    ("CK", "H5",    0.10800,   307105.6),  #  ged from 340. bsd on C6H6 nmodes; ADE,GUA
    ("CK", "NB",    0.13040,   442667.2),  #  7,(1986),230; ADE,GUA
    ("CM", "CM",    0.13500,   459403.2),  #  7,(1986),230; CYT,THY,URA
    ("CM", "CT",    0.15100,   265265.6),  #  7,(1986),230; THY
    ("CM", "HA",    0.10800,   307105.6),  #  ged from 340. bsd on C6H6 nmodes; CYT,URA
    ("CM", "H4",    0.10800,   307105.6),  #  ged from 340. bsd on C6H6 nmodes; CYT,URA
    ("CM", "H5",    0.10800,   307105.6),  #  ged from 340. bsd on C6H6 nmodes; not assigned
    ("CQ", "H5",    0.10800,   307105.6),  #  ged from 340. bsd on C6H6 nmodes; ADE
    ("CQ", "NC",    0.13240,   420073.6),  #  7,(1986),230; ADE
    ("CT", "CT",    0.15260,   259408.0),  #  7,(1986),230; AA, SUGARS
    ("CT", "HC",    0.10900,   284512.0),  #  ged from 331 bsd on NMA nmodes; AA, SUGARS
    ("CT", "H1",    0.10900,   284512.0),  #  ged from 331 bsd on NMA nmodes; AA, RIBOSE
    ("CT", "H2",    0.10900,   284512.0),  #  ged from 331 bsd on NMA nmodes; SUGARS
    ("CT", "H3",    0.10900,   284512.0),  #  ged from 331 bsd on NMA nmodes; not assigned
    ("CT", "HP",    0.10900,   284512.0),  #  nged from 331; AA-lysine, methyl ammonium cation
    ("CT", "N2",    0.14630,   282001.6),  #  7,(1986),230; ARG
    ("CT", "OH",    0.14100,   267776.0),  #  7,(1986),230; SUGARS
    ("CT", "OS",    0.14100,   267776.0),  #  7,(1986),230; NUCLEIC ACIDS
    ( "H", "N2",    0.10100,   363171.2),  #  7,(1986),230; ADE,CYT,GUA,ARG
    ( "H", "NA",    0.10100,   363171.2),  #  7,(1986),230; GUA,URA,HIS
    ("HO", "OH",    0.09600,   462750.4),  #  7,(1986),230; SUGARS,SER,TYR
    ("HO", "OS",    0.09600,   462750.4),  #  7,(1986),230; NUCLEOTIDE ENDS
    ("O2",  "P",    0.14800,   439320.0),  #  7,(1986),230; NA PHOSPHATES
    ("OH",  "P",    0.16100,   192464.0),  #  7,(1986),230; NA PHOSPHATES
    ("OS",  "P",    0.16100,   192464.0),  #  7,(1986),230; NA PHOSPHATES
    ( "C",  "N",    0.13350,   410032.0),  #  7,(1986),230; AA
    ("CA", "CN",    0.14000,   392459.2),  #  7,(1986),230; TRP
    ("CB", "CN",    0.14190,   374049.6),  #  7,(1986),230; TRP
    ("CC", "CT",    0.15040,   265265.6),  #  7,(1986),230; HIS
    ("CC", "CV",    0.13750,   428441.6),  #  7,(1986),230; HIS(delta)
    ("CC", "CW",    0.13710,   433462.4),  #  7,(1986),230; HIS(epsilon)
    ("CC", "NA",    0.13850,   353129.6),  #  7,(1986),230; HIS
    ("CC", "NB",    0.13940,   343088.0),  #  7,(1986),230; HIS
    ("CN", "NA",    0.13800,   358150.4),  #  7,(1986),230; TRP
    ("CR", "H5",    0.10800,   307105.6),  #  ged from 340. bsd on C6H6 nmodes;HIS
    ("CR", "NA",    0.13430,   399153.6),  #  7,(1986),230; HIS
    ("CR", "NB",    0.13350,   408358.4),  #  7,(1986),230; HIS
    ("CT",  "N",    0.14490,   282001.6),  #  7,(1986),230; AA
    ("CT", "N3",    0.14710,   307105.6),  #  7,(1986),230; LYS
    ("CT",  "S",    0.18100,   189953.6),  #  ged from 222.0 based on dimethylS nmodes
    ("CT", "SH",    0.18100,   198321.6),  #  ged from 222.0 based on methanethiol nmodes
    ("CV", "H4",    0.10800,   307105.6),  #  ged from 340. bsd on C6H6 nmodes; HIS
    ("CV", "NB",    0.13940,   343088.0),  #  7,(1986),230; HIS
    ("CW", "H4",    0.10800,   307105.6),  #  ged from 340. bsd on C6H6 nmodes;HIS(epsilon,+)
    ("CW", "NA",    0.13810,   357313.6),  #  7,(1986),230; HIS,TRP
    ( "H",  "N",    0.10100,   363171.2),  #  7,(1986),230; AA
    ( "H", "N3",    0.10100,   363171.2),  #  7,(1986),230; LYS
    ("HS", "SH",    0.13360,   229283.2),  #  7,(1986),230; CYS
    ( "S",  "S",    0.20380,   138908.8),  #  7,(1986),230; CYX   (SCHERAGA)
    ("CT",  "F",    0.13800,   307105.6)   #  13,(1992),963;CF4; R0=1.332 FOR CHF3
end



@ffspec ffamber03.components :angles HarmonicAngleType begin
    ("H0", "CT", "H0",    109.500,    292.880),  #  03GLY
    ("H0", "CT",  "N",    109.500,    418.400),  #  03GLY AA general  changed based on NMA nmodes
    ( "C", "CT", "H0",    109.500,    418.400),  #  03GLY AA general  changed based on NMA nmodes
    ("HW", "OW", "HW",    104.520,    836.800),  #  TIP3P water
    ("HW", "HW", "OW",    127.740,      0.000),  #  (found in crystallographic water with 3 bonds)
    ( "C",  "C",  "O",    120.000,    669.440),  #  new99
    ( "C",  "C", "OH",    120.000,    669.440),  #  new99
    ("CT",  "C", "CT",    117.000,    527.184),  #  new99
    ("CT",  "C", "OS",    115.000,    669.440),  #  new99
    ( "O",  "C", "OS",    125.000,    669.440),  #  new99
    ("H4",  "C",  "C",    120.000,    418.400),  #  new99
    ("H4",  "C", "CM",    115.000,    418.400),  #  new99
    ("H4",  "C", "CT",    115.000,    418.400),  #  new99
    ("H4",  "C",  "O",    120.000,    418.400),  #  new99
    ("H4",  "C", "OH",    120.000,    418.400),  #  new99
    ("H5",  "C",  "N",    120.000,    418.400),  #  new99
    ("H5",  "C",  "O",    119.000,    418.400),  #  new99
    ("H5",  "C", "OH",    107.000,    418.400),  #  new99
    ("H5",  "C", "OS",    107.000,    418.400),  #  new99
    ("CA", "CA", "OH",    120.000,    585.760),  #  new99
    ("CA", "OH", "HO",    113.000,    418.400),  #  new99
    ( "F", "CA", "CA",    121.000,    585.760),  #  new99
    ("Cl", "CA", "CA",    118.800,    585.760),  #  new99
    ("Br", "CA", "CA",    118.800,    585.760),  #  new99
    ( "I", "CA", "CA",    118.800,    585.760),  #  new99
    ("CM", "CM", "OS",    125.000,    669.440),  #  new99
    ("H4", "CM", "OS",    113.000,    418.400),  #  new99
    ("HA", "CM", "HA",    120.000,    292.880),  #  new99
    ("HA", "CM", "CT",    120.000,    418.400),  #  new99
    ("H1", "CT", "CM",    109.500,    418.400),  #  new99
    ("HC", "CT", "CM",    109.500,    418.400),  #  new99
    ( "C", "CT", "OS",    109.500,    502.080),  #  new99
    ("CM", "CT", "CT",    111.000,    527.184),  #  new99
    ("CM", "CT", "OS",    109.500,    418.400),  #  new99
    ("CT", "CT", "CA",    114.000,    527.184),  #  new99
    ("OS", "CT", "OS",    101.000,    502.080),  #  new99
    ( "F", "CT", "CT",    109.000,    418.400),  #  new99
    ( "F", "CT", "H2",    109.500,    418.400),  #  new99
    ("Cl", "CT", "CT",    108.500,    418.400),  #  new99
    ("Cl", "CT", "H1",    108.500,    418.400),  #  new99
    ("Br", "CT", "CT",    108.000,    418.400),  #  new99
    ("Br", "CT", "H1",    106.500,    418.400),  #  new99
    ( "I", "CT", "CT",    106.000,    418.400),  #  new99
    ("CB",  "C", "NA",    111.300,    585.760),  #  NA
    ("CB",  "C",  "O",    128.800,    669.440),  # 
    ("CM",  "C", "NA",    114.100,    585.760),  # 
    ("CM",  "C",  "O",    125.300,    669.440),  # 
    ("CT",  "C",  "O",    120.400,    669.440),  # 
    ("CT",  "C", "O2",    117.000,    585.760),  # 
    ("CT",  "C", "OH",    110.000,    669.440),  #  new99
    ("NA",  "C",  "O",    120.600,    669.440),  # 
    ("NC",  "C",  "O",    122.500,    669.440),  # 
    ("CT",  "C",  "N",    116.600,    585.760),  #  AA general
    ( "N",  "C",  "O",    122.900,    669.440),  #  AA general
    ( "O",  "C",  "O",    126.000,    669.440),  #  AA COO- terminal residues
    ("O2",  "C", "O2",    126.000,    669.440),  #  AA GLU            (SCH JPC 79,2379)
    ( "O",  "C", "OH",    120.000,    669.440),  # 
    ("CA",  "C", "CA",    120.000,    527.184),  #  changed from 85.0  bsd on C6H6 nmodes; AA tyr
    ("CA",  "C", "OH",    120.000,    585.760),  #  AA tyr
    ( "C", "CA", "CA",    120.000,    527.184),  #  changed from 85.0  bsd on C6H6 nmodes
    ("CA", "CA", "CA",    120.000,    527.184),  #  changed from 85.0  bsd on C6H6 nmodes
    ("CA", "CA", "CB",    120.000,    527.184),  #  changed from 85.0  bsd on C6H6 nmodes
    ("CA", "CA", "CT",    120.000,    585.760),  # 
    ("CA", "CA", "HA",    120.000,    418.400),  #  new99
    ("CA", "CA", "H4",    120.000,    418.400),  #  new99
    ("CB", "CA", "HA",    120.000,    418.400),  #  new99
    ("CB", "CA", "H4",    120.000,    418.400),  #  new99
    ("CB", "CA", "N2",    123.500,    585.760),  # 
    ("CB", "CA", "NC",    117.300,    585.760),  # 
    ("CM", "CA", "N2",    120.100,    585.760),  # 
    ("CM", "CA", "NC",    121.500,    585.760),  # 
    ("N2", "CA", "NA",    116.000,    585.760),  # 
    ("N2", "CA", "NC",    119.300,    585.760),  # 
    ("NA", "CA", "NC",    123.300,    585.760),  # 
    ( "C", "CA", "HA",    120.000,    418.400),  #  new99 tyr
    ("N2", "CA", "N2",    120.000,    585.760),  #  AA arg
    ("CN", "CA", "HA",    120.000,    418.400),  #  new99 trp
    ("CA", "CA", "CN",    120.000,    527.184),  #  changed from 85.0  bsd on C6H6 nmodes; AA trp
    ( "C", "CB", "CB",    119.200,    527.184),  #  changed from 85.0  bsd on C6H6 nmodes; NA gua
    ( "C", "CB", "NB",    130.000,    585.760),  # 
    ("CA", "CB", "CB",    117.300,    527.184),  #  changed from 85.0  bsd on C6H6 nmodes; NA ade
    ("CA", "CB", "NB",    132.400,    585.760),  # 
    ("CB", "CB", "N*",    106.200,    585.760),  # 
    ("CB", "CB", "NB",    110.400,    585.760),  # 
    ("CB", "CB", "NC",    127.700,    585.760),  # 
    ("CA", "CB", "CN",    116.200,    527.184),  #  changed from 85.0  bsd on C6H6 nmodes; AA trp
    ("H5", "CK", "N*",    123.050,    418.400),  #  new99
    ("H5", "CK", "NB",    123.050,    418.400),  #  new99
    ( "C", "CM", "CM",    120.700,    527.184),  #  changed from 85.0  bsd on C6H6 nmodes; NA thy
    ( "C", "CM", "CT",    119.700,    585.760),  # 
    ( "C", "CM", "HA",    119.700,    418.400),  #  new99
    ( "C", "CM", "H4",    119.700,    418.400),  #  new99
    ("CA", "CM", "CM",    117.000,    527.184),  #  changed from 85.0  bsd on C6H6 nmodes; NA cyt
    ("CA", "CM", "HA",    123.300,    418.400),  #  new99
    ("CA", "CM", "H4",    123.300,    418.400),  #  new99
    ("CM", "CM", "CT",    119.700,    585.760),  # 
    ("CM", "CM", "HA",    119.700,    418.400),  #  new99
    ("CM", "CM", "H4",    119.700,    418.400),  #  new99
    ("CM", "CM", "N*",    121.200,    585.760),  # 
    ("H4", "CM", "N*",    119.100,    418.400),  #  new99
    ("H5", "CQ", "NC",    115.450,    418.400),  #  new99
    ("NC", "CQ", "NC",    129.100,    585.760),  # 
    ("CM", "CT", "HC",    109.500,    418.400),  #  changed based on NMA nmodes
    ("CT", "CT", "CT",    109.500,    334.720),  # 
    ("CT", "CT", "HC",    109.500,    418.400),  #  changed based on NMA nmodes
    ("CT", "CT", "H1",    109.500,    418.400),  #  changed based on NMA nmodes
    ("CT", "CT", "H2",    109.500,    418.400),  #  changed based on NMA nmodes
    ("CT", "CT", "HP",    109.500,    418.400),  #  changed based on NMA nmodes
    ("CT", "CT", "N*",    109.500,    418.400),  # 
    ("CT", "CT", "OH",    109.500,    418.400),  # 
    ("CT", "CT", "OS",    109.500,    418.400),  # 
    ("HC", "CT", "HC",    109.500,    292.880),  # 
    ("H1", "CT", "H1",    109.500,    292.880),  # 
    ("HP", "CT", "HP",    109.500,    292.880),  #  AA lys, ch3nh4+
    ("H2", "CT", "N*",    109.500,    418.400),  #  changed based on NMA nmodes
    ("H1", "CT", "N*",    109.500,    418.400),  #  changed based on NMA nmodes
    ("H1", "CT", "OH",    109.500,    418.400),  #  changed based on NMA nmodes
    ("H1", "CT", "OS",    109.500,    418.400),  #  changed based on NMA nmodes
    ("H2", "CT", "OS",    109.500,    418.400),  #  changed based on NMA nmodes
    ("H1", "CT",  "N",    109.500,    418.400),  #  AA general  changed based on NMA nmodes
    ( "C", "CT", "H1",    109.500,    418.400),  #  AA general  changed based on NMA nmodes
    ( "C", "CT", "HP",    109.500,    418.400),  #  AA zwitterion  changed based on NMA nmodes
    ("H1", "CT",  "S",    109.500,    418.400),  #  AA cys     changed based on NMA nmodes
    ("H1", "CT", "SH",    109.500,    418.400),  #  AA cyx     changed based on NMA nmodes
    ("CT", "CT",  "S",    114.700,    418.400),  #  AA cyx            (SCHERAGA  JPC 79,1428)
    ("CT", "CT", "SH",    108.600,    418.400),  #  AA cys
    ("H2", "CT", "H2",    109.500,    292.880),  #  AA lys
    ("H1", "CT", "N2",    109.500,    418.400),  #  AA arg     changed based on NMA nmodes
    ("HP", "CT", "N3",    109.500,    418.400),  #  AA lys, ch3nh3+, changed based on NMA nmodes
    ("CA", "CT", "CT",    114.000,    527.184),  #  AA phe tyr          (SCH JPC  79,2379)
    ( "C", "CT", "HC",    109.500,    418.400),  #  AA gln      changed based on NMA nmodes
    ( "C", "CT",  "N",    110.100,    527.184),  #  AA general
    ("CT", "CT", "N2",    111.200,    669.440),  #  AA arg             (JCP 76, 1439)
    ("CT", "CT",  "N",    109.700,    669.440),  #  AA ala, general    (JACS 94, 2657)
    ( "C", "CT", "CT",    111.100,    527.184),  #  AA general
    ("CA", "CT", "HC",    109.500,    418.400),  #  AA tyr     changed based on NMA nmodes
    ("CT", "CT", "N3",    111.200,    669.440),  #  AA lys             (JCP 76, 1439)
    ("CC", "CT", "CT",    113.100,    527.184),  #  AA his
    ("CC", "CT", "HC",    109.500,    418.400),  #  AA his     changed based on NMA nmodes
    ( "C", "CT", "N3",    111.200,    669.440),  #  AA amino terminal residues
    ("CT", "CC", "NA",    120.000,    585.760),  #  AA his
    ("CT", "CC", "CV",    120.000,    585.760),  #  AA his
    ("CT", "CC", "NB",    120.000,    585.760),  #  AA his
    ("CV", "CC", "NA",    120.000,    585.760),  #  AA his
    ("CW", "CC", "NA",    120.000,    585.760),  #  AA his
    ("CW", "CC", "NB",    120.000,    585.760),  #  AA his
    ("CT", "CC", "CW",    120.000,    585.760),  #  AA his
    ("H5", "CR", "NA",    120.000,    418.400),  #  new99 his
    ("H5", "CR", "NB",    120.000,    418.400),  #  new99 his
    ("NA", "CR", "NA",    120.000,    585.760),  #  AA his
    ("NA", "CR", "NB",    120.000,    585.760),  #  AA his
    ("CC", "CV", "H4",    120.000,    418.400),  #  new99 his
    ("CC", "CV", "NB",    120.000,    585.760),  #  AA his
    ("H4", "CV", "NB",    120.000,    418.400),  #  new99 his
    ("CC", "CW", "H4",    120.000,    418.400),  #  new99 his
    ("CC", "CW", "NA",    120.000,    585.760),  #  AA his
    ("H4", "CW", "NA",    120.000,    418.400),  #  new99 his
    ("CA", "CN", "NA",    132.800,    585.760),  #  AA trp
    ("CB", "CN", "NA",    104.400,    585.760),  #  AA trp
    ("CA", "CN", "CB",    122.700,    527.184),  #  changed from 85.0  bsd on C6H6 nmodes; AA trp
    ( "C",  "N", "CT",    121.900,    418.400),  #  AA general
    ( "C",  "N",  "H",    120.000,    418.400),  #  new99 general, gln, asn,changed based on NMA nmodes
    ("CT",  "N",  "H",    118.040,    418.400),  #  new99 general,     changed based on NMA nmodes
    ("CT",  "N", "CT",    118.000,    418.400),  #  AA pro             (DETAR JACS 99,1232)
    ( "H",  "N",  "H",    120.000,    292.880),  #  ade,cyt,gua,gln,asn     **
    ("CA", "N2",  "H",    120.000,    418.400),  #  new99
    ( "H", "N2",  "H",    120.000,    292.880),  # 
    ("CT", "N2",  "H",    118.400,    418.400),  #  new99 arg
    ("CA", "N2", "CT",    123.200,    418.400),  #  AA arg
    ("CT", "N3",  "H",    109.500,    418.400),  #  AA lys,     changed based on NMA nmodes
    ("CT", "N3", "CT",    109.500,    418.400),  #  AA pro/nt
    ( "H", "N3",  "H",    109.500,    292.880),  #  AA lys, AA(end)
    ( "C", "NA",  "C",    126.400,    585.760),  # 
    ( "C", "NA", "CA",    125.200,    585.760),  # 
    ( "C", "NA",  "H",    116.800,    418.400),  #  new99
    ("CA", "NA",  "H",    118.000,    418.400),  #  new99
    ("CC", "NA", "CR",    120.000,    585.760),  #  AA his
    ("CC", "NA",  "H",    120.000,    418.400),  #  new99 his
    ("CR", "NA", "CW",    120.000,    585.760),  #  AA his
    ("CR", "NA",  "H",    120.000,    418.400),  #  new99 his
    ("CW", "NA",  "H",    120.000,    418.400),  #  new99 his
    ("CN", "NA", "CW",    111.600,    585.760),  #  AA trp
    ("CN", "NA",  "H",    123.100,    418.400),  #  new99 trp
    ("CB", "NB", "CK",    103.800,    585.760),  # 
    ("CC", "NB", "CR",    117.000,    585.760),  #  AA his
    ("CR", "NB", "CV",    117.000,    585.760),  #  AA his
    ( "C", "NC", "CA",    120.500,    585.760),  # 
    ("CA", "NC", "CB",    112.200,    585.760),  # 
    ("CA", "NC", "CQ",    118.600,    585.760),  # 
    ("CB", "NC", "CQ",    111.000,    585.760),  # 
    ( "C", "OH", "HO",    113.000,    418.400),  #  new99
    ("CT", "OH", "HO",    108.500,    460.240),  # 
    ("HO", "OH",  "P",    108.500,    376.560),  # 
    ("CT", "OS", "CT",    109.500,    502.080),  # 
    ("CT", "OS",  "P",    120.500,    836.800),  # 
    ( "P", "OS",  "P",    120.500,    836.800),  # 
    ("O2",  "P", "OH",    108.230,    376.560),  # 
    ("O2",  "P", "O2",    119.900,   1171.520),  # 
    ("O2",  "P", "OS",    108.230,    836.800),  # 
    ("OH",  "P", "OS",    102.600,    376.560),  # 
    ("OS",  "P", "OS",    102.600,    376.560),  # 
    ("CT",  "S", "CT",     98.900,    518.816),  #  AA met
    ("CT",  "S",  "S",    103.700,    569.024),  #  AA cyx             (SCHERAGA  JPC 79,1428)
    ("CT", "SH", "HS",     96.000,    359.824),  #  changed from 44.0 based on methanethiol nmodes
    ("HS", "SH", "HS",     92.070,    292.880),  #  AA cys
    ( "F", "CT",  "F",    109.100,    644.336),  #  JCC,13,(1992),963;
    ( "F", "CT", "H1",    109.500,    418.400),  #  new99
    ( "N",  "C",  "N",    120.000,    585.760)   #  Added for Urea (same as N2-CA-N2) - EJS
end



@ffspec ffamber03.components :improper CosineDihedralType begin
    ("CA", "CA", "CA", "OH",     180.00,    4.60240,          2),  #  new99
    ("H5",  "O",  "C", "OH",     180.00,    4.60240,          2),  #  new99
    ("H5",  "O",  "C", "OS",     180.00,    4.60240,          2),  #  new99
    ("CM", "CT", "CM", "HA",     180.00,    4.60240,          2),  #  new99
    ("CA", "CA", "CA", "Br",     180.00,    4.60240,          2),  #  new99
    ("CM", "H4",  "C",  "O",     180.00,    4.60240,          2),  #  new99
    ( "C", "CT",  "N",  "H",     180.00,    4.60240,          2),  #  new99
    ( "C", "CT",  "N",  "O",     180.00,    4.60240,          2),  #  new99
    ("CB", "CK", "N*", "CT",     180.00,    4.18400,          2),  # 
    ("CK", "CB", "N*", "CT",     180.00,    4.18400,          2),  # 
    ( "C", "CM", "N*", "CT",     180.00,    4.18400,          2),  #  dac guess, 9/94
    ("CM",  "C", "CM", "CT",     180.00,    4.60240,          2),  # 
    ("CT",  "O",  "C", "OH",     180.00,   43.93200,          2),  # 
    ("NA", "CV", "CC", "CT",     180.00,    4.60240,          2),  # 
    ("NB", "CW", "CC", "CT",     180.00,    4.60240,          2),  # 
    ("NA", "CW", "CC", "CT",     180.00,    4.60240,          2),  # 
    ("CW", "CB", "C*", "CT",     180.00,    4.60240,          2),  # 
    ("CA", "CA", "CA", "CT",     180.00,    4.60240,          2),  # 
    ( "C", "CM", "CM", "CT",     180.00,    4.60240,          2),  #  dac guess, 9/94
    ("NC", "CM", "CA", "N2",     180.00,    4.60240,          2),  #  dac guess, 9/94
    ("CB", "NC", "CA", "N2",     180.00,    4.60240,          2),  #  dac, 10/94
    ("NA", "NC", "CA", "N2",     180.00,    4.60240,          2),  #  dac, 10/94
    ("CA", "CA",  "C", "OH",     180.00,    4.60240,          2),  # 
    ("CT", "CV", "CC", "NA",     180.00,    4.60240,          2),  # 
    ("CT", "CW", "CC", "NB",     180.00,    4.60240,          2),  # 
    ("CT", "CW", "CC", "NA",     180.00,    4.60240,          2),  # 
    ("CB", "CT", "C*", "CW",     180.00,    4.60240,          2),  # 
    ("CM", "N2", "CA", "NC",     180.00,    4.60240,          2),  # 
    ("CB", "N2", "CA", "NC",     180.00,    4.60240,          2),  # 
    ("N2", "NA", "CA", "NC",     180.00,    4.60240,          2),  # 
    ( "N",  "N",  "C",  "O",     180.00,   43.93200,          2),  #  urea
    ( "X", "O2",  "C", "O2",     180.00,   43.93200,          2),  #  JCC,7,(1986),230
    ( "X", "N2", "CA", "N2",     180.00,   43.93200,          2),  #  JCC,7,(1986),230
    ( "X", "CT",  "N", "CT",     180.00,    4.18400,          2),  #  JCC,7,(1986),230
    ( "X",  "X",  "C",  "O",     180.00,   43.93200,          2),  #  JCC,7,(1986),230
    ( "X",  "X",  "N",  "H",     180.00,    4.18400,          2),  #  JCC,7,(1986),230
    ( "X",  "X", "N2",  "H",     180.00,    4.18400,          2),  #  JCC,7,(1986),230
    ( "X",  "X", "NA",  "H",     180.00,    4.18400,          2),  #  JCC,7,(1986),230
    ( "X",  "X", "CA", "HA",     180.00,    4.60240,          2),  #  bsd.on C6H6 nmodes
    ( "X",  "X", "CW", "H4",     180.00,    4.60240,          2),  # 
    ( "X",  "X", "CR", "H5",     180.00,    4.60240,          2),  # 
    ( "X",  "X", "CV", "H4",     180.00,    4.60240,          2),  # 
    ( "X",  "X", "CQ", "H5",     180.00,    4.60240,          2),  # 
    ( "X",  "X", "CK", "H5",     180.00,    4.60240,          2),  # 
    ( "X",  "X", "CM", "H4",     180.00,    4.60240,          2),  # 
    ( "X",  "X", "CM", "HA",     180.00,    4.60240,          2),  # 
    ( "X",  "X", "CA", "H4",     180.00,    4.60240,          2),  #  bsd.on C6H6 nmodes
    ( "X",  "X", "CA", "H5",     180.00,    4.60240,          2)   #  bsd.on C6H6 nmodes
end



@ffspec ffamber03.components :proper CosineDihedralType begin
    ("OS", "CT", "N*", "CK",        0.0,   10.46000,          1),  #  parm98, TC,PC,PAK
    ("OS", "CT", "N*", "CM",        0.0,   10.46000,          1),  #  parm98, TC,PC,PAK
    ("HC", "CT", "CT", "HC",        0.0,    0.62760,          3),  #  Junmei et al, 1999
    ("HC", "CT", "CT", "CT",        0.0,    0.66944,          3),  #  Junmei et al, 1999
    ( "F", "CT", "CT",  "F",      180.0,    5.02080,          1),  #  Junmei et al, 1999
    ("Cl", "CT", "CT", "Cl",      180.0,    1.88280,          1),  #  Junmei et al, 1999
    ("Br", "CT", "CT", "Br",        0.0,    0.00000,          0),  #  Junmei et al, 1999
    ("H1", "CT", "CT", "OS",        0.0,    1.04600,          1),  #  Junmei et al, 1999
    ("H1", "CT", "CT", "OH",        0.0,    1.04600,          1),  #  Junmei et al, 1999
    ("H1", "CT", "CT",  "F",        0.0,    0.79496,          1),  #  Junmei et al, 1999
    ("H1", "CT", "CT", "Cl",        0.0,    1.04600,          1),  #  Junmei et al, 1999
    ("H1", "CT", "CT", "Br",        0.0,    2.30120,          1),  #  Junmei et al, 1999
    ("HC", "CT", "CT", "OS",        0.0,    1.04600,          1),  #  Junmei et al, 1999
    ("HC", "CT", "CT", "OH",        0.0,    1.04600,          1),  #  Junmei et al, 1999
    ("HC", "CT", "CT",  "F",        0.0,    0.79496,          1),  #  Junmei et al, 1999
    ("HC", "CT", "CT", "Cl",        0.0,    1.04600,          1),  #  Junmei et al, 1999
    ("HC", "CT", "CT", "Br",        0.0,    2.30120,          1),  #  Junmei et al, 1999
    ( "X",  "C",  "C",  "X",      180.0,   15.16700,          2),  #  Junmei et al, 1999
    ( "X",  "C",  "O",  "X",      180.0,   11.71520,          2),  #  Junmei et al, 1999
    ( "X",  "C", "OS",  "X",      180.0,   11.29680,          2),  #  Junmei et al, 1999
    ( "X", "CA", "OH",  "X",      180.0,    3.76560,          2),  #  Junmei et al, 99
    ( "X", "CM", "OS",  "X",      180.0,    4.39320,          2),  #  Junmei et al, 1999
    ( "X",  "C", "CA",  "X",      180.0,   15.16700,          2),  #  intrpol.bsd.on C6H6
    ( "X",  "C", "CB",  "X",      180.0,   12.55200,          2),  #  intrpol.bsd.on C6H6
    ( "X",  "C", "CM",  "X",      180.0,    9.10020,          2),  #  intrpol.bsd.on C6H6
    ( "X",  "C", "N*",  "X",      180.0,    6.06680,          2),  #  JCC,7,(1986),230
    ( "X",  "C", "NA",  "X",      180.0,    5.64840,          2),  #  JCC,7,(1986),230
    ( "X",  "C", "NC",  "X",      180.0,   16.73600,          2),  #  JCC,7,(1986),230
    ( "X",  "C", "OH",  "X",      180.0,    9.62320,          2),  #  Junmei et al, 1999
    ( "X",  "C", "CT",  "X",        0.0,    0.00000,          0),  #  JCC,7,(1986),230
    ( "X", "CA", "CA",  "X",      180.0,   15.16700,          2),  #  intrpol.bsd.on C6H6
    ( "X", "CA", "CB",  "X",      180.0,   14.64400,          2),  #  intrpol.bsd.on C6H6
    ( "X", "CA", "CM",  "X",      180.0,   10.66920,          2),  #  intrpol.bsd.on C6H6
    ( "X", "CA", "CT",  "X",        0.0,    0.00000,          0),  #  JCC,7,(1986),230
    ( "X", "CA", "N2",  "X",      180.0,   10.04160,          2),  #  reinterpolated 93'
    ( "X", "CA", "NA",  "X",      180.0,    6.27600,          2),  #  JCC,7,(1986),230
    ( "X", "CA", "NC",  "X",      180.0,   20.08320,          2),  #  JCC,7,(1986),230
    ( "X", "CB", "CB",  "X",      180.0,   22.80280,          2),  #  intrpol.bsd.on C6H6
    ( "X", "CB", "N*",  "X",      180.0,    6.90360,          2),  #  JCC,7,(1986),230
    ( "X", "CB", "NB",  "X",      180.0,   10.66920,          2),  #  JCC,7,(1986),230
    ( "X", "CB", "NC",  "X",      180.0,   17.36360,          2),  #  JCC,7,(1986),230
    ( "X", "CK", "N*",  "X",      180.0,    7.11280,          2),  #  JCC,7,(1986),230
    ( "X", "CK", "NB",  "X",      180.0,   41.84000,          2),  #  JCC,7,(1986),230
    ( "X", "CM", "CM",  "X",      180.0,   27.82360,          2),  #  intrpol.bsd.on C6H6
    ( "X", "CM", "CT",  "X",        0.0,    0.00000,          0),  #  JCC,7,(1986),230
    ( "X", "CM", "N*",  "X",      180.0,    7.74040,          2),  #  JCC,7,(1986),230
    ( "X", "CQ", "NC",  "X",      180.0,   28.45120,          2),  #  JCC,7,(1986),230
    ( "X", "CT", "CT",  "X",        0.0,    0.65084,          3),  #  JCC,7,(1986),230
    ( "X", "CT",  "N",  "X",        0.0,    0.00000,          0),  #  JCC,7,(1986),230
    ( "X", "CT", "N*",  "X",        0.0,    0.00000,          0),  #  JCC,7,(1986),230
    ( "X", "CT", "N2",  "X",        0.0,    0.00000,          0),  #  JCC,7,(1986),230
    ( "X", "CT", "OH",  "X",        0.0,    0.69733,          3),  #  JCC,7,(1986),230
    ( "X", "CT", "OS",  "X",        0.0,    1.60387,          3),  #  JCC,7,(1986),230
    ( "X", "OH",  "P",  "X",        0.0,    1.04600,          3),  #  JCC,7,(1986),230
    ( "X", "OS",  "P",  "X",        0.0,    1.04600,          3),  #  JCC,7,(1986),230
    ( "X",  "C",  "N",  "X",      180.0,   10.46000,          2),  #  AA,NMA
    ( "X", "CT", "N3",  "X",        0.0,    0.65084,          3),  #  JCC,7,(1986),230
    ( "X", "CT",  "S",  "X",        0.0,    1.39467,          3),  #  JCC,7,(1986),230
    ( "X", "CT", "SH",  "X",        0.0,    1.04600,          3),  #  JCC,7,(1986),230
    ( "X", "CA", "CN",  "X",      180.0,   15.16700,          2),  #  reinterpolated 93'
    ( "X", "CB", "CN",  "X",      180.0,   12.55200,          2),  #  reinterpolated 93'
    ( "X", "CC", "CT",  "X",        0.0,    0.00000,          0),  #  JCC,7,(1986),230
    ( "X", "CC", "CV",  "X",      180.0,   21.54760,          2),  #  intrpol.bsd.on C6H6
    ( "X", "CC", "CW",  "X",      180.0,   22.48900,          2),  #  intrpol.bsd.on C6H6
    ( "X", "CC", "NA",  "X",      180.0,    5.85760,          2),  #  JCC,7,(1986),230
    ( "X", "CC", "NB",  "X",      180.0,   10.04160,          2),  #  JCC,7,(1986),230
    ( "X", "CN", "NA",  "X",      180.0,    6.38060,          2),  #  reinterpolated 93'
    ( "X", "CR", "NA",  "X",      180.0,    9.72780,          2),  #  JCC,7,(1986),230
    ( "X", "CR", "NB",  "X",      180.0,   20.92000,          2),  #  JCC,7,(1986),230
    ( "X", "CV", "NB",  "X",      180.0,   10.04160,          2),  #  JCC,7,(1986),230
    ( "X", "CW", "NA",  "X",      180.0,    6.27600,          2)   #  JCC,7,(1986),230
end



@ffspec ffamber03.components :proper NCosineDihedralType begin
    ("CT", "CT", "OS", "CT",          [0.0, 180.0],          [ 1.60247, 0.41840],    [3, 2]),  # ;; 
    ( "N", "CT",  "C",  "N", [180.0, 180.0, 180.0], [ 2.86144, 6.08228, 1.93092], [1, 2, 3]),  #  Amber03;;  Amber03;;  Amber03
    ( "C",  "N", "CT",  "C", [  0.0, 180.0,   0.0], [ 4.25053, 1.44390, 0.94517], [1, 2, 3]),  #  Amber03;;  Amber03;;  Amber03
    ("CT", "CT",  "C",  "N", [180.0, 180.0,   0.0], [ 3.25683, 0.27489, 0.23430], [1, 2, 3]),  #  Amber03;;  Amber03;;  Amber03
    ( "C",  "N", "CT", "CT", [180.0, 180.0, 180.0], [ 1.47988, 3.69698, 0.94977], [1, 2, 3]),  #  Amber03;;  Amber03;;  Amber03
    ( "C",  "N", "CT", "H0",          [0.0, 180.0],          [ 1.91418, 5.25427],    [1, 2]),  #  Amber03 GLY;;  Amber03 GLY
    ("H0", "CT",  "C",  "N",        [180.0,   0.0],          [ 4.43797, 0.04602],    [1, 2]),  #  Amber03 GLY;;  Amber03 GLY
    ( "H",  "N",  "C",  "O",        [180.0,   0.0],          [10.46000, 8.36800],    [2, 1]),  #  JCC,7,(1986),230;;  J.C.cistrans-NMA DE
    ("CT",  "S",  "S", "CT",          [0.0,   0.0],          [14.64400, 2.51040],    [2, 3]),  #  JCC,7,(1986),230;;  JCC,7,(1986),230
    ("OS", "CT", "CT", "OS",          [0.0,   0.0],          [ 0.60250, 4.91620],    [3, 2]),  #  parm98, TC,PC,PAK;;  Piotr et al.
    ("OS", "CT", "CT", "OH",          [0.0,   0.0],          [ 0.60250, 4.91620],    [3, 2]),  #  parm98, TC,PC,PAK;;  parm98, TC,PC,PAK
    ("OH", "CT", "CT", "OH",          [0.0,   0.0],          [ 0.60250, 4.91620],    [3, 2]),  #  parm98, TC,PC,PAK;;  parm98, TC,PC,PAK
    ("OH",  "P", "OS", "CT",          [0.0,   0.0],          [ 1.04600, 5.02080],    [3, 2]),  #  JCC,7,(1986),230;;  gg&gt ene.631g*/mp2
    ("OS",  "P", "OS", "CT",          [0.0,   0.0],          [ 1.04600, 5.02080],    [3, 2]),  #  JCC,7,(1986),230;;  gg&gt ene.631g*/mp2
    ("H1", "CT",  "C",  "O",          [0.0, 180.0],          [ 3.34720, 0.33472],    [1, 3]),  #  Junmei et al, 1999;;  Junmei et al, 1999
    ("HC", "CT",  "C",  "O",          [0.0, 180.0],          [ 3.34720, 0.33472],    [1, 3]),  #  Junmei et al, 1999;;  Junmei et al, 1999
    ("HC", "CT", "CM", "CM",        [180.0,   0.0],          [ 1.58992, 4.81160],    [3, 1]),  #  Junmei et al, 1999;;  Junmei et al, 1999
    ("HO", "OH", "CT", "CT",          [0.0,   0.0],          [ 0.66944, 1.04600],    [3, 1]),  #  Junmei et al, 1999;;  Junmei et al, 1999
    ("HO", "OH",  "C",  "O",        [180.0,   0.0],          [ 9.62320, 7.94960],    [2, 1]),  #  Junmei et al, 1999;;  Junmei et al, 1999
    ("CM", "CM",  "C",  "O",        [180.0,   0.0],          [ 9.10020, 1.25520],    [2, 3]),  #  Junmei et al, 1999;;  Junmei et al, 1999
    ("CT", "CM", "CM", "CT",        [180.0, 180.0],          [27.82360, 7.94960],    [2, 1]),  #  Junmei et al, 1999;;  Junmei et al, 1999
    ("CT", "CT", "CT", "CT",   [0.0, 180.0, 180.0], [ 0.75312, 1.04600, 0.83680], [3, 2, 1]),  #  Junmei et al, 1999;;  Junmei et al, 1999;;  Junmei et al, 1999
    ("CT", "CT", "OS",  "C",          [0.0, 180.0],          [ 1.60247, 3.34720],    [3, 1]),  #  Junmei et al, 1999;;  Junmei et al, 1999
    ("CT", "OS", "CT", "OS",   [0.0, 180.0, 180.0], [ 0.41840, 3.55640, 5.64840], [3, 2, 1]),  #  Junmei et al, 1999;;  Junmei et al, 1999;;  Junmei et al, 1999
    ( "O",  "C", "OS", "CT",        [180.0, 180.0],          [11.29680, 5.85760],    [2, 1]),  #  Junmei et al, 1999;;  Junmei et al, 1999
    ("CT", "OS", "CT", "N*",          [0.0,   0.0],          [ 1.60247, 2.71960],    [3, 2])   #  parm98.dat, TC,PC,PAK;;  Piotr et al.
end

for comp in values(ffamber03.components[:angles])
    comp.θ = deg2rad.(comp.θ)
end
for comp in values(ffamber03.components[:proper])
    comp.θ = deg2rad.(comp.θ)
end
for comp in values(ffamber03.components[:improper])
    comp.θ = deg2rad.(comp.θ)
end

ffamber03

end # module