<?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="_model__util_8h">
<title>/Users/bernard/b20/bsoft/include/model_util.h File Reference</title>
<indexterm><primary>/Users/bernard/b20/bsoft/include/model_util.h</primary></indexterm>
<para>

<para>Library routines used for model processing. </para>
 
</para>
<programlisting>#include &quot;rwmodel.h&quot;
#include &quot;rwmolecule.h&quot;
#include &quot;Bstring.h&quot;
</programlisting><simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para>long <link linkend="_model__util_8h_1a30ee786d43459f872ff601eb60226854">models_process</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, long(modfunc)(<link linkend="_struct_bmodel">Bmodel</link> *))</para>

<para>Process a list of models using the specified function. </para>
</listitem>
            <listitem><para>long <link linkend="_model__util_8h_1a355a6493fa508eb628ff486cc70f9904">models_process</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, long i, long(modfunc)(<link linkend="_struct_bmodel">Bmodel</link> *, long))</para>
</listitem>
            <listitem><para>long <link linkend="_model__util_8h_1ae5ed4fecd2de6c3b2bd6afd1f1a8ae2c">models_process</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, double d, long(modfunc)(<link linkend="_struct_bmodel">Bmodel</link> *, double))</para>
</listitem>
            <listitem><para>long <link linkend="_model__util_8h_1ae484457b3aee6c6366ac4caf87f37284">models_process</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_class_bstring">Bstring</link> &amp;str, long(modfunc)(<link linkend="_struct_bmodel">Bmodel</link> *, <link linkend="_class_bstring">Bstring</link> &amp;str))</para>
</listitem>
            <listitem><para>long <link linkend="_model__util_8h_1a4c33f296c7e12512c8b5db3ebddecf3e">model_list</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>

<para>Lists models in table form. </para>
</listitem>
            <listitem><para>long <link linkend="_model__util_8h_1ac6f6367948187664f95336a73c75154b">model_list_comp</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>

<para>Lists models with component counts in table form. </para>
</listitem>
            <listitem><para>long <link linkend="_model__util_8h_1a18355d3e26bb3b6b2281a41fb9c32c40">model_replace_components</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_struct_bmodel">Bmodel</link> *modref)</para>

<para>Replaces all components in a model with reference components. </para>
</listitem>
            <listitem><para>long <link linkend="_model__util_8h_1a7435e9d2c8374e7a221feb51cde53364">model_merge</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>

<para>Merges components from all models into one. </para>
</listitem>
            <listitem><para>long <link linkend="_model__util_8h_1a2e3082fb07d37877121b5a70d9f54b70">model_number_ids</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>

<para>Add a number to each model id. </para>
</listitem>
            <listitem><para>long <link linkend="_model__util_8h_1a9e766f5d17472ddfa9c37ff546b6055b">model_rename_components</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>

<para>Rename components. </para>
</listitem>
            <listitem><para>double <link linkend="_model__util_8h_1a73660f17a8ecd63c263e6eafed7361ba">model_mass</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>

<para>Calculates the mass of a model from component masses. </para>
</listitem>
            <listitem><para>long <link linkend="_model__util_8h_1a81f7644aaefa69028611bd923a5c18dd">model_mass_all</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>

<para>Calculates the masses of all the models in the list. </para>
</listitem>
            <listitem><para><link linkend="_class_vector3">Vector3</link>&lt; double &gt; <link linkend="_model__util_8h_1a7775e0d625d96afa3bc75f31d608b435">model_center_of_mass</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>
</listitem>
            <listitem><para>double <link linkend="_model__util_8h_1a4f99375e354e9a427bc20f01117d0c68">model_gyration_radius</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>

<para>Calculates the radius of gyration for a model. </para>
</listitem>
            <listitem><para><link linkend="_class_vector3">Vector3</link>&lt; double &gt; <link linkend="_model__util_8h_1afc89fc3ae2ad4349459fac3be59c76e6">model_principal_axes</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_class_vector3">Vector3</link>&lt; double &gt; *eigenvec)</para>

