<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.15.0" xml:lang="en-US">
  <compounddef id="group__eval__loops__hp" kind="group">
    <compoundname>eval_loops_hp</compoundname>
    <title>Hairpin Loops</title>
    <innerfile refid="backtrack_2hairpin_8h">hairpin.h</innerfile>
    <innerfile refid="loops_2hairpin_8h">hairpin.h</innerfile>
    <sectiondef kind="user-defined">
      <header>Basic free energy interface</header>
      <memberdef kind="function" id="group__eval__loops__hp_1ga86aa270e29f10581ced8a9b867c6b051" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int vrna_E_hairpin</definition>
        <argsstring>(unsigned int size, unsigned int type, int si1, int sj1, const char *sequence, vrna_param_t *P)</argsstring>
        <name>vrna_E_hairpin</name>
        <param>
          <type>unsigned int</type>
          <declname>size</declname>
        </param>
        <param>
          <type>unsigned int</type>
          <declname>type</declname>
        </param>
        <param>
          <type>int</type>
          <declname>si1</declname>
        </param>
        <param>
          <type>int</type>
          <declname>sj1</declname>
        </param>
        <param>
          <type>const char *</type>
          <declname>sequence</declname>
        </param>
        <param>
          <type><ref refid="group__energy__parameters_1ga8a69ca7d787e4fd6079914f5343a1f35" kindref="member">vrna_param_t</ref> *</type>
          <declname>P</declname>
        </param>
        <briefdescription>
<para>Retrieve the energy of a hairpin-loop. </para>
        </briefdescription>
        <detaileddescription>
<para>To evaluate the free energy of a hairpin-loop, several parameters have to be known. A general hairpin-loop has this structure:<linebreak/>
 <preformatted>
      a3 a4
    a2     a5
    a1     a6
      X - Y
      |   |
      5&apos;  3&apos;
</preformatted> where X-Y marks the closing pair [e.g. a <bold>(G,C)</bold> pair]. The length of this loop is 6 as there are six unpaired nucleotides (a1-a6) enclosed by (X,Y). The 5&apos; mismatching nucleotide is a1 while the 3&apos; mismatch is a6. The nucleotide sequence of this loop is "a1.a2.a3.a4.a5.a6" <linebreak/>
</para>
<para><simplesect kind="warning"><para>This function <bold>only</bold> evaluates the free energy of a hairpin loop according to the current Turner energy parameter set! No additional hard- or soft constraints are applied. See <ref refid="group__eval__deprecated_1gad0bb844f8dc704c71737ae1d7e32b975" kindref="member">vrna_eval_hp_loop()</ref> for a function that also takes into account any user-supplied constraints!</para>
</simplesect>
<simplesect kind="note"><para>Whenever one of the mismatch base encodings <computeroutput>si1</computeroutput> or <computeroutput>sj1</computeroutput> is negative, terminal mismatch energies are not applied!</para>
</simplesect>
<simplesect kind="note"><para>The parameter <computeroutput>sequence</computeroutput> is a 0-terminated string of size <computeroutput>size</computeroutput> + 2 that contain the nucleic acid sequence of the loop in upper-case letters. This parameter is only required for loops of <computeroutput>size</computeroutput> below 7, since it is used for look-up of unusually stable tri-, tetra- and hexa-loops, such as GNRA tetra loops. Those may have additional sequence-dependent tabulated free energies available.</para>
</simplesect>
<simplesect kind="see"><para><ref refid="group__energy__parameters_1ga8a69ca7d787e4fd6079914f5343a1f35" kindref="member">vrna_param_t</ref>, <ref refid="group__eval__deprecated_1gad0bb844f8dc704c71737ae1d7e32b975" kindref="member">vrna_eval_hp_loop()</ref></para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>size</parametername>
</parameternamelist>
<parameterdescription>
<para>The size of the loop (number of unpaired nucleotides) </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>type</parametername>
</parameternamelist>
<parameterdescription>
<para>The pair type of the base pair closing the hairpin </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>si1</parametername>
</parameternamelist>
<parameterdescription>
<para>The 5&apos;-mismatching nucleotide </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>sj1</parametername>
</parameternamelist>
<parameterdescription>
<para>The 3&apos;-mismatching nucleotide </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>sequence</parametername>
</parameternamelist>
<parameterdescription>
<para>The sequence of the loop (May be <computeroutput>NULL</computeroutput>, otherwise mst be at least <formula id="69">$size + 2$</formula> long) </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>P</parametername>
</parameternamelist>
<parameterdescription>
<para>The datastructure containing scaled energy parameters </para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The Free energy of the Hairpin-loop in dcal/mol </para>
</simplesect>
</para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="ViennaRNA/eval/hairpin.h" line="94" column="1" declfile="ViennaRNA/eval/hairpin.h" declline="94" declcolumn="1"/>
      </memberdef>
      <memberdef kind="function" id="group__eval__loops__hp_1gac0097dbc11097cff5bff873c276c264a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int vrna_eval_hairpin</definition>
        <argsstring>(vrna_fold_compound_t *fc, unsigned int i, unsigned int j, unsigned int options)</argsstring>
        <name>vrna_eval_hairpin</name>
        <param>
          <type><ref refid="group__fold__compound_1ga1b0cef17fd40466cef5968eaeeff6166" kindref="member">vrna_fold_compound_t</ref> *</type>
          <declname>fc</declname>
        </param>
        <param>
          <type>unsigned int</type>
          <declname>i</declname>
        </param>
        <param>
          <type>unsigned int</type>
          <declname>j</declname>
        </param>
        <param>
          <type>unsigned int</type>
          <declname>options</declname>
        </param>
        <briefdescription>
