<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_mol__map__energy_8h">
<title>/Users/bernard/b20/bsoft/include/mol_map_energy.h File Reference</title>
<indexterm><primary>/Users/bernard/b20/bsoft/include/mol_map_energy.h</primary></indexterm>
<para>

<para>Headers of functions to calculate estimates of the fitting of molecules to maps. </para>
 
</para>
<programlisting>#include &quot;rwmolecule.h&quot;
#include &quot;rwimg.h&quot;
</programlisting><simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para>double <link linkend="_mol__map__energy_8h_1ad300cdac60f9bbab302dc1835dcbdcf8">molgroup_map_energy</link> (<link linkend="_struct_bmolgroup">Bmolgroup</link> *molgroup, <link linkend="_class_bimage">Bimage</link> *map, double Kmap)</para>

<para>Energy calculation of a molecule fit into a map. </para>
</listitem>
            <listitem><para>double <link linkend="_mol__map__energy_8h_1ad14efe6199856474e3c4f71a34647f76">mol_map_energy</link> (<link linkend="_struct_bmolecule">Bmolecule</link> *mol, <link linkend="_class_bimage">Bimage</link> *map, double Kmap)</para>

<para>Energy calculation of a molecule fit into a map. </para>
</listitem>
            <listitem><para>double <link linkend="_mol__map__energy_8h_1a3cfafe3fe596d7383ae2847c88c19eed">molgroup_map_correlation</link> (<link linkend="_struct_bmolgroup">Bmolgroup</link> *molgroup, <link linkend="_class_bimage">Bimage</link> *map)</para>

<para>Calculation of the fit of a molecule group into a map as a correlation coefficient. </para>
</listitem>
            <listitem><para>double <link linkend="_mol__map__energy_8h_1ab3312b0b839dd8781fb5c2d33318a97a">mol_map_correlation</link> (<link linkend="_struct_bmolecule">Bmolecule</link> *mol, <link linkend="_class_bimage">Bimage</link> *map)</para>

<para>Calculation of the fit of a molecule into a map as a correlation coefficient. </para>
</listitem>
            <listitem><para>double <link linkend="_mol__map__energy_8h_1a2eee27ebf6a7cc1af85c04d7b5702885">molgroup_bond_fit_map_energy</link> (<link linkend="_struct_bmolgroup">Bmolgroup</link> *molgroup, <link linkend="_class_bimage">Bimage</link> *map, double Kmap, int steps)</para>

<para>Energy calculation of a molecule fit into a map. </para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Headers of functions to calculate estimates of the fitting of molecules to maps. </para>

<para><formalpara><title>Author: </title>

<para>Bernard Heymann </para>
</formalpara>
<formalpara><title>Date: </title>

<para>Created: 20041230 </para>

<para>Modified: 20071224 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_mol__map__energy_8h_1ab3312b0b839dd8781fb5c2d33318a97a"/>    <section>
    <title>mol_map_correlation()</title>
<indexterm><primary>mol_map_correlation</primary><secondary>mol_map_energy.h</secondary></indexterm>
<indexterm><primary>mol_map_energy.h</primary><secondary>mol_map_correlation</secondary></indexterm>
<para><computeroutput>double mol_map_correlation (<link linkend="_struct_bmolecule">Bmolecule</link> * mol, <link linkend="_class_bimage">Bimage</link> * map)</computeroutput></para><para>

<para>Calculation of the fit of a molecule into a map as a correlation coefficient. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*mol</entry>
                                <entry>
<para>molecule. </para>
</entry>
                            </row>
                            <row>
                                <entry>*map</entry>
                                <entry>
<para>map. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double correlation coefficient. </para>
</formalpara>
</para>
<para>
Definition at line 185 of file mol_map_energy.cpp.</para>
    </section><anchor xml:id="_mol__map__energy_8h_1ad14efe6199856474e3c4f71a34647f76"/>    <section>
    <title>mol_map_energy()</title>
<indexterm><primary>mol_map_energy</primary><secondary>mol_map_energy.h</secondary></indexterm>
<indexterm><primary>mol_map_energy.h</primary><secondary>mol_map_energy</secondary></indexterm>
<para><computeroutput>double mol_map_energy (<link linkend="_struct_bmolecule">Bmolecule</link> * mol, <link linkend="_class_bimage">Bimage</link> * map, double Kmap)</computeroutput></para><para>

<para>Energy calculation of a molecule fit into a map. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*mol</entry>
                                <entry>
