| [6029a6] | 1 | <?xml version="1.0" encoding="UTF-8"?>
 | 
|---|
 | 2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
 | 
|---|
 | 3 |                "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 | 
|---|
 | 4 | <!ENTITY molecuilder_logo SYSTEM "pictures/molecuilder_logo.png" NDATA PNG>
 | 
|---|
 | 5 | <!ENTITY dialog_box SYSTEM "pictures/dialog_box.png" NDATA PNG>
 | 
|---|
 | 6 | <!ENTITY dialog_add-atom_tooltip SYSTEM "pictures/dialog_add-atom_tooltip.png" NDATA PNG>
 | 
|---|
 | 7 | <!ENTITY dialog_complex SYSTEM "pictures/dialog_complex.png" NDATA PNG>
 | 
|---|
 | 8 | <!ENTITY dialog_exit SYSTEM "pictures/dialog_exit.png" NDATA PNG>
 | 
|---|
 | 9 | <!ENTITY example_basic_view SYSTEM "pictures/example_basic_view.png" NDATA PNG>
 | 
|---|
 | 10 | ]>
 | 
|---|
 | 11 | <book version="5.0" xmlns="http://docbook.org/ns/docbook"
 | 
|---|
 | 12 |       xmlns:xlink="http://www.w3.org/1999/xlink"
 | 
|---|
 | 13 |       xmlns:xi="http://www.w3.org/2001/XInclude"
 | 
|---|
 | 14 |       xmlns:svg="http://www.w3.org/2000/svg"
 | 
|---|
 | 15 |       xmlns:m="http://www.w3.org/1998/Math/MathML"
 | 
|---|
 | 16 |       xmlns:html="http://www.w3.org/1999/xhtml"
 | 
|---|
 | 17 |       xmlns:db="http://docbook.org/ns/docbook">
 | 
|---|
 | 18 |   <info>
 | 
|---|
 | 19 |     <title>MoleCuilder - a Molecule Builder</title>
 | 
|---|
 | 20 | 
 | 
|---|
 | 21 |     <author>
 | 
|---|
 | 22 |       <personname><firstname>Frederik</firstname><surname>Heber</surname></personname>
 | 
|---|
 | 23 | 
 | 
|---|
 | 24 |       <affiliation>
 | 
|---|
 | 25 |         <orgname>heber@ins.uni-bonn.de</orgname>
 | 
|---|
 | 26 |       </affiliation>
 | 
|---|
 | 27 |     </author>
 | 
|---|
 | 28 | 
 | 
|---|
 | 29 |     <pubdate>07/03/14</pubdate>
 | 
|---|
 | 30 |   </info>
 | 
|---|
 | 31 | 
 | 
|---|
 | 32 |   <chapter>
 | 
|---|
 | 33 |     <title>Introduction</title>
 | 
|---|
 | 34 | 
 | 
|---|
 | 35 |     <figure>
 | 
|---|
 | 36 |       <title>MoleCuilder logo depicting a tesselated buckyball and a benzene
 | 
|---|
 | 37 |       molecule</title>
 | 
|---|
 | 38 | 
 | 
|---|
 | 39 |       <mediaobject>
 | 
|---|
 | 40 |         <imageobject>
 | 
|---|
 | 41 |           <imagedata entityref="molecuilder_logo" scalefit="1" width="100%"/>
 | 
|---|
 | 42 |         </imageobject>
 | 
|---|
 | 43 |       </mediaobject>
 | 
|---|
 | 44 |     </figure>
 | 
|---|
 | 45 | 
 | 
|---|
 | 46 |     <section>
 | 
|---|
 | 47 |       <title>What is MoleCuilder?</title>
 | 
|---|
 | 48 | 
 | 
|---|
 | 49 |       <para>In Short,<command> MoleCuilder</command> is a concatenation of
 | 
|---|
 | 50 |       molecule and builder.</para>
 | 
|---|
 | 51 | 
 | 
|---|
 | 52 |       <para>In more words, molecular dynamics simulations are frequently
 | 
|---|
 | 53 |       employed to simulate material behavior under stress, chemical reactions
 | 
|---|
 | 54 |       such as of cementitious materials, or folding pathways and docking
 | 
|---|
 | 55 |       procedures of bio proteins. Even if the computational load, due to the
 | 
|---|
 | 56 |       large number of atoms, is very demanding, nonetheless they may serve as
 | 
|---|
 | 57 |       a starting point, e.g. extracting parameters for a coarser model.
 | 
|---|
 | 58 |       However, what is on the other hand the starting point of molecular
 | 
|---|
 | 59 |       dynamics simulations? It is the coordinate and element of each atom
 | 
|---|
 | 60 |       combined with potential functions that model the interactions.</para>
 | 
|---|
 | 61 | 
 | 
|---|
 | 62 |       <para>MoleCuilder allows to fully construct such a starting point:
 | 
|---|
 | 63 |       letting the user construct atomic and molecular geometries by a simple
 | 
|---|
 | 64 |       point&click approach, a CAD-pendant on the nanoscale. Creating
 | 
|---|
 | 65 |       suitable empirical potentials by fitting parameters to ab-initio
 | 
|---|
 | 66 |       calculations within hours. Specific emphasis is placed on a
 | 
|---|
 | 67 |       simple-to-use interface, allowing for the quick-and-dirty building of
 | 
|---|
 | 68 |       molecular systems, and on scriptability. Eventually, not a single, but
 | 
|---|
 | 69 |       many, related molecular systems have to be created.</para>
 | 
|---|
 | 70 | 
 | 
|---|
 | 71 |       <section>
 | 
|---|
 | 72 |         <title>Installation requirements</title>
 | 
|---|
 | 73 | 
 | 
|---|
 | 74 |         <para>For installations requirements and instructions we refer to the
 | 
|---|
 | 75 |         internal documentation of MoleCuilder, created via doxgen from the
 | 
|---|
 | 76 |         source code.</para>
 | 
|---|
 | 77 |       </section>
 | 
|---|
 | 78 | 
 | 
|---|
 | 79 |       <section>
 | 
|---|
 | 80 |         <title>License</title>
 | 
|---|
 | 81 | 
 | 
|---|
 | 82 |         <para>As long as no other license statement is given, MoleCuilder is
 | 
|---|
 | 83 |         free for user under the GNU Public License (GPL) Version 2 (see
 | 
|---|
 | 84 |         <uri>www.gnu.de/documents/gpl-2.0.de.html</uri>).</para>
 | 
|---|
 | 85 |       </section>
 | 
|---|
 | 86 | 
 | 
|---|
 | 87 |       <section>
 | 
|---|
 | 88 |         <title>Disclaimer</title>
 | 
|---|
 | 89 | 
 | 
|---|
 | 90 |         <para>We quote section 11 from the GPLv2 license:</para>
 | 
|---|
 | 91 | 
 | 
|---|
 | 92 |         <remark>Because the program is licensed free of charge, there is not
 | 
|---|
 | 93 |         warranty for the program, to the extent permitted by applicable law.
 | 
|---|
 | 94 |         Except when otherwise stated in writing in the copyright holders
 | 
|---|
 | 95 |         and/or other parties provide the program "as is" without warranty of
 | 
|---|
 | 96 |         any kind, either expressed or implied. Including, but not limited to,
 | 
|---|
 | 97 |         the implied warranties of merchantability and fitness for a particular
 | 
|---|
 | 98 |         purpose. The entire risk as to the quality and performance of the
 | 
|---|
 | 99 |         program is with you. Should the program prove defective, you assume
 | 
|---|
 | 100 |         the cost of all necessary servicing, repair, or correction.</remark>
 | 
|---|
 | 101 |       </section>
 | 
|---|
 | 102 | 
 | 
|---|
 | 103 |       <section>
 | 
|---|
 | 104 |         <title>Feedback</title>
 | 
|---|
 | 105 | 
 | 
|---|
 | 106 |         <para>If you encounter any bugs, errors, or would like to submit
 | 
|---|
 | 107 |         feature request, please use the email address provided at the very
 | 
|---|
 | 108 |         beginning of this user guide. The author is especially thankful for
 | 
|---|
 | 109 |         any description of all related events prior to occurrence of the
 | 
|---|
 | 110 |         error, saved "session scripts" (see below) and auxiliary files. Please
 | 
|---|
 | 111 |         mind sensible space restrictions of email attachments.</para>
 | 
|---|
 | 112 |       </section>
 | 
|---|
 | 113 | 
 | 
|---|
 | 114 |       <section>
 | 
|---|
 | 115 |         <title>Notation</title>
 | 
|---|
 | 116 | 
 | 
|---|
 | 117 |         <para>We briefly explain a few specific wordings associated with the
 | 
|---|
 | 118 |         program:</para>
 | 
|---|
 | 119 | 
 | 
|---|
 | 120 |         <itemizedlist>
 | 
|---|
 | 121 |           <listitem>
 | 
|---|
 | 122 |             <para><emphasis>Action</emphasis> is a command that allows for
 | 
|---|
 | 123 |             undoing and redoing, i.e. a single atomic procedure for
 | 
|---|
 | 124 |             manipulating the molecular system.</para>
 | 
|---|
 | 125 |           </listitem>
 | 
|---|
 | 126 | 
 | 
|---|
 | 127 |           <listitem>
 | 
|---|
 | 128 |             <para>Selection refers to a subsets from the set of instances of a
 | 
|---|
 | 129 |             particular type, e.g. atoms.</para>
 | 
|---|
 | 130 |           </listitem>
 | 
|---|
 | 131 | 
 | 
|---|
 | 132 |           <listitem>
 | 
|---|
 | 133 |             <para>Shape means a specific region of the domain that can be
 | 
|---|
 | 134 |             described in the way of constructive geometry, i.e. as the
 | 
|---|
 | 135 |             intersection, negation, and combination of primitives such as
 | 
|---|
 | 136 |             spheres or cylinders.</para>
 | 
|---|
 | 137 |           </listitem>
 | 
|---|
 | 138 |         </itemizedlist>
 | 
|---|
 | 139 |       </section>
 | 
|---|
 | 140 | 
 | 
|---|
 | 141 |       <section>
 | 
|---|
 | 142 |         <title>Completeness</title>
 | 
|---|
 | 143 | 
 | 
|---|
 | 144 |         <para>This documentation takes quite some effort to write. Hence, the
 | 
|---|
 | 145 |         described features and especially the actions herein are settled with
 | 
|---|
 | 146 |         respect to their functionality, while newer features or actions are
 | 
|---|
 | 147 |         probably missing. This should be a clear sign to you that these are
 | 
|---|
 | 148 |         probably not safe to use yet. If you nonetheless require them and thus
 | 
|---|
 | 149 |         should acquire some familiarity with the code itself. This suggests
 | 
|---|
 | 150 |         changing to the developer documentation which is maintained along with
 | 
|---|
 | 151 |         the source code with <productname>doxygen</productname>.</para>
 | 
|---|
 | 152 |       </section>
 | 
|---|
 | 153 |     </section>
 | 
|---|
 | 154 |   </chapter>
 | 
|---|
 | 155 | 
 | 
|---|
 | 156 |   <chapter>
 | 
|---|
 | 157 |     <title>Features</title>
 | 
|---|
 | 158 | 
 | 
|---|
 | 159 |     <para>Basically, <command>MoleCuilder</command> parses geometries from
 | 
|---|
 | 160 |     files, manipulates them and stores them again in files. The manipulation
 | 
|---|
 | 161 |     can be done either via a command-line interface or via the graphical user
 | 
|---|
 | 162 |     interface.</para>
 | 
|---|
 | 163 | 
 | 
|---|
 | 164 |     <section>
 | 
|---|
 | 165 |       <title>Concepts</title>
 | 
|---|
 | 166 | 
 | 
|---|
 | 167 |       <para>In general, we divide the molecular systems into three different
 | 
|---|
 | 168 |       components or scales.</para>
 | 
|---|
 | 169 | 
 | 
|---|
 | 170 |       <orderedlist>
 | 
|---|
 | 171 |         <listitem>
 | 
|---|
 | 172 |           <para>Atoms</para>
 | 
|---|
 | 173 | 
 | 
|---|
 | 174 |           <para>Atoms are the undividable objects of the molecular systems.
 | 
|---|
 | 175 |           They have an element <quote>Z</quote> and three coordinates
 | 
|---|
 | 176 |           <quote>(x,y,z)</quote>.</para>
 | 
|---|
 | 177 |         </listitem>
 | 
|---|
 | 178 | 
 | 
|---|
 | 179 |         <listitem>
 | 
|---|
 | 180 |           <para>Molecules</para>
 | 
|---|
 | 181 | 
 | 
|---|
 | 182 |           <para>Molecules are bound conglomeration of atoms. They contain a
 | 
|---|
 | 183 |           number of atoms and a specific center in the domain such that its
 | 
|---|
 | 184 |           atoms are placed relative to this center. Also, they may have a
 | 
|---|
 | 185 |           bounding box, i.e. a subdomain that contains all of the atoms in the
 | 
|---|
 | 186 |           molecule.</para>
 | 
|---|
 | 187 | 
 | 
|---|
 | 188 |           <para>Note that the molecular structure of the system, i.e. the
 | 
|---|
 | 189 |           bonding graph, is determined by MoleCuilder and used to dissect the
 | 
|---|
 | 190 |           system into distinct molecules automatically.</para>
 | 
|---|
 | 191 |         </listitem>
 | 
|---|
 | 192 | 
 | 
|---|
 | 193 |         <listitem>
 | 
|---|
 | 194 |           <para>Clusters</para>
 | 
|---|
 | 195 | 
 | 
|---|
 | 196 |           <para>Clusters are unbound conglomeration of atoms. Clusters serves
 | 
|---|
 | 197 |           as groups of atoms for specific operations that would be to
 | 
|---|
 | 198 |           restricted if they worked on just molecules.</para>
 | 
|---|
 | 199 |         </listitem>
 | 
|---|
 | 200 | 
 | 
|---|
 | 201 |         <listitem>
 | 
|---|
 | 202 |           <para>Domain</para>
 | 
|---|
 | 203 | 
 | 
|---|
 | 204 |           <para>The domain refers to the simulation domain. It is
 | 
|---|
 | 205 |           parallelepiped in <inlineequation>
 | 
|---|
 | 206 |               <m:math display="inline">
 | 
|---|
 | 207 |                 <m:mi>\mathbb{R}^3</m:mi>
 | 
|---|
 | 208 |               </m:math>
 | 
|---|
 | 209 |             </inlineequation>where either periodic, wrapped, or open boundary
 | 
|---|
 | 210 |           conditions apply. The domain contains all atoms, i.e. the box
 | 
|---|
 | 211 |           containing all atoms.</para>
 | 
|---|
 | 212 |         </listitem>
 | 
|---|
 | 213 |       </orderedlist>
 | 
|---|
 | 214 |     </section>
 | 
|---|
 | 215 | 
 | 
|---|
 | 216 |     <section>
 | 
|---|
 | 217 |       <title>Interfaces</title>
 | 
|---|
 | 218 | 
 | 
|---|
 | 219 |       <para>MoleCuilder has four different interfaces: Command-line, text
 | 
|---|
 | 220 |       menu, graphical user interface, and python interface.</para>
 | 
|---|
 | 221 | 
 | 
|---|
 | 222 |       <orderedlist>
 | 
|---|
 | 223 |         <listitem>
 | 
|---|
 | 224 |           <para>Command-Line</para>
 | 
|---|
 | 225 | 
 | 
|---|
 | 226 |           <para>The command-line interface allows to use MoleCuilder
 | 
|---|
 | 227 |           non-interactively via a terminal session. The program is executed by
 | 
|---|
 | 228 |           expanding the shell command with a number of commands including all
 | 
|---|
 | 229 |           required options that are executed one after the other. After
 | 
|---|
 | 230 |           execution of the last command, the program quits. The command-line
 | 
|---|
 | 231 |           interface usually works on a specific file that is given as input,
 | 
|---|
 | 232 |           manipulated, analysed, ... via the sequence of commands and
 | 
|---|
 | 233 |           eventually all changes are stored in the this file. Hence, the input
 | 
|---|
 | 234 |           file acts as the state of the starting configuration that is
 | 
|---|
 | 235 |           modified via MoleCuilder.</para>
 | 
|---|
 | 236 |         </listitem>
 | 
|---|
 | 237 | 
 | 
|---|
 | 238 |         <listitem>
 | 
|---|
 | 239 |           <para>Text menu</para>
 | 
|---|
 | 240 | 
 | 
|---|
 | 241 |           <para>The text-menu is similar to the command-line interface with
 | 
|---|
 | 242 |           the exception that it allows for interactive sessions. Commands are
 | 
|---|
 | 243 |           chosen from a text menu and executed directly after selection by the
 | 
|---|
 | 244 |           user.</para>
 | 
|---|
 | 245 |         </listitem>
 | 
|---|
 | 246 | 
 | 
|---|
 | 247 |         <listitem>
 | 
|---|
 | 248 |           <para>Graphical interface</para>
 | 
|---|
 | 249 | 
 | 
|---|
 | 250 |           <para>The graphical interface is based on Qt. It features a full
 | 
|---|
 | 251 |           graphical representation of the simulation domain with atoms and
 | 
|---|
 | 252 |           their bonds. It allows manipulation in point&click fashion.
 | 
|---|
 | 253 |           Commands are selected from pull-down menus and dialogs are used to
 | 
|---|
 | 254 |           query the user for all required parameters to such a command.</para>
 | 
|---|
 | 255 |         </listitem>
 | 
|---|
 | 256 | 
 | 