<para>Evaluate free energy of a hairpin loop. </para>
        </briefdescription>
        <detaileddescription>
<para>This function evaluates the free energy of a hairpin loop closed by a base pair (i,j). By default (<computeroutput>options</computeroutput> = <ref refid="group__eval_1gae647cf494a8b80274f63e9921e379c1b" kindref="member">VRNA_EVAL_LOOP_DEFAULT</ref>), <emphasis>all</emphasis> user-supplied constraints will be taken into consideration. This means that any hard constraints that prohibit the formation of this loop will result in an energy contribution of <bold><ref refid="constants_8h_1a12c2040f25d8e3a7b9e1c2024c618cb6" kindref="member">INF</ref></bold>. On the other hand, if, given the set of constraints, the loop is allowed then its free energy is evaluated according to the Nearest Neighbor energy parameter set. On top of that, any user-supplied soft-constraints will be added, if applicable.</para>
<para>The <computeroutput>options</computeroutput> argument allows for (de-)activating certain aspects of the evaluation, e.g. hard constraints, soft constraints, etc.</para>
<para><simplesect kind="note"><para>If sequence position <computeroutput>i</computeroutput> is larger than <computeroutput>j</computeroutput>, the function assumes a hairpin loop formed by a circular RNA, where the unpaired loop sequence spans the n,1-junction.</para>
</simplesect>
<simplesect kind="note"><para>By default, all user-supplied hard- and soft constraints will be taken into account! Use the <ref refid="group__eval_1gabf464e57b705137b553431ae88b5f276" kindref="member">VRNA_EVAL_LOOP_NO_HC</ref> and <ref refid="group__eval_1gabfc2f7e81ec9ec64ccc9ef6b2b5aac2a" kindref="member">VRNA_EVAL_LOOP_NO_SC</ref> bit flags as input for <computeroutput>options</computeroutput> to change the default behavior if necessary.</para>
</simplesect>
<simplesect kind="note"><para>This function is polymorphic! The provided <ref refid="group__fold__compound_1ga1b0cef17fd40466cef5968eaeeff6166" kindref="member">vrna_fold_compound_t</ref> may be of type <ref refid="group__fold__compound_1gga01a4ff86fa71deaaa5d1abbd95a1447da7e264dd3cf2dc9b6448caabcb7763cd6" kindref="member">VRNA_FC_TYPE_SINGLE</ref> or <ref refid="group__fold__compound_1gga01a4ff86fa71deaaa5d1abbd95a1447dab821ce46ea3cf665be97df22a76f5023" kindref="member">VRNA_FC_TYPE_COMPARATIVE</ref></para>
</simplesect>
<simplesect kind="see"><para><ref refid="group__eval__loops__hp_1ga86aa270e29f10581ced8a9b867c6b051" kindref="member">vrna_E_hairpin()</ref>, <ref refid="group__eval__loops__hp_1ga4997b7ebab4b1d8a34dee8365b28d03e" kindref="member">vrna_exp_eval_hairpin()</ref>, <ref refid="group__eval_1gabf464e57b705137b553431ae88b5f276" kindref="member">VRNA_EVAL_LOOP_NO_HC</ref>, <ref refid="group__eval_1gabfc2f7e81ec9ec64ccc9ef6b2b5aac2a" kindref="member">VRNA_EVAL_LOOP_NO_SC</ref>, <ref refid="group__eval_1gaafb5b0c04bc9f522b7a2e7909bd56d23" kindref="member">VRNA_EVAL_LOOP_NO_CONSTRAINTS</ref></para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>fc</parametername>
</parameternamelist>
<parameterdescription>
<para>The <ref refid="group__fold__compound_1ga1b0cef17fd40466cef5968eaeeff6166" kindref="member">vrna_fold_compound_t</ref> for the particular energy evaluation </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>i</parametername>
</parameternamelist>
<parameterdescription>
<para>5&apos;-position of the base pair </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>j</parametername>
</parameternamelist>
<parameterdescription>
<para>3&apos;-position of the base pair </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>options</parametername>
</parameternamelist>
<parameterdescription>
<para>A bit-field that specifies which aspects (not) to consider during evaluation </para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Free energy of the hairpin loop closed by <formula id="30">$ (i,j) $</formula> in deka-kal/mol or <ref refid="constants_8h_1a12c2040f25d8e3a7b9e1c2024c618cb6" kindref="member">INF</ref> if the loop is forbidden </para>
</simplesect>
</para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="ViennaRNA/eval/hairpin.h" line="138" column="1" declfile="ViennaRNA/eval/hairpin.h" declline="138" declcolumn="1"/>
      </memberdef>
    </sectiondef>
    <sectiondef kind="user-defined">
      <header>Boltzmann weight (partition function) interface</header>
      <memberdef kind="function" id="group__eval__loops__hp_1ga847c34387b29b06448c7c843156bca91" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__data__structures_1ga31125aeace516926bf7f251f759b6126" kindref="member">FLT_OR_DBL</ref></type>
        <definition>FLT_OR_DBL vrna_exp_E_hairpin</definition>
        <argsstring>(unsigned int size, unsigned int type, int si1, int sj1, const char *sequence, vrna_exp_param_t *P)</argsstring>
        <name>vrna_exp_E_hairpin</name>
        <param>
          <type>unsigned int</type>
          <declname>size</declname>
        </param>
        <param>
          <type>unsigned int</type>
          <declname>type</declname>
        </param>
        <param>
          <type>int</type>
          <declname>si1</declname>
        </param>
        <param>
          <type>int</type>
          <declname>sj1</declname>
        </param>
        <param>
          <type>const char *</type>
          <declname>sequence</declname>
        </param>
        <param>
          <type><ref refid="group__energy__parameters_1ga01d8b92fe734df8d79a6169482c7d8d8" kindref="member">vrna_exp_param_t</ref> *</type>
          <declname>P</declname>
        </param>
        <briefdescription>