<para>molecule. </para>
</entry>
                            </row>
                            <row>
                                <entry>*map</entry>
                                <entry>
<para>map. </para>
</entry>
                            </row>
                            <row>
                                <entry>Kmap</entry>
                                <entry>
<para>map energy constant. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double energy. </para>
</formalpara>
</para>
<para>
Definition at line 83 of file mol_map_energy.cpp.</para>
    </section><anchor xml:id="_mol__map__energy_8h_1a2eee27ebf6a7cc1af85c04d7b5702885"/>    <section>
    <title>molgroup_bond_fit_map_energy()</title>
<indexterm><primary>molgroup_bond_fit_map_energy</primary><secondary>mol_map_energy.h</secondary></indexterm>
<indexterm><primary>mol_map_energy.h</primary><secondary>molgroup_bond_fit_map_energy</secondary></indexterm>
<para><computeroutput>double molgroup_bond_fit_map_energy (<link linkend="_struct_bmolgroup">Bmolgroup</link> * molgroup, <link linkend="_class_bimage">Bimage</link> * map, double Kmap, int steps)</computeroutput></para><para>

<para>Energy calculation of a molecule fit into a map. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*molgroup</entry>
                                <entry>
<para>molecule group. </para>
</entry>
                            </row>
                            <row>
                                <entry>*map</entry>
                                <entry>
<para>map. </para>
</entry>
                            </row>
                            <row>
                                <entry>Kmap</entry>
                                <entry>
<para>map energy constant. </para>
</entry>
                            </row>
                            <row>
                                <entry>steps</entry>
                                <entry>
<para>number of steps along a bond. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double energy.</para>
</formalpara>
<literallayout><computeroutput>The energy is the negative of the density at each step along a bond, rho, 
plus a fudge factor to make it positive:
    E = Kmap * ((-sum(rho)/n + avg)/std + 10)
where n is the number of voxels sampled, avg is the average of the map,
and std is the standard deviation of the map.
The force associated with this energy is the gradient at each step:
    Fx = Kmap * (rho(x+1) - rho(x-1))/(2*u)
where u is the voxel size. The contribution of a force to an atom at 
a step is weighted by the fractional distance the step is away from
the atom along the bond. 
</computeroutput></literallayout> </para>
<para>
Definition at line 250 of file mol_map_energy.cpp.</para>
    </section><anchor xml:id="_mol__map__energy_8h_1a3cfafe3fe596d7383ae2847c88c19eed"/>    <section>
    <title>molgroup_map_correlation()</title>
<indexterm><primary>molgroup_map_correlation</primary><secondary>mol_map_energy.h</secondary></indexterm>
<indexterm><primary>mol_map_energy.h</primary><secondary>molgroup_map_correlation</secondary></indexterm>
<para><computeroutput>double molgroup_map_correlation (<link linkend="_struct_bmolgroup">Bmolgroup</link> * molgroup, <link linkend="_class_bimage">Bimage</link> * map)</computeroutput></para><para>

<para>Calculation of the fit of a molecule group into a map as a correlation coefficient. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*molgroup</entry>
                                <entry>
<para>molecule group. </para>
</entry>
                            </row>
                            <row>
                                <entry>*map</entry>
                                <entry>
<para>map. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double correlation coefficient. </para>
</formalpara>
</para>
<para>
Definition at line 128 of file mol_map_energy.cpp.</para>
    </section><anchor xml:id="_mol__map__energy_8h_1ad300cdac60f9bbab302dc1835dcbdcf8"/>    <section>
    <title>molgroup_map_energy()</title>
<indexterm><primary>molgroup_map_energy</primary><secondary>mol_map_energy.h</secondary></indexterm>
<indexterm><primary>mol_map_energy.h</primary><secondary>molgroup_map_energy</secondary></indexterm>
<para><computeroutput>double molgroup_map_energy (<link linkend="_struct_bmolgroup">Bmolgroup</link> * molgroup, <link linkend="_class_bimage">Bimage</link> * map, double Kmap)</computeroutput></para><para>

<para>Energy calculation of a molecule fit into a map. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*molgroup</entry>
                                <entry>
<para>molecule group. </para>
</entry>
                            </row>
                            <row>
                                <entry>*map</entry>
                                <entry>
<para>map. </para>
</entry>
                            </row>
                            <row>
                                <entry>Kmap</entry>
                                <entry>
<para>map energy constant. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double energy. </para>
</formalpara>
</para>
<para>
Definition at line 23 of file mol_map_energy.cpp.</para>
</section>
</section>
</section>
