#This example will update all the bond/angle/dihedral parameters for the whole [ moleculetype ] section, including [bonds],[angles] and [dihedrals]
#
#Step1:
#prepare the template top files and protocols for update.

#Step2:
#Use the fitted .off file update the template files.
#Update can be done by following steps:

#a) update nonbonded parameters.
#If the number of nonbonded terms are different for every generation fitting, you need to update the nonbonded list for [ nonbond_params ] first.
# For this example, we only keep the ones for water interactions in the template file, and create the list for Ala based on .off file.
off2top protocol.nonboned_list  intra.off  template_nonbonded_ala7_water.itp nonbond.itp > out.nonbond

#b) generate the tabulated potentials based on the terms in [ nonbond_params ] section and .off file.
off2tab protocol.tab  intra.off  nonbond.itp > out.tab

#c)update the parameters for [moleculetype], including charges in [ atoms ], and parameters in [ bond ]/[angle]/[dihedral] section
off2top protocol.mol  intra.off  template_ala7.itp  ala7.itp > out.mol