<para>Compute Boltzmann weight <formula id="70">$e^{-\Delta G/kT} $</formula> of a hairpin loop. </para>
        </briefdescription>
        <detaileddescription>
<para>This is the partition function variant of vrna_E_hp() that returns the Boltzmann weight <formula id="71">$e^{-\Delta E/kT} $</formula> instead of the energy <formula id="61">$ E $</formula>.</para>
<para><simplesect kind="note"><para>Whenever one of the mismatch base encodings <computeroutput>si1</computeroutput> or <computeroutput>sj1</computeroutput> is negative, terminal mismatch energies are not applied!</para>
</simplesect>
<simplesect kind="note"><para>Do not forget to scale this Bolztmann factor properly, e.g. by multiplying with scale[u+2]</para>
</simplesect>
<simplesect kind="see"><para>vrna_exp_eval_hp_loop(), <ref refid="group__energy__parameters_1ga01d8b92fe734df8d79a6169482c7d8d8" kindref="member">vrna_exp_param_t</ref>, vrna_E_hp()</para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>size</parametername>
</parameternamelist>
<parameterdescription>
<para>The size of the loop (number of unpaired nucleotides) </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>type</parametername>
</parameternamelist>
<parameterdescription>
<para>The pair type of the base pair closing the hairpin </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>si1</parametername>
</parameternamelist>
<parameterdescription>
<para>The 5&apos;-mismatching nucleotide </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>sj1</parametername>
</parameternamelist>
<parameterdescription>
<para>The 3&apos;-mismatching nucleotide </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>sequence</parametername>
</parameternamelist>
<parameterdescription>
<para>The sequence of the loop (May be <computeroutput>NULL</computeroutput>, otherwise mst be at least <formula id="69">$size + 2$</formula> long) </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>P</parametername>
</parameternamelist>
<parameterdescription>
<para>The datastructure containing scaled Boltzmann weights of the energy parameters </para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>The Boltzmann weight of the Hairpin-loop </para>
</simplesect>
</para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="ViennaRNA/eval/hairpin.h" line="175" column="1" declfile="ViennaRNA/eval/hairpin.h" declline="175" declcolumn="1"/>
      </memberdef>
      <memberdef kind="function" id="group__eval__loops__hp_1ga4997b7ebab4b1d8a34dee8365b28d03e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type><ref refid="group__data__structures_1ga31125aeace516926bf7f251f759b6126" kindref="member">FLT_OR_DBL</ref></type>
        <definition>FLT_OR_DBL vrna_exp_eval_hairpin</definition>
        <argsstring>(vrna_fold_compound_t *fc, unsigned int i, unsigned int j, unsigned int options)</argsstring>
        <name>vrna_exp_eval_hairpin</name>
        <param>
          <type><ref refid="group__fold__compound_1ga1b0cef17fd40466cef5968eaeeff6166" kindref="member">vrna_fold_compound_t</ref> *</type>
          <declname>fc</declname>
        </param>
        <param>
          <type>unsigned int</type>
          <declname>i</declname>
        </param>
        <param>
          <type>unsigned int</type>
          <declname>j</declname>
        </param>
        <param>
          <type>unsigned int</type>
          <declname>options</declname>
        </param>
        <briefdescription>
