<cg>
  <!-- example for a non-bonded interaction entry -->

  <bonded>
  <name>bond</name>
  <min>0.32</min>
  <max>0.52</max>
  <step>0.005</step>
  <inverse>
	  <target>bond.dist.tgt</target>
	  <do_potential> 1 0 0 0 </do_potential>
	  <post_add>acc_convergence</post_add>
	  <gromacs>
		  <table>table_b1.xvg</table>
	  </gromacs>
  </inverse>
  </bonded>

  <bonded>
  <name>angle</name>
  <min>1.08</min>
  <max>3.12</max>
  <step>0.02</step>
  <inverse>
	  <target>angle.dist.tgt</target>
	  <do_potential> 0 1 0 0 </do_potential>
	  <post_add>acc_convergence</post_add>
	  <gromacs>
		  <table>table_a1.xvg</table>
	  </gromacs>
  </inverse>
  </bonded>

  <bonded>
  <name>dihedral</name>
  <min>-3.11</min>
  <max>3.11</max>
  <step>0.05</step>
  <inverse>
	  <target>dihedral.dist.tgt</target>
	  <do_potential> 0 0 1 0 </do_potential>
	  <post_update> smooth </post_update>
	  <post_update_options>
		  <smooth>
			  <iterations> 1 </iterations>
		  </smooth>
	  </post_update_options>
	  <post_add>acc_convergence</post_add>
	  <gromacs>
		  <table>table_d1.xvg</table>
	  </gromacs>
  </inverse>
  </bonded>

  <non-bonded>
    <!-- name of the interaction -->
    <name>B-B</name>
    <!-- types involved in this interaction -->
    <type1>B</type1>
    <type2>B</type2>
    <!-- dimension + grid spacing of tables for calculations -->
    <min>0</min>
    <max>2.5</max>
    <step>0.01</step>
    
    <inverse>
      <!-- target distribution (rdf), just give gromas rdf.xvg -->
      <target>B-B.dist.tgt</target>
      <!-- update cycles -->
      <do_potential> 0 0 0 1 </do_potential>
      <!-- additional post processing of dU before added to potential -->
      <post_update></post_update>
      <!-- additional post processing of U after dU added to potential -->
      <post_add>acc_convergence</post_add>
      <!-- inverse monte carlo specific stuff -->
      <!-- name of the table for gromacs run -->
      <gromacs>
        <table>table_B_B.xvg</table>
      </gromacs>
    </inverse>
  </non-bonded>


  <!-- general options for inverse script -->
  <inverse>
    <!-- 393[K] * 0.00831451 = 3.267602 gromacs units -->
    <kBT>3.267602</kBT>
    <!-- use gromacs as simulation program -->
    <program>gromacs</program>
    <!-- gromacs specific options -->
    <gromacs>
      <!-- trash so many frames at the beginning -->
      <equi_time>100</equi_time> 
      <!-- <first_frame>500</first_frame> -->
      <!-- grid for table*.xvg !-->
      <table_bins>0.01</table_bins>
      <!-- cut the potential at this value (gromacs bug) -->
      <pot_max>1000000</pot_max>
      <!-- extend the tables to this value -->
      <table_end>3.5</table_end>
    </gromacs>
    <!-- these files are copied for each new run -->
    <map>CGcIP.xml</map>
    <filelist>grompp.mdp topol.top table.xvg index.ndx</filelist>
    <!-- do so many iterations -->
    <iterations_max>30</iterations_max>
    <convergence_check>
      <type>default</type>
      <limit>0.001</limit>
    </convergence_check>
    <!-- ibm: inverse biltzmann imc: inverse monte carlo -->
    <method>ibi</method>
    <!-- write log to this file -->
    <log_file>inverse.log</log_file>
    <!-- write restart step to this file -->
    <restart_file>restart_points.log</restart_file>
  </inverse>
</cg>