|---|
 | 257 |         <listitem>
 | 
|---|
 | 258 |           <para>Python interface</para>
 | 
|---|
 | 259 | 
 | 
|---|
 | 260 |           <para>The last interface is accessible only within the python
 | 
|---|
 | 261 |           programming language. MoleCuilder can be loaded as a module and its
 | 
|---|
 | 262 |           commands can be executed with either the python interpreter
 | 
|---|
 | 263 |           interactively or via python scripts non-interactively. Note that
 | 
|---|
 | 264 |           this allows auxiliary calculations to be performed in pythons whose
 | 
|---|
 | 265 |           results may be used as parameters in subsequent commands.</para>
 | 
|---|
 | 266 |         </listitem>
 | 
|---|
 | 267 |       </orderedlist>
 | 
|---|
 | 268 |     </section>
 | 
|---|
 | 269 | 
 | 
|---|
 | 270 |     <section>
 | 
|---|
 | 271 |       <title>Known File formats</title>
 | 
|---|
 | 272 | 
 | 
|---|
 | 273 |       <para>We briefly the file formats MoleCuilder can parse and
 | 
|---|
 | 274 |       store.</para>
 | 
|---|
 | 275 | 
 | 
|---|
 | 276 |       <itemizedlist>
 | 
|---|
 | 277 |         <listitem>
 | 
|---|
 | 278 |           <para>XYZ, <filename>.xyz</filename> (simplest of all formats,
 | 
|---|
 | 279 |           line-wise element and three coordinates with two line header, number
 | 
|---|
 | 280 |           of lines and a comment line)</para>
 | 
|---|
 | 281 |         </listitem>
 | 
|---|
 | 282 | 
 | 
|---|
 | 283 |         <listitem>
 | 
|---|
 | 284 |           <para><productname>MPQC</productname>, <filename>.in</filename>
 | 