<para>Calculates the principal axes of a model. </para>
</listitem>
            <listitem><para>long <link linkend="_model__util_8h_1a9d8d7c19bf2b1cf963c1ae67e10b712d">model_principal_axes</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>
</listitem>
            <listitem><para>long <link linkend="_model__util_8h_1a3fee2fe7d3ef591140662b1e7a318b65">model_radial_distribution</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, double interval)</para>

<para>Calculates the radial distribution function of a model. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmolgroup">Bmolgroup</link> * <link linkend="_model__util_8h_1a78d383ded80b6e5b822a05890b3e4864">model_assemble</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_class_bstring">Bstring</link> &amp;paramfile, int separate)</para>

<para>Concatenates selected molecules into one group. </para>
</listitem>
            <listitem><para><link linkend="_struct_bmodel">Bmodel</link> * <link linkend="_model__util_8h_1a6625613941d908cf4b0a2dcf5a212c11">model_generate_com</link> (<link linkend="_struct_bmolgroup">Bmolgroup</link> *molgroup)</para>

<para>Calculates the centers-of-mass of molecule group components and generates a new model. </para>
</listitem>
            <listitem><para>long <link linkend="_model__util_8h_1ad50f31b66740e3743866faba6fc31f12">model_update_centers_of_mass</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, <link linkend="_struct_bmolgroup">Bmolgroup</link> *molgroup)</para>

<para>Updates the centers-of-mass of molecule group components. </para>
</listitem>
            <listitem><para>long <link linkend="_model__util_8h_1a0725d2b7fbef2210b3d5b6c8650c324c">model_average_components</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, int number)</para>

<para>Averages sequential components. </para>
</listitem>
            <listitem><para><link linkend="_struct_bcomponent">Bcomponent</link> ** <link linkend="_model__util_8h_1adb153f04b84882e3e117f171a01cfc77">component_get_array</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, long &amp;ncomp)</para>

<para>Generates an array of pointers to component structures. </para>
</listitem>
            <listitem><para><link linkend="_class_vector3">Vector3</link>&lt; double &gt; <link linkend="_model__util_8h_1ab164bcd5074a88677bcd2fe76c5ee23a">component_plane</link> (<link linkend="_struct_bcomponent">Bcomponent</link> **comparray, double &amp;offset)</para>

<para>Calculates a plane through an array of components. </para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Library routines used for model processing. </para>

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

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

<para>Created: 20060908 </para>

<para>Modified: 20190125 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_model__util_8h_1adb153f04b84882e3e117f171a01cfc77"/>    <section>
    <title>component_get_array()</title>
<indexterm><primary>component_get_array</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>component_get_array</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bcomponent">Bcomponent</link>** component_get_array (<link linkend="_struct_bmodel">Bmodel</link> * model, long &amp; n)</computeroutput></para><para>

<para>Generates an array of pointers to component structures. </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>*model</entry>
                                <entry>
<para>model structure. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;n</entry>
                                <entry>
<para>pointer to number of comps found. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bcomponent** array of pointers to components. </para>
</formalpara>
</para>
<para>
Definition at line 903 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1ab164bcd5074a88677bcd2fe76c5ee23a"/>    <section>
    <title>component_plane()</title>
<indexterm><primary>component_plane</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>component_plane</secondary></indexterm>
<para><computeroutput><link linkend="_class_vector3">Vector3</link>&lt;double&gt; component_plane (<link linkend="_struct_bcomponent">Bcomponent</link> ** comparray, double &amp; offset)</computeroutput></para><para>

<para>Calculates a plane through an array of components. </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>**comparray</entry>
                                <entry>
<para>array of components. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;offset</entry>
                                <entry>
