<cg>
  <bonded>
    <!-- name of the interaction -->
    <name>bond1</name>
    <min>0.2</min>
    <max>0.5</max>
    <step>0.002</step>
    <inverse>
      <!-- target distribution -->
      <target>bond1.dist.tgt</target>
      <gromacs>
        <table>table_b1.xvg</table>
      </gromacs>
    </inverse>
  </bonded>
  <bonded>
    <!-- name of the interaction -->
    <name>bond2</name>
    <min>0.252</min>
    <max>0.409</max>
    <step>0.002</step>
    <inverse>
      <!-- target distribution -->
      <target>bond2.dist.tgt</target>
      <gromacs>
        <table>table_b2.xvg</table>
      </gromacs>
    </inverse>
  </bonded>
  
  <bonded>
    <!-- name of the interaction -->
    <name>angle1</name>
    <min>1.0</min>
    <max>3.2</max>
    <step>0.02</step>
    <inverse>
      <!-- target distribution -->
      <target>angle1.dist.tgt</target>
      <gromacs>
        <table>table_a1.xvg</table>
      </gromacs>
    </inverse>
  </bonded>
 
  <bonded>
    <!-- name of the interaction -->
    <name>angle2</name>
    <min>1.0</min>
    <max>3.2</max>
    <step>0.02</step>
    <inverse>
      <!-- target distribution -->
      <target>angle2.dist.tgt</target>
      <gromacs>
        <table>table_a2.xvg</table>
      </gromacs>
    </inverse>
  </bonded>
    <bonded>
      <!-- name of the interaction -->
          <name>dihedral1</name>
          <min>-3.0</min>
          <max>3.0</max>
          <step>0.02</step>
        <inverse>
          <!-- target distribution -->
         <target>dihedral1.dist.tgt</target>
         <gromacs>
              <table>table_d0.xvg</table>
         </gromacs>
         </inverse>
   </bonded>
   <bonded>
      <!-- name of the interaction -->
          <name>dihedral2</name>
          <min>-3.0</min>
          <max>3.0</max>
          <step>0.02</step>
        <inverse>
          <!-- target distribution -->
         <target>dihedral2.dist.tgt</target>
         <gromacs>
              <table>table_d1.xvg</table>
         </gromacs>
         </inverse>
   </bonded>
  <!-- example for a non-bonded interaction entry -->
  <non-bonded>
    <!-- name of the interaction -->
    <name>A-A</name>
    <!-- types involved in this interaction -->
    <type1>A</type1>
    <type2>A</type2>
    <!-- dimension + grid spacing of tables for calculations -->
    <min>0.0</min>
    <max>1.5</max>
    <step>0.01</step>
    <inverse>
      <!-- target distribution (rdf), just give gromas rdf.xvg -->
      <target>A-A.dist.tgt</target>
            <!-- target pressure -->
	          <p_target>1.0</p_target>
      <!-- update cycles -->
      <do_potential>1 0 0</do_potential>
      <!-- additional post processing of dU before added to potential -->
      <post_update>pressure</post_update>
        <post_update_options>
	            <pressure>
	              <type>simple</type>
	                <do>1 0 1</do>
		          <simple>
		        <!--<scale>0.0003</scale>-->
                            <scale>0.0003</scale>
	                  </simple>
		    </pressure>
       	</post_update_options>
      <!-- additional post processing of U after dU added to potential -->
      <post_add>convergence</post_add>
      <!-- name of the table for gromacs run -->
      <gromacs>
        <table>table_A_A.xvg</table>
      </gromacs>
    </inverse>
  </non-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.0</min>
    <max>1.5</max>
    <step>0.01</step>
    <inverse>
      <!-- target distribution (rdf), just give gromas rdf.xvg -->
      <target>B-B.dist.tgt</target>
            <!-- target pressure -->
	          <p_target>1.0</p_target>
      <!-- update cycles -->
      <do_potential>1 0 0</do_potential>
      <!-- additional post processing of dU before added to potential -->
      <post_update>pressure</post_update>
        <post_update_options>
	            <pressure>
	              <type>simple</type>
	                <do>1 0 1</do>
		          <simple>
		        <!--<scale>0.0003</scale>-->
                            <scale>0.0003</scale>
	                  </simple>
		    </pressure>
       	</post_update_options>
      <!-- additional post processing of U after dU added to potential -->
      <post_add>convergence</post_add>
      <!-- name of the table for gromacs run -->
      <gromacs>
        <table>table_B_B.xvg</table>
      </gromacs>
    </inverse>
  </non-bonded>
  
  <non-bonded>
    <!-- name of the interaction -->
    <name>A-B</name>
    <!-- types involved in this interaction -->
    <type1>A</type1>
    <type2>B</type2>
    <!-- dimension + grid spacing of tables for calculations -->
    <min>0.0</min>
    <max>1.5</max>
    <step>0.01</step>
    <inverse>
      <!-- target distribution (rdf), just give gromas rdf.xvg -->
      <target>A-B.dist.tgt</target>
            <!-- target pressure -->
	          <p_target>1.0</p_target>
      <!-- update cycles -->
      <do_potential>1 0 0</do_potential>
      <!-- additional post processing of dU before added to potential -->
      <post_update>pressure</post_update>
        <post_update_options>
	            <pressure>
	              <type>simple</type>
	                <do>1 0 1</do>
		          <simple>
		        <!--<scale>0.0003</scale>-->
                            <scale>0.0003</scale>
	                  </simple>
		    </pressure>
       	</post_update_options>
      <!-- additional post processing of U after dU added to potential -->
      <post_add>convergence</post_add>
      <!-- name of the table for gromacs run -->
      <gromacs>
        <table>table_A_B.xvg</table>
      </gromacs>
    </inverse>
  </non-bonded>
  



  <!-- general options for inverse script -->
  <inverse>
    <!-- 473*0.00831451 gromacs units -->
    <kBT>3.932763</kBT>
    <!-- use gromacs as simulation program -->
    <program>gromacs</program>
    <!-- gromacs specific options -->
    <gromacs>
	    <pre_simulation>yes
		    <mdp>em.mdp</mdp>
	    </pre_simulation>
	    <grompp>
		    <opts> -maxwarn 1 </opts>
	    </grompp>
	    <mdrun>
		    <opts> -ntmpi 4  </opts>
        	   <opts> -rdd 2  </opts> 
        	  <!-- <opts> -rdd 1  </opts>   -->
	    </mdrun>
      <!-- trash so many frames at the beginning -->
      <equi_time>20</equi_time>
      <!-- grid for table*.xvg !-->
      <table_bins>0.002</table_bins>
      <!-- cut the potential at this value (gromacs bug) -->
      <pot_max>1000000</pot_max>
      <!-- extend the tables to this value -->
      <table_end>2.5</table_end>
    </gromacs>
    <map>c28-cg-ibi.xml</map>
    <!-- these files are copied for each new run -->
    <filelist> grompp.mdp topol.top table.xvg index.ndx em.mdp </filelist>
    <!-- do so many iterations -->
    <iterations_max>250</iterations_max>
    <convergence_check>
      <type>default</type>
      <limit>0.003</limit>
    </convergence_check>
    <!-- ibm: inverse boltzmann 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>
