<?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="_rwatomprop_8cpp">
<title>/Users/bernard/b20/bsoft/src/rwparam/rwatomprop.cpp File Reference</title>
<indexterm><primary>/Users/bernard/b20/bsoft/src/rwparam/rwatomprop.cpp</primary></indexterm>
<para>

<para>Library routines to read and write atom properties. </para>
 
</para>
<programlisting>#include &quot;rwatomprop.h&quot;
#include &quot;rwstar.h&quot;
#include &quot;mol_tags.h&quot;
#include &quot;linked_list.h&quot;
#include &quot;utilities.h&quot;
</programlisting><simplesect>
    <title>Classes    </title>
        <itemizedlist>
            <listitem><para>struct <emphasis role="strong">atom_type</emphasis></para>
</listitem>
        </itemizedlist>
</simplesect>
<simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para><link linkend="_struct_batomtype">Batomtype</link> * <link linkend="_rwatomprop_8cpp_1a85742dfa343fdc74124655c4cea1b84c">read_atom_prop_star</link> (<link linkend="_class_bstring">Bstring</link> &amp;filename)</para>
</listitem>
            <listitem><para><link linkend="_struct_batomtype">Batomtype</link> * <link linkend="_rwatomprop_8cpp_1a377cd85620e995540fcd9a5e9e70d740">read_atom_properties</link> (<link linkend="_class_bstring">Bstring</link> &amp;filename)</para>
</listitem>
            <listitem><para>int <link linkend="_rwatomprop_8cpp_1a89a73c56a2b9eb2235e810d0cd4de5db">write_atom_prop_star</link> (<link linkend="_class_bstring">Bstring</link> &amp;filename, <link linkend="_struct_batomtype">Batomtype</link> *at_first)</para>
</listitem>
            <listitem><para><link linkend="_struct_batomtype">Batomtype</link> * <link linkend="_rwatomprop_8cpp_1a9a32fa70e7dff67815cfde9fa241a06f">get_atom_properties</link> (<link linkend="_class_bstring">Bstring</link> &amp;filename)</para>

<para>Reading atomic properties from parameter files. </para>
</listitem>
            <listitem><para>int <link linkend="_rwatomprop_8cpp_1ab3a42af0ab9d63829c6af616b2cd0fb6">write_atom_properties</link> (<link linkend="_class_bstring">Bstring</link> &amp;filename, <link linkend="_struct_batomtype">Batomtype</link> *at)</para>

<para>Writing atomic properties from parameter files. </para>
</listitem>
            <listitem><para><link linkend="_struct_batomtype">Batomtype</link> * <link linkend="_rwatomprop_8cpp_1aab8b8ff0e1d3b39c947e3b75c687ee9f">atom_type_add</link> (<link linkend="_struct_batomtype">Batomtype</link> **atype, const char *aname)</para>

<para>Adds an atom type structure to a linked list. </para>
</listitem>
            <listitem><para>int <link linkend="_rwatomprop_8cpp_1a189dacb3a249bad04a9e113a37a02c29">atom_type_kill</link> (<link linkend="_struct_batomtype">Batomtype</link> *atype)</para>

<para>Destroys an atom type. </para>
</listitem>
        </itemizedlist>
</simplesect>
<simplesect>
    <title>Variables    </title>
        <itemizedlist>
            <listitem><para>int <link linkend="_rwatomprop_8cpp_1a0b2caeb4b6f130be43e5a2f0267dd453">verbose</link></para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Library routines to read and write atom properties. </para>

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

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

<para>Created: 19991114 </para>

<para>Modified: 20110810 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_rwatomprop_8cpp_1aab8b8ff0e1d3b39c947e3b75c687ee9f"/>    <section>
    <title>atom_type_add()</title>
<indexterm><primary>atom_type_add</primary><secondary>rwatomprop.cpp</secondary></indexterm>
<indexterm><primary>rwatomprop.cpp</primary><secondary>atom_type_add</secondary></indexterm>
<para><computeroutput><link linkend="_struct_batomtype">Batomtype</link>* atom_type_add (<link linkend="_struct_batomtype">Batomtype</link> ** atype, const char * aname)</computeroutput></para><para>

<para>Adds an atom type structure to a linked 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>**atype</entry>
                                <entry>
<para>pointer to any atom type in the list. </para>
</entry>
                            </row>
                            <row>
                                <entry>*aname</entry>
                                <entry>
<para>atom type name. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Batomtype* new atom type. <literallayout><computeroutput>The function allocates memory for a new atom type structure.
If the content of the pointer is null, the new structure is
the first in the list. Otherwise, the end of the list is found
and the new structure added to it.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 144 of file rwatomprop.cpp.</para>
    </section><anchor xml:id="_rwatomprop_8cpp_1a189dacb3a249bad04a9e113a37a02c29"/>    <section>
    <title>atom_type_kill()</title>