|---|
 | 285 |           (<link xlink:href="???">http://www.mpqc.org/</link>)</para>
 | 
|---|
 | 286 |         </listitem>
 | 
|---|
 | 287 | 
 | 
|---|
 | 288 |         <listitem>
 | 
|---|
 | 289 |           <para>PDB, <filename>.pdb</filename> (<link
 | 
|---|
 | 290 |           xlink:href="???">http://www.pdb.org/</link>)</para>
 | 
|---|
 | 291 |         </listitem>
 | 
|---|
 | 292 | 
 | 
|---|
 | 293 |         <listitem>
 | 
|---|
 | 294 |           <para><productname>ESPACK</productname>, <filename>.conf</filename>
 | 
|---|
 | 295 |           (electronic structure package by Institute for Numerical Simulation,
 | 
|---|
 | 296 |           University of Bonn, code not in circulation)</para>
 | 
|---|
 | 297 |         </listitem>
 | 
|---|
 | 298 | 
 | 
|---|
 | 299 |         <listitem>
 | 
|---|
 | 300 |           <para><productname>PSI4</productname>, <filename>.psi</filename>
 | 
|---|
 | 301 |           (<link xlink:href="???">http://www.psicode.org/</link>)</para>
 | 
|---|
 | 302 |         </listitem>
 | 
|---|
 | 303 | 
 | 
|---|
 | 304 |         <listitem>
 | 
|---|
 | 305 |           <para><productname>TREMOLO</productname>, <filename>.data</filename>
 | 
|---|
 | 306 |           (<link xlink:href="???">http://www.tremolo-x.org/</link>)</para>
 | 
|---|
 | 307 |         </listitem>
 | 
|---|
 | 308 | 
 | 
|---|
 | 309 |         <listitem>
 | 
|---|
 | 310 |           <para>XML, <filename>.xml</filename> (XML as read by scafacos
 | 
|---|
 | 311 |           project, <link
 | 
|---|
 | 312 |           xlink:href="???">http://www.scafacos.org</link>/)</para>
 | 
|---|
 | 313 |         </listitem>
 | 
|---|
 | 314 |       </itemizedlist>
 | 
|---|
 | 315 | 
 | 
|---|
 | 316 |       <para>These are identified via their suffixes and can be converted from
 | 
|---|
 | 317 |       one into another (with loss of all data not in the intersection of
 | 
|---|
 | 318 |       stored properties of the two involved file formats).</para>
 | 
|---|
 | 319 |     </section>
 | 
|---|
 | 320 |   </chapter>
 | 
|---|
 | 321 | 
 | 
|---|
 | 322 |   <chapter>
 | 
|---|
 | 323 |     <title>Interfaces</title>
 | 
|---|
 | 324 | 
 | 
|---|
 | 325 |     <para>In this chapter, we explain the intention and use of the four
 | 
|---|
 | 326 |     interfaces.</para>
 | 
|---|
 | 327 | 
 | 
|---|
 | 328 |     <para>We give the most extensive explanation of the command-line
 | 
|---|
 | 329 |     interface, all subsequent interfaces are explained in highlighting their
 | 
|---|
 | 330 |     differences with respect to the command-line interface. This is because
 | 
|---|
 | 331 |     the command-line lends itself very well to representation in this textual
 | 
|---|
 | 332 |     user guide. Although some images of the graphical interface are given
 | 
|---|
 | 333 |     below, they would blow the size of the guide out of proportion.</para>
 | 
|---|
 | 334 | 
 | 
|---|
 | 335 |     <para>In any case, you should make yourself familiar with at least one of
 | 
|---|
 | 336 |     the interactive (text menu, GUI) and one of the non-interactive
 | 
|---|
 | 337 |     (command-line, python) interfaces to use MoleCuilder to is full potential:
 | 
|---|
 | 338 |     The interactive interface gives you the immediate feedback in constructing
 | 
|---|
 | 339 |     "synthesis" (build) chains (of commands) for constructing your specific
 | 
|---|
 | 340 |     molecular system in the computer. The non-interactive interface lends
 | 
|---|
 | 341 |     itself to quick creation of related systems that differ only by specific
 | 
|---|
 | 342 |     parameters you have modified in the script (command-line can be used in
 | 
|---|
 | 343 |     shell scripts, python itself is a scripted language). Also, the
 | 
|---|
 | 344 |     non-interactive interfaces are used for storing sessions which helps you
 | 
|---|
 | 345 |     in documentation your experiments and lateron understanding of what has
 | 
|---|
 | 346 |     been done.</para>
 | 
|---|
 | 347 | 
 | 
|---|
 | 348 |     <section>
 | 
|---|
 | 349 |       <title>Command-line interface</title>
 | 
|---|
 | 350 | 
 | 
|---|
 | 351 |       <para>The command-line interface reads options and commands from the
 | 
|---|
 | 352 |       command line and executes them sequentially. This may be for example:
 | 
|---|
 | 353 |       Open an empty file, add 2 hydrogen atoms and add 1 oxygen atom, choose a
 | 
|---|
 | 354 |       simulation box, fill the box with this given "filler" molecule, save the
 | 
|---|
 | 355 |       file. This enables the use of MoleCuilder in simple script-files to
 | 
|---|
 | 356 |       create a whole range of geometries that only differ in a few parameters
 | 
|---|
 | 357 |       automatically.</para>
 | 
|---|
 | 358 | 
 | 
|---|
 | 359 |       <para>Traditionally, <command>MoleCuilder</command> operates on a single
 | 
|---|
 | 360 |       configuration file - the state - which may also store additional
 | 
|---|
 | 361 |       information depending on the chosen file format such as parameters for
 | 
|---|
 | 362 |       ab-initio computations. An example for the above procedure is given
 | 
|---|
 | 363 |       below:</para>
 | 
|---|
 | 364 | 
 | 
|---|
 | 365 |       <programlisting>
 | 
|---|
 | 366 |         ./molecuilder \
 | 
|---|
 | 367 |                 -i sample.xyz \
 | 
|---|
 | 368 |                 --add-atom H \
 | 
|---|
 | 369 |                 --domain-position "0.,0.,0." \
 | 
|---|
 | 370 |                 ...
 | 
|---|
 | 371 |         </programlisting>
 | 
|---|
 | 372 | 
 | 
|---|
 | 373 |       <para>The first argument is the executable itself. Second, there is a
 | 
|---|
 | 374 |       slew of arguments -- one per line split with a backslash telling the 
 | 
|---|
 | 375 |       shell that the line still continues -- consisting of the input action and 
 | 
|---|
 | 376 |       an arbitrarily named file <filename>sample.xyz</filename>, which may be 
 | 
|---|
 | 377 |       empty and whose file format is chosen by the given extension. The third 
 | 
|---|
 | 378 |       is the add-atom action following by an option that gives the position in 
 | 
|---|
 | 379 |       the domain where to add the "H"ydrogen atom. An action is always 
 | 
|---|
 | 380 |       introduced via a double hyphen and its full name (containing just 
 | 
|---|
 | 381 |       non-capital letters and hyphens) or a single hyphen and a single letter 
 | 
|---|
 | 382 |       for its shortform, e.g. -a for adding an atom to the system. It is 
 | 
|---|
 | 383 |       followed by a fixed number of options. Most of these have default values 
 | 
|---|
 | 384 |       and in this do not have to be specified. If not enough options are given 
 | 
|---|
 | 385 |       or invalid values have been entered, an error message is printed stating 
 | 
|---|
 | 386 |       the name of the first missing or invalid option value.</para>
 | 
|---|
 | 387 | 
 | 
|---|
 | 388 |       <note>
 | 
|---|
 | 389 |         <para>Note that not all action have shortforms and it is best practice
 | 
|---|
 | 390 |         to have the full action name instead of its shortform to make the
 | 
|---|
 | 391 |         command-line understable to you in years to come.</para>
 | 
|---|
 | 392 |       </note>
 | 
|---|
 | 393 | 
 | 
|---|
 | 394 |       <section>
 | 
|---|
 | 395 |         <title>Preliminaries</title>
 | 
|---|
 | 396 | 
 | 
|---|
 | 397 |         <para>Some preliminary remarks are in order which we have gathered
 | 
|---|
 | 398 |         here on how these actions work in general.</para>
 | 
|---|
 | 399 | 
 | 
|---|
 | 400 |         <para>Below we first delve into some details about secondary structure
 | 
|---|
 | 401 |         such as selections, shapes, and randomization required to specify
 | 
|---|
 | 402 |         subsets of atoms and molecules you wish to manipulate. Then, we have
 | 
|---|
 | 403 |         ordered the subsequent details on the manipulation depending on the
 | 
|---|
 | 404 |         scale they act upon - single atoms, multiple atoms organised as
 | 
|---|
 | 405 |         molecules, and all atoms organised by their containing domain.</para>
 | 
|---|
 | 406 | 
 | 
|---|
 | 407 |         <para>In the following we will always give a command to illustrate the
 | 
|---|
 | 408 |         procedure but just the necessary parts, i.e. "..." implies to prepend
 | 
|---|
 | 409 |         it with the executable and input command for a specific configuration
 | 
|---|
 | 410 |         file, for storing the manipulated state of the molecular system. Note
 | 
|---|
 | 411 |         that</para>
 | 
|---|
 | 412 | 
 | 
|---|
 | 413 |         <programlisting>./molecuilder --help</programlisting>
 | 
|---|
 | 414 | 
 | 
|---|
 | 415 |         <para>will always give you a list of all available actions and also a
 | 
|---|
 | 416 |         brief explanation on how to properly enter values of a specific type,
 | 
|---|
 | 417 |         e.g. an element, a vector, or a list of numbers. Details to a specific
 | 
|---|
 | 418 |         action can be requested when its full name is known, e.g. for
 | 
|---|
 | 419 |         "add-atom",</para>
 | 
|---|
 | 420 | 
 | 
|---|
 | 421 |         <programlisting>./molecuilder --help --actionname add-atom</programlisting>
 | 
|---|
 | 422 | 
 | 
|---|
 | 423 |         <para>which fills you in on each option to the action: its full name,
 | 
|---|
 | 424 |         its expected type, and a possibly present default value, and a brief
 | 
|---|
 | 425 |         description of the option.</para>
 | 
|---|
 | 426 | 
 | 
|---|
 | 427 |         <para>An Action can be undone and redone, e.g. undo adding an atom as
 | 
|---|
 | 428 |         follows,</para>
 | 
|---|
 | 429 | 
 | 
|---|
 | 430 |         <programlisting>... --add-atom H --domain-position "0,0,0" --undo</programlisting>
 | 
|---|
 | 431 | 
 | 
|---|
 | 432 |         <para>and redo as follows</para>
 | 
|---|
 | 433 | 
 | 
|---|
 | 434 |         <programlisting>... --add-atom H --domain-position "0,0,0" --undo --redo</programlisting>
 | 
|---|
 | 435 | 
 | 
|---|
 | 436 |         <para>With the non-interactive interfaces this may seem rather
 | 
|---|
 | 437 |         superfluous but it comes in very handy in the interactive ones. Also
 | 
|---|
 | 438 |         this tells you that actions are placed in a queue, i.e. a history,
 | 
|---|
 | 439 |         that undo and redo manipulate.</para>
 | 
|---|
 | 440 |       </section>
 | 
|---|
 | 441 | 
 | 
|---|
 | 442 |       <section>
 | 
|---|
 | 443 |         <title>File parsers</title>
 | 
|---|
 | 444 | 
 | 
|---|
 | 445 |         <para>We have already given a list of all known file formats, see
 | 
|---|
 | 446 |         <link linkend="???">File formats</link>. Next, we explain how these
 | 
|---|
 | 447 |         file formats are picked and manipulated.</para>
 | 
|---|
 | 448 | 
 | 
|---|
 | 449 |         <section>
 | 
|---|
 | 450 |           <title>Parsing files</title>
 | 
|---|
 | 451 | 
 | 
|---|
 | 452 |           <para>We already discussed that the command-line interface works
 | 
|---|
 | 453 |           state-based and hence you should supply it with a file to work
 | 
|---|
 | 454 |           on.</para>
 | 
|---|
 | 455 | 
 | 
|---|
 | 456 |           <programlisting>... --input water.data</programlisting>
 | 
|---|
 | 457 | 
 | 
|---|
 | 458 |           <para>This will load all information, especially atoms with their
 | 
|---|
 | 459 |           element and position, from the file <filename>water.data</filename>
 | 
|---|
 | 460 |           into the state. All changes will eventually be stored to this file,
 | 
|---|
 | 461 |           or to files with the prefix <filename>water</filename> and suffixes
 | 
|---|
 | 462 |           of desired file formats, e.g. <filename>water.in</filename> if you
 | 
|---|
 | 463 |           specified <productname>MPQC</productname>.</para>
 | 
|---|
 | 464 | 
 | 
|---|
 | 465 |           <programlisting>... --load morewater.xyz</programlisting>
 | 
|---|
 | 466 | 
 | 
|---|
 | 467 |           <para>This will load another file <filename>water.xyz</filename>,
 | 
|---|
 | 468 |           however changes will still be written to files prefixed with
 | 
|---|
 | 469 |           <filename>water</filename>. Note that now already two state files
 | 
|---|
 | 470 |           will stored, <filename>water.data</filename> and
 | 
|---|
 | 471 |           <filename>water.xyz</filename> as these two different file formats
 | 
|---|
 | 472 |           have been used.</para>
 | 
|---|
 | 473 |         </section>
 | 
|---|
 | 474 | 
 | 
|---|
 | 475 |         <section>
 | 
|---|
 | 476 |           <title>Adding output file formats</title>
 | 
|---|
 | 477 | 
 | 
|---|
 | 478 |           <para>We already know that loading a file also picks a file format
 | 
|---|
 | 479 |           by its suffix. We may add further file formats to which the state of
 | 
|---|
 | 480 |           the molecular system on program exit.</para>
 | 
|---|
 | 481 | 
 | 
|---|
 | 482 |           <programlisting>... --set-output mpqc tremolo</programlisting>
 | 
|---|
 | 483 | 
 | 
|---|
 | 484 |           <para>This will store the final state of the molecular systems as
 | 
|---|
 | 485 |           <productname>MPQC</productname> and as
 | 
|---|
 | 486 |           <productname>TREMOLO</productname> configuration file.</para>
 | 
|---|
 | 487 |         </section>
 | 
|---|
 | 488 | 
 | 
|---|
 | 489 |         <section>
 | 
|---|
 | 490 |           <title>Setting parser specific parameters</title>
 | 
|---|
 | 491 | 
 | 
|---|
 | 492 |           <para>You can also tweak the parameters stored in this file easily.
 | 
|---|
 | 493 |           For example, <productname>MPQC</productname> stores various
 | 
|---|
 | 494 |           parameters modifying the specific ab-initio calculation performed.
 | 
|---|
 | 495 |           For <productname>MPQC</productname> and 
 | 
|---|
 | 496 |           <productname>Psi4</productname> this can be modified as 
 | 
|---|
 | 497 |           follows.</para>
 | 
|---|
 | 498 | 
 | 
|---|
 | 499 |           <programlisting>
 | 
|---|
 | 500 |                 ... --set-parser-parameters mpqc \
 | 
|---|
 | 501 |                     --parser-parameters "theory=CLHF;basis=6-31*G;"
 | 
|---|
 | 502 |           </programlisting>
 | 
|---|
 | 503 | 
 | 
|---|
 | 504 |           <para>This sets the ab-initio theory to closed-shell Hartree-Fock
 | 
|---|
 | 505 |           and the basis set to 6-31*G. Please check the
 | 
|---|
 | 506 |           <productname>MPQC</productname> manual on specific
 | 
|---|
 | 507 |           parameters.</para>
 | 
|---|
 | 508 |         </section>
 | 
|---|
 | 509 | 
 | 
|---|
 | 510 |         <section>
 | 
|---|
 | 511 |           <title>Tremolo specific options and potential files</title>
 | 
|---|
 | 512 | 
 | 
|---|
 | 513 |           <para><productname>TREMOLO</productname>'s configuration files start
 | 
|---|
 | 514 |           with a specific line telling the amount of information stored in the
 | 
|---|
 | 515 |           file. This file can be modified, e.g. to enforce storing of
 | 
|---|
 | 516 |           velocities and forces as well as the atoms positions and
 | 
|---|
 | 517 |           element.</para>
 | 
|---|
 | 518 | 
 | 
|---|
 | 519 |           <programlisting>
 | 
|---|
 | 520 |                 ... --set-tremolo-atomdata "ATOM id element u=3 v=3 F=3" \
 | 
|---|
 | 521 |                     --reset 1
 | 
|---|
 | 522 |           </programlisting>
 | 
|---|
 | 523 | 
 | 
|---|
 | 524 |           <para>This will not append but reset the old line and fill it with
 | 
|---|
 | 525 |           the given string.</para>
 | 
|---|
 | 526 | 
 | 
|---|
 | 527 |           <para>One specific action is required when loading certain
 | 
|---|
 | 528 |           <productname>TREMOLO</productname> configuration files. These
 | 
|---|
 | 529 |           contain element notations that refer to parameterized names used in
 | 
|---|
 | 530 |           empirical potentials and molecular dynamics simulations and not the
 | 
|---|
 | 531 |           usual chemical symbols, such as H or O. We may load an auxiliary
 | 
|---|
 | 532 |           file that gives the required conversion from OH1 to H, which is the
 | 
|---|
 | 533 |           so-called potential file.</para>
 | 
|---|
 | 534 | 
 | 
|---|
 | 535 |           <programlisting>... --parse-tremolo-potentials water.potentials</programlisting>
 | 
|---|
 | 536 | 
 | 
|---|
 | 537 |           <para>This parses the lookup table from the file
 | 
|---|
 | 538 |           <filename>water.potentials</filename> and it can be used in
 | 
|---|
 | 539 |           following load actions.</para>
 | 
|---|
 | 540 |         </section>
 | 
|---|
 | 541 |       </section>
 | 
|---|
 | 542 | 
 | 
|---|
 | 543 |       <section>
 | 
|---|
 | 544 |         <title>Selections and unselections</title>
 | 
|---|
 | 545 | 
 | 
|---|
 | 546 |         <para>In order to tell MoleCuilder on what subset of atoms a specific
 | 
|---|
 | 547 |         Action is to be performed, there are <emphasis>selection
 | 
|---|
 | 548 |         actions</emphasis>. Note that a selection per se does not change
 | 
|---|
 | 549 |         anything in the state of the molecular system in any way.</para>
 | 
|---|
 | 550 | 
 | 
|---|
 | 551 |         <para>Selections either work on atoms, on molecules, or on shapes
 | 
|---|
 | 552 |         (this we explain lateron). A given selection is maintained from the
 | 
|---|
 | 553 |         execution of the selection action to the end of program or until
 | 
|---|
 | 554 |         modified by another selection applied on the same type (atom,
 | 
|---|
 | 555 |         molecule, shape).</para>
 | 
|---|
 | 556 | 
 | 
|---|
 | 557 |         <para>We only give a brief list on the kind of selections per type,
 | 
|---|
 | 558 |         each action is executed either as follows, exemplified by selecting
 | 
|---|
 | 559 |         all atoms.</para>
 | 
|---|
 | 560 | 
 | 
|---|
 | 561 |         <programlisting>.... --select-all-atoms</programlisting>
 | 
|---|
 | 562 | 
 | 
|---|
 | 563 |         <para>or, exemplified by unselecting the last molecule,</para>
 | 
|---|
 | 564 | 
 | 
|---|
 | 565 |         <programlisting>... --unselect-molecule-by-order -1</programlisting>
 | 
|---|
 | 566 | 
 | 
|---|
 | 567 |         <itemizedlist>
 | 
|---|
 | 568 |           <listitem>
 | 
|---|
 | 569 |             <para>Atoms</para>
 | 
|---|
 | 570 | 
 | 
|---|
 | 571 |             <itemizedlist>
 | 
|---|
 | 572 |               <listitem>
 | 
|---|
 | 573 |                 <para>By Element (all hydrogen atoms, all sulphur atoms,
 | 
|---|
 | 574 |                 ...)</para>
 | 
|---|
 | 575 |               </listitem>
 | 
|---|
 | 576 | 
 | 
|---|
 | 577 |               <listitem>
 | 
|---|
 | 578 |                 <para>By Id (atom with id 76)</para>
 | 
|---|
 | 579 |               </listitem>
 | 
|---|
 | 580 | 
 | 
|---|
 | 581 |               <listitem>
 | 
|---|
 | 582 |                 <para>By Order (the first (1), the second, ... the last, the
 | 
|---|
 | 583 |                 last but one)</para>
 | 
|---|
 | 584 |               </listitem>
 | 
|---|
 | 585 | 
 | 
|---|
 | 586 |               <listitem>
 | 
|---|
 | 587 |                 <para>By Shape (specific region of the domain)</para>
 | 
|---|
 | 588 |               </listitem>
 | 
|---|
 | 589 | 
 | 
|---|
 | 590 |               <listitem>
 | 
|---|
 | 591 |                 <para>By Molecule (all atoms belonging to currently selected
 | 
|---|
 | 592 |                 molecules)</para>
 | 
|---|
 | 593 |               </listitem>
 | 
|---|
 | 594 |             </itemizedlist>
 | 
|---|
 | 595 |           </listitem>
 | 
|---|
 | 596 | 
 | 
|---|
 | 597 |           <listitem>
 | 
|---|
 | 598 |             <para>Molecules</para>
 | 
|---|
 | 599 | 
 | 
|---|
 | 600 |             <itemizedlist>
 | 
|---|
 | 601 |               <listitem>
 | 
|---|
 | 602 |                 <para>By Id (molecule with id 4)</para>
 | 
|---|
 | 603 |               </listitem>
 | 
|---|
 | 604 | 
 | 
|---|
 | 605 |               <listitem>
 | 
|---|
 | 606 |                 <para>By Order (first molecule, second molecule, ...)</para>
 | 
|---|
 | 607 |               </listitem>
 | 
|---|
 | 608 | 
 | 
|---|
 | 609 |               <listitem>
 | 
|---|
 | 610 |                 <para>By Name (molecule named "water4"</para>
 | 
|---|
 | 611 |               </listitem>
 | 
|---|
 | 612 | 
 | 
|---|
 | 613 |               <listitem>
 | 
|---|
 | 614 |                 <para>By Atom (all molecules for which at least one atom is
 | 
|---|
 | 615 |                 currently selected)</para>
 | 
|---|
 | 616 |               </listitem>
 | 
|---|
 | 617 |             </itemizedlist>
 | 
|---|
 | 618 |           </listitem>
 | 
|---|
 | 619 |         </itemizedlist>
 | 
|---|
 | 620 | 
 | 
|---|
 | 621 |         <itemizedlist>
 | 
|---|
 | 622 |           <listitem>
 | 
|---|
 | 623 |             <para>Shapes</para>
 | 
|---|
 | 624 | 
 | 
|---|
 | 625 |             <itemizedlist>
 | 
|---|
 | 626 |               <listitem>
 | 
|---|
 | 627 |                 <para>By Name (shape name "sphere1")</para>
 | 
|---|
 | 628 |               </listitem>
 | 
|---|
 | 629 |             </itemizedlist>
 | 
|---|
 | 630 |           </listitem>
 | 
|---|
 | 631 | 
 | 
|---|
 | 632 |           <listitem>
 | 
|---|
 | 633 |             <para>All</para>
 | 
|---|
 | 634 | 
 | 
|---|
 | 635 |             <itemizedlist>
 | 
|---|
 | 636 |               <listitem>
 | 
|---|
 | 637 |                 <para>All (selects or unselects all instances of the
 | 
|---|
 | 638 |                 type)</para>
 | 
|---|
 | 639 |               </listitem>
 | 
|---|
 | 640 | 
 | 
|---|
 | 641 |               <listitem>
 | 
|---|
 | 642 |                 <para>Clear (clears the current selection)</para>
 | 
|---|
 | 643 |               </listitem>
 | 
|---|
 | 644 |             </itemizedlist>
 | 
|---|
 | 645 |           </listitem>
 | 
|---|
 | 646 |         </itemizedlist>
 | 
|---|
 | 647 | 
 | 
|---|
 | 648 |         <para>Furthermore, a selection can be imverted, e.g. inverting the
 | 
|---|
 | 649 |         current selection of atoms.</para>
 | 
|---|
 | 650 | 
 | 
|---|
 | 651 |         <programlisting>... --invert-atoms</programlisting>
 | 
|---|
 | 652 | 
 | 
|---|
 | 653 |         <remark>Note that an unselected instance (e.g. an atom) remains
 | 
|---|
 | 654 |         unselected upon further unselection and vice versa with
 | 
|---|
 | 655 |         selection.</remark>
 | 
|---|
 | 656 | 
 | 
|---|
 | 657 |         <para>These above selections work then in conjunction with other
 | 
|---|
 | 658 |         actions and make them very powerful, e.g. you can remove all atoms
 | 
|---|
 | 659 |         inside a sphere by a selecting the spherical shape and subsequently
 | 
|---|
 | 660 |         selecting all atoms inside the shape and then removing them.</para>
 | 
|---|
 | 661 |       </section>
 | 
|---|
 | 662 | 
 | 
|---|
 | 663 |       <section>
 | 
|---|
 | 664 |         <title>Shapes</title>
 | 
|---|
 | 665 | 
 | 
|---|
 | 666 |         <para>Shapes are specific regions of the domain. There are just a few
 | 
|---|
 | 667 |         so-called <emphasis>primitive</emphasis> shapes such as cuboid,
 | 
|---|
 | 668 |         sphere, cylinder, the whole domain, none of it. However, these can be
 | 
|---|
 | 669 |         combined via boolean operations such as and, or, and not. This
 | 
|---|
 | 670 |         approach is called <emphasis>constructive geometry</emphasis>. E.g. by
 | 
|---|
 | 671 |         combining a sphere with the negated (not) of a smaller sphere, we
 | 
|---|
 | 672 |         obtain a spherical surface of specific thickness.</para>
 | 
|---|
 | 673 | 
 | 
|---|
 | 674 |         <section>
 | 
|---|
 | 675 |           <title>Creating shapes</title>
 | 
|---|
 | 676 | 
 | 
|---|
 | 677 |           <para>Primitive shapes can be created as follows,</para>
 | 
|---|
 | 678 | 
 | 
|---|
 | 679 |           <programlisting>
 | 
|---|
 | 680 |                 ... --create-shape \
 | 
|---|
 | 681 |                     --shape-type sphere \
 | 
|---|
 | 682 |                     --shape-name "sphere1" \
 | 
|---|
 | 683 |                     --stretch "2,2,2" \
 | 
|---|
 | 684 |                     --translation "5,5,5"
 | 
|---|
 | 685 |           </programlisting>
 | 
|---|
 | 686 | 
 | 
|---|
 | 687 |           <para>This will create a sphere of radius 2 (initial radius is 1)
 | 
|---|
 | 688 |           with name "sphere1" that is centered at (5,5,5). Other primitives at
 | 
|---|
 | 689 |           cuboid and cylinder, where a rotation can be specified as
 | 
|---|
 | 690 |           follows.</para>
 | 
|---|
 | 691 | 
 | 
|---|
 | 692 |           <programlisting>
 | 
|---|
 | 693 |                 ... --create-shape \
 | 
|---|
 | 694 |                     --shape-type cuboid \
 | 
|---|
 | 695 |                     --shape-name "box" \
 | 
|---|
 | 696 |                     --stretch "1,2,2" \
 | 
|---|
 | 697 |                     --translation "5,5,5" \
 | 
|---|
 | 698 |                     --angle-x "90"
 | 
|---|
 | 699 |           </programlisting>
 | 
|---|
 | 700 |         </section>
 | 
|---|
 | 701 | 
 | 
|---|
 | 702 |         <section>
 | 
|---|
 | 703 |           <title>Removing shapes</title>
 | 
|---|
 | 704 | 
 | 
|---|
 | 705 |           <para>Removing a shape is as simple as removing an atom.</para>
 | 
|---|
 | 706 | 
 | 
|---|
 | 707 |           <programlisting>... --remove-shape </programlisting>
 | 
|---|
 | 708 | 
 | 
|---|
 | 709 |           <para>This removes the currently selected shapes.</para>
 | 
|---|
 | 710 |         </section>
 | 
|---|
 | 711 | 
 | 
|---|
 | 712 |         <section>
 | 
|---|
 | 713 |           <title>Manipulating shapes</title>
 | 
|---|
 | 714 | 
 | 
|---|
 | 715 |           <para>Shapes can be stretched, scaled, rotated, and translated to
 | 
|---|
 | 716 |           modify primitives or combined primitive shapes. As you have seen
 | 
|---|
 | 717 |           this manipulation could have occurred already at creation but also
 | 
|---|
 | 718 |           later on. We just the list examples of the various manipulations
 | 
|---|
 | 719 |           below, each works on the currently selected shapes.</para>
 | 
|---|
 | 720 | 
 | 
|---|
 | 721 |           <programlisting>
 | 
|---|
 | 722 |                 ... --stretch-shapes "1,1,2" \
 | 
|---|
 | 723 |                     --stretch-center "5,5,5"
 | 
|---|
 | 724 |           </programlisting>
 | 
|---|
 | 725 | 
 | 
|---|
 | 726 |           <para>This stretches the shapes relative to the center at (5,5,5)
 | 
|---|
 | 727 |           (default is origin) by a factor of 2 in the z direction.</para>
 | 
|---|
 | 728 | 
 | 
|---|
 | 729 |           <programlisting>
 | 
|---|
 | 730 |                 ... --rotate-shape \
 | 
|---|
 | 731 |                     --center "10,2,2" \
 | 
|---|
 | 732 |                     --angle-x 90 \
 | 
|---|
 | 733 |                     --angle-y 0 \
 | 
|---|
 | 734 |                     --angle-z 0
 | 
|---|
 | 735 |           </programlisting>
 | 
|---|
 | 736 | 
 | 
|---|
 | 737 |           <para>This way all selected shapes are rotated by 90 degrees around
 | 
|---|
 | 738 |           the x axis with respect to the center at (10,2,2).</para>
 | 
|---|
 | 739 | 
 | 
|---|
 | 740 |           <programlisting>... --translate-shapes "5,0,0" </programlisting>
 | 
|---|
 | 741 | 
 | 
|---|
 | 742 |           <para>This translates all selected shapes by 5 along the x
 | 
|---|
 | 743 |           axis.</para>
 | 
|---|
 | 744 |         </section>
 | 
|---|
 | 745 |       </section>
 | 
|---|
 | 746 | 
 | 
|---|
 | 747 |       <section>
 | 
|---|
 | 748 |         <title>Randomization</title>
 | 
|---|
 | 749 | 
 | 
|---|
 | 750 |         <para>Some operations require randomness as input, e.g. when filling a
 | 
|---|
 | 751 |         domain with molecules these may be randomly translated and rotated.
 | 
|---|
 | 752 |         Random values are obtained by a random number generator that consists
 | 
|---|
 | 753 |         of two parts: engine and distribution. The engine yields a uniform set
 | 
|---|
 | 754 |         of random numbers in a specific interval, the distribution modifies
 | 
|---|
 | 755 |         them, e.g. to become gaussian.</para>
 | 
|---|
 | 756 | 
 | 
|---|
 | 757 |         <para>There are several Actions to modify the specific engine and
 | 
|---|
 | 758 |         distribution and their parameters. One example usage is that with the
 | 
|---|
 | 759 |         aforementioned filling of the domain molecules are rotated randomly.
 | 
|---|
 | 760 |         If you specify a random number generator that randomly just spills out
 | 
|---|
 | 761 |         values 0,1,2,3, then the randomness is just the orientation of the
 | 
|---|
 | 762 |         molecule with respect to a specific axis: x,y,z. (rotation is at most
 | 
|---|
 | 763 |         360 degrees and 0,1,2,3 act as divisor, hence rotation angle is always
 | 
|---|
 | 764 |         a multiple of 90 degrees).</para>
 | 
|---|
 | 765 | 
 | 
|---|
 | 766 |         <programlisting>
 | 
|---|
 | 767 |                 ... --set-random-number-distribution "uniform_int" \
 | 
|---|
 | 768 |                     --random-number-distribution-parameters "p=1"
 | 
|---|
 | 769 |         </programlisting>
 | 
|---|
 | 770 | 
 | 
|---|
 | 771 |         <para>This changes the distribution to "uniform_int", i.e. integer
 | 
|---|
 | 772 |         numbers distributed uniformly.</para>
 | 
|---|
 | 773 | 
 | 
|---|
 | 774 |         <programlisting>
 | 
|---|
 | 775 |                 ... --set-random-number-engine "mt19937" \
 | 
|---|
 | 776 |                     --random-numner-engine-parameters "seed=10"
 | 
|---|
 | 777 |         </programlisting>
 | 
|---|
 | 778 | 
 | 
|---|
 | 779 |         <para>Specifying the seed allows you to obtain the same sequence of
 | 
|---|
 | 780 |         random numbers for testing purposes.</para>
 | 
|---|
 | 781 |       </section>
 | 
|---|
 | 782 | 
 | 
|---|
 | 783 |       <section>
 | 
|---|
 | 784 |         <title>Manipulate atoms</title>
 | 
|---|
 | 785 | 
 | 
|---|
 | 786 |         <para>Here, we explain in detail how to add, remove atoms, change its
 | 
|---|
 | 787 |         element type, scale the bond in between or measure the bond length or
 | 
|---|
 | 788 |         angle.</para>
 | 
|---|
 | 789 | 
 | 
|---|
 | 790 |         <section>
 | 
|---|
 | 791 |           <title>Adding atoms</title>
 | 
|---|
 | 792 | 
 | 
|---|
 | 793 |           <para>Adding an atom to the domain requires the element of the atom
 | 
|---|
 | 794 |           and its coordinates as follows,</para>
 | 
|---|
 | 795 | 
 | 
|---|
 | 796 |           <programlisting>
 | 
|---|
 | 797 |                 ... --add-atom O \
 | 
|---|
 | 798 |                     --domain-position "2.,3.,2.35"
 | 
|---|
 | 799 |           </programlisting>
 | 
|---|
 | 800 | 
 | 
|---|
 | 801 |           <para>where the element is given via its chemical symbol and the
 | 
|---|
 | 802 |           vector gives the position within the domain</para>
 | 
|---|
 | 803 |         </section>
 | 
|---|
 | 804 | 
 | 
|---|
 | 805 |         <section>
 | 
|---|
 | 806 |           <title>Removing atoms</title>
 | 
|---|
 | 807 | 
 | 
|---|
 | 808 |           <para>Removing atom(s) does not need any option and operates on the
 | 
|---|
 | 809 |           currently selected ones.</para>
 | 
|---|
 | 810 | 
 | 
|---|
 | 811 |           <programlisting>... --remove-atom</programlisting>
 | 
|---|
 | 812 |         </section>
 | 
|---|
 | 813 | 
 | 
|---|
 | 814 |         <section>
 | 
|---|
 | 815 |           <title>Translating atoms</title>
 | 
|---|
 | 816 | 
 | 
|---|
 | 817 |           <para>In order to translate the current selected subset of atoms you
 | 
|---|
 | 818 |           specify a translation vector.</para>
 | 
|---|
 | 819 | 
 | 
|---|
 | 820 |           <programlisting>
 | 
|---|
 | 821 |                 ... --translate-atoms "-1,0,0" \
 | 
|---|
 | 822 |                     --periodic 0
 | 
|---|
 | 823 |           </programlisting>
 | 
|---|
 | 824 | 
 | 
|---|
 | 825 |           <para>This translate all atoms by "-1" along the x axis and does not
 | 
|---|
 | 826 |           mind the boundary conditions, i.e. might shift atoms outside of the
 | 
|---|
 | 827 |           domain.</para>
 | 
|---|
 | 828 |         </section>
 | 
|---|
 | 829 | 
 | 
|---|
 | 830 |         <section>
 | 
|---|
 | 831 |           <title>Changing an atoms element</title>
 | 
|---|
 | 832 | 
 | 
|---|
 | 833 |           <para>You can easily turn lead or silver into gold, by selecting the
 | 
|---|
 | 834 |           silver atom and calling the change element action.</para>
 | 
|---|
 | 835 | 
 | 
|---|
 | 836 |           <programlisting>... --change-element Au</programlisting>
 | 
|---|
 | 837 |         </section>
 | 
|---|
 | 838 |       </section>
 | 
|---|
 | 839 | 
 | 
|---|
 | 840 |       <section>
 | 
|---|
 | 841 |         <title>Bond-related manipulation</title>
 | 
|---|
 | 842 | 
 | 
|---|
 | 843 |         <para>Atoms can also be manipulated with respect to the bonds.
 | 
|---|
 | 844 |         <remark>Note that with bonds we always mean covalent bonds.</remark>
 | 
|---|
 | 845 |         First, we explain how to modify the bond structure itself, then we go
 | 
|---|
 | 846 |         in the details of using the bond information to change bond distance
 | 
|---|
 | 847 |         and angles.</para>
 | 
|---|
 | 848 | 
 | 
|---|
 | 849 |         <section>
 | 
|---|
 | 850 |           <title>Creating a bond graph</title>
 | 
|---|
 | 851 | 
 | 
|---|
 | 852 |           <para>In case you have loaded a configuration file with no bond
 | 
|---|
 | 853 |           information, e.g. XYZ, it is necessary to create the bond graph.
 | 
|---|
 | 854 |           This is done by a heuristic distance criterion.</para>
 | 
|---|
 | 855 | 
 | 
|---|
 | 856 |           <programlisting>... --create-adjacency</programlisting>
 | 
|---|
 | 857 | 
 | 
|---|
 | 858 |           <para>This uses by default a criterion based on van-der-Waals radii,
 | 
|---|
 | 859 |           i.e. if we look at two atoms indexed by "a" and "b"</para>
 | 
|---|
 | 860 | 
 | 
|---|
 | 861 |           <equation>
 | 
|---|
 | 862 |             <title>V(a) + V(b) - \tau < R_{ab} < V(a) + V(b) +
 | 
|---|
 | 863 |             \tau</title>
 | 
|---|
 | 864 | 
 | 
|---|
 | 865 |             <m:math display="block">
 | 
|---|
 | 866 |               <m:mi>where V(.) is the lookup table for the radii for a given
 | 
|---|
 | 867 |               element and \tau is a threshold value, set to 0.4.</m:mi>
 | 
|---|
 | 868 |             </m:math>
 | 
|---|
 | 869 |           </equation>
 | 
|---|
 | 870 | 
 | 
|---|
 | 871 |           <para>As a second option, you may load a file containing bond table
 | 
|---|
 | 872 |           information.</para>
 | 
|---|
 | 873 | 
 | 
|---|
 | 874 |           <programlisting>... --bond-table table.dat</programlisting>
 | 
|---|
 | 875 | 
 | 
|---|
 | 876 |           <para>which would parse a file <filename>table.dat</filename> for a
 | 
|---|
 | 877 |           table giving typical bond distances between elements a and b. These
 | 
|---|
 | 878 |           are used in the above criterion as <inlineequation>
 | 
|---|
 | 879 |               <m:math display="inline">
 | 
|---|
 | 880 |                 <m:mi>V(a,b)</m:mi>
 | 
|---|
 | 881 |               </m:math>
 | 
|---|
 | 882 |             </inlineequation> in place of <inlineequation>
 | 
|---|
 | 883 |               <m:math display="inline">
 | 
|---|
 | 884 |                 <m:mi>V(a)+V(b)</m:mi>
 | 
|---|
 | 885 |               </m:math>
 | 
|---|
 | 886 |             </inlineequation>.</para>
 | 
|---|
 | 887 |         </section>
 | 
|---|
 | 888 | 
 | 
|---|
 | 889 |         <section>
 | 
|---|
 | 890 |           <title>Destroying the bond graph</title>
 | 
|---|
 | 891 | 
 | 
|---|
 | 892 |           <para>The bond graph can be removed completely (and all bonds along
 | 
|---|
 | 893 |           with it).</para>
 | 
|---|
 | 894 | 
 | 
|---|
 | 895 |           <programlisting>... --destroy-adjacency</programlisting>
 | 
|---|
 | 896 |         </section>
 | 
|---|
 | 897 | 
 | 
|---|
 | 898 |         <section>
 | 
|---|
 | 899 |           <title>Analysing a bond graph</title>
 | 
|---|
 | 900 | 
 | 
|---|
 | 901 |           <para>You can perform a depth-first search analysis that reveals
 | 
|---|
 | 902 |           cycles and other graph-related information.</para>
 | 
|---|
 | 903 | 
 | 
|---|
 | 904 |           <programlisting>... --depth-first-search</programlisting>
 | 
|---|
 | 905 |         </section>
 | 
|---|
 | 906 | 
 | 
|---|
 | 907 |         <section>
 | 
|---|
 | 908 |           <title>Dissecting the molecular system into molecules</title>
 | 
|---|
 | 909 | 
 | 
|---|
 | 910 |           <para>The bond graph information can be used to recognize the
 | 
|---|
 | 911 |           molecule within the system. Imagine you have just loaded a PDB file
 | 
|---|
 | 912 |           containing bond information. However, initially all atoms are dumped
 | 
|---|
 | 913 |           into the same molecule. Before you can start manipulating, you need
 | 
|---|
 | 914 |           to dissect the system into individual molecules. Note that this is
 | 
|---|
 | 915 |           just structural information and does not change the state of the
 | 
|---|
 | 916 |           system.</para>
 | 
|---|
 | 917 | 
 | 
|---|
 | 918 |           <programlisting>... --subgraph-dissection</programlisting>
 | 
|---|
 | 919 | 
 | 
|---|
 | 920 |           <para>This analyses the bond graph and splits the single molecule up
 | 
|---|
 | 921 |           into individual (new) ones that each contain a single connected
 | 
|---|
 | 922 |           subgraph, hence the naming.</para>
 | 
|---|
 | 923 |         </section>
 | 
|---|
 | 924 | 
 | 
|---|
 | 925 |         <section>
 | 
|---|
 | 926 |           <title>Adding a bond manually</title>
 | 
|---|
 | 927 | 
 | 
|---|
 | 928 |           <para>When the automatically created adjacency or bond graph
 | 
|---|
 | 929 |           contains faulty bonds or lacks some, you can add them manually.
 | 
|---|
 | 930 |           First, you must have selected two atoms.</para>
 | 
|---|
 | 931 | 
 | 
|---|
 | 932 |           <programlisting>... --add-bond</programlisting>
 | 
|---|
 | 933 |         </section>
 | 
|---|
 | 934 | 
 | 
|---|
 | 935 |         <section>
 | 
|---|
 | 936 |           <title>Removing a bond manually</title>
 | 
|---|
 | 937 | 
 | 
|---|
 | 938 |           <para>In much the same way as adding a bond, you can also remove a
 | 
|---|
 | 939 |           bond.</para>
 | 
|---|
 | 940 | 
 | 
|---|
 | 941 |           <programlisting>... --remove-bond</programlisting>
 | 
|---|
 | 942 |         </section>
 | 
|---|
 | 943 | 
 | 
|---|
 | 944 |         <section>
 | 
|---|
 | 945 |           <title>Stretching a bond</title>
 | 
|---|
 | 946 | 
 | 
|---|
 | 947 |           <para>Stretching a bond actually refers to translation of the
 | 
|---|
 | 948 |           associated pair of atoms. However, this action will keep the rest of
 | 
|---|
 | 949 |           the molecule to which both atoms belong to invariant as well.</para>
 | 
|---|
 | 950 | 
 | 
|---|
 | 951 |           <programlisting>... --stretch-bond 1.2</programlisting>
 | 
|---|
 | 952 | 
 | 
|---|
 | 953 |           <para>This scales the original bond distance to the new bond
 | 
|---|
 | 954 |           distance 1.2, shifting the right hand side and the left hand side of
 | 
|---|
 | 955 |           the molecule accordingly.</para>
 | 
|---|
 | 956 | 
 | 
|---|
 | 957 |           <warning>
 | 
|---|
 | 958 |             <para>this fails with aromatic rings (but you can always
 | 
|---|
 | 959 |             undo).</para>
 | 
|---|
 | 960 |           </warning>
 | 
|---|
 | 961 |         </section>
 | 
|---|
 | 962 | 
 | 
|---|
 | 963 |         <section>
 | 
|---|
 | 964 |           <title>Changing a bond angle</title>
 | 
|---|
 | 965 | 
 | 
|---|
 | 966 |           <para>In the same way as stretching a bond, you can change the angle
 | 
|---|
 | 967 |           in between two bonds. This works if exactly three atoms are selected
 | 
|---|
 | 968 |           and two pairs are bonded.</para>
 | 
|---|
 | 969 | 
 | 
|---|
 | 970 |           <programlisting>... --change-bond-angle 90</programlisting>
 | 
|---|
 | 971 | 
 | 
|---|
 | 972 |           <para>This will change the angle from its value to 90 degree by
 | 
|---|
 | 973 |           translating the two outer atoms of this triangle (the atom connected
 | 
|---|
 | 974 |           to both others is the axis of the rotation).</para>
 | 
|---|
 | 975 |         </section>
 | 
|---|
 | 976 |       </section>
 | 
|---|
 | 977 | 
 | 
|---|
 | 978 |       <section>
 | 
|---|
 | 979 |         <title>Manipulate molecules</title>
 | 
|---|
 | 980 | 
 | 
|---|
 | 981 |         <para>Molecules are agglomerations of atoms that are bonded. Hence,
 | 
|---|
 | 982 |         the actions working on molecules differ from those working on atoms.
 | 
|---|
 | 983 |         Joining two molecules can only be accomplished by adding a bond in
 | 
|---|
 | 984 |         between, and in the reverse fashion splitting a molecule by removing
 | 
|---|
 | 985 |         all bonds in between. Actions below mostly deal with copying
 | 
|---|
 | 986 |         molecules. Removing of molecules is done via selecting the molecule's
 | 
|---|
 | 987 |         atoms and removing them, which removes the atoms as well.</para>
 | 
|---|
 | 988 | 
 | 
|---|
 | 989 |         <note>
 | 
|---|
 | 990 |           <para>Initially when you load a file via the input action all atoms
 | 
|---|
 | 991 |           are placed in a single molecule despite any present bond
 | 
|---|
 | 992 |           information, see <link linkend="???">Dissecting the molecular system
 | 
|---|
 | 993 |           into molecules</link></para>
 | 
|---|
 | 994 |         </note>
 | 
|---|
 | 995 | 
 | 
|---|
 | 996 |         <section>
 | 
|---|
 | 997 |           <title>Copy molecules</title>
 | 
|---|
 | 998 | 
 | 
|---|
 | 999 |           <para>A basic operation is to duplicate a molecule. This works on a
 | 
|---|
 | 1000 |           single, currently selected molecule. Afterwards, we elaborate on a
 | 
|---|
 | 1001 |           more complex manner of copying, filling a specific shape with
 | 
|---|
 | 1002 |           molecules.</para>
 | 
|---|
 | 1003 | 
 | 
|---|
 | 1004 |           <programlisting>
 | 
|---|
 | 1005 |                 ... --copy-molecule \
 | 
|---|
 | 1006 |                     --position "10,10,10"
 | 
|---|
 | 1007 |           </programlisting>
 | 
|---|
 | 1008 | 
 | 
|---|
 | 1009 |           <para>This action copies the selected molecule and inserts it at the
 | 
|---|
 | 1010 |           position (10,10,10) in the domain with respect to the molecule's
 | 
|---|
 | 1011 |           center. In effect, it copies all the atoms of the original molecule
 | 
|---|
 | 1012 |           and adds new bonds in between these copied atoms such that their
 | 
|---|
 | 1013 |           bond subgraphs are identical.</para>
 | 
|---|
 | 1014 |         </section>
 | 
|---|
 | 1015 | 
 | 
|---|
 | 1016 |         <section>
 | 
|---|
 | 1017 |           <title>Fill a domain section with molecules</title>
 | 
|---|
 | 1018 | 
 | 
|---|
 | 1019 |           <para>Filling a specific part of the domain with one type of
 | 
|---|
 | 1020 |           molecule, e.g. a water molecule, is the more advanced type of
 | 
|---|
 | 1021 |           copying and we need several ingredients.</para>
 | 
|---|
 | 1022 | 
 | 
|---|
 | 1023 |           <para>First, we need to specify the part of the domain. This is done
 | 
|---|
 | 1024 |           via a shape. We have already learned how to create and select
 | 
|---|
 | 1025 |           shapes. The currently selected shape will serve as the fill-in
 | 
|---|
 | 1026 |           region.</para>
 | 
|---|
 | 1027 | 
 | 
|---|
 | 1028 |           <para>Then, they are two types of filling, volume and surface. The
 | 
|---|
 | 1029 |           volume is filled with a regular grid of fill-in points, and in the
 | 
|---|
 | 1030 |           same manner is the surface filled with a regular grid of points.
 | 
|---|
 | 1031 |           Molecules will be copied and translated points when they
 | 
|---|
 | 1032 |           "fit".</para>
 | 
|---|
 | 1033 | 
 | 
|---|
 | 1034 |           <para>The filler procedure checks each fill-in point whether there
 | 
|---|
 | 1035 |           is enough space for the molecule. To know this, we require a cluster
 | 
|---|
 | 1036 |           instead of a molecule. This is just a general agglomeration of atoms
 | 
|---|
 | 1037 |           combined with a bounding box that contains all of them and serves as
 | 
|---|
 | 1038 |           its minimal volume. I.e. we need this cluster. For this a number of
 | 
|---|
 | 1039 |           atoms have to be specified, the minimum bounding box is generated
 | 
|---|
 | 1040 |           automatically.</para>
 | 
|---|
 | 1041 | 
 | 
|---|
 | 1042 |           <para>On top of that molecules can be selected whose volume is
 | 
|---|
 | 1043 |           additionally excluded from the filling region.</para>
 | 
|---|
 | 1044 | 
 | 
|---|
 | 1045 |           <para>The call to fill the volume of the selected shape with the
 | 
|---|
 | 1046 |           selected atoms is then as follows,</para>
 | 
|---|
 | 1047 | 
 | 
|---|
 | 1048 |           <programlisting>
 | 
|---|
 | 1049 |                 ... --fill-regular-grid \
 | 
|---|
 | 1050 |                     --mesh-size "5,5,5" \
 | 
|---|
 | 1051 |                     --mesh-offset ".5,.5,.5" \
 | 
|---|
 | 1052 |                     --DoRotate 1 --min-distance 1. \
 | 
|---|
 | 1053 |                     --random-atom-displacement 0.05 \
 | 
|---|
 | 1054 |                     --random-molecule-displacement 0.4 \
 | 
|---|
 | 1055 |                     --tesselation-radius 2.5
 | 
|---|
 | 1056 |           </programlisting>
 | 
|---|
 | 1057 | 
 | 
|---|
 | 1058 |           <para>This generates a grid of 5x5x5 fill-in points within the
 | 
|---|
 | 1059 |           sphere that are offset such as to lay centered within the sphere
 | 
|---|
 | 1060 |           (offset per axis in [0,1]). Additionally, each molecule is rotated
 | 
|---|
 | 1061 |           by random rotation matrix, each atom is translated randomly by at
 | 
|---|
 | 1062 |           most 0.05, each molecule's center at most by 0.4. The selected
 | 
|---|
 | 1063 |           molecules' volume is obtained by tesselating their surface and
 | 
|---|
 | 1064 |           excluding every fill-in point whose distance to this surface does
 | 
|---|
 | 1065 |           not exceed 1. We refer to our comments in <link linkend="???">1.4
 | 
|---|
 | 1066 |           Randomization </link>for details on changing the randomness.</para>
 | 
|---|
 | 1067 |         </section>
 | 
|---|
 | 1068 | 
 | 
|---|
 | 1069 |         <section>
 | 
|---|
 | 1070 |           <title>Change a molecules name</title>
 | 
|---|
 | 1071 | 
 | 
|---|
 | 1072 |           <para>You can change the name of a molecule which is important for
 | 
|---|
 | 1073 |           selection.</para>
 | 
|---|
 | 1074 | 
 | 
|---|
 | 1075 |           <programlisting>... -change-molname "test</programlisting>
 | 
|---|
 | 1076 | 
 | 
|---|
 | 1077 |           <para>This will change the name of the (only) selected molecule to
 | 
|---|
 | 1078 |           "test".</para>
 | 
|---|
 | 1079 | 
 | 
|---|
 | 1080 |           <para>Connected with this is the default name an unknown molecule
 | 
|---|
 | 1081 |           gets.</para>
 | 
|---|
 | 1082 | 
 | 
|---|
 | 1083 |           <programlisting>... --default-molname test</programlisting>
 | 
|---|
 | 1084 | 
 | 
|---|
 | 1085 |           <para>This will change the default name of a molecule to
 | 
|---|
 | 1086 |           "test".</para>
 | 
|---|
 | 1087 | 
 | 
|---|
 | 1088 |           <note>
 | 
|---|
 | 1089 |             <para>Note that a molecule loaded from file gets the filename
 | 
|---|
 | 1090 |             (without suffix) as its name.</para>
 | 
|---|
 | 1091 |           </note>
 | 
|---|
 | 1092 |         </section>
 | 
|---|
 | 1093 | 
 | 
|---|
 | 1094 |         <section>
 | 
|---|
 | 1095 |           <title>Rotate around self</title>
 | 
|---|
 | 1096 | 
 | 
|---|
 | 1097 |           <para>You can rotate a molecule around its own axis.</para>
 | 
|---|
 | 1098 | 
 | 
|---|
 | 1099 |           <programlisting>
 | 
|---|
 | 1100 |                 ... --rotate-around-self "90" \
 | 
|---|
 | 1101 |                     --axis "0,0,1"
 | 
|---|
 | 1102 |           </programlisting>
 | 
|---|
 | 1103 | 
 | 
|---|
 | 1104 |           <para>This rotates the molecule around the z axis by 90 degrees as
 | 
|---|
 | 1105 |           if the origin were at its center of origin.</para>
 | 
|---|
 | 1106 |         </section>
 | 
|---|
 | 1107 | 
 | 
|---|
 | 1108 |         <section>
 | 
|---|
 | 1109 |           <title>Rotate around origin</title>
 | 
|---|
 | 1110 | 
 | 
|---|
 | 1111 |           <para>In the same manner the molecule can be rotated around an
 | 
|---|
 | 1112 |           external origin.</para>
 | 
|---|
 | 1113 | 
 | 
|---|
 | 1114 |           <programlisting>
 | 
|---|
 | 1115 |                 ... --rotate-around-origin 90 \
 | 
|---|
 | 1116 |                     --position "0,0,1"\
 | 
|---|
 | 1117 |           </programlisting>
 | 
|---|
 | 1118 | 
 | 
|---|
 | 1119 |           <para>This rotates the molecule around an axis from the origin to
 | 
|---|
 | 1120 |           the position (0,0,1), i.e. around the z axis, by 90 degrees.</para>
 | 
|---|
 | 1121 |         </section>
 | 
|---|
 | 1122 | 
 | 
|---|
 | 1123 |         <section>
 | 
|---|
 | 1124 |           <title>Rotate to principal axis system</title>
 | 
|---|
 | 1125 | 
 | 
|---|
 | 1126 |           <para>The principal axis system is given by an ellipsoid that mostly
 | 
|---|
 | 1127 |           matches the molecules shape. The principal axis system can be just
 | 
|---|
 | 1128 |           simply determined by</para>
 | 
|---|
 | 1129 | 
 | 
|---|
 | 1130 |           <programlisting>... --principal-axis-system</programlisting>
 | 
|---|
 | 1131 | 
 | 
|---|
 | 1132 |           <para>To rotate the molecule around itself to align with this system
 | 
|---|
 | 1133 |           do as follows.</para>
 | 
|---|
 | 1134 | 
 | 
|---|
 | 1135 |           <programlisting>... --rotate-to-principal-axis-system "0,0,1"</programlisting>
 | 
|---|
 | 1136 | 
 | 
|---|
 | 1137 |           <para>This rotates the molecule in such a manner that the ellipsoids
 | 
|---|
 | 1138 |           largest axis is aligned with the z axis. <remark>Note that "0,0,-1"
 | 
|---|
 | 1139 |           would align anti-parallel.</remark></para>
 | 
|---|
 | 1140 |         </section>
 | 
|---|
 | 1141 | 
 | 
|---|
 | 1142 |         <section>
 | 
|---|
 | 1143 |           <title>Perform verlet integration</title>
 | 
|---|
 | 1144 | 
 | 
|---|
 | 1145 |           <para>Atoms not only have a position, but each instance also stores
 | 
|---|
 | 1146 |           velocity and a force vector. These can be used in a velocity verlet
 | 
|---|
 | 1147 |           integration step. Velocity verlet is a often employed time
 | 
|---|
 | 1148 |           integration algorithm in molecular dynamics simulations.</para>
 | 
|---|
 | 1149 | 
 | 
|---|
 | 1150 |           <programlisting>
 | 
|---|
 | 1151 |                 ... --verlet-integration \
 | 
|---|
 | 1152 |                     --deltat 0.1 \
 | 
|---|
 | 1153 |                     --keep-fixed-CenterOfMass 0
 | 
|---|
 | 1154 |           </programlisting>
 | 
|---|
 | 1155 | 
 | 
|---|
 | 1156 |           <para>This will integrate with a timestep of <inlineequation>
 | 
|---|
 | 1157 |               <m:math display="inline">
 | 
|---|
 | 1158 |                 <m:mi>\Delta_t = 0.1</m:mi>
 | 
|---|
 | 1159 |               </m:math>
 | 
|---|
 | 1160 |             </inlineequation>and correcting forces and velocities such that
 | 
|---|
 | 1161 |           the sum over all atoms is zero.</para>
 | 
|---|
 | 1162 |         </section>
 | 
|---|
 | 1163 |       </section>
 | 
|---|
 | 1164 | 
 | 
|---|
 | 1165 |       <section>
 | 
|---|
 | 1166 |         <title>Manipulate domain</title>
 | 
|---|
 | 1167 | 
 | 
|---|
 | 1168 |         <para>Here, we elaborate on how to duplicate all the atoms inside the
 | 
|---|
 | 1169 |         domain, how the scale the coordinate system, how to center the atoms
 | 
|---|
 | 1170 |         with respect to certain points, how to realign them by given
 | 
|---|
 | 1171 |         constraints, how to mirror and most importantly how to specify the
 | 
|---|
 | 1172 |         domain.</para>
 | 
|---|
 | 1173 | 
 | 
|---|
 | 1174 |         <section>
 | 
|---|
 | 1175 |           <title>Changing the domain</title>
 | 
|---|
 | 1176 | 
 | 
|---|
 | 1177 |           <para>The domain is specified by a symmetric 3x3 matrix. The
 | 
|---|
 | 1178 |           eigenvalues (diagonal entries in case of a diagonal matrix) give the
 | 
|---|
 | 1179 |           length of the edges, additional entries specify transformations of
 | 
|---|
 | 1180 |           the box such that it becomes a more general parallelepiped.</para>
 | 
|---|
 | 1181 | 
 | 
|---|
 | 1182 |           <programlisting>... change-box "20,0,20,0,0,20"</programlisting>
 | 
|---|
 | 1183 | 
 | 
|---|
 | 1184 |           <para>As the domain matrix is symmetric, six values suffice to fully
 | 
|---|
 | 1185 |           specify it. We have to give the six components of the lower diagonal
 | 
|---|
 | 1186 |           matrix. Here, we change the box to a cuboid of equal edge length of
 | 
|---|
 | 1187 |           20.</para>
 | 
|---|
 | 1188 |         </section>
 | 
|---|
 | 1189 | 
 | 
|---|
 | 1190 |         <section>
 | 
|---|
 | 1191 |           <title>Bound atoms inside box</title>
 | 
|---|
 | 1192 | 
 | 
|---|
 | 1193 |           <para>The following applies the current boundary conditions to the
 | 
|---|
 | 1194 |           atoms. In case of periodic or wrapped boundary conditions the atoms
 | 
|---|
 | 1195 |           will be periodically translated to be inside the domain
 | 
|---|
 | 1196 |           again.</para>
 | 
|---|
 | 1197 | 
 | 
|---|
 | 1198 |           <programlisting>... --bound-in-box</programlisting>
 | 
|---|
 | 1199 |         </section>
 | 
|---|
 | 1200 | 
 | 
|---|
 | 1201 |         <section>
 | 
|---|
 | 1202 |           <title>Center atoms inside the domain</title>
 | 
|---|
 | 1203 | 
 | 
|---|
 | 1204 |           <para>This is a combination of changing the box and bounding the
 | 
|---|
 | 1205 |           atoms inside it.</para>
 | 
|---|
 | 1206 | 
 | 
|---|
 | 1207 |           <programlisting>... --center-in-box "20,0,20,0,0,"</programlisting>
 | 
|---|
 | 1208 |         </section>
 | 
|---|
 | 1209 | 
 | 
|---|
 | 1210 |         <section>
 | 
|---|
 | 1211 |           <title>Center the atoms at an edge</title>
 | 
|---|
 | 1212 | 
 | 
|---|
 | 1213 |           <para>MoleCuilder can calculate the minimum box (parallel to the
 | 
|---|
 | 1214 |           cardinal axis) all atoms would fit in and translate all atoms in
 | 
|---|
 | 1215 |           such a way that the lower, left, front edge of this minimum is at
 | 
|---|
 | 1216 |           the origin (0,0,0).</para>
 | 
|---|
 | 1217 | 
 | 
|---|
 | 1218 |           <programlisting>... --center-edge</programlisting>
 | 
|---|
 | 1219 |         </section>
 | 
|---|
 | 1220 | 
 | 
|---|
 | 1221 |         <section>
 | 
|---|
 | 1222 |           <title>Extending the boundary by adding an empty boundary</title>
 | 
|---|
 | 1223 | 
 | 
|---|
 | 1224 |           <para>In the same manner as above a minimum box is determined that
 | 
|---|
 | 1225 |           is subsequently expanded by a boundary of the given additional
 | 
|---|
 | 1226 |           thickness. This applies to either side.</para>
 | 
|---|
 | 1227 | 
 | 
|---|
 | 1228 |           <programlisting>... --add-empty-boundary "5,5,5"</programlisting>
 | 
|---|
 | 1229 | 
 | 
|---|
 | 1230 |           <para>This will enlarge the box in such a way that every atom is at
 | 
|---|
 | 1231 |           least by a distance of 5 away from the boundary of the domain (in
 | 
|---|
 | 1232 |           the infinity norm).</para>
 | 
|---|
 | 1233 |         </section>
 | 
|---|
 | 1234 | 
 | 
|---|
 | 1235 |         <section>
 | 
|---|
 | 1236 |           <title>Scaling the box</title>
 | 
|---|
 | 1237 | 
 | 
|---|
 | 1238 |           <para>You can enlarge the domain by simple scaling factors.</para>
 | 
|---|
 | 1239 | 
 | 
|---|
 | 1240 |           <programlisting>... --scale-box "1,1,2.5"</programlisting>
 | 
|---|
 | 1241 | 
 | 
|---|
 | 1242 |           <para>Here, the domain is stretched in the z direction by a factor
 | 
|---|
 | 1243 |           of 2.5.</para>
 | 
|---|
 | 1244 |         </section>
 | 
|---|
 | 1245 | 
 | 
|---|
 | 1246 |         <section>
 | 
|---|
 | 1247 |           <title>Repeating the box</title>
 | 
|---|
 | 1248 | 
 | 
|---|
 | 1249 |           <para>Under periodic boundary conditions often only the minimal
 | 
|---|
 | 1250 |           periodic cell is stored. If need be, multiple images can be easily
 | 
|---|
 | 1251 |           added to the current state of the system by repeating the box, i.e.
 | 
|---|
 | 1252 |           the box along with all contained atoms is copied and placed
 | 
|---|
 | 1253 |           adjacently.</para>
 | 
|---|
 | 1254 | 
 | 
|---|
 | 1255 |           <programlisting>... --repeat-box "1,2,2"</programlisting>
 | 
|---|
 | 1256 | 
 | 
|---|
 | 1257 |           <para>This will create a 2x2 grid of the current domain, replicating
 | 
|---|
 | 1258 |           it along the y and z direction along with all atoms. If the domain
 | 
|---|
 | 1259 |           contained before a single water molecule, we will now have four of
 | 
|---|
 | 1260 |           them.</para>
 | 
|---|
 | 1261 |         </section>
 | 
|---|
 | 1262 |       </section>
 | 
|---|
 | 1263 | 
 | 
|---|
 | 1264 |       <section>
 | 
|---|
 | 1265 |         <title>Fragmentation</title>
 | 
|---|
 | 1266 | 
 | 
|---|
 | 1267 |         <para>Fragmentation refers to a so-called linear-scaling method called
 | 
|---|
 | 1268 |         "Bond-Order diSSection in an ANOVA-like fashion" (BOSSANOVA),
 | 
|---|
 | 1269 |         developed by <personname>Frederik Heber</personname>. In this section
 | 
|---|
 | 1270 |         we briefly explain what the method does and how the associated actions
 | 
|---|
 | 1271 |         work.</para>
 | 
|---|
 | 1272 | 
 | 
|---|
 | 1273 |         <para>The central idea behind the BOSSANOVA scheme is to fragment the
 | 
|---|
 | 1274 |         graph of the molecular system into connected subgraphs of a certain
 | 
|---|
 | 1275 |         number of vertices (atoms). To give an example, loading a ethane atom
 | 
|---|
 | 1276 |         with the chemical formula C2H6, fragmenting the molecule up to order 1
 | 
|---|
 | 1277 |         means creating two fragments, both methane-like from either carbon
 | 
|---|
 | 1278 |         atom including surrounding hydrogen atoms. Fragmenting up to order 2
 | 
|---|
 | 1279 |         would return both the methane fragments and additionally the full
 | 
|---|
 | 1280 |         ethane molecule as it resembles a fragment of order 2, namely
 | 
|---|
 | 1281 |         containing two (non-hydrogen) atoms.</para>
 | 
|---|
 | 1282 | 
 | 
|---|
 | 1283 |         <para>The reason for doing this is that usual ab-initio calculations
 | 
|---|
 | 1284 |         of molecular systems via methods such as Density Functional Theory or
 | 
|---|
 | 1285 |         Hartree-Fock scale at least as <inlineequation>
 | 
|---|
 | 1286 |             <m:math display="inline">
 | 
|---|
 | 1287 |               <m:mi>{\cal O}(M^3}</m:mi>
 | 
|---|
 | 1288 |             </m:math>
 | 
|---|
 | 1289 |           </inlineequation>with the number of atoms <inlineequation>
 | 
|---|
 | 1290 |             <m:math display="inline">
 | 
|---|
 | 1291 |               <m:mi>M</m:mi>
 | 
|---|
 | 1292 |             </m:math>
 | 
|---|
 | 1293 |           </inlineequation>. Hence, calculating the ground state energy of a
 | 
|---|
 | 1294 |         number of fragment molecules scaling linearly with the number of atoms
 | 
|---|
 | 1295 |         yields a linear-scaling methods. In the doctoral thesis of Frederik
 | 
|---|
 | 1296 |         Heber, it is explained why this is a sensible ansatz mathematically
 | 
|---|
 | 1297 |         and shown that it delivers a very good accuracy if electrons (and
 | 
|---|
 | 1298 |         hence interactions) are in general localized.</para>
 | 
|---|
 | 1299 | 
 | 
|---|
 | 1300 |         <para>Long-range interactions are artificially truncated, however,
 | 
|---|
 | 1301 |         with this fragment ansatz. It can be obtained in a perturbation manner
 | 
|---|
 | 1302 |         by sampling the resulting electronic and nuclei charge density on a
 | 
|---|
 | 1303 |         grid, summing over all fragments, and solving the associated Poisson
 | 
|---|
 | 1304 |         equation. Such a calculation is implemented via the solver
 | 
|---|
 | 1305 |         <productname>vmg</productname> by Julian Iseringhausen that is
 | 
|---|
 | 1306 |         contained in the <productname>ScaFaCoS</productname> package (<link
 | 
|---|
 | 1307 |         xlink:href="???">http://www.scafacos.org/</link>).</para>
 | 
|---|
 | 1308 | 
 | 
|---|
 | 1309 |         <para>Note that we treat hydrogen special (but can be switched off) as
 | 
|---|
 | 1310 |         fragments are calculated as closed shell (total spin equals zero).
 | 
|---|
 | 1311 |         Also, we use hydrogen to saturate any dangling bonds that occur as
 | 
|---|
 | 1312 |         bonds are cut when fragmenting a molecule (this, too, can be switched
 | 
|---|
 | 1313 |         off).</para>
 | 
|---|
 | 1314 | 
 | 
|---|
 | 1315 |         <section>
 | 
|---|
 | 1316 |           <title>Fragmenting a molecular system</title>
 | 
|---|
 | 1317 | 
 | 
|---|
 | 1318 |           <para>For the current selection of atoms, all fragments consisting
 | 
|---|
 | 1319 |           of these (sub)set of atoms are created in the following
 | 
|---|
 | 1320 |           manner.</para>
 | 
|---|
 | 1321 | 
 | 
|---|
 | 1322 |           <programlisting>
 | 
|---|
 | 1323 |                 ... --fragment-molecule "BondFragment" \
 | 
|---|
 | 1324 |                     --DoCyclesFull 1 \
 | 
|---|
 | 1325 |                     --distance 3. \
 | 
|---|
 | 1326 |                     --order 3 \
 | 
|---|
 | 1327 |                     --grid-level 5 \
 | 
|---|
 | 1328 |                     --output-types xyz mpqc
 | 
|---|
 | 1329 |           </programlisting>
 | 
|---|
 | 1330 | 
 | 
|---|
 | 1331 |           <para>We go through each of the options one after the other. During
 | 
|---|
 | 1332 |           fragmentation some files are created storing state information, i.e.
 | 
|---|
 | 1333 |           the vertex/atom indices per fragment and so on. These files all need
 | 
|---|
 | 1334 |           a common prefix, here "BondFragment". Then, we specify that cycles
 | 
|---|
 | 1335 |           should be treated fully. This compensates for electrons in aromatic
 | 
|---|
 | 1336 |           rings being delocalized over the ring. If cycles in the graph,
 | 
|---|
 | 1337 |           originating from aromatic rings, are always calculated fully, i.e.
 | 
|---|
 | 1338 |           the whole ring becomes a fragment, we partially overcome these
 | 
|---|
 | 1339 |           issues. This does however not work indefinitely and accuracy of the
 | 
|---|
 | 1340 |           approximation is limited (<inlineequation>
 | 
|---|
 | 1341 |               <m:math display="inline">
 | 
|---|
 | 1342 |                 <m:mi>>10^{-4}</m:mi>
 | 
|---|
 | 1343 |               </m:math>
 | 
|---|
 | 1344 |             </inlineequation>) in systems with many interconnected aromatic
 | 
|---|
 | 1345 |           rings, such as graphene. Next, we give a distance cutoff of 3 used
 | 
|---|
 | 1346 |           in bond graph creation. Then, we specify the maximum order, i.e. the
 | 
|---|
 | 1347 |           maximum number of (non-hydrogen) atoms per fragment, here 3. The
 | 
|---|
 | 1348 |           higher this number the more expensive the calculation becomes
 | 
|---|
 | 1349 |           (because substantially more fragments are created) but also the more
 | 
|---|
 | 1350 |           accurate. The grid level refers to the part where long-range Coulomb
 | 
|---|
 | 1351 |           interactions are calculated. This is done via solving the associated
 | 
|---|
 | 1352 |           Poisson equation with a multigrid solver. As input the solver
 | 
|---|
 | 1353 |           requires the density which is sampled on a cartesian grid whose
 | 
|---|
 | 1354 |           resolution these parameter defines (<inlineequation>
 | 
|---|
 | 1355 |               <m:math display="inline">
 | 
|---|
 | 1356 |                 <m:mi>2^{\mathrm{level}}</m:mi>
 | 
|---|
 | 1357 |               </m:math>
 | 
|---|
 | 1358 |             </inlineequation>). And finally, we give the output file formats,
 | 
|---|
 | 1359 |           i.e. which file formats are used for writing each fragment
 | 
|---|
 | 1360 |           configuration (prefix is "BondFragment", remember?). Here, we use
 | 
|---|
 | 1361 |           XYZ (mainly for checking the configurations visually) and MPQC,
 | 
|---|
 | 1362 |           which is a very robust Hartree-Fock solver. We refer to the
 | 
|---|
 | 1363 |           discussion of the <link linkend="???">Parsers</link> above on how to
 | 
|---|
 | 1364 |           change the parameters of the ab-initio calculation.</para>
 | 
|---|
 | 1365 | 
 | 
|---|
 | 1366 |           <para>After having written all fragment configuration files, you
 | 
|---|
 | 1367 |           need to calculate each fragment, grab the resulting energy (and
 | 
|---|
 | 1368 |           force vectors) and place them into a result file manually. This at
 | 
|---|
 | 1369 |           least is necessary if you have specified output-types above. If not,
 | 
|---|
 | 1370 |           the fragments are not written to file but stored internally. Read
 | 
|---|
 | 1371 |           on.</para>
 | 
|---|
 | 1372 |         </section>
 | 
|---|
 | 1373 | 
 | 
|---|
 | 1374 |         <section>
 | 
|---|
 | 1375 |           <title>Calculating fragment energies automatically</title>
 | 
|---|
 | 1376 | 
 | 
|---|
 | 1377 |           <para>Another way of doing this is enabled if you have
 | 
|---|
 | 1378 |           <productname>JobMarket</productname> package. JobMarket implements a
 | 
|---|
 | 1379 |           client/server ansatz, i.e. two (or more) independent programs are
 | 
|---|
 | 1380 |           running (even on another computer but connected via an IP network),
 | 
|---|
 | 1381 |           namely a server and at least one client. The server receives
 | 
|---|
 | 1382 |           fragment configurations from MoleCuilder and assigns these to a
 | 
|---|
 | 1383 |           client who is not busy. The client launches an executable that is
 | 
|---|
 | 1384 |           specified in the work package he is assigned and gathers after
 | 
|---|
 | 1385 |           calculation a number of values, samewise specified in the package.
 | 
|---|
 | 1386 |           The results are gathered together by the server and can be requested
 | 
|---|
 | 1387 |           from MoleCuilder once they are done. This essentially describe what
 | 
|---|
 | 1388 |           is happening during the execution of this action.</para>
 | 
|---|
 | 1389 | 
 | 
|---|
 | 1390 |           <para>Stored fragment jobs can also be parsed again, i.e. reversing
 | 
|---|
 | 1391 |           the effect of having output-types specified in <link
 | 
|---|
 | 1392 |           linkend="???">Fragmenting a molecule</link>.</para>
 | 
|---|
 | 1393 | 
 | 
|---|
 | 1394 |           <programlisting>
 | 
|---|
 | 1395 |                 ... --parse-fragment-jobs \
 | 
|---|
 | 1396 |                     --fragment-jobs "BondFragment00.in" "BondFragment01.in" \
 | 
|---|
 | 1397 |                     --fragment-path "./" \
 | 
|---|
 | 1398 |                     --grid-level 5
 | 
|---|
 | 1399 |           </programlisting>
 | 
|---|
 | 1400 | 
 | 
|---|
 | 1401 |           <para>Here, we have specified two files, namely
 | 
|---|
 | 1402 |           <filename>BondFragment00.in</filename> and
 | 
|---|
 | 1403 |           <filename>BondFragment01.in</filename>, to be parsed from the path
 | 
|---|
 | 1404 |           "./", i.e. the current directory. Also, we have specified to sample
 | 
|---|
 | 1405 |           the electronic charge density obtained from the calculated ground
 | 
|---|
 | 1406 |           state energy solution with a resolution of 5 (see fragment molecule
 | 
|---|
 | 1407 |           and also below).</para>
 | 
|---|
 | 1408 | 
 | 
|---|
 | 1409 |           <para>This allows for automated and parallel calculation of all
 | 
|---|
 | 1410 |           fragment energies and forces directly within MoleCuilder. The
 | 
|---|
 | 1411 |           FragmentationAutomation action takes the fragment configurations
 | 
|---|
 | 1412 |           from an internal storage wherein they are placed if in
 | 
|---|
 | 1413 |           FragmentMolecule no output-types have been specified.</para>
 | 
|---|
 | 1414 | 
 | 
|---|
 | 1415 |           <programlisting>
 | 
|---|
 | 1416 |                 ... --fragment-automation \
 | 
|---|
 | 1417 |                     --fragment-executable mpqc \
 | 
|---|
 | 1418 |                     --fragment-resultfile BondFragment_results.dat \
 | 
|---|
 | 1419 |                     --DoLongrange 1 \
 | 
|---|
 | 1420 |                     --DoValenceOnly 1 \
 | 
|---|
 | 1421 |                     --grid-level 5 \
 | 
|---|
 | 1422 |                     --interpolation-degree 3 \
 | 
|---|
 | 1423 |                     --near-field-cells 4 \
 | 
|---|
 | 1424 |                     --server-address 127.0.0.1 \
 | 
|---|
 | 1425 |                     --server-port 1025
 | 
|---|
 | 1426 |           </programlisting>
 | 
|---|
 | 1427 | 
 | 
|---|
 | 1428 |           <para>Again, we go through each of the action's options step by
 | 
|---|
 | 1429 |           step.</para>
 | 
|---|
 | 1430 | 
 | 
|---|
 | 1431 |           <para>The executable is required if you do not have a patched
 | 
|---|
 | 1432 |           version of <productname>MPQC</productname> that may directly act as
 | 
|---|
 | 1433 |           a client to JobMarket's server. All calculated results are placed in
 | 
|---|
 | 1434 |           the result file. If none is given, they are instead again placed in
 | 
|---|
 | 1435 |           an internal storage for later access.</para>
 | 
|---|
 | 1436 | 
 | 
|---|
 | 1437 |           <note>
 | 
|---|
 | 1438 |             <para>Long-calculations are only possible with a client that knows
 | 
|---|
 | 1439 |             how to handle VMG jobs. If you encounter failures, then it is most
 | 
|---|
 | 1440 |             likely that you do not have a suitable client.</para>
 | 
|---|
 | 1441 |           </note>
 | 
|---|
 | 1442 | 
 | 
|---|
 | 1443 |           <para>In the next line, we have all options related to calculation
 | 
|---|
 | 1444 |           of long-range interactions. We only sample valence charges on the
 | 
|---|
 | 1445 |           grid, i.e. not core electrons and the nuclei charge is reduces
 | 
|---|
 | 1446 |           respectively. This avoids problems with sampling highly localized
 | 
|---|
 | 1447 |           charges on the grid and is in general recommended. Next, there
 | 
|---|
 | 1448 |           follow parameters for the multi grid solver, namely the resolution
 | 
|---|
 | 1449 |           of the grid, see under fragmenting the molecule, the interpolation
 | 
|---|
 | 1450 |           degree and the number of near field cells. A grid level of 6 is
 | 
|---|
 | 1451 |           recommended but costly in terms of memory, the other values are at
 | 
|---|
 | 1452 |           their recommend values.</para>
 | 
|---|
 | 1453 | 
 | 
|---|
 | 1454 |           <para>In the last line, parameters are given on how to access the
 | 
|---|
 | 1455 |           JobMarket server, namely it address and its port.</para>
 | 
|---|
 | 1456 |         </section>
 | 
|---|
 | 1457 | 
 | 
|---|
 | 1458 |         <section>
 | 
|---|
 | 1459 |           <title>Analyse fragment results</title>
 | 
|---|
 | 1460 | 
 | 
|---|
 | 1461 |           <para>After the energies and force vectors of each fragment have
 | 
|---|
 | 1462 |           been calculated, they need to be summed up to an approximation for
 | 
|---|
 | 1463 |           the energy and force vectors of the whole molecular system. This is
 | 
|---|
 | 1464 |           done by calling this action.</para>
 | 
|---|
 | 1465 | 
 | 
|---|
 | 1466 |           <programlisting>
 | 
|---|
 | 1467 |                 ... --analyse-fragment-results \
 | 
|---|
 | 1468 |                     --fragment-prefix "BondFragment" \
 | 
|---|
 | 1469 |                     --fragment-resultfile BondFragment_results.dat \
 | 
|---|
 | 1470 |                     --store-grids 1
 | 
|---|
 | 1471 |           </programlisting>
 | 
|---|
 | 1472 | 
 | 
|---|
 | 1473 |           <para>The purpose of the prefix should already be known to you, same
 | 
|---|
 | 1474 |           with the result file that is the file parsed by MoleCuilder. The
 | 
|---|
 | 1475 |           last option states that the sampled charge densities and the
 | 
|---|
 | 1476 |           calculated potential from the long-range calculations should be
 | 
|---|
 | 1477 |           stored with the summed up energies and forces. Note that this makes
 | 
|---|
 | 1478 |           the resulting files substantially larger (Hundreds of megabyte or
 | 
|---|
 | 1479 |           even gigabytes). Fragment energies and forces are stored in
 | 
|---|
 | 1480 |           so-called internal homology containers. These are explained in the
 | 
|---|
 | 1481 |           next section.</para>
 | 
|---|
 | 1482 | 
 | 
|---|
 | 1483 |           <para>Note that this action sets the force vector if these have been
 | 
|---|
 | 1484 |           calculated for the fragment. Hence, a <link linkend="???">verlet
 | 
|---|
 | 1485 |           integration</link> is possible afterwards.</para>
 | 
|---|
 | 1486 |         </section>
 | 
|---|
 | 1487 |       </section>
 | 
|---|
 | 1488 | 
 | 
|---|
 | 1489 |       <section>
 | 
|---|
 | 1490 |         <title>Homologies</title>
 | 
|---|
 | 1491 | 
 | 
|---|
 | 1492 |         <para>After a fragmentation procedure has been performed fully, what
 | 
|---|
 | 1493 |         to do with the results? The forces can be used already but what about
 | 
|---|
 | 1494 |         the energies? The energy value is basically the function evaluation of
 | 
|---|
 | 1495 |         the Born-Oppenheimer surface. For molecular dynamics simulations
 | 
|---|
 | 1496 |         continuous ab-initio calculations to evaluate the Born-Oppenheimer
 | 
|---|
 | 1497 |         surface is not feasible. Instead usually empirical potential functions
 | 
|---|
 | 1498 |         are fitted as to resemble the Born-Oppenheimer surface to a sufficient
 | 
|---|
 | 1499 |         degree.</para>
 | 
|---|
 | 1500 | 
 | 
|---|
 | 1501 |         <para>One frequent method is the many-body expansion of said surface
 | 
|---|
 | 1502 |         which is basically nothing else than the fragment ansatz described
 | 
|---|
 | 1503 |         above. Potential functions resemble a specific term in this many-body
 | 
|---|
 | 1504 |         expansion. These are discussed in the next section.</para>
 | 
|---|
 | 1505 | 
 | 
|---|
 | 1506 |         <para>For each of these terms all homologous fragments (i.e. having
 | 
|---|
 | 1507 |         the same atoms with respect to the present elements and bonded in the
 | 
|---|
 | 1508 |         same way), differing only in the coordinate of each atom, are just a
 | 
|---|
 | 1509 |         sampling or a function evaluation of this term of the many-body
 | 
|---|
 | 1510 |         expansion with respect to varying nuclei coordinates. Hence, it is
 | 
|---|
 | 1511 |         appropriate to use these function evaluations in a non-linear
 | 
|---|
 | 1512 |         regression procedure. That is, we want to tune the parameter of the
 | 
|---|
 | 1513 |         empirical potential function in such a way as to most closely obtain
 | 
|---|
 | 1514 |         the same function evaluation as the ab-initio calculation did with the
 | 
|---|
 | 1515 |         same nuclear coordinates. Usually, this is done in a least-square
 | 
|---|
 | 1516 |         sense, minimising the euclidean norm.</para>
 | 
|---|
 | 1517 | 
 | 
|---|
 | 1518 |         <para>Homologies are then nothing else but containers for a specific
 | 
|---|
 | 1519 |         type of fragment of all the different, calculated configurations (i.e.
 | 
|---|
 | 1520 |         varying nuclear coordinates of the same fragment).</para>
 | 
|---|
 | 1521 | 
 | 
|---|
 | 1522 |         <para>Now, we explain the actions that parse and store
 | 
|---|
 | 1523 |         homologies.</para>
 | 
|---|
 | 1524 | 
 | 
|---|
 | 1525 |         <programlisting>... --parse-homologies homologies.dat</programlisting>
 | 
|---|
 | 1526 | 
 | 
|---|
 | 1527 |         <para>This parses the all homologies contained in the file
 | 
|---|
 | 1528 |         <filename>homologies.dat</filename> and appends them to the homology
 | 
|---|
 | 1529 |         container.</para>
 | 
|---|
 | 1530 | 
 | 
|---|
 | 1531 |         <programlisting>... --store-homologies homologies.dat</programlisting>
 | 
|---|
 | 1532 | 
 | 
|---|
 | 1533 |         <para>Complementary, this stores the current contents of the homology
 | 
|---|
 | 1534 |         container, overwriting the file
 | 
|---|
 | 1535 |         <filename>homologies.dat</filename>.</para>
 | 
|---|
 | 1536 |       </section>
 | 
|---|
 | 1537 | 
 | 
|---|
 | 1538 |       <section>
 | 
|---|
 | 1539 |         <title>Potentials</title>
 | 
|---|
 | 1540 | 
 | 
|---|
 | 1541 |         <para>In much the same manner, we would now ask what are homology
 | 
|---|
 | 1542 |         files or containers good for but with the just had explanation it
 | 
|---|
 | 1543 |         should be clear: We fit potential function to these function
 | 
|---|
 | 1544 |         evaluation of terms of the many-body expansion of the Born-Oppenheimer
 | 
|---|
 | 1545 |         surface of the full system.</para>
 | 
|---|
 | 1546 | 
 | 
|---|
 | 1547 |         <section>
 | 
|---|
 | 1548 |           <title>Fitting empirical potentials</title>
 | 
|---|
 | 1549 | 
 | 
|---|
 | 1550 |           <para>Let's take a look at an exemplary call to the fit potential
 | 
|---|
 | 1551 |           action.</para>
 | 
|---|
 | 1552 | 
 | 
|---|
 | 1553 |           <programlisting>
 | 
|---|
 | 1554 |                 ... --fit-potential \
 | 
|---|
 | 1555 |                     --fragment-charges 8 1 1 \
 | 
|---|
 | 1556 |                     --potential-charges 8 1 \
 | 
|---|
 | 1557 |                     --potential-type morse \
 | 
|---|
 | 1558 |                     --take-best-of 5
 | 
|---|
 | 1559 |           </programlisting>
 | 
|---|
 | 1560 | 
 | 
|---|
 | 1561 |           <para>Again, we look at each option in turn. The first is the
 | 
|---|
 | 1562 |           charges or elements specifying the set of homologous fragments that
 | 
|---|
 | 1563 |           we want to look at. Here, obviously we are interested in water
 | 
|---|
 | 1564 |           molecules, consisting of a single oxygen and two hydrogen atoms.
 | 
|---|
 | 1565 |           Next, we specify the nuclei coordinates of the potential. We give
 | 
|---|
 | 1566 |           the type of the potential as morse, which requires a single distance
 | 
|---|
 | 1567 |           or two nuclear coordinates, here between an oxygen and a hydrogen
 | 
|---|
 | 1568 |           atom. Finally, we state that the non-linear regression should be
 | 
|---|
 | 1569 |           done with five random starting positions and the set of parameters
 | 
|---|
 | 1570 |           with the smallest L2 norm wins.</para>
 | 
|---|
 | 1571 | 
 | 
|---|
 | 1572 |           <note>
 | 
|---|
 | 1573 |             <para>Due to translational and rotational degrees of freedom for
 | 
|---|
 | 1574 |             fragments smaller than 7 atoms, it is appropriate to look at the
 | 
|---|
 | 1575 |             pair-wise distances and not at the absolute coordinates. Hence,
 | 
|---|
 | 1576 |             the two atomic positions, here for oxygen and hydrogen, are
 | 
|---|
 | 1577 |             converted to a single distance. If we had given an harmonic
 | 
|---|
 | 1578 |             angular potential and three charges/element, 8 1 1, i.e. oxygen
 | 
|---|
 | 1579 |             and two hydrogens, we would have obtained three distances.</para>
 | 
|---|
 | 1580 | 
 | 
|---|
 | 1581 |             <para>MoleCuilder always adds a so-called constant potential to
 | 
|---|
 | 1582 |             the fit containing only a single parameter, the energy offset.
 | 
|---|
 | 1583 |             This offset compensates for the interaction energy associated with
 | 
|---|
 | 1584 |             a fragment of order 1, e.g. a single hydrogen atom.</para>
 | 
|---|
 | 1585 |           </note>
 | 
|---|
 | 1586 | 
 | 
|---|
 | 1587 |           <para>Another way is using a file containing a specific set of
 | 
|---|
 | 1588 |           potential functions, possibly even with initial values.</para>
 | 
|---|
 | 1589 | 
 | 
|---|
 | 1590 |           <programlisting>
 | 
|---|
 | 1591 |                 ... --fit-potential \
 | 
|---|
 | 1592 |                     --fragment-charges 8 1 1 \
 | 
|---|
 | 1593 |                     --potential-file water.potentials \
 | 
|---|
 | 1594 |                     --set-threshold 1e-3 \
 | 
|---|
 | 1595 |                     --training-file test.dat
 | 
|---|
 | 1596 |           </programlisting>
 | 
|---|
 | 1597 | 
 | 
|---|
 | 1598 |           <para>Now, all empirical potential functions are summed up into a
 | 
|---|
 | 1599 |           so-called compound potential over the combined set of parameters.
 | 
|---|
 | 1600 |           These are now fitted simultaneously. For example, if the potential
 | 
|---|
 | 1601 |           file <filename>water.potentials</filename> contains a harmonic bond
 | 
|---|
 | 1602 |           potential between oxygen and hydrogen and another angular potential
 | 
|---|
 | 1603 |           for the angle between hydrogen, oxygen, and hydrogen atom we would
 | 
|---|
 | 1604 |           fit a still simple function approximating the energy of a single
 | 
|---|
 | 1605 |           water molecule. Here, the threshold takes the place of the
 | 
|---|
 | 1606 |           take-best-of option. Here, random starting parameters are used as
 | 
|---|
 | 1607 |           long as the final L2 error is not below 1e-3. Also, all data used
 | 
|---|
 | 1608 |           for training, i.e. the tuples consisting of the fragments nuclei
 | 
|---|
 | 1609 |           coordinates and the associated energy value are written to the file
 | 
|---|
 | 1610 |           <filename>test.dat</filename>. This allows for graphical or other
 | 
|---|
 | 1611 |           type of analysis.</para>
 | 
|---|
 | 1612 | 
 | 
|---|
 | 1613 |           <para>Note that you can combine the two ways, i.e. start with the
 | 
|---|
 | 1614 |           first but give an empty potential file. The resulting parameters are
 | 
|---|
 | 1615 |           stored in this way. Fit other potentials and give different file
 | 
|---|
 | 1616 |           names for each. Eventually, you have to combine the file in a text
 | 
|---|
 | 1617 |           editor at the moment.</para>
 | 
|---|
 | 1618 |         </section>
 | 
|---|
 | 1619 | 
 | 
|---|
 | 1620 |         <section>
 | 
|---|
 | 1621 |           <title>Fitting partial charges</title>
 | 
|---|
 | 1622 | 
 | 
|---|
 | 1623 |           <para>The above empirical potential just model the short-range
 | 
|---|
 | 1624 |           behavior in the molecular fragment, namely the bonded interaction.
 | 
|---|
 | 1625 |           In order to model the long-range interaction as well without solving
 | 
|---|
 | 1626 |           for the electronic ground state in each time step, partial charges
 | 
|---|
 | 1627 |           are used that capture to some degree the created dipoles due to
 | 
|---|
 | 1628 |           charge transfer from one atom to another when bonded.</para>
 | 
|---|
 | 1629 | 
 | 
|---|
 | 1630 |           <para>To allow least-squares regression of these partial charges we
 | 
|---|
 | 1631 |           need the results of long-range calculations and the store-grids
 | 
|---|
 | 1632 |           option (see above under <link linkend="???">Fragmentation</link>)
 | 
|---|
 | 1633 |           must have been given. With these sampled charge density and Coulomb
 | 
|---|
 | 1634 |           potential stored in the homology containers, we call this action as
 | 
|---|
 | 1635 |           follows.</para>
 | 
|---|
 | 1636 | 
 | 
|---|
 | 1637 |           <programlisting>
 | 
|---|
 | 1638 |                 ... --fit-partial-charges \
 | 
|---|
 | 1639 |                     --fragment-charges 8 1 1 \
 | 
|---|
 | 1640 |                     --potential-file water.potentials \
 | 
|---|
 | 1641 |                     --radius 0.2
 | 
|---|
 | 1642 |           </programlisting>
 | 
|---|
 | 1643 | 
 | 
|---|
 | 1644 |           <para>This will again use water molecule as homologous fragment
 | 
|---|
 | 1645 |           "key" to request configurations from the container. Results are
 | 
|---|
 | 1646 |           stored in <filename>water.potentials</filename>. The radius is used
 | 
|---|
 | 1647 |           to mark the region directly around the nuclei from the fit
 | 
|---|
 | 1648 |           procedure. As here the charges of the core electrons and the nuclei
 | 
|---|
 | 1649 |           itself dominate, we however are only interested in a good
 | 
|---|
 | 1650 |           approximation to the long-range potential, this mask radius allows
 | 
|---|
 | 1651 |           to give the range of the excluded zone.</para>
 | 
|---|
 | 1652 |         </section>
 | 
|---|
 | 1653 |       </section>
 | 
|---|
 | 1654 | 
 | 
|---|
 | 1655 |       <section>
 | 
|---|
 | 1656 |         <title>Various commands</title>
 | 
|---|
 | 1657 | 
 | 
|---|
 | 1658 |         <para>Here, we gather all commands that do not fit into one of above
 | 
|---|
 | 1659 |         categories for completeness.</para>
 | 
|---|
 | 1660 | 
 | 
|---|
 | 1661 |         <section>
 | 
|---|
 | 1662 |           <title>Changing verbosity</title>
 | 
|---|
 | 1663 | 
 | 
|---|
 | 1664 |           <para>The verbosity level is the amount of stuff printed to screen.
 | 
|---|
 | 1665 |           This information will in general help you to understand when
 | 
|---|
 | 1666 |           something does not work. Mind the <emphasis>ERROR</emphasis> and
 | 
|---|
 | 1667 |           <emphasis>WARNING</emphasis> messages in any case.</para>
 | 
|---|
 | 1668 | 
 | 
|---|
 | 1669 |           <para>This sets the verbosity from default of 2 to 4,</para>
 | 
|---|
 | 1670 | 
 | 
|---|
 | 1671 |           <programlisting>... --verbose 4</programlisting>
 | 
|---|
 | 1672 | 
 | 
|---|
 | 1673 |           <para>or shorter,</para>
 | 
|---|
 | 1674 | 
 | 
|---|
 | 1675 |           <programlisting>... -v 4</programlisting>
 | 
|---|
 | 1676 |         </section>
 | 
|---|
 | 1677 | 
 | 
|---|
 | 1678 |         <section>
 | 
|---|
 | 1679 |           <title>Giving the version of the program</title>
 | 
|---|
 | 1680 | 
 | 
|---|
 | 1681 |           <para>This prints the version information of the code, especially
 | 
|---|
 | 1682 |           important when you request the fixing of bugs or implementation of
 | 
|---|
 | 1683 |           features.</para>
 | 
|---|
 | 1684 | 
 | 
|---|
 | 1685 |           <programlisting>... --version</programlisting>
 | 
|---|
 | 1686 |         </section>
 | 
|---|
 | 1687 | 
 | 
|---|
 | 1688 |         <section>
 | 
|---|
 | 1689 |           <title>Giving warranty information</title>
 | 
|---|
 | 1690 | 
 | 
|---|
 | 1691 |           <para>As follows warranty information is given,</para>
 | 
|---|
 | 1692 | 
 | 
|---|
 | 1693 |           <programlisting>... --warranty</programlisting>
 | 
|---|
 | 1694 |         </section>
 | 
|---|
 | 1695 |       </section>
 | 
|---|
 | 1696 | 
 | 
|---|
 | 1697 |       <section>
 | 
|---|
 | 1698 |         <title>Sessions</title>
 | 
|---|
 | 1699 | 
 | 
|---|
 | 1700 |         <para>A session refers to the queue of actions you have executed.
 | 
|---|
 | 1701 |         Together with the initial configuration (and all files required for
 | 
|---|
 | 1702 |         actions in the queue) this might be seen as a clever way of storing
 | 
|---|
 | 1703 |         the state of a molecular system. When proceeding in a try&error
 | 
|---|
 | 1704 |         fashion to construct a certain system, it is a good idea, to store the
 | 
|---|
 | 1705 |         session at the point where your attempts start to deviate from one
 | 
|---|
 | 1706 |         another.</para>
 | 
|---|
 | 1707 |       </section>
 | 
|---|
 | 1708 | 
 | 
|---|
 | 1709 |       <section>
 | 
|---|
 | 1710 |         <title>Storing a session</title>
 | 
|---|
 | 1711 | 
 | 
|---|
 | 1712 |         <para>Storing sessions is simple,</para>
 | 
|---|
 | 1713 | 
 | 
|---|
 | 1714 |         <programlisting>
 | 
|---|
 | 1715 |                 ... --store-session "session.py" \
 | 
|---|
 | 1716 |                     --session-type python
 | 
|---|
 | 1717 |         </programlisting>
 | 
|---|
 | 1718 | 
 | 
|---|
 | 1719 |         <para>Here, the session type is given as python (the other option is
 | 
|---|
 | 1720 |         cli for in the manner of the command-line interface) and the written
 | 
|---|
 | 1721 |         python script <filename>session.py</filename> can even be used with
 | 
|---|
 | 1722 |         the python interface described below, i.e. it is a full python script
 | 
|---|
 | 1723 |         (that however requires the so-called pyMoleCuilder module).</para>
 | 
|---|
 | 1724 |       </section>
 | 
|---|
 | 1725 | 
 | 
|---|
 | 1726 |       <section>
 | 
|---|
 | 1727 |         <title>Loading a session</title>
 | 
|---|
 | 1728 | 
 | 
|---|
 | 1729 |         <para>Loading a session only works for python scripts. This actually
 | 
|---|
 | 1730 |         blurs the line between the command-line interface and the python
 | 
|---|
 | 1731 |         interface a bit. But even more, MoleCuilder automatically executes a
 | 
|---|
 | 1732 |         script called <filename>molecuilder.py</filename> if such a file is
 | 
|---|
 | 1733 |         contained in the current directory.</para>
 | 
|---|
 | 1734 | 
 | 
|---|
 | 1735 |         <programlisting>... --load-session "session.py"</programlisting>
 | 
|---|
 | 1736 | 
 | 
|---|
 | 1737 |         <para>This will execute every action with its options contained in the
 | 
|---|
 | 1738 |         script <filename>session.py</filename>.</para>
 | 
|---|
 | 1739 |       </section>
 | 
|---|
 | 1740 |     </section>
 | 
|---|
 | 1741 | 
 | 
|---|
 | 1742 |     <section>
 | 
|---|
 | 1743 |       <title>Text menu</title>
 | 
|---|
 | 1744 | 
 | 
|---|
 | 1745 |       <para>We now discuss how to use the text menu interface.</para>
 | 
|---|
 | 1746 | 
 | 
|---|
 | 1747 |       <para>The text menu is very much the interface counterpart to the
 | 
|---|
 | 1748 |       command-line interface. Both work in a terminal session.</para>
 | 
|---|
 | 1749 | 
 | 
|---|
 | 1750 |       <para>In the text menu, actions can be selected from hierarchical lists.
 | 
|---|
 | 1751 |       Note that the menus for the graphical interface are organized in the
 | 
|---|
 | 1752 |       exactly same way. After an action has been chosen, the option values
 | 
|---|
 | 1753 |       have to be entered one after the other. After the last option value has
 | 
|---|
 | 1754 |       been given, the action is executed and the result printed to the
 | 
|---|
 | 1755 |       screen.</para>
 | 
|---|
 | 1756 | 
 | 
|---|
 | 1757 |       <para>With regards to the other functionality, it is very much the same
 | 
|---|
 | 1758 |       as the command-line interface above.</para>
 | 
|---|
 | 1759 |     </section>
 | 
|---|
 | 1760 | 
 | 
|---|
 | 1761 |     <section>
 | 
|---|
 | 1762 |       <title linkend="GUI">Graphical user interface</title>
 | 
|---|
 | 1763 | 
 | 
|---|
 | 1764 |       <para>The main point of the GUI is that it renders the atoms and
 | 
|---|
 | 1765 |       molecules visually. These are represented by the common
 | 
|---|
 | 1766 |       stick-and-ball-model. Single or multiple atoms and molecules can easily
 | 
|---|
 | 1767 |       be accessed, activated and manipulated via tables. Changes made in the
 | 
|---|
 | 1768 |       tables cause immediate update of the visual representation. Under the
 | 
|---|
 | 1769 |       hood each of these manipulations is nothing but the call to an action,
 | 
|---|
 | 1770 |       hence is fully undo- and redoable.</para>
 | 
|---|
 | 1771 | 
 | 
|---|
 | 1772 |       <para>This is mostly helpful to design more advanced structures that are
 | 
|---|
 | 1773 |       conceptually difficult to imagine without visual aid. At the end, a
 | 
|---|
 | 1774 |       session may be stored and this script can then be used to construct
 | 
|---|
 | 1775 |       various derived or slightly modified structures.</para>
 | 
|---|
 | 1776 | 
 | 
|---|
 | 1777 |       <section>
 | 
|---|
 | 1778 |         <title>Basic view</title>
 | 
|---|
 | 1779 | 
 | 
|---|
 | 1780 |         <para>Let us first give an impression of the basic view of the gui
 | 
|---|
 | 1781 |         after a molecule has been loaded.</para>
 | 
|---|
 | 1782 | 
 | 
|---|
 | 1783 |         <figure>
 | 
|---|
 | 1784 |           <title>Screenshot of the basic view of the GUI after loading a file
 | 
|---|
 | 1785 |           with eight water molecules.</title>
 | 
|---|
 | 1786 | 
 | 
|---|
 | 1787 |           <mediaobject>
 | 
|---|
 | 1788 |             <imageobject>
 | 
|---|
 | 1789 |               <imagedata entityref="example_basic_view" scalefit="1" width="100%"/>
 | 
|---|
 | 1790 |             </imageobject>
 | 
|---|
 | 1791 |           </mediaobject>
 | 
|---|
 | 1792 |         </figure>
 | 
|---|
 | 1793 | 
 | 
|---|
 | 1794 |         <section>
 | 
|---|
 | 1795 |           <title>3D view</title>
 | 
|---|
 | 1796 | 
 | 
|---|
 | 1797 |           <para>In the above figure, you see the stick-and-ball representation
 | 
|---|
 | 1798 |           of the water molecules, the dreibein giving the positive axis
 | 
|---|
 | 1799 |           direction and the cuboidal domain on a black background.</para>
 | 
|---|
 | 1800 |         </section>
 | 
|---|
 | 1801 | 
 | 
|---|
 | 1802 |         <section>
 | 
|---|
 | 1803 |           <title>Information Tabs</title>
 | 
|---|
 | 1804 | 
 | 
|---|
 | 1805 |           <para>Beneath this 3D view that you can rotate at will your mouse
 | 
|---|
 | 1806 |           and zoom in and out with your scroll wheel, you find to the right a
 | 
|---|
 | 1807 |           part containing two tabs named Atom and Molecule. Look at where the
 | 
|---|
 | 1808 |           mouse pointer is. It has colored the atom underneath in cyan
 | 
|---|
 | 1809 |           (although it's also an oxygen atom and should bne coloured in rose
 | 
|---|
 | 1810 |           as the rest). You can inspect its properties in the tab Atom: Name,
 | 
|---|
 | 1811 |           element, mass, charge, position and number of bonds. If you switch
 | 
|---|
 | 1812 |           to the Molecule tab, you would see the properties of the water
 | 
|---|
 | 1813 |           molecule this specific atom belongs to.</para>
 | 
|---|
 | 1814 |         </section>
 | 
|---|
 | 1815 | 
 | 
|---|
 | 1816 |         <section>
 | 
|---|
 | 1817 |           <title>Shape section</title>
 | 
|---|
 | 1818 | 
 | 
|---|
 | 1819 |           <para>Beneath these information tabs you find the shape sections.
 | 
|---|
 | 1820 |           There you find a list of all currently created shapes and you can
 | 
|---|
 | 1821 |           manipulate them via the buttons beneath this list.</para>
 | 
|---|
 | 1822 |         </section>
 | 
|---|
 | 1823 | 
 | 
|---|
 | 1824 |         <section>
 | 
|---|
 | 1825 |           <title>Timeline</title>
 | 
|---|
 | 1826 | 
 | 
|---|
 | 1827 |           <para>Directly below the 3D view there is a long slider. If a loaded
 | 
|---|
 | 1828 |           file has multiple time step entries, this slider allows you to
 | 
|---|
 | 1829 |           smoothly select one time frame after another. Sliding it with the
 | 
|---|
 | 1830 |           mouse from left to right will reveal the animation that is hidden
 | 
|---|
 | 1831 |           behind the distinct snapshots stored in the configuration
 | 
|---|
 | 1832 |           file.</para>
 | 
|---|
 | 1833 |         </section>
 | 
|---|
 | 1834 | 
 | 
|---|
 | 1835 |         <section>
 | 
|---|
 | 1836 |           <title>Selection tables</title>
 | 
|---|
 | 1837 | 
 | 
|---|
 | 1838 |           <para>Underneath the time line there is another place for
 | 
|---|
 | 1839 |           tabs.</para>
 | 
|---|
 | 1840 | 
 | 
|---|
 | 1841 |           <para>The first is on molecules, listing all present molecules of
 | 
|---|
 | 1842 |           the molecular system in a list view. If you click on a specific
 | 
|---|
 | 1843 |           molecule, the one will get selected or unselected depending on its
 | 
|---|
 | 1844 |           current selection state (see below for details on this with respect
 | 
|---|
 | 1845 |           to the GUI).</para>
 | 
|---|
 | 1846 | 
 | 
|---|
 | 1847 |           <para>The next tab enumerates all elements known to MoleCuilder
 | 
|---|
 | 1848 |           where the ones are greyed out that are not present in the molecular
 | 
|---|
 | 1849 |           system. Clicking on a present element will select all atoms of this
 | 
|---|
 | 1850 |           specific element. A subsequent click unselects again.</para>
 | 
|---|
 | 1851 | 
 | 
|---|
 | 1852 |           <para>Subsequent follow tabs on enumerating the fragments and their
 | 
|---|
 | 1853 |           fragment energies if calculated and the homologies along with
 | 
|---|
 | 1854 |           graphical depiction (via QWT) if present.</para>
 | 
|---|
 | 1855 |         </section>
 | 
|---|
 | 1856 |       </section>
 | 
|---|
 | 1857 | 
 | 
|---|
 | 1858 |       <section>
 | 
|---|
 | 1859 |         <title>Selections</title>
 | 
|---|
 | 1860 | 
 | 
|---|
 | 1861 |         <para>Selections work generally always by selecting the respective
 | 
|---|
 | 1862 |         action from the pull-down menu.</para>
 | 
|---|
 | 1863 | 
 | 
|---|
 | 1864 |         <para>However, it may also be accessed directly. The row of icons
 | 
|---|
 | 1865 |         above the 3D view has two icons depicting the selection of individual
 | 
|---|
 | 1866 |         atoms or molecules. If either of them is selected, clicking with the
 | 
|---|
 | 1867 |         left mouse button on an atom will either (un)select the atom or its
 | 
|---|
 | 1868 |         associated molecule. Multiple atoms can be selected in this
 | 
|---|
 | 1869 |         manner.</para>
 | 
|---|
 | 1870 | 
 | 
|---|
 | 1871 |         <para>Also the selection tabs may be used by clicking on the name of a
 | 
|---|
 | 1872 |         molecule as stated above or at an element.</para>
 | 
|---|
 | 1873 | 
 | 
|---|
 | 1874 |         <para>Similarly, if shapes are present in the shape section, clicking
 | 
|---|
 | 1875 |         them with select them and also cause a translucent visualization to
 | 
|---|
 | 1876 |         appear in the 3D view. Note that this visualization is quite costly
 | 
|---|
 | 1877 |         right now and not suited to complex shapes.</para>
 | 
|---|
 | 1878 |       </section>
 | 
|---|
 | 1879 | 
 | 
|---|
 | 1880 |       <section>
 | 
|---|
 | 1881 |         <title>Dialogs</title>
 | 
|---|
 | 1882 | 
 | 
|---|
 | 1883 |         <para>Most essential, however, to the GUI are the dialogs. Each action
 | 
|---|
 | 1884 |         calls forth such a dialog even if no options are required (the
 | 
|---|
 | 1885 |         execution of the action has at least to be confirmed). Each dialog
 | 
|---|
 | 1886 |         consisting of queries for a particular option value. As each option
 | 
|---|
 | 1887 |         value has a specific type, we briefly go into the details of how these
 | 
|---|
 | 1888 |         queries look like.</para>
 | 
|---|
 | 1889 | 
 | 
|---|
 | 1890 |         <note>
 | 
|---|
 | 1891 |           <para>Each dialog's Ok is greyed out until all entered option values
 | 
|---|
 | 1892 |           are valid.</para>
 | 
|---|
 | 1893 |         </note>
 | 
|---|
 | 1894 | 
 | 
|---|
 | 1895 |         <section>
 | 
|---|
 | 1896 |           <title>Domain query</title>
 | 
|---|
 | 1897 | 
 | 
|---|
 | 1898 |           <figure>
 | 
|---|
 | 1899 |             <title>Screenshot of a dialog showing a domain query</title>
 | 
|---|
 | 1900 | 
 | 
|---|
 | 1901 |             <mediaobject>
 | 
|---|
 | 1902 |               <imageobject>
 | 
|---|
 | 1903 |                 <imagedata entityref="dialog_box" scalefit="1" width="100%"/>
 | 
|---|
 | 1904 |               </imageobject>
 | 
|---|
 | 1905 |             </mediaobject>
 | 
|---|
 | 1906 | 
 | 
|---|
 | 1907 |             <para>In the domain query a 3x3 symmetric matrix has to be
 | 
|---|
 | 1908 |             entered. In the above screenshots you notice that the only
 | 
|---|
 | 1909 |             non-zero entries are on the main diagonal. Here, we have simply
 | 
|---|
 | 1910 |             specified a cube of edge length 8. The ok button will be greyed
 | 
|---|
 | 1911 |             out if the matrix is either singular or not symmetric.</para>
 | 
|---|
 | 1912 |           </figure>
 | 
|---|
 | 1913 |         </section>
 | 
|---|
 | 1914 | 
 | 
|---|
 | 1915 |         <section>
 | 
|---|
 | 1916 |           <title>Element query</title>
 | 
|---|
 | 1917 | 
 | 
|---|
 | 1918 |           <figure>
 | 
|---|
 | 1919 |             <title>Screenshot the add atom action containing an element
 | 
|---|
 | 1920 |             query</title>
 | 
|---|
 | 1921 | 
 | 
|---|
 | 1922 |             <mediaobject>
 | 
|---|
 | 1923 |               <imageobject>
 | 
|---|
 | 1924 |                 <imagedata entityref="dialog_add-atom_tooltip" scalefit="1" width="100%"/>
 | 
|---|
 | 1925 |               </imageobject>
 | 
|---|
 | 1926 |             </mediaobject>
 | 
|---|
 | 1927 | 
 | 
|---|
 | 1928 |             <para>Elements are picked from a pull-down box where all known
 | 
|---|
 | 1929 |             elements are listed.</para>
 | 
|---|
 | 1930 | 
 | 
|---|
 | 1931 |             <para>In this dialog you also notice that a tooltip is given,
 | 
|---|
 | 1932 |             briefly explaining what the action does.</para>
 | 
|---|
 | 1933 |           </figure>
 | 
|---|
 | 1934 |         </section>
 | 
|---|
 | 1935 | 
 | 
|---|
 | 1936 |         <section>
 | 
|---|
 | 1937 |           <title>Complex query</title>
 | 
|---|
 | 1938 | 
 | 
|---|
 | 1939 |           <figure>
 | 
|---|
 | 1940 |             <title>Screenshot of a complex dialog consisting of multiple
 | 
|---|
 | 1941 |             queries</title>
 | 
|---|
 | 1942 | 
 | 
|---|
 | 1943 |             <mediaobject>
 | 
|---|
 | 1944 |               <imageobject>
 | 
|---|
 | 1945 |                 <imagedata entityref="dialog_complex" scalefit="1" width="100%"/>
 | 
|---|
 | 1946 |               </imageobject>
 | 
|---|
 | 1947 |             </mediaobject>
 | 
|---|
 | 1948 | 
 | 
|---|
 | 1949 |             <para>Here we show a more complex dialog. It queries for strings,
 | 
|---|
 | 1950 |             for integer values (see the increase/decrease arrows), for
 | 
|---|
 | 1951 |             booleans and for files (the "choose" buttons opens a file
 | 
|---|
 | 1952 |             dialog).</para>
 | 
|---|
 | 1953 |           </figure>
 | 
|---|
 | 1954 |         </section>
 | 
|---|
 | 1955 | 
 | 
|---|
 | 1956 |         <section>
 | 
|---|
 | 1957 |           <title>Exit query</title>
 | 
|---|
 | 1958 | 
 | 
|---|
 | 1959 |           <figure>
 | 
|---|
 | 1960 |             <title>Screenshort showing the exit dialog</title>
 | 
|---|
 | 1961 | 
 | 
|---|
 | 1962 |             <mediaobject>
 | 
|---|
 | 1963 |               <imageobject>
 | 
|---|
 | 1964 |                 <imagedata entityref="dialog_exit" scalefit="1" width="100%"/>
 | 
|---|
 | 1965 |               </imageobject>
 | 
|---|
 | 1966 |             </mediaobject>
 | 
|---|
 | 1967 | 
 | 
|---|
 | 1968 |             <para>Finally, we show the dialog that will pop up when exiting
 | 
|---|
 | 1969 |             the graphical interface. It will ask whether it should store the
 | 
|---|
 | 1970 |             current state of the system in the input file or not. You may
 | 
|---|
 | 1971 |             cancel the exit, close without saving or save the current
 | 
|---|
 | 1972 |             state.</para>
 | 
|---|
 | 1973 |           </figure>
 | 
|---|
 | 1974 |         </section>
 | 
|---|
 | 1975 |       </section>
 | 
|---|
 | 1976 |     </section>
 | 
|---|
 | 1977 | 
 | 
|---|
 | 1978 |     <section>
 | 
|---|
 | 1979 |       <title>Python interface</title>
 | 
|---|
 | 1980 | 
 | 
|---|
 | 1981 |       <para>Last but not least we elaborate on the python interface. We have
 | 
|---|
 | 1982 |       already discusses this interface to some extent. The current session,
 | 
|---|
 | 1983 |       i.e. the queue of actions you have executed, can be stored as a python
 | 
|---|
 | 1984 |       script and subsequently executed independently of the user interface it
 | 
|---|
 | 1985 |       was created with. More general, MoleCuilder can execute arbitrary python
 | 
|---|
 | 1986 |       scripts where prior to its execution a specific module is loaded by
 | 
|---|
 | 1987 |       default enabling access to MoleCuilder's actions from inside the
 | 
|---|
 | 1988 |       script.</para>
 | 
|---|
 | 1989 | 
 | 
|---|
 | 1990 |       <para>MoleCuilder's python module is called pyMoleCuilder. it is
 | 
|---|
 | 1991 |       essentially a library that can be imported into python just as any other
 | 
|---|
 | 1992 |       module. Let us assume you have started the python interpreter and you
 | 
|---|
 | 1993 |       have added the destination of the <filename>pyMoleCuilder</filename>
 | 
|---|
 | 1994 |       library to the <varname>PYTHONPATH</varname> variable.</para>
 | 
|---|
 | 1995 | 
 | 
|---|
 | 1996 |       <programlisting>import pyMoleCuilder as mol</programlisting>
 | 
|---|
 | 1997 | 
 | 
|---|
 | 1998 |       <para>Subsequently, you can access the help via</para>
 | 
|---|
 | 1999 | 
 | 
|---|
 | 2000 |       <programlisting>help(mol)</programlisting>
 | 
|---|
 | 2001 | 
 | 
|---|
 | 2002 |       <para>This will list all of MoleCuilder's actions with their function
 | 
|---|
 | 2003 |       signatures within python as contained in the module pyMoleCuilder named
 | 
|---|
 | 2004 |       as mol in the scope of the currently running interpreter. Note that the
 | 
|---|
 | 2005 |       function names are not the names you know from the command-line
 | 
|---|
 | 2006 |       interface, they might be called
 | 
|---|
 | 2007 |       <computeroutput>WorldChangeBox(...)</computeroutput> or alike.</para>
 | 
|---|
 | 2008 | 
 | 
|---|
 | 2009 |       <para>Let's try it out.</para>
 | 
|---|
 | 2010 | 
 | 
|---|
 | 2011 |       <programlisting>print mol.CommandVersion()</programlisting>
 | 
|---|
 | 2012 | 
 | 
|---|
 | 2013 |       <para>This will state the current version of the library.</para>
 | 
|---|
 | 2014 | 
 | 
|---|
 | 2015 |       <para>Go ahead and try out other commands. Refer to the documentation
 | 
|---|
 | 2016 |       under the command-line interface and look up the function name via
 | 
|---|
 | 2017 |       help.</para>
 | 
|---|
 | 2018 |     </section>
 | 
|---|
 | 2019 |   </chapter>
 | 
|---|
 | 2020 | 
 | 
|---|
 | 2021 |   <chapter>
 | 
|---|
 | 2022 |     <title>Conclusions</title>
 | 
|---|
 | 2023 | 
 | 
|---|
 | 2024 |     <para>This ends this user guide.</para>
 | 
|---|
 | 2025 | 
 | 
|---|
 | 2026 |     <para>We have given you a brief introduction to the aim of the program and
 | 
|---|
 | 2027 |     how each of the four interfaces are to be used. The rest is up to
 | 
|---|
 | 2028 |     you.</para>
 | 
|---|
 | 2029 | 
 | 
|---|
 | 2030 |     <para>Tutorials and more information is available online, see <link
 | 
|---|
 | 2031 |     xlink:href="???">http://www.molecuilder.com/</link>.</para>
 | 
|---|
 | 2032 | 
 | 
|---|
 | 2033 |     <para>Be aware that in general knowing how the code works allows you to
 | 
|---|
 | 2034 |     understand what's going wrong if something's going wrong.</para>
 | 
|---|
 | 2035 | 
 | 
|---|
 | 2036 |     <section>
 | 
|---|
 | 2037 |       <title>Thanks</title>
 | 
|---|
 | 2038 | 
 | 
|---|
 | 2039 |       <para>Huge thanks go out to Saskia Metzler who was patient enough to let
 | 
|---|
 | 2040 |       me sit next to her while riding ten hours in a bus to Berlin.</para>
 | 
|---|
 | 2041 |     </section>
 | 
|---|
 | 2042 |   </chapter>
 | 
|---|
 | 2043 | </book>
 | 
|---|