<para>offset from plane. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para><link linkend="_class_vector3">Vector3&lt;double&gt;</link> plane normal. <literallayout><computeroutput>A plane is fit through the polygon vertices and the normal calculated from:
    n•p = d
where n is the normal vector, p is a point in the plane, and d is the offset.
The polygon planarity is defined as the root-mean-square-deviation from 
the fitted plane.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 933 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1a78d383ded80b6e5b822a05890b3e4864"/>    <section>
    <title>model_assemble()</title>
<indexterm><primary>model_assemble</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_assemble</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmolgroup">Bmolgroup</link>* model_assemble (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_class_bstring">Bstring</link> &amp; paramfile, int separate)</computeroutput></para><para>

<para>Concatenates selected molecules into one group. </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>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;paramfile</entry>
                                <entry>
<para>atomic parameter file. </para>
</entry>
                            </row>
                            <row>
                                <entry>separate</entry>
                                <entry>
<para>flag to generate separate molecule groups. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmolgroup* list of molecule groups. <literallayout><computeroutput>Only the first model in the linked list is processed.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 688 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1a0725d2b7fbef2210b3d5b6c8650c324c"/>    <section>
    <title>model_average_components()</title>
<indexterm><primary>model_average_components</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_average_components</secondary></indexterm>
<para><computeroutput>long model_average_components (<link linkend="_struct_bmodel">Bmodel</link> * model, int number)</computeroutput></para><para>

<para>Averages sequential components. </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>*model</entry>
                                <entry>
<para>model structure to be modified. </para>
</entry>
                            </row>
                            <row>
                                <entry>number</entry>
                                <entry>
<para>number of components to average. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long number of remaining components. <literallayout><computeroutput>Only the first component in each set with modified coordinates is kept.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 866 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1a7775e0d625d96afa3bc75f31d608b435"/>    <section>
    <title>model_center_of_mass()</title>