<indexterm><primary>atom_type_kill</primary><secondary>rwatomprop.cpp</secondary></indexterm>
<indexterm><primary>rwatomprop.cpp</primary><secondary>atom_type_kill</secondary></indexterm>
<para><computeroutput>int atom_type_kill (<link linkend="_struct_batomtype">Batomtype</link> * atype)</computeroutput></para><para>

<para>Destroys an atom type. </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>atype</entry>
                                <entry>
<para>the atom type. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. </para>
</formalpara>
</para>
<para>
Definition at line 177 of file rwatomprop.cpp.</para>
    </section><anchor xml:id="_rwatomprop_8cpp_1a9a32fa70e7dff67815cfde9fa241a06f"/>    <section>
    <title>get_atom_properties()</title>
<indexterm><primary>get_atom_properties</primary><secondary>rwatomprop.cpp</secondary></indexterm>
<indexterm><primary>rwatomprop.cpp</primary><secondary>get_atom_properties</secondary></indexterm>
<para><computeroutput><link linkend="_struct_batomtype">Batomtype</link>* get_atom_properties (<link linkend="_class_bstring">Bstring</link> &amp; filename)</computeroutput></para><para>

<para>Reading atomic properties from parameter files. </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>&amp;filename</entry>
                                <entry>
<para>file name (if empty, use a default file). </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Batomtype* atom property structure, NULL on failure. </para>
</formalpara>
</para>
<para>
Definition at line 47 of file rwatomprop.cpp.</para>
    </section><anchor xml:id="_rwatomprop_8cpp_1a85742dfa343fdc74124655c4cea1b84c"/>    <section>
    <title>read_atom_prop_star()</title>
<indexterm><primary>read_atom_prop_star</primary><secondary>rwatomprop.cpp</secondary></indexterm>
<indexterm><primary>rwatomprop.cpp</primary><secondary>read_atom_prop_star</secondary></indexterm>
<para><computeroutput><link linkend="_struct_batomtype">Batomtype</link> * read_atom_prop_star (<link linkend="_class_bstring">Bstring</link> &amp; filename)</computeroutput></para><para>
Definition at line 193 of file rwatomprop.cpp.</para>
    </section><anchor xml:id="_rwatomprop_8cpp_1a377cd85620e995540fcd9a5e9e70d740"/>    <section>
    <title>read_atom_properties()</title>
<indexterm><primary>read_atom_properties</primary><secondary>rwatomprop.cpp</secondary></indexterm>
<indexterm><primary>rwatomprop.cpp</primary><secondary>read_atom_properties</secondary></indexterm>
<para><computeroutput><link linkend="_struct_batomtype">Batomtype</link> * read_atom_properties (<link linkend="_class_bstring">Bstring</link> &amp; filename)</computeroutput></para><para>
Definition at line 359 of file rwatomprop.cpp.</para>
    </section><anchor xml:id="_rwatomprop_8cpp_1a89a73c56a2b9eb2235e810d0cd4de5db"/>    <section>
    <title>write_atom_prop_star()</title>
<indexterm><primary>write_atom_prop_star</primary><secondary>rwatomprop.cpp</secondary></indexterm>
<indexterm><primary>rwatomprop.cpp</primary><secondary>write_atom_prop_star</secondary></indexterm>
<para><computeroutput>int write_atom_prop_star (<link linkend="_class_bstring">Bstring</link> &amp; filename, <link linkend="_struct_batomtype">Batomtype</link> * at_first)</computeroutput></para><para>
Definition at line 297 of file rwatomprop.cpp.</para>
    </section><anchor xml:id="_rwatomprop_8cpp_1ab3a42af0ab9d63829c6af616b2cd0fb6"/>    <section>
    <title>write_atom_properties()</title>
<indexterm><primary>write_atom_properties</primary><secondary>rwatomprop.cpp</secondary></indexterm>
<indexterm><primary>rwatomprop.cpp</primary><secondary>write_atom_properties</secondary></indexterm>
<para><computeroutput>int write_atom_properties (<link linkend="_class_bstring">Bstring</link> &amp; filename, <link linkend="_struct_batomtype">Batomtype</link> * at)</computeroutput></para><para>

<para>Writing atomic properties from parameter files. </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>&amp;filename</entry>
                                <entry>
<para>file name. </para>
</entry>
                            </row>
                            <row>
                                <entry>*at</entry>
                                <entry>
<para>the atom property structure. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int error code (&lt;0 means failure). </para>
</formalpara>
</para>
<para>
Definition at line 113 of file rwatomprop.cpp.</para>
</section>
</section>
<section>
<title>Variable Documentation</title>
<anchor xml:id="_rwatomprop_8cpp_1a0b2caeb4b6f130be43e5a2f0267dd453"/>    <section>
    <title>verbose</title>
<indexterm><primary>verbose</primary><secondary>rwatomprop.cpp</secondary></indexterm>
<indexterm><primary>rwatomprop.cpp</primary><secondary>verbose</secondary></indexterm>
<para><computeroutput>int verbose</computeroutput></para></section>
</section>
</section>