<para>High-Level function for hairpin loop energy evaluation (partition function variant). </para>
        </briefdescription>
        <detaileddescription>
<para>This is the partition function variant of <ref refid="group__eval__deprecated_1gad0bb844f8dc704c71737ae1d7e32b975" kindref="member">vrna_eval_hp_loop()</ref> that returns the Boltzmann weight <formula id="71">$e^{-\Delta E/kT} $</formula> instead of the energy <formula id="61">$ E $</formula>. On top of all constraints application, this function already scales the Boltzmann factor, i.e. it multiplies the result with scale[u + 2]</para>
<para>The <computeroutput>options</computeroutput> argument allows for (de-)activating certain aspects of the evaluation, e.g. hard constraints, soft constraints, etc.</para>
<para><simplesect kind="note"><para>If sequence position <computeroutput>i</computeroutput> is larger than <computeroutput>j</computeroutput>, the function assumes a hairpin loop formed by a circular RNA, where the unpaired loop sequence spans the n,1-junction.</para>
</simplesect>
<simplesect kind="note"><para>By default, all user-supplied hard- and soft constraints will be taken into account! Use the <ref refid="group__eval_1gabf464e57b705137b553431ae88b5f276" kindref="member">VRNA_EVAL_LOOP_NO_HC</ref> and <ref refid="group__eval_1gabfc2f7e81ec9ec64ccc9ef6b2b5aac2a" kindref="member">VRNA_EVAL_LOOP_NO_SC</ref> bit flags to change the default behavior if necessary.</para>
</simplesect>
<simplesect kind="note"><para>This function is polymorphic! The provided <ref refid="group__fold__compound_1ga1b0cef17fd40466cef5968eaeeff6166" kindref="member">vrna_fold_compound_t</ref> may be of type <ref refid="group__fold__compound_1gga01a4ff86fa71deaaa5d1abbd95a1447da7e264dd3cf2dc9b6448caabcb7763cd6" kindref="member">VRNA_FC_TYPE_SINGLE</ref> or <ref refid="group__fold__compound_1gga01a4ff86fa71deaaa5d1abbd95a1447dab821ce46ea3cf665be97df22a76f5023" kindref="member">VRNA_FC_TYPE_COMPARATIVE</ref></para>
</simplesect>
<simplesect kind="see"><para><ref refid="group__eval__loops__hp_1gac0097dbc11097cff5bff873c276c264a" kindref="member">vrna_eval_hairpin()</ref>, <ref refid="group__eval__loops__hp_1ga847c34387b29b06448c7c843156bca91" kindref="member">vrna_exp_E_hairpin()</ref>, <ref refid="group__eval_1gabf464e57b705137b553431ae88b5f276" kindref="member">VRNA_EVAL_LOOP_NO_HC</ref>, <ref refid="group__eval_1gabfc2f7e81ec9ec64ccc9ef6b2b5aac2a" kindref="member">VRNA_EVAL_LOOP_NO_SC</ref>, <ref refid="group__eval_1gaafb5b0c04bc9f522b7a2e7909bd56d23" kindref="member">VRNA_EVAL_LOOP_NO_CONSTRAINTS</ref></para>
</simplesect>
<parameterlist kind="param"><parameteritem>
<parameternamelist>
<parametername>fc</parametername>
</parameternamelist>
<parameterdescription>
<para>The <ref refid="group__fold__compound_1ga1b0cef17fd40466cef5968eaeeff6166" kindref="member">vrna_fold_compound_t</ref> for the particular energy evaluation </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>i</parametername>
</parameternamelist>
<parameterdescription>
<para>5&apos;-position of the base pair </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>j</parametername>
</parameternamelist>
<parameterdescription>
<para>3&apos;-position of the base pair </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername>options</parametername>
</parameternamelist>
<parameterdescription>
<para>A bit-field that specifies which aspects (not) to consider during evaluation </para>
</parameterdescription>
</parameteritem>
</parameterlist>
<simplesect kind="return"><para>Boltzmann factor of the free energy of the hairpin loop closed by <formula id="30">$ (i,j) $</formula> or 0. if the loop is forbidden </para>
</simplesect>
</para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="ViennaRNA/eval/hairpin.h" line="215" column="1" declfile="ViennaRNA/eval/hairpin.h" declline="215" declcolumn="1"/>
      </memberdef>
    </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
  </compounddef>
</doxygen>