<indexterm><primary>model_center_of_mass</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_center_of_mass</secondary></indexterm>
<para><computeroutput><link linkend="_class_vector3">Vector3</link>&lt;double&gt; model_center_of_mass (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>
Definition at line 475 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1a6625613941d908cf4b0a2dcf5a212c11"/>    <section>
    <title>model_generate_com()</title>
<indexterm><primary>model_generate_com</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_generate_com</secondary></indexterm>
<para><computeroutput><link linkend="_struct_bmodel">Bmodel</link>* model_generate_com (<link linkend="_struct_bmolgroup">Bmolgroup</link> * molgroup)</computeroutput></para><para>

<para>Calculates the centers-of-mass of molecule group components and generates a new model. </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>list of molecule groups. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Bmodel* new model. <literallayout><computeroutput>Each molecule is assumed to be a component.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 790 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1a4f99375e354e9a427bc20f01117d0c68"/>    <section>
    <title>model_gyration_radius()</title>
<indexterm><primary>model_gyration_radius</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_gyration_radius</secondary></indexterm>
<para><computeroutput>double model_gyration_radius (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>

<para>Calculates the radius of gyration for a model. </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>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double radius of gyration. <literallayout><computeroutput>Only the first model in the list is processed.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 503 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1a4c33f296c7e12512c8b5db3ebddecf3e"/>    <section>
    <title>model_list()</title>
<indexterm><primary>model_list</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_list</secondary></indexterm>
<para><computeroutput>long model_list (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>

<para>Lists models in table form. </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>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long number of models. </para>
</formalpara>
</para>
<para>
Definition at line 127 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1ac6f6367948187664f95336a73c75154b"/>    <section>
    <title>model_list_comp()</title>
<indexterm><primary>model_list_comp</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_list_comp</secondary></indexterm>
<para><computeroutput>long model_list_comp (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>

<para>Lists models with component counts in table form. </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>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long number of models. </para>
</formalpara>
</para>
<para>
Definition at line 158 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1a73660f17a8ecd63c263e6eafed7361ba"/>    <section>
    <title>model_mass()</title>
<indexterm><primary>model_mass</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_mass</secondary></indexterm>
<para><computeroutput>double model_mass (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>

<para>Calculates the mass of a model from component masses. </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>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double model mass. <literallayout><computeroutput>The component type masses must be provided.
Only the first model in the list is processed.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 416 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1a81f7644aaefa69028611bd923a5c18dd"/>    <section>
    <title>model_mass_all()</title>
<indexterm><primary>model_mass_all</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_mass_all</secondary></indexterm>
<para><computeroutput>long model_mass_all (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>

<para>Calculates the masses of all the models in the list. </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>*model</entry>
                                <entry>
<para>linked list of model parameters. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long number of selected models. <literallayout><computeroutput>The component type masses must be provided.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 445 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1a7435e9d2c8374e7a221feb51cde53364"/>    <section>
    <title>model_merge()</title>
<indexterm><primary>model_merge</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_merge</secondary></indexterm>
<para><computeroutput>long model_merge (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>

<para>Merges components from all models into one. </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>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long number of components. </para>
</formalpara>
</para>
<para>
Definition at line 299 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1a2e3082fb07d37877121b5a70d9f54b70"/>    <section>
    <title>model_number_ids()</title>
<indexterm><primary>model_number_ids</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_number_ids</secondary></indexterm>
<para><computeroutput>long model_number_ids (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>

<para>Add a number to each model id. </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>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long number of models. <literallayout><computeroutput>The intention is to give unique id&apos;s to models.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 356 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1afc89fc3ae2ad4349459fac3be59c76e6"/>    <section>
    <title>model_principal_axes()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>model_principal_axes</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_principal_axes</secondary></indexterm>
<para><computeroutput><link linkend="_class_vector3">Vector3</link>&lt;double&gt; model_principal_axes (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_class_vector3">Vector3</link>&lt; double &gt; * eigenvec)</computeroutput></para><para>

<para>Calculates the principal axes of a model. </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>*model</entry>
                                <entry>
<para>model structure. </para>
</entry>
                            </row>
                            <row>
                                <entry>*eigenvec</entry>
                                <entry>
<para>eigen vectors (can be NULL). </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para><link linkend="_class_vector3">Vector3&lt;double&gt;</link> 3-valued vector of principal axes. <literallayout><computeroutput>Only the first model in the list is processed.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 534 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1a9d8d7c19bf2b1cf963c1ae67e10b712d"/>    <section>
    <title>model_principal_axes()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>model_principal_axes</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_principal_axes</secondary></indexterm>
<para><computeroutput>long model_principal_axes (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>
Definition at line 574 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1a3fee2fe7d3ef591140662b1e7a318b65"/>    <section>
    <title>model_radial_distribution()</title>
<indexterm><primary>model_radial_distribution</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_radial_distribution</secondary></indexterm>
<para><computeroutput>long model_radial_distribution (<link linkend="_struct_bmodel">Bmodel</link> * model, double interval)</computeroutput></para><para>

<para>Calculates the radial distribution function of a model. </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>*model</entry>
                                <entry>
<para>model structure. </para>
</entry>
                            </row>
                            <row>
                                <entry>interval</entry>
                                <entry>
<para>interval between bins. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long 0. <literallayout><computeroutput>Only the first model in the list is processed.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 605 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1a9e766f5d17472ddfa9c37ff546b6055b"/>    <section>
    <title>model_rename_components()</title>
<indexterm><primary>model_rename_components</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_rename_components</secondary></indexterm>
<para><computeroutput>long model_rename_components (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>

<para>Rename components. </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>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long number of components. <literallayout><computeroutput>The number of links to a component determines its new name.
Only the first model is processed.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 378 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1a18355d3e26bb3b6b2281a41fb9c32c40"/>    <section>
    <title>model_replace_components()</title>
<indexterm><primary>model_replace_components</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_replace_components</secondary></indexterm>
<para><computeroutput>long model_replace_components (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_struct_bmodel">Bmodel</link> * modref)</computeroutput></para><para>

<para>Replaces all components in a model with reference components. </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>*model</entry>
                                <entry>
<para>model structure to be modified. </para>
</entry>
                            </row>
                            <row>
                                <entry>*modref</entry>
                                <entry>
<para>reference model. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long number of components used in reference. <literallayout><computeroutput>Only the first model in the reference is used.
All models will have identical sets of components.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 227 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1ad50f31b66740e3743866faba6fc31f12"/>    <section>
    <title>model_update_centers_of_mass()</title>
<indexterm><primary>model_update_centers_of_mass</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>model_update_centers_of_mass</secondary></indexterm>
<para><computeroutput>long model_update_centers_of_mass (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_struct_bmolgroup">Bmolgroup</link> * molgroup)</computeroutput></para><para>

<para>Updates the centers-of-mass of molecule group components. </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>*model</entry>
                                <entry>
<para>model parameters. </para>
</entry>
                            </row>
                            <row>
                                <entry>*molgroup</entry>
                                <entry>
<para>list of molecule groups. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long number of selected components. <literallayout><computeroutput>The identifiers of the molecule groups must correspond to the component identifiers.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 839 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1a30ee786d43459f872ff601eb60226854"/>    <section>
    <title>models_process()<computeroutput>[1/4]</computeroutput></title>
<indexterm><primary>models_process</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>models_process</secondary></indexterm>
<para><computeroutput>long models_process (<link linkend="_struct_bmodel">Bmodel</link> * model, long(modfunc)(<link linkend="_struct_bmodel">Bmodel</link> *) )</computeroutput></para><para>

<para>Process a list of models using the specified function. </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>*model</entry>
                                <entry>
<para>list of models. </para>
</entry>
                            </row>
                            <row>
                                <entry>modfunc</entry>
                                <entry>
<para>function to be called. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>long aggregate number returned by function. <literallayout><computeroutput>The function called process only one model.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 36 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1a355a6493fa508eb628ff486cc70f9904"/>    <section>
    <title>models_process()<computeroutput>[2/4]</computeroutput></title>
<indexterm><primary>models_process</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>models_process</secondary></indexterm>
<para><computeroutput>long models_process (<link linkend="_struct_bmodel">Bmodel</link> * model, long i, long(modfunc)(<link linkend="_struct_bmodel">Bmodel</link> *, long) )</computeroutput></para><para>
Definition at line 60 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1ae5ed4fecd2de6c3b2bd6afd1f1a8ae2c"/>    <section>
    <title>models_process()<computeroutput>[3/4]</computeroutput></title>
<indexterm><primary>models_process</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>models_process</secondary></indexterm>
<para><computeroutput>long models_process (<link linkend="_struct_bmodel">Bmodel</link> * model, double d, long(modfunc)(<link linkend="_struct_bmodel">Bmodel</link> *, double) )</computeroutput></para><para>
Definition at line 84 of file model_util.cpp.</para>
    </section><anchor xml:id="_model__util_8h_1ae484457b3aee6c6366ac4caf87f37284"/>    <section>
    <title>models_process()<computeroutput>[4/4]</computeroutput></title>
<indexterm><primary>models_process</primary><secondary>model_util.h</secondary></indexterm>
<indexterm><primary>model_util.h</primary><secondary>models_process</secondary></indexterm>
<para><computeroutput>long models_process (<link linkend="_struct_bmodel">Bmodel</link> * model, <link linkend="_class_bstring">Bstring</link> &amp; str, long(modfunc)(<link linkend="_struct_bmodel">Bmodel</link> *, <link linkend="_class_bstring">Bstring</link> &amp;str) )</computeroutput></para><para>
Definition at line 108 of file model_util.cpp.</para>
</section>
</section>
</section>
