source: doc/userguide/userguide.xml@ f73e06

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Added_ParseSaveFragmentResults AddingActions_SaveParseParticleParameters Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_ParticleName_to_Atom Adding_StructOpt_integration_tests AtomFragments Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.5.4 Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator CombiningParticlePotentialParsing Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_BoundInBox_CenterInBox_MoleculeActions Fix_ChargeSampling_PBC Fix_ChronosMutex Fix_FitPartialCharges Fix_FitPotential_needs_atomicnumbers Fix_ForceAnnealing Fix_IndependentFragmentGrids Fix_ParseParticles Fix_ParseParticles_split_forward_backward_Actions Fix_PopActions Fix_QtFragmentList_sorted_selection Fix_Restrictedkeyset_FragmentMolecule Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns Fix_fitting_potentials Fixes ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion FragmentAction_writes_AtomFragments FragmentMolecule_checks_bonddegrees GeometryObjects Gui_Fixes Gui_displays_atomic_force_velocity ImplicitCharges IndependentFragmentGrids IndependentFragmentGrids_IndividualZeroInstances IndependentFragmentGrids_IntegrationTest IndependentFragmentGrids_Sole_NN_Calculation JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix MoreRobust_FragmentAutomation ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PdbParser_setsAtomName PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks Rewrite_FitPartialCharges RotateToPrincipalAxisSystem_UndoRedo SaturateAtoms_findBestMatching SaturateAtoms_singleDegree StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg Switchable_LogView ThirdParty_MPQC_rebuilt_buildsystem TrajectoryDependenant_MaxOrder TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps TremoloParser_setsAtomName Ubuntu_1604_changes stable
Last change on this file since f73e06 was f73e06, checked in by Frederik Heber <heber@…>, 10 years ago

DOCU: Added all missing Actions to userguide.

  • Property mode set to 100644
File size: 109.9 KB
Line 
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&amp;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&amp;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>Output the current molecular system</title>
491
492 <para>This will store the current World, i.e. all its atoms, to a
493 given file, where the output format is determined from the file
494 suffix.</para>
495
496 <programlisting>... --output-as world.xyz</programlisting>
497 </section>
498
499 <section>
500 <title>Output the current molecular system</title>
501
502 <para>This will store all atoms contained in the currently selected
503 molecules to file. This is different to "store-saturated-fragment"
504 as it will not saturate dangling bonds because only whole molecules,
505 i.e. whose bond graph is connected, will be stored.</para>
506
507 <programlisting>... --save-selected-molecules waters.pdb
508 </programlisting>
509 </section>
510
511 <section>
512 <title>Load extra bond information</title>
513
514 <para>For some parsers bond information is stored not with the atoms
515 coordinates but in an extra file. This action parses such a file.</para>
516
517 <programlisting>... --bond-file water.dbond
518 </programlisting>
519 </section>
520 </section>
521
522 <section>
523 <title>Selections and unselections</title>
524
525 <para>In order to tell MoleCuilder on what subset of atoms a specific
526 Action is to be performed, there are <emphasis>selection
527 actions</emphasis>. Note that a selection per se does not change
528 anything in the state of the molecular system in any way.</para>
529
530 <para>Selections either work on atoms, on molecules, or on shapes
531 (this we explain lateron). A given selection is maintained from the
532 execution of the selection action to the end of program or until
533 modified by another selection applied on the same type (atom,
534 molecule, shape).</para>
535
536 <para>We only give a brief list on the kind of selections per type,
537 each action is executed either as follows, exemplified by selecting
538 all atoms.</para>
539
540 <programlisting>.... --select-all-atoms</programlisting>
541
542 <para>or, exemplified by unselecting the last molecule,</para>
543
544 <programlisting>... --unselect-molecule-by-order -1</programlisting>
545
546 <itemizedlist>
547 <listitem>
548 <para>Atoms</para>
549
550 <itemizedlist>
551 <listitem>
552 <para>All</para>
553 <programlisting>
554 ... --select-all-atoms
555 </programlisting>
556 </listitem>
557
558 <listitem>
559 <para>None</para>
560 <programlisting>
561 ... --unselect-all-atoms
562 </programlisting>
563 <programlisting>
564 ... --clear-atom-selection
565 </programlisting>
566 </listitem>
567
568 <listitem>
569 <para>Invert selection</para>
570 <programlisting>
571 ... --invert-atoms
572 </programlisting>
573 </listitem>
574
575 <listitem>
576 <para>By Element (all hydrogen atoms, all sulphur atoms,
577 ...)</para>
578 <programlisting>
579 ... --select-atom-by-element 1
580 </programlisting>
581 <programlisting>
582 ... --unselect-atom-by-element 1
583 </programlisting>
584 </listitem>
585
586 <listitem>
587 <para>By Id (atom with id 76)</para>
588 <programlisting>
589 ... --select-atom-by-id 76
590 </programlisting>
591 <programlisting>
592 ... --unselect-atom-by-id 76
593 </programlisting>
594 </listitem>
595
596 <listitem>
597 <para>By Order (the first (1), the second, ... the last
598 created(-1), the last but one)</para>
599 <programlisting>
600 ... --select-atom-by-order 1
601 </programlisting>
602 <programlisting>
603 ... --unselect-atom-by-order -2
604 </programlisting>
605 </listitem>
606
607 <listitem>
608 <para>By Shape (specific region of the domain)</para>
609 <programlisting>
610 ... --select-atom-inside-volume
611 </programlisting>
612 <programlisting>
613 ... --unselect-atoms-inside-volume
614 </programlisting>
615 </listitem>
616
617 <listitem>
618 <para>By Molecule (all atoms belonging to currently selected
619 molecules)</para>
620 <programlisting>
621 ... --select-molecules-atoms
622 </programlisting>
623 <programlisting>
624 ... --unselect-molecules-atoms
625 </programlisting>
626 </listitem>
627 </itemizedlist>
628 </listitem>
629
630 <listitem>
631 <para>Molecules</para>
632
633 <itemizedlist>
634 <listitem>
635 <para>All</para>
636 <programlisting>
637 ... --select-all-molecules
638 </programlisting>
639 </listitem>
640
641 <listitem>
642 <para>None</para>
643 <programlisting>
644 ... --unselect-all-molecules
645 </programlisting>
646 <programlisting>
647 ... --clear-molecule-selection
648 </programlisting>
649 </listitem>
650
651 <listitem>
652 <para>Invert selection</para>
653 <programlisting>
654 ... --invert-molecules
655 </programlisting>
656 </listitem>
657
658 <listitem>
659 <para>By Id (molecule with id 4)</para>
660 <programlisting>
661 ... --select-molecule-by-id 2
662 </programlisting>
663 <programlisting>
664 ... --unselect-molecule-by-id 2
665 </programlisting>
666 </listitem>
667
668 <listitem>
669 <para>By Order (first created molecule, second created
670 molecule, ...)</para>
671 <programlisting>
672 ... --select-molecule-by-order 2
673 </programlisting>
674 <programlisting>
675 ... --unselect-molecule-by-order -2
676 </programlisting>
677 </listitem>
678
679 <listitem>
680 <para>By Formula (molecule with H2O as formula)</para>
681 <programlisting>
682 ... --select-molecules-by-formula "H2O"
683 </programlisting>
684 <programlisting>
685 ... --unselect-molecules-by-formula "H2O"
686 </programlisting>
687 </listitem>
688
689 <listitem>
690 <para>By Name (molecule named "water4")</para>
691 <programlisting>
692 ... --select-molecules-by-name "water4"
693 </programlisting>
694 <programlisting>
695 ... --unselect-molecules-by-name "water4"
696 </programlisting>
697 </listitem>
698
699 <listitem>
700 <para>By Atom (all molecules for which at least one atom is
701 currently selected)</para>
702 <programlisting>
703 ... --select-atoms-molecules
704 </programlisting>
705 <programlisting>
706 ... --unselect-atoms-molecules
707 </programlisting>
708 </listitem>
709 </itemizedlist>
710 </listitem>
711
712 <listitem>
713 <para>Shapes</para>
714
715 <itemizedlist>
716 <listitem>
717 <para>All</para>
718 <programlisting>
719 ... --select-all-shapes
720 </programlisting>
721 </listitem>
722
723 <listitem>
724 <para>None</para>
725 <programlisting>
726 ... --unselect-all-shapes
727 </programlisting>
728 </listitem>
729
730 <listitem>
731 <para>By Name (shape name "sphere1")</para>
732 <programlisting>
733 ... --select-shape-by-name "sphere1"
734 </programlisting>
735 <programlisting>
736 ... --unselect-shape-by-name "sphere1"
737 </programlisting>
738 </listitem>
739 </itemizedlist>
740 </listitem>
741
742 </itemizedlist>
743
744 <remark>Note that an unselected instance (e.g. an atom) remains
745 unselected upon further unselection and vice versa with
746 selection.</remark>
747
748 <para>These above selections work then in conjunction with other
749 actions and make them very powerful, e.g. you can remove all atoms
750 inside a sphere by a selecting the spherical shape and subsequently
751 selecting all atoms inside the shape and then removing them.</para>
752 </section>
753
754 <section>
755 <title>Shapes</title>
756
757 <para>Shapes are specific regions of the domain. There are just a few
758 so-called <emphasis>primitive</emphasis> shapes such as cuboid,
759 sphere, cylinder, the whole domain, none of it. However, these can be
760 combined via boolean operations such as and, or, and not. This
761 approach is called <emphasis>constructive geometry</emphasis>. E.g. by
762 combining a sphere with the negated (not) of a smaller sphere, we
763 obtain a spherical surface of specific thickness.</para>
764
765 <section>
766 <title>Creating shapes</title>
767
768 <para>Primitive shapes can be created as follows,</para>
769
770 <programlisting>
771 ... --create-shape \
772 --shape-type sphere \
773 --shape-name "sphere1" \
774 --stretch "2,2,2" \
775 --translation "5,5,5"
776 </programlisting>
777
778 <para>This will create a sphere of radius 2 (initial radius is 1)
779 with name "sphere1" that is centered at (5,5,5). Other primitives at
780 cuboid and cylinder, where a rotation can be specified as
781 follows.</para>
782
783 <programlisting>
784 ... --create-shape \
785 --shape-type cuboid \
786 --shape-name "box" \
787 --stretch "1,2,2" \
788 --translation "5,5,5" \
789 --angle-x "90"
790 </programlisting>
791 </section>
792
793 <section>
794 <title>Combining shapes</title>
795
796 <para>Any two shapes can be combined by boolean operations as follows</para>
797
798 <programlisting>
799 ... --combine-shapes \
800 --shape-name "combinedshape" \
801 --shape-op "AND" \
802 </programlisting>
803
804 <para>This will combine two currently selected shapes vis the "AND" operation
805 and create a new shape called "combinedshape". Note that the two old shapes
806 are still present after this operation. We briefly explain each operation:
807 </para>
808 <itemizedlist>
809 <listitem>
810 <para><emphasis>AND</emphasis> combines two currently selected shapes
811 into a new shape that only consists of the volume where shapes overlap.</para>
812 </listitem>
813 <listitem>
814 <para><emphasis>OR</emphasis> combines two currently selected shapes
815 into a new shape that consists of all the volume where that either shape
816 occupies.</para>
817 </listitem>
818 <listitem>
819 <para><emphasis>NOT</emphasis> creates the inverse to a currently selected
820 single shape that contains the volume with respect to the simulation domain
821 that the present one does not.</para>
822 </listitem>
823 </itemizedlist>
824 </section>
825
826 <section>
827 <title>Removing shapes</title>
828
829 <para>Removing a shape is as simple as removing an atom.</para>
830
831 <programlisting>... --remove-shape </programlisting>
832
833 <para>This removes the currently selected shapes.</para>
834 </section>
835
836 <section>
837 <title>Manipulating shapes</title>
838
839 <para>Shapes can be stretched, scaled, rotated, and translated to
840 modify primitives or combined primitive shapes. As you have seen
841 this manipulation could have occurred already at creation but also
842 later on. We just the list examples of the various manipulations
843 below, each works on the currently selected shapes.</para>
844
845 <programlisting>
846 ... --stretch-shapes "1,1,2" \
847 --stretch-center "5,5,5"
848 </programlisting>
849
850 <para>This stretches the shapes relative to the center at (5,5,5)
851 (default is origin) by a factor of 2 in the z direction.</para>
852
853 <programlisting>
854 ... --rotate-shapes \
855 --center "10,2,2" \
856 --angle-x 90 \
857 --angle-y 0 \
858 --angle-z 0
859 </programlisting>
860
861 <para>This way all selected shapes are rotated by 90 degrees around
862 the x axis with respect to the center at (10,2,2).</para>
863
864 <programlisting>... --translate-shapes "5,0,0" </programlisting>
865
866 <para>This translates all selected shapes by 5 along the x
867 axis.</para>
868 </section>
869 </section>
870
871 <section>
872 <title>Randomization</title>
873
874 <para>Some operations require randomness as input, e.g. when filling a
875 domain with molecules these may be randomly translated and rotated.
876 Random values are obtained by a random number generator that consists
877 of two parts: engine and distribution. The engine yields a uniform set
878 of random numbers in a specific interval, the distribution modifies
879 them, e.g. to become gaussian.</para>
880
881 <para>There are several Actions to modify the specific engine and
882 distribution and their parameters. One example usage is that with the
883 aforementioned filling of the domain molecules are rotated randomly.
884 If you specify a random number generator that randomly just spills out
885 values 0,1,2,3, then the randomness is just the orientation of the
886 molecule with respect to a specific axis: x,y,z. (rotation is at most
887 360 degrees and 0,1,2,3 act as divisor, hence rotation angle is always
888 a multiple of 90 degrees).</para>
889
890 <programlisting>
891 ... --set-random-number-distribution "uniform_int" \
892 --random-number-distribution-parameters "p=1"
893 </programlisting>
894
895 <para>This changes the distribution to "uniform_int", i.e. integer
896 numbers distributed uniformly.</para>
897
898 <programlisting>
899 ... --set-random-number-engine "mt19937" \
900 --random-numner-engine-parameters "seed=10"
901 </programlisting>
902
903 <para>Specifying the seed allows you to obtain the same sequence of
904 random numbers for testing purposes.</para>
905 </section>
906
907 <section>
908 <title>Manipulate atoms</title>
909
910 <para>Here, we explain in detail how to add, remove atoms, change its
911 element type, scale the bond in between or measure the bond length or
912 angle.</para>
913
914 <section>
915 <title>Adding atoms</title>
916
917 <para>Adding an atom to the domain requires the element of the atom
918 and its coordinates as follows,</para>
919
920 <programlisting>
921 ... --add-atom O \
922 --domain-position "2.,3.,2.35"
923 </programlisting>
924
925 <para>where the element is given via its chemical symbol and the
926 vector gives the position within the domain</para>
927 </section>
928
929 <section>
930 <title>Removing atoms</title>
931
932 <para>Removing atom(s) does not need any option and operates on the
933 currently selected ones.</para>
934
935 <programlisting>... --remove-atom</programlisting>
936 </section>
937
938 <section>
939 <title>Translating atoms</title>
940
941 <para>In order to translate the current selected subset of atoms you
942 specify a translation vector.</para>
943
944 <programlisting>
945 ... --translate-atoms "-1,0,0" \
946 --periodic 0
947 </programlisting>
948
949 <para>This translate all atoms by "-1" along the x axis and does not
950 mind the boundary conditions, i.e. might shift atoms outside of the
951 domain.</para>
952 </section>
953
954 <section>
955 <title>Changing an atoms element</title>
956
957 <para>You can easily turn lead or silver into gold, by selecting the
958 silver atom and calling the change element action.</para>
959
960 <programlisting>... --change-element Au</programlisting>
961 </section>
962 </section>
963
964 <section>
965 <title>Bond-related manipulation</title>
966
967 <para>Atoms can also be manipulated with respect to the bonds.
968 <remark>Note that with bonds we always mean covalent bonds.</remark>
969 First, we explain how to modify the bond structure itself, then we go
970 in the details of using the bond information to change bond distance
971 and angles.</para>
972
973 <section>
974 <title>Creating a bond graph</title>
975
976 <para>In case you have loaded a configuration file with no bond
977 information, e.g. XYZ, it is necessary to create the bond graph.
978 This is done by a heuristic distance criterion.</para>
979
980 <programlisting>... --create-adjacency</programlisting>
981
982 <para>This uses by default a criterion based on van-der-Waals radii,
983 i.e. if we look at two atoms indexed by "a" and "b"</para>
984
985 <equation>
986 <title>V(a) + V(b) - \tau &lt; R_{ab} &lt; V(a) + V(b) +
987 \tau</title>
988
989 <m:math display="block">
990 <m:mi>where V(.) is the lookup table for the radii for a given
991 element and \tau is a threshold value, set to 0.4.</m:mi>
992 </m:math>
993 </equation>
994
995 <para>As a second option, you may load a file containing bond table
996 information.</para>
997
998 <programlisting>... --bond-table table.dat</programlisting>
999
1000 <para>which would parse a file <filename>table.dat</filename> for a
1001 table giving typical bond distances between elements a and b. These
1002 are used in the above criterion as <inlineequation>
1003 <m:math display="inline">
1004 <m:mi>V(a,b)</m:mi>
1005 </m:math>
1006 </inlineequation> in place of <inlineequation>
1007 <m:math display="inline">
1008 <m:mi>V(a)+V(b)</m:mi>
1009 </m:math>
1010 </inlineequation>.</para>
1011 </section>
1012
1013 <section>
1014 <title>Destroying the bond graph</title>
1015
1016 <para>The bond graph can be removed completely (and all bonds along
1017 with it).</para>
1018
1019 <programlisting>... --destroy-adjacency</programlisting>
1020 </section>
1021
1022 <section>
1023 <title>Correcting bond degrees</title>
1024
1025 <para>Typically, after loading an input file bond information, e.g.
1026 a PDB file, the bond graph is complete but we lack the weights. That
1027 is we do not know whether a bond is single, double, triple, ...
1028 This action corrects the bond degree by enforcing charge neutrality
1029 among the connected atoms.
1030 </para>
1031 <para>This action is in fact quadratically scaling in the number of
1032 atoms. Hence, for large systems this may take longer than expected.
1033 </para>
1034
1035 <programlisting>... --correct-bonddegree</programlisting>
1036 </section>
1037
1038 <section>
1039 <title>Analysing a bond graph</title>
1040
1041 <para>You can perform a depth-first search analysis that reveals
1042 cycles and other graph-related information.</para>
1043
1044 <programlisting>... --depth-first-search</programlisting>
1045 </section>
1046
1047 <section>
1048 <title>Dissecting the molecular system into molecules</title>
1049
1050 <para>The bond graph information can be used to recognize the
1051 molecule within the system. Imagine you have just loaded a PDB file
1052 containing bond information. However, initially all atoms are dumped
1053 into the same molecule. Before you can start manipulating, you need
1054 to dissect the system into individual molecules. Note that this is
1055 just structural information and does not change the state of the
1056 system.</para>
1057
1058 <programlisting>... --subgraph-dissection</programlisting>
1059
1060 <para>This analyses the bond graph and splits the single molecule up
1061 into individual (new) ones that each contain a single connected
1062 subgraph, hence the naming.</para>
1063 </section>
1064
1065 <section>
1066 <title>Updating molecule structure</title>
1067
1068 <para>When the bond information has changed, new molecules might
1069 have formed, this action updates all the molecules by scanning
1070 the connectedness of the bond grapf of the molecular system.
1071 </para>
1072
1073 <programlisting>... --update-molecules</programlisting>
1074 </section>
1075
1076 <section>
1077 <title>Adding a bond manually</title>
1078
1079 <para>When the automatically created adjacency or bond graph
1080 contains faulty bonds or lacks some, you can add them manually.
1081 First, you must have selected two atoms.</para>
1082
1083 <programlisting>... --add-bond</programlisting>
1084 </section>
1085
1086 <section>
1087 <title>Removing a bond manually</title>
1088
1089 <para>In much the same way as adding a bond, you can also remove a
1090 bond.</para>
1091
1092 <programlisting>... --remove-bond</programlisting>
1093 </section>
1094
1095 <section>
1096 <title>Saving bond information</title>
1097
1098 <para>Bond information can be saved to a file in <link
1099 xlink:href="http://www.molecuilder.com/"><programname>TREMOLO
1100 </programname></link>'s dbond style.</para>
1101
1102 <programlisting>... --save-bonds system.dbonds</programlisting>
1103
1104 <para>Similarly is the following Action which saves the bond
1105 information as a simple list of one atomic id per line and in
1106 the same line, separated by spaces, the ids of all atoms connected
1107 to it.</para>
1108
1109 <programlisting>... --save-adjacency system.adj</programlisting>
1110
1111 </section>
1112
1113 <section>
1114 <title>Stretching a bond</title>
1115
1116 <para>Stretching a bond actually refers to translation of the
1117 associated pair of atoms. However, this action will keep the rest of
1118 the molecule to which both atoms belong to invariant as well.</para>
1119
1120 <programlisting>... --stretch-bond 1.2</programlisting>
1121
1122 <para>This scales the original bond distance to the new bond
1123 distance 1.2, shifting the right hand side and the left hand side of
1124 the molecule accordingly.</para>
1125
1126 <warning>
1127 <para>this fails with aromatic rings (but you can always
1128 undo).</para>
1129 </warning>
1130 </section>
1131
1132 <section>
1133 <title>Changing a bond angle</title>
1134
1135 <para>In the same way as stretching a bond, you can change the angle
1136 in between two bonds. This works if exactly three atoms are selected
1137 and two pairs are bonded.</para>
1138
1139 <programlisting>... --change-bond-angle 90</programlisting>
1140
1141 <para>This will change the angle from its value to 90 degree by
1142 translating the two outer atoms of this triangle (the atom connected
1143 to both others is the axis of the rotation).</para>
1144 </section>
1145 </section>
1146
1147 <section>
1148 <title>Manipulate molecules</title>
1149
1150 <para>Molecules are agglomerations of atoms that are bonded. Hence,
1151 the actions working on molecules differ from those working on atoms.
1152 Joining two molecules can only be accomplished by adding a bond in
1153 between, and in the reverse fashion splitting a molecule by removing
1154 all bonds in between. Actions below mostly deal with copying
1155 molecules. Removing of molecules is done via selecting the molecule's
1156 atoms and removing them, which removes the atoms as well.</para>
1157
1158 <note>
1159 <para>Initially when you load a file via the input action all atoms
1160 are placed in a single molecule despite any present bond
1161 information, see <link linkend="???">Dissecting the molecular system
1162 into molecules</link></para>
1163 </note>
1164
1165 <section>
1166 <title>Copy molecules</title>
1167
1168 <para>A basic operation is to duplicate a molecule. This works on a
1169 single, currently selected molecule. Afterwards, we elaborate on a
1170 more complex manner of copying, filling a specific shape with
1171 molecules.</para>
1172
1173 <programlisting>
1174 ... --copy-molecule \
1175 --position "10,10,10"
1176 </programlisting>
1177
1178 <para>This action copies the selected molecule and inserts it at the
1179 position (10,10,10) in the domain with respect to the molecule's
1180 center. In effect, it copies all the atoms of the original molecule
1181 and adds new bonds in between these copied atoms such that their
1182 bond subgraphs are identical.</para>
1183 </section>
1184
1185 <section>
1186 <title>Change a molecules name</title>
1187
1188 <para>You can change the name of a molecule which is important for
1189 selection.</para>
1190
1191 <programlisting>... -change-molname "test</programlisting>
1192
1193 <para>This will change the name of the (only) selected molecule to
1194 "test".</para>
1195
1196 <para>Connected with this is the default name an unknown molecule
1197 gets.</para>
1198
1199 <programlisting>... --default-molname test</programlisting>
1200
1201 <para>This will change the default name of a molecule to
1202 "test".</para>
1203
1204 <note>
1205 <para>Note that a molecule loaded from file gets the filename
1206 (without suffix) as its name.</para>
1207 </note>
1208 </section>
1209
1210 <section>
1211 <title>Rotate around self</title>
1212
1213 <para>You can rotate a molecule around its own axis.</para>
1214
1215 <programlisting>
1216 ... --rotate-around-self "90" \
1217 --axis "0,0,1"
1218 </programlisting>
1219
1220 <para>This rotates the molecule around the z axis by 90 degrees as
1221 if the origin were at its center of origin.</para>
1222 </section>
1223
1224 <section>
1225 <title>Rotate around origin</title>
1226
1227 <para>In the same manner the molecule can be rotated around an
1228 external origin.</para>
1229
1230 <programlisting>
1231 ... --rotate-around-origin 90 \
1232 --position "0,0,1"\
1233 </programlisting>
1234
1235 <para>This rotates the molecule around an axis from the origin to
1236 the position (0,0,1), i.e. around the z axis, by 90 degrees.</para>
1237 </section>
1238
1239 <section>
1240 <title>Rotate to principal axis system</title>
1241
1242 <para>The principal axis system is given by an ellipsoid that mostly
1243 matches the molecules shape. The principal axis system can be just
1244 simply determined by</para>
1245
1246 <programlisting>... --principal-axis-system</programlisting>
1247
1248 <para>To rotate the molecule around itself to align with this system
1249 do as follows.</para>
1250
1251 <programlisting>... --rotate-to-principal-axis-system "0,0,1"</programlisting>
1252
1253 <para>This rotates the molecule in such a manner that the ellipsoids
1254 largest axis is aligned with the z axis. <remark>Note that "0,0,-1"
1255 would align anti-parallel.</remark></para>
1256 </section>
1257
1258 <section>
1259 <title>Perform verlet integration</title>
1260
1261 <para>Atoms not only have a position, but each instance also stores
1262 velocity and a force vector. These can be used in a velocity verlet
1263 integration step. Velocity verlet is a often employed time
1264 integration algorithm in molecular dynamics simulations.</para>
1265
1266 <programlisting>
1267 ... --verlet-integration \
1268 --deltat 0.1 \
1269 --keep-fixed-CenterOfMass 0
1270 </programlisting>
1271
1272 <para>This will integrate with a timestep of <inlineequation>
1273 <m:math display="inline">
1274 <m:mi>\Delta_t = 0.1</m:mi>
1275 </m:math>
1276 </inlineequation>and correcting forces and velocities such that
1277 the sum over all atoms is zero.</para>
1278 </section>
1279
1280 <section>
1281 <title>Anneal the atomic forces</title>
1282
1283 <para>This will shift the atoms in a such a way as to decrease (or
1284 anneal) the forces acting upon them.</para>
1285
1286 <para>Forces may either be already present for the set of atoms by
1287 some other way (e.g. from a prior fragmentation calculation) or,
1288 as shown here, from an external file. We anneal the forces for
1289 one step with a certain initial step width of 0.5 atomic time
1290 units and do not create a new timestep for each optimization
1291 step.</para>
1292
1293 <programlisting>
1294 ... --force-annealing \
1295 --forces-file test.forces \
1296 --deltat 0.5 \
1297 --steps 1 \
1298 --output-every-step 0
1299 </programlisting>
1300 </section>
1301
1302 <section>
1303 <title>Linear interpolation between configurations</title>
1304
1305 <para>This is similar to verlet-integration, only that it performs
1306 a linear integration irrespective of the acting atomic forces.
1307 </para>
1308
1309 <para>The following call will produce an interpolation between the
1310 configurations in time step 0 and time step 1 with 98 intermediate
1311 steps, i.e. current step 1 will end up in time step 99. In this
1312 case an idential mapping is used to associated atoms in start and
1313 end configuration.</para>
1314
1315 <programlisting>
1316 ... --linear-interpolation-of-trajectories \
1317 --start-step 0 \
1318 --end-step 1 \
1319 --interpolation-steps 100 \
1320 --id-mapping 1
1321 </programlisting>
1322 </section>
1323 </section>
1324
1325 <section>
1326 <title>Manipulate domain</title>
1327
1328 <para>Here, we elaborate on how to duplicate all the atoms inside the
1329 domain, how the scale the coordinate system, how to center the atoms
1330 with respect to certain points, how to realign them by given
1331 constraints, how to mirror and most importantly how to specify the
1332 domain.</para>
1333
1334 <section>
1335 <title>Changing the domain</title>
1336
1337 <para>The domain is specified by a symmetric 3x3 matrix. The
1338 eigenvalues (diagonal entries in case of a diagonal matrix) give the
1339 length of the edges, additional entries specify transformations of
1340 the box such that it becomes a more general parallelepiped.</para>
1341
1342 <programlisting>... change-box "20,0,20,0,0,20"</programlisting>
1343
1344 <para>As the domain matrix is symmetric, six values suffice to fully
1345 specify it. We have to give the six components of the lower diagonal
1346 matrix. Here, we change the box to a cuboid of equal edge length of
1347 20.</para>
1348 </section>
1349
1350 <section>
1351 <title>Bound atoms inside box</title>
1352
1353 <para>The following applies the current boundary conditions to the
1354 atoms. In case of periodic or wrapped boundary conditions the atoms
1355 will be periodically translated to be inside the domain
1356 again.</para>
1357
1358 <programlisting>... --bound-in-box</programlisting>
1359 </section>
1360
1361 <section>
1362 <title>Center atoms inside the domain</title>
1363
1364 <para>This is a combination of changing the box and bounding the
1365 atoms inside it.</para>
1366
1367 <programlisting>... --center-in-box "20,0,20,0,0,"</programlisting>
1368 </section>
1369
1370 <section>
1371 <title>Center the atoms at an edge</title>
1372
1373 <para>MoleCuilder can calculate the minimum box (parallel to the
1374 cardinal axis) all atoms would fit in and translate all atoms in
1375 such a way that the lower, left, front edge of this minimum is at
1376 the origin (0,0,0).</para>
1377
1378 <programlisting>... --center-edge</programlisting>
1379 </section>
1380
1381 <section>
1382 <title>Extending the boundary by adding an empty boundary</title>
1383
1384 <para>In the same manner as above a minimum box is determined that
1385 is subsequently expanded by a boundary of the given additional
1386 thickness. This applies to either side.</para>
1387
1388 <programlisting>... --add-empty-boundary "5,5,5"</programlisting>
1389
1390 <para>This will enlarge the box in such a way that every atom is at
1391 least by a distance of 5 away from the boundary of the domain (in
1392 the infinity norm).</para>
1393 </section>
1394
1395 <section>
1396 <title>Scaling the box</title>
1397
1398 <para>You can enlarge the domain by simple scaling factors.</para>
1399
1400 <programlisting>... --scale-box "1,1,2.5"</programlisting>
1401
1402 <para>Here, the domain is stretched in the z direction by a factor
1403 of 2.5.</para>
1404 </section>
1405
1406 <section>
1407 <title>Repeating the box</title>
1408
1409 <para>Under periodic boundary conditions often only the minimal
1410 periodic cell is stored. If need be, multiple images can be easily
1411 added to the current state of the system by repeating the box, i.e.
1412 the box along with all contained atoms is copied and placed
1413 adjacently.</para>
1414
1415 <programlisting>... --repeat-box "1,2,2"</programlisting>
1416
1417 <para>This will create a 2x2 grid of the current domain, replicating
1418 it along the y and z direction along with all atoms. If the domain
1419 contained before a single water molecule, we will now have four of
1420 them.</para>
1421 </section>
1422
1423 <section>
1424 <title>Change the boundary conditions</title>
1425
1426 <para>Various boundary conditions can be applied that affect how
1427 certain Actions work, e.g. translate-atoms. We briefly give a list
1428 of all possible conditions:</para>
1429 <itemizedlist>
1430 <listitem>
1431 <para>Wrap</para>
1432 <para>Coordinates are wrapped to the other side of the domain,
1433 i.e. periodic boundary conditions.</para>
1434 </listitem>
1435 <listitem>
1436 <para>Bounce</para>
1437 <para>Coordinates are bounced back into the domain, i.e. they
1438 are reflected from the domain walls.</para>
1439 </listitem>
1440 <listitem>
1441 <para>Ignore</para>
1442 <para>No boundary conditions apply.</para>
1443 </listitem>
1444 </itemizedlist>
1445
1446 <para>The following will set the boundary conditions to periodic.
1447 </para>
1448
1449 <programlisting>... --set-boundary-conditions "Wrap Wrap Wrap"
1450 </programlisting>
1451 </section>
1452 </section>
1453
1454 <section>
1455 <title>Filling</title>
1456
1457 <para>Filling a specific part of the domain with one type of
1458 molecule, e.g. a water molecule, is the more advanced type of
1459 copying of a molecule (see copy-molecule) and we need several
1460 ingredients.</para>
1461
1462 <para>First, we need to specify the part of the domain. This is done
1463 via a shape. We have already learned how to create and select
1464 shapes. The currently selected shape will serve as the fill-in
1465 region.</para>
1466
1467 <para>Then, they are three types of filling, domain, volume, and
1468 surface. The domain is filled with a regular grid of fill-in points.
1469 A volume and a surface are filled by a set of equidistant points
1470 distributed within the volume or on the surface of a selected
1471 shape. Molecules will then be copied and translated points when they
1472 "fit".</para>
1473
1474 <para>The filler procedure checks each fill-in point whether there
1475 is enough space for the molecule. To know this, we require a cluster
1476 instead of a molecule. This is just a general agglomeration of atoms
1477 combined with a bounding box that contains all of them and serves as
1478 its minimal volume. I.e. we need this cluster. For this a number of
1479 atoms have to be specified, the minimum bounding box is generated
1480 automatically.</para>
1481
1482 <para>On top of that molecules can be selected whose volume is
1483 additionally excluded from the filling region.</para>
1484
1485 <section>
1486 <title>Fill the domain with molecules</title>
1487
1488 <para>The call to fill the volume of the selected shape with the
1489 selected atoms is then as follows,</para>
1490
1491 <programlisting>
1492 ... --fill-regular-grid \
1493 --mesh-size "5,5,5" \
1494 --mesh-offset ".5,.5,.5" \
1495 --DoRotate 1 \
1496 --min-distance 1. \
1497 --random-atom-displacement 0.05 \
1498 --random-molecule-displacement 0.4 \
1499 --tesselation-radius 2.5
1500 </programlisting>
1501
1502 <para>This generates a grid of 5x5x5 fill-in points within the
1503 sphere that are offset such as to lay centered within the sphere
1504 (offset per axis in [0,1]). Additionally, each molecule is rotated
1505 by random rotation matrix, each atom is translated randomly by at
1506 most 0.05, each molecule's center at most by 0.4. The selected
1507 molecules' volume is obtained by tesselating their surface and
1508 excluding every fill-in point whose distance to this surface does
1509 not exceed 1. We refer to our comments in <link linkend="???">1.4
1510 Randomization </link>for details on changing the randomness.</para>
1511 </section>
1512
1513 <section>
1514 <title>Fill a shape's volume with molecules</title>
1515
1516 <para>More specifically than filling the whole domain with molecules,
1517 maybe except areas where other molecules already are, we also can
1518 fill only specific parts by selecting a shape and calling upon
1519 the following action:</para>
1520
1521 <programlisting>
1522 ... --fill-volume \
1523 --counts 12 \
1524 --min-distance 1. \
1525 --DoRotate 1 \
1526 --random-atom-displacement 0.05 \
1527 --random-molecule-displacement 0.4 \
1528 --tesselation-radius 2.5
1529 </programlisting>
1530 </section>
1531
1532 <section>
1533 <title>Fill a shape's surface with molecules</title>
1534
1535 <para>Filling a surface is very similar to filling its volume.
1536 Again the number of equidistant points has to be specified.
1537 However, randomness is constrained as the molecule is be aligned
1538 with the surface in a specific manner. The alignment axis refers
1539 to the largest principal axis of the filler molecule and will
1540 be aligned parallel to the surface normal at the fill-in point.
1541 </para>
1542
1543 <para>The call below fill in 12 points with a minimum distance
1544 between the instances of 1 angstroem. We allow for certain random
1545 displacements and use the z-axis for aligning the molecules on
1546 the surface.</para>
1547
1548 <programlisting>
1549 ... --fill-surface \
1550 --counts 12 \
1551 --min-distance 1. \
1552 --DoRotate 1 \
1553 --random-atom-displacement 0.05 \
1554 --random-molecule-displacement 0.4 \
1555 --Alignment-Axis "0,0,1"
1556 </programlisting>
1557 </section>
1558
1559 <section>
1560 <title>Suspend in molecule</title>
1561
1562 <para>Add a given molecule in the simulation domain in such a way
1563 that the total density is as desired.</para>
1564
1565 <programlisting>
1566 ... --suspend-in-molecule 1.
1567 </programlisting>
1568 </section>
1569
1570 <section>
1571 <title>Fill in molecule</title>
1572
1573 <para>This action will be soon be removed.</para>
1574
1575 <programlisting>
1576 ... --fill-molecule
1577 </programlisting>
1578 </section>
1579
1580 <section>
1581 <title>Fill void with molecule</title>
1582
1583 <para>This action will be soon be removed.</para>
1584
1585 <programlisting>
1586 ... --fill-void
1587 </programlisting>
1588 </section>
1589 </section>
1590
1591 <section>
1592 <title>Analysis</title>
1593
1594 <para></para>
1595
1596 <section>
1597 <title>Pair Correlation</title>
1598
1599 <para>Pair correlation checks for two given elements on the typical
1600 distance they can be found with respect to one another. E.g. for
1601 water one might be interested what is the typical distance for
1602 hydrogen and oxygen atoms.</para>
1603
1604 <programlisting>
1605 ... --pair-correlation \
1606 --elements 1 8 \
1607 --bin-start 0 \
1608 --bin-width 0.7 \
1609 --bin-end 10 \
1610 --output-file histogram.dat \
1611 --bin-output-file bins.dat \
1612 --periodic 0
1613 </programlisting>
1614
1615 <para>This will compile a histogram for the interval [0,10] in steps
1616 of 0.7 and increment a specific bin if the distance of one such pair
1617 of a hydrogen and an oxygen atom can be found within its distance
1618 interval.</para>
1619 </section>
1620
1621 <section>
1622 <title>Dipole Correlation</title>
1623
1624 <para>The dipole correlation is similar to the pair correlation, only
1625 that it correlates the orientation of dipoles in the molecular
1626 system with one another.</para>
1627 <para>Note that the dipole correlation works on the currently
1628 selected molecules, e.g. all water molecules if so selected.</para>
1629
1630 <programlisting>
1631 ... --dipole-correlation \
1632 --bin-start 0 \
1633 --bin-width 0.7 \
1634 --bin-end 10 \
1635 --output-file histogram.dat \
1636 --bin-output-file bins.dat \
1637 --periodic 0
1638 </programlisting>
1639 </section>
1640
1641 <section>
1642 <title>Dipole Angular Correlation</title>
1643
1644 <para>The dipole angular correlation looks at the angles of a
1645 dipole over time. It takes the orientation of a certain time step
1646 as the zero angle and bins all other orientations found in later
1647 time steps relative to it.
1648 </para>
1649 <para>Note that in contrast to the dipole correlation the dipole
1650 angular correlation works on the molecules determined by a formula.
1651 This is because selections do not work over time steps as molecules
1652 might change.
1653 </para>
1654
1655 <programlisting>
1656 ... --dipole-angular-correlation H2O \
1657 --bin-start 0 \
1658 --bin-width 5 \
1659 --bin-end 360 \
1660 --output-file histogram.dat \
1661 --bin-output-file bins.dat \
1662 --periodic 0 \
1663 --time-step-zero 0
1664 </programlisting>
1665 </section>
1666
1667 <section>
1668 <title>Point Correlation</title>
1669
1670 <para>Point correlation is very similar to pair correlation, only
1671 that it correlates not positions of atoms among one another but
1672 against a fixed, given point.</para>
1673
1674 <programlisting>
1675 ... --point-correlation \
1676 --elements 1 8 \
1677 --position "0,0,0" \
1678 --bin-start 0 \
1679 --bin-width 0.7 \
1680 --bin-end 10 \
1681 --output-file histogram.dat \
1682 --bin-output-file bins.dat \
1683 --periodic 0
1684 </programlisting>
1685
1686 <para>This would calculate the correlation of all hydrogen and
1687 oxygen atoms with respect to the origin.</para>
1688 </section>
1689
1690 <section>
1691 <title>Surface Correlation</title>
1692
1693 <para>The surface correlation calculates the distance of a set
1694 of atoms with respect to a tesselated surface.</para>
1695
1696 <programlisting>
1697 ... --surface-correlation \
1698 --elements 1 8 \
1699 --bin-start 0 \
1700 --bin-width 0.7 \
1701 --bin-end 10 \
1702 --output-file histogram.dat \
1703 --bin-output-file bins.dat \
1704 --periodic 0
1705 </programlisting>
1706 </section>
1707
1708 <section>
1709 <title>Molecular Volume</title>
1710
1711 <para>This simply calculates the volume that a selected molecule
1712 occupies. For this the molecular surface is determined via a
1713 tesselation. Note that this surface is minimal is that aspect
1714 that each node of the tesselation consists of an atom of the
1715 molecule.</para>
1716
1717 <programlisting>... --molecular-volume</programlisting>
1718 </section>
1719
1720 </section>
1721
1722 <section>
1723 <title>Fragmentation</title>
1724
1725 <para>Fragmentation refers to a so-called linear-scaling method called
1726 "Bond-Order diSSection in an ANOVA-like fashion" (BOSSANOVA),
1727 developed by <personname>Frederik Heber</personname>. In this section
1728 we briefly explain what the method does and how the associated actions
1729 work.</para>
1730
1731 <para>The central idea behind the BOSSANOVA scheme is to fragment the
1732 graph of the molecular system into connected subgraphs of a certain
1733 number of vertices (atoms). To give an example, loading a ethane atom
1734 with the chemical formula C2H6, fragmenting the molecule up to order 1
1735 means creating two fragments, both methane-like from either carbon
1736 atom including surrounding hydrogen atoms. Fragmenting up to order 2
1737 would return both the methane fragments and additionally the full
1738 ethane molecule as it resembles a fragment of order 2, namely
1739 containing two (non-hydrogen) atoms.</para>
1740
1741 <para>The reason for doing this is that usual ab-initio calculations
1742 of molecular systems via methods such as Density Functional Theory or
1743 Hartree-Fock scale at least as <inlineequation>
1744 <m:math display="inline">
1745 <m:mi>{\cal O}(M^3}</m:mi>
1746 </m:math>
1747 </inlineequation>with the number of atoms <inlineequation>
1748 <m:math display="inline">
1749 <m:mi>M</m:mi>
1750 </m:math>
1751 </inlineequation>. Hence, calculating the ground state energy of a
1752 number of fragment molecules scaling linearly with the number of atoms
1753 yields a linear-scaling methods. In the doctoral thesis of Frederik
1754 Heber, it is explained why this is a sensible ansatz mathematically
1755 and shown that it delivers a very good accuracy if electrons (and
1756 hence interactions) are in general localized.</para>
1757
1758 <para>Long-range interactions are artificially truncated, however,
1759 with this fragment ansatz. It can be obtained in a perturbation manner
1760 by sampling the resulting electronic and nuclei charge density on a
1761 grid, summing over all fragments, and solving the associated Poisson
1762 equation. Such a calculation is implemented via the solver
1763 <productname>vmg</productname> by Julian Iseringhausen that is
1764 contained in the <link xlink:href="http://www.scafacos.org/">
1765 <productname>ScaFaCoS</productname></link>.</para>
1766
1767 <para>Note that we treat hydrogen special (but can be switched off) as
1768 fragments are calculated as closed shell (total spin equals zero).
1769 Also, we use hydrogen to saturate any dangling bonds that occur as
1770 bonds are cut when fragmenting a molecule (this, too, can be switched
1771 off).</para>
1772
1773 <section>
1774 <title>Fragmenting a molecular system</title>
1775
1776 <para>For the current selection of atoms, all fragments consisting
1777 of these (sub)set of atoms are created in the following
1778 manner.</para>
1779
1780 <programlisting>
1781 ... --fragment-molecule "BondFragment" \
1782 --DoCyclesFull 1 \
1783 --distance 3. \
1784 --order 3 \
1785 --grid-level 5 \
1786 --output-types xyz mpqc
1787 </programlisting>
1788
1789 <para>We go through each of the options one after the other. During
1790 fragmentation some files are created storing state information, i.e.
1791 the vertex/atom indices per fragment and so on. These files all need
1792 a common prefix, here "BondFragment". Then, we specify that cycles
1793 should be treated fully. This compensates for electrons in aromatic
1794 rings being delocalized over the ring. If cycles in the graph,
1795 originating from aromatic rings, are always calculated fully, i.e.
1796 the whole ring becomes a fragment, we partially overcome these
1797 issues. This does however not work indefinitely and accuracy of the
1798 approximation is limited (<inlineequation>
1799 <m:math display="inline">
1800 <m:mi>&gt;10^{-4}</m:mi>
1801 </m:math>
1802 </inlineequation>) in systems with many interconnected aromatic
1803 rings, such as graphene. Next, we give a distance cutoff of 3 used
1804 in bond graph creation. Then, we specify the maximum order, i.e. the
1805 maximum number of (non-hydrogen) atoms per fragment, here 3. The
1806 higher this number the more expensive the calculation becomes
1807 (because substantially more fragments are created) but also the more
1808 accurate. The grid level refers to the part where long-range Coulomb
1809 interactions are calculated. This is done via solving the associated
1810 Poisson equation with a multigrid solver. As input the solver
1811 requires the density which is sampled on a cartesian grid whose
1812 resolution these parameter defines (<inlineequation>
1813 <m:math display="inline">
1814 <m:mi>2^{\mathrm{level}}</m:mi>
1815 </m:math>
1816 </inlineequation>). And finally, we give the output file formats,
1817 i.e. which file formats are used for writing each fragment
1818 configuration (prefix is "BondFragment", remember?). Here, we use
1819 XYZ (mainly for checking the configurations visually) and MPQC,
1820 which is a very robust Hartree-Fock solver. We refer to the
1821 discussion of the <link linkend="???">Parsers</link> above on how to
1822 change the parameters of the ab-initio calculation.</para>
1823
1824 <para>After having written all fragment configuration files, you
1825 need to calculate each fragment, grab the resulting energy (and
1826 force vectors) and place them into a result file manually. This at
1827 least is necessary if you have specified output-types above. If not,
1828 the fragments are not written to file but stored internally. Read
1829 on.</para>
1830 </section>
1831
1832 <section>
1833 <title>Calculating fragment energies automatically</title>
1834
1835 <para>Another way of doing this is enabled if you have
1836 <productname>JobMarket</productname> package. JobMarket implements a
1837 client/server ansatz, i.e. two (or more) independent programs are
1838 running (even on another computer but connected via an IP network),
1839 namely a server and at least one client. The server receives
1840 fragment configurations from MoleCuilder and assigns these to a
1841 client who is not busy. The client launches an executable that is
1842 specified in the work package he is assigned and gathers after
1843 calculation a number of values, samewise specified in the package.
1844 The results are gathered together by the server and can be requested
1845 from MoleCuilder once they are done. This essentially describe what
1846 is happening during the execution of this action.</para>
1847
1848 <para>Stored fragment jobs can also be parsed again, i.e. reversing
1849 the effect of having output-types specified in <link
1850 linkend="???">Fragmenting a molecule</link>.</para>
1851
1852 <programlisting>
1853 ... --parse-fragment-jobs \
1854 --fragment-jobs "BondFragment00.in" "BondFragment01.in" \
1855 --fragment-path "./" \
1856 --grid-level 5
1857 </programlisting>
1858
1859 <para>Here, we have specified two files, namely
1860 <filename>BondFragment00.in</filename> and
1861 <filename>BondFragment01.in</filename>, to be parsed from the path
1862 "./", i.e. the current directory. Also, we have specified to sample
1863 the electronic charge density obtained from the calculated ground
1864 state energy solution with a resolution of 5 (see fragment molecule
1865 and also below).</para>
1866
1867 <para>This allows for automated and parallel calculation of all
1868 fragment energies and forces directly within MoleCuilder. The
1869 FragmentationAutomation action takes the fragment configurations
1870 from an internal storage wherein they are placed if in
1871 FragmentMolecule no output-types have been specified.</para>
1872
1873 <programlisting>
1874 ... --fragment-automation \
1875 --fragment-executable mpqc \
1876 --fragment-resultfile BondFragment_results.dat \
1877 --DoLongrange 1 \
1878 --DoValenceOnly 1 \
1879 --grid-level 5 \
1880 --interpolation-degree 3 \
1881 --near-field-cells 4 \
1882 --server-address 127.0.0.1 \
1883 --server-port 1025
1884 </programlisting>
1885
1886 <para>Again, we go through each of the action's options step by
1887 step.</para>
1888
1889 <para>The executable is required if you do not have a patched
1890 version of <productname>MPQC</productname> that may directly act as
1891 a client to JobMarket's server. All calculated results are placed in
1892 the result file. If none is given, they are instead again placed in
1893 an internal storage for later access.</para>
1894
1895 <note>
1896 <para>Long-calculations are only possible with a client that knows
1897 how to handle VMG jobs. If you encounter failures, then it is most
1898 likely that you do not have a suitable client.</para>
1899 </note>
1900
1901 <para>In the next line, we have all options related to calculation
1902 of long-range interactions. We only sample valence charges on the
1903 grid, i.e. not core electrons and the nuclei charge is reduces
1904 respectively. This avoids problems with sampling highly localized
1905 charges on the grid and is in general recommended. Next, there
1906 follow parameters for the multi grid solver, namely the resolution
1907 of the grid, see under fragmenting the molecule, the interpolation
1908 degree and the number of near field cells. A grid level of 6 is
1909 recommended but costly in terms of memory, the other values are at
1910 their recommend values.</para>
1911
1912 <para>In the last line, parameters are given on how to access the
1913 JobMarket server, namely it address and its port.</para>
1914 </section>
1915
1916 <section>
1917 <title>Analyse fragment results</title>
1918
1919 <para>After the energies and force vectors of each fragment have
1920 been calculated, they need to be summed up to an approximation for
1921 the energy and force vectors of the whole molecular system. This is
1922 done by calling this action.</para>
1923
1924 <programlisting>
1925 ... --analyse-fragment-results \
1926 --fragment-prefix "BondFragment" \
1927 --fragment-resultfile BondFragment_results.dat \
1928 --store-grids 1
1929 </programlisting>
1930
1931 <para>The purpose of the prefix should already be known to you, same
1932 with the result file that is the file parsed by MoleCuilder. The
1933 last option states that the sampled charge densities and the
1934 calculated potential from the long-range calculations should be
1935 stored with the summed up energies and forces. Note that this makes
1936 the resulting files substantially larger (Hundreds of megabyte or
1937 even gigabytes). Fragment energies and forces are stored in
1938 so-called internal homology containers. These are explained in the
1939 next section.</para>
1940
1941 <para>Note that this action sets the force vector if these have been
1942 calculated for the fragment. Hence, a <link linkend="???">verlet
1943 integration</link> is possible afterwards.</para>
1944 </section>
1945
1946 <section>
1947 <title>Store a saturated fragment</title>
1948
1949 <para>After the energies and force vectors of each fragment have
1950 been calculated, they need to be summed up to an approximation for
1951 the energy and force vectors of the whole molecular system. This is
1952 done by calling this action.</para>
1953
1954 <para>This will store the currently selected atoms as a fragment
1955 where all dangling bonds (by atoms that are connected in the bond
1956 graph but have not been selected as well) are saturated with
1957 additional hydrogen atoms. The output formats are set to just xyz.
1958 </para>
1959
1960 <programlisting>
1961 ... --store-saturated-fragment \
1962 --DoSaturate 1 \
1963 --output-types xyz
1964 </programlisting>
1965 </section>
1966 </section>
1967
1968 <section>
1969 <title>Homologies</title>
1970
1971 <para>After a fragmentation procedure has been performed fully, what
1972 to do with the results? The forces can be used already but what about
1973 the energies? The energy value is basically the function evaluation of
1974 the Born-Oppenheimer surface. For molecular dynamics simulations
1975 continuous ab-initio calculations to evaluate the Born-Oppenheimer
1976 surface is not feasible. Instead usually empirical potential functions
1977 are fitted as to resemble the Born-Oppenheimer surface to a sufficient
1978 degree.</para>
1979
1980 <para>One frequent method is the many-body expansion of said surface
1981 which is basically nothing else than the fragment ansatz described
1982 above. Potential functions resemble a specific term in this many-body
1983 expansion. These are discussed in the next section.</para>
1984
1985 <para>For each of these terms all homologous fragments (i.e. having
1986 the same atoms with respect to the present elements and bonded in the
1987 same way), differing only in the coordinate of each atom, are just a
1988 sampling or a function evaluation of this term of the many-body
1989 expansion with respect to varying nuclei coordinates. Hence, it is
1990 appropriate to use these function evaluations in a non-linear
1991 regression procedure. That is, we want to tune the parameter of the
1992 empirical potential function in such a way as to most closely obtain
1993 the same function evaluation as the ab-initio calculation did with the
1994 same nuclear coordinates. Usually, this is done in a least-square
1995 sense, minimising the euclidean norm.</para>
1996
1997 <para>Homologies are then nothing else but containers for a specific
1998 type of fragment of all the different, calculated configurations (i.e.
1999 varying nuclear coordinates of the same fragment).</para>
2000
2001 <para>Now, we explain the actions that parse and store
2002 homologies.</para>
2003
2004 <programlisting>... --parse-homologies homologies.dat</programlisting>
2005
2006 <para>This parses the all homologies contained in the file
2007 <filename>homologies.dat</filename> and appends them to the homology
2008 container.</para>
2009
2010 <programlisting>... --save-homologies homologies.dat</programlisting>
2011
2012 <para>Complementary, this stores the current contents of the homology
2013 container, overwriting the file
2014 <filename>homologies.dat</filename>.</para>
2015 </section>
2016
2017 <section>
2018 <title>Potentials</title>
2019
2020 <para>In much the same manner, we would now ask what are homology
2021 files or containers good for but with the just had explanation it
2022 should be clear: We fit potential function to these function
2023 evaluation of terms of the many-body expansion of the Born-Oppenheimer
2024 surface of the full system.</para>
2025
2026 <section>
2027 <title>Fitting empirical potentials</title>
2028
2029 <para>Let's take a look at an exemplary call to the fit potential
2030 action.</para>
2031
2032 <programlisting>
2033 ... --fit-potential \
2034 --fragment-charges 8 1 1 \
2035 --potential-charges 8 1 \
2036 --potential-type morse \
2037 --take-best-of 5
2038 </programlisting>
2039
2040 <para>Again, we look at each option in turn. The first is the
2041 charges or elements specifying the set of homologous fragments that
2042 we want to look at. Here, obviously we are interested in water
2043 molecules, consisting of a single oxygen and two hydrogen atoms.
2044 Next, we specify the nuclei coordinates of the potential. We give
2045 the type of the potential as morse, which requires a single distance
2046 or two nuclear coordinates, here between an oxygen and a hydrogen
2047 atom. Finally, we state that the non-linear regression should be
2048 done with five random starting positions and the set of parameters
2049 with the smallest L2 norm wins.</para>
2050
2051 <note>
2052 <para>Due to translational and rotational degrees of freedom for
2053 fragments smaller than 7 atoms, it is appropriate to look at the
2054 pair-wise distances and not at the absolute coordinates. Hence,
2055 the two atomic positions, here for oxygen and hydrogen, are
2056 converted to a single distance. If we had given an harmonic
2057 angular potential and three charges/element, 8 1 1, i.e. oxygen
2058 and two hydrogens, we would have obtained three distances.</para>
2059
2060 <para>MoleCuilder always adds a so-called constant potential to
2061 the fit containing only a single parameter, the energy offset.
2062 This offset compensates for the interaction energy associated with
2063 a fragment of order 1, e.g. a single hydrogen atom.</para>
2064 </note>
2065
2066 <para>Another way is using a file containing a specific set of
2067 potential functions, possibly even with initial values.</para>
2068
2069 <programlisting>
2070 ... --fit-potential \
2071 --fragment-charges 8 1 1 \
2072 --potential-file water.potentials \
2073 --set-threshold 1e-3 \
2074 --training-file test.dat
2075 </programlisting>
2076
2077 <para>Now, all empirical potential functions are summed up into a
2078 so-called compound potential over the combined set of parameters.
2079 These are now fitted simultaneously. For example, if the potential
2080 file <filename>water.potentials</filename> contains a harmonic bond
2081 potential between oxygen and hydrogen and another angular potential
2082 for the angle between hydrogen, oxygen, and hydrogen atom we would
2083 fit a still simple function approximating the energy of a single
2084 water molecule. Here, the threshold takes the place of the
2085 take-best-of option. Here, random starting parameters are used as
2086 long as the final L2 error is not below 1e-3. Also, all data used
2087 for training, i.e. the tuples consisting of the fragments nuclei
2088 coordinates and the associated energy value are written to the file
2089 <filename>test.dat</filename>. This allows for graphical or other
2090 type of analysis.</para>
2091
2092 <para>Note that you can combine the two ways, i.e. start with the
2093 first but give an empty potential file. The resulting parameters are
2094 stored in this way. Fit other potentials and give different file
2095 names for each. Eventually, you have to combine the file in a text
2096 editor at the moment.</para>
2097 </section>
2098
2099 <section>
2100 <title>Fitting particle charges</title>
2101
2102 <para>The above empirical potential just model the short-range
2103 behavior in the molecular fragment, namely the bonded interaction.
2104 In order to model the long-range interaction as well without solving
2105 for the electronic ground state in each time step, particle charges
2106 are used that capture to some degree the created dipoles due to
2107 charge transfer from one atom to another when bonded.</para>
2108
2109 <para>To allow least-squares regression of these partial charges we
2110 need the results of long-range calculations and the store-grids
2111 option (see above under <link linkend="???">Fragmentation</link>)
2112 must have been given. With these sampled charge density and Coulomb
2113 potential stored in the homology containers, we call this action as
2114 follows.</para>
2115
2116 <programlisting>
2117 ... --fit-particle-charges \
2118 --fragment-charges 8 1 1 \
2119 --potential-file water.potentials \
2120 --radius 0.2
2121 </programlisting>
2122
2123 <para>This will again use water molecule as homologous fragment
2124 "key" to request configurations from the container. Results are
2125 stored in <filename>water.potentials</filename>. The radius is used
2126 to mark the region directly around the nuclei from the fit
2127 procedure. As here the charges of the core electrons and the nuclei
2128 itself dominate, we however are only interested in a good
2129 approximation to the long-range potential, this mask radius allows
2130 to give the range of the excluded zone.</para>
2131 </section>
2132 </section>
2133
2134 <section>
2135 <title>Dynamics</title>
2136
2137 <para>For fitting potentials or charges we need many homologuous but
2138 different fragments, i.e. atoms with slightly different positions.
2139 How can we generate these?</para>
2140
2141 <para>One possibility is to use molecular dynamics. With the
2142 aforementioned fragmentation scheme we can quickly calculate not only
2143 energies but also forces if the chosen solver, such as
2144 <link xlink:href="http://www.mpqc.org/"><productname>MPQC
2145 </productname></link>, supports it. Integrating these forces discretely over time
2146 gives insight into vibrational features of a molecular system and
2147 allows to generate those positions for fitting potentials that
2148 describe these vibrations.</para>
2149
2150 <section>
2151 <title>Molecular dynamics</title>
2152
2153 <para>The molecular dynamics action is a so-called macro Action,
2154 i.e. it combines several other Actions into one, namely:</para>
2155 <itemizedlist>
2156 <listitem>
2157 <para>--verlet-integration</para>
2158 </listitem>
2159 <listitem>
2160 <para>--output</para>
2161 </listitem>
2162 <listitem>
2163 <para>--clear-fragment-results</para>
2164 </listitem>
2165 <listitem>
2166 <para>--destroy-adjacency</para>
2167 </listitem>
2168 <listitem>
2169 <para>--create-adjacency</para>
2170 </listitem>
2171 <listitem>
2172 <para>--update-molecules</para>
2173 </listitem>
2174 <listitem>
2175 <para>--fragment-molecule</para>
2176 </listitem>
2177 <listitem>
2178 <para>--fragment-automation</para>
2179 </listitem>
2180 <listitem>
2181 <para>--analyse-fragment-results</para>
2182 </listitem>
2183 </itemizedlist>
2184
2185 <para>The following will perform a molecular dynamics simulation
2186 for 100 time steps, each time step combining 0.5 atomic time units,
2187 i.e. 1.2 1e-17 s. The other options listed below will seem familiar
2188 to you if you have read about the other Actions listed above. Below
2189 we will not keep the bondgraph, i.e bonds and molecules may change
2190 over the simulation and hence also the created fragments per time
2191 step.
2192 </para>
2193
2194 <programlisting>
2195 ... --molecular-dynamics \
2196 --steps 100 \
2197 --keep-bondgraph 0 \
2198 --order 3 \
2199 --distance 3. \
2200 --deltat 0.5 \
2201 --keep-fixed-CenterOfMass 1 \
2202 --fragment-executable mpqc \
2203 </programlisting>
2204 </section>
2205
2206 <section>
2207 <title>Structure optimization</title>
2208
2209 <para>Structure optimization is also a macro Action, it basically
2210 combines the same Actions as molecular-dynamics does. However, it
2211 uses force-annealing instead of verlet-integration.</para>
2212
2213 <para>The following performs a structure optimization of the
2214 currently selected atoms (may also be a subset) for up to 100 time
2215 steps, where each time step ist 0.5 atomic time units. The time
2216 step here is the initial step with for annealing.
2217 </para>
2218
2219 <programlisting>
2220 ... --optimize-structure \
2221 --keep-bondgraph 1 \
2222 --output-every-step 1 \
2223 --steps 100 \
2224 --order 3 \
2225 --distance 3. \
2226 --deltat 0.5 \
2227 --keep-fixed-CenterOfMass 1 \
2228 --fragment-executable mpqc \
2229 </programlisting>
2230
2231 <para>Note that output-every-step will allow you to watch the
2232 optimization as each step is placed into a distinct time step.
2233 Otherwise only two time steps would be created: the initial and
2234 the final one containing the optimized structure.</para>
2235 </section>
2236
2237 <section>
2238 <title>Set the world's time step</title>
2239
2240 <para>In order to inspect or manipulate atoms and molecules at a
2241 certain time step, the World's time has to be set with the following
2242 Action.
2243 </para>
2244
2245 <para>This will set the World's time to the fifth step (counting
2246 starts at zero).</para>
2247
2248 <programlisting>... --set-world-time 4</programlisting>
2249 </section>
2250
2251 <section>
2252 <title>Save the temperature information</title>
2253
2254 <para>For each time step the temperature (i.e. the average velocity
2255 per atom times its mass) will be stored to a file.</para>
2256
2257 <programlisting>
2258 ... --save-temperature temperature.dat \
2259 </programlisting>
2260 </section>
2261 </section>
2262
2263 <section>
2264 <title>Tesselations</title>
2265
2266 <para>Tesselations obtain molecular surfaces (and volumes) by rolling
2267 a virtual sphere of a certain radii on a molecule until a closed
2268 surface of connected triangles is created.</para>
2269
2270 <section>
2271 <title>Non-convex envelope</title>
2272
2273 <para>This will create a non-convex envelope for a molecule.</para>
2274
2275 <programlisting>
2276 ... --nonconvex-envelope 6. \
2277 --nonconvex-file nonconvex.dat
2278 </programlisting>
2279
2280 <para>This tesselation file can be conveniently viewed with
2281 <programname>TecPlot</programname> or with one of the Tcl script
2282 in the util folder with <programname>VMD</programname>.</para>
2283 </section>
2284
2285 <section>
2286 <title>Convex envelope</title>
2287
2288 <para>This will create a convex envelope for a molecule.</para>
2289
2290 <programlisting>
2291 ... --convex-envelope 6. \
2292 --convex-file convex.dat
2293 </programlisting>
2294
2295 <para>This tesselation file can be conveniently viewed with
2296 <programname>TecPlot</programname> or with one of the Tcl script
2297 in the util folder with <programname>VMD</programname>.</para>
2298 </section>
2299 </section>
2300
2301 <section>
2302 <title>Various commands</title>
2303
2304 <para>Here, we gather all commands that do not fit into one of above
2305 categories for completeness.</para>
2306
2307 <section>
2308 <title>Changing verbosity</title>
2309
2310 <para>The verbosity level is the amount of stuff printed to screen.
2311 This information will in general help you to understand when
2312 something does not work. Mind the <emphasis>ERROR</emphasis> and
2313 <emphasis>WARNING</emphasis> messages in any case.</para>
2314
2315 <para>This sets the verbosity from default of 2 to 4,</para>
2316
2317 <programlisting>... --verbose 4</programlisting>
2318
2319 <para>or shorter,</para>
2320
2321 <programlisting>... -v 4</programlisting>
2322 </section>
2323
2324 <section>
2325 <title>Loading an element database</title>
2326
2327 <para>Element databases contain information on valency, van der
2328 Waals-radii and other information for each element.</para>
2329
2330 <para>This loads all element database from the current folder (in a
2331 unix environment):</para>
2332
2333 <programlisting>... --element-db ./</programlisting>
2334
2335 </section>
2336
2337 <section>
2338 <title>Fast parsing</title>
2339
2340 <para>Parsing all time steps from a given input file can take a
2341 while, especially for larger systems. If fast parsing is activated,
2342 only the first time step is loaded, all other are ignored.</para>
2343
2344 <programlisting>... --fastparsing 1</programlisting>
2345 </section>
2346
2347 <section>
2348 <title>Giving the version of the program</title>
2349
2350 <para>This prints the version information of the code, especially
2351 important when you request the fixing of bugs or implementation of
2352 features.</para>
2353
2354 <programlisting>... --version</programlisting>
2355 </section>
2356
2357 <section>
2358 <title>Giving warranty information</title>
2359
2360 <para>As follows warranty information is given,</para>
2361
2362 <programlisting>... --warranty</programlisting>
2363 </section>
2364
2365 <section>
2366 <title>Giving redistribution information</title>
2367
2368 <para>This gives information on the license and how to redistribute
2369 the program and its source code</para>
2370
2371 <programlisting>... --help-redistribute</programlisting>
2372 </section>
2373 </section>
2374
2375 <section>
2376 <title>Sessions</title>
2377
2378 <para>A session refers to the queue of actions you have executed.
2379 Together with the initial configuration (and all files required for
2380 actions in the queue) this might be seen as a clever way of storing
2381 the state of a molecular system. When proceeding in a try&amp;error
2382 fashion to construct a certain system, it is a good idea, to store the
2383 session at the point where your attempts start to deviate from one
2384 another.</para>
2385
2386 <section>
2387 <title>Storing a session</title>
2388
2389 <para>Storing sessions is simple,</para>
2390
2391 <programlisting>
2392 ... --store-session "session.py" \
2393 --session-type python
2394 </programlisting>
2395
2396 <para>Here, the session type is given as python (the other option is
2397 cli for in the manner of the command-line interface) and the written
2398 python script <filename>session.py</filename> can even be used with
2399 the python interface described below, i.e. it is a full python script
2400 (that however requires the so-called pyMoleCuilder module).</para>
2401 </section>
2402
2403 <section>
2404 <title>Loading a session</title>
2405
2406 <para>Loading a session only works for python scripts. This actually
2407 blurs the line between the command-line interface and the python
2408 interface a bit. But even more, MoleCuilder automatically executes a
2409 script called <filename>molecuilder.py</filename> if such a file is
2410 contained in the current directory.</para>
2411
2412 <programlisting>... --load-session "session.py"</programlisting>
2413
2414 <para>This will execute every action with its options contained in the
2415 script <filename>session.py</filename>.</para>
2416 </section>
2417 </section>
2418
2419 <section>
2420 <title>Various specific commands</title>
2421
2422 <para>In this (final) section of the action description we list a number
2423 Actions that are very specific to some purposes (or other programs).
2424 </para>
2425
2426 <section>
2427 <title>Saving exttypes of a set of atoms</title>
2428
2429 <para>This saves the atomic ids of all currently selected atoms in a
2430 <link xlink:href="http://www.tremolo-x.com/"><programname>TREMOLO
2431 </programname></link> exttypes file with the given name.</para>
2432
2433 <programlisting>
2434 ... --save-selected-atoms-as-exttypes \
2435 --filename test.exttypes </programlisting>
2436 </section>
2437
2438 <section>
2439 <title>Setting parser specific parameters</title>
2440
2441 <para>You can also tweak the parameters stored in this file easily.
2442 For example, <productname>MPQC</productname> stores various
2443 parameters modifying the specific ab-initio calculation performed.
2444 For <link xlink:href="http://www.mpqc.org/"><productname>MPQC
2445 </productname></link> and
2446 <link xlink:href="http://www.psicode.org/"><productname>Psi4
2447 </productname></link> this can be modified as follows.</para>
2448
2449 <programlisting>
2450 ... --set-parser-parameters mpqc \
2451 --parser-parameters "theory=CLHF;basis=6-31*G;"
2452 </programlisting>
2453
2454 <para>This sets the ab-initio theory to closed-shell Hartree-Fock
2455 and the basis set to 6-31*G. Please check the
2456 <productname>MPQC</productname> manual on specific
2457 parameters.</para>
2458 </section>
2459
2460 <section>
2461 <title>Tremolo specific options and potential files</title>
2462
2463 <para><productname>TREMOLO</productname>'s configuration files start
2464 with a specific line telling the amount of information stored in the
2465 file. This file can be modified, e.g. to enforce storing of
2466 velocities and forces as well as the atoms positions and
2467 element.</para>
2468
2469 <programlisting>
2470 ... --set-tremolo-atomdata "ATOM id element u=3 v=3 F=3" \
2471 --reset 1
2472 </programlisting>
2473
2474 <para>This will not append but reset the old line and fill it with
2475 the given string.</para>
2476
2477 <para>One specific action is required when loading certain
2478 <productname>TREMOLO</productname> configuration files. These
2479 contain element notations that refer to parameterized names used in
2480 empirical potentials and molecular dynamics simulations and not the
2481 usual chemical symbols, such as H or O. We may load an auxiliary
2482 file that gives the required conversion from OH1 to H, which is the
2483 so-called potential file.</para>
2484
2485 <programlisting>... --parse-tremolo-potentials water.potentials</programlisting>
2486
2487 <para>This parses the lookup table from the file
2488 <filename>water.potentials</filename> and it can be used in
2489 following load actions.</para>
2490 </section>
2491 </section>
2492 </section>
2493
2494 <section>
2495 <title>Text menu</title>
2496
2497 <para>We now discuss how to use the text menu interface.</para>
2498
2499 <para>The text menu is very much the interface counterpart to the
2500 command-line interface. Both work in a terminal session.</para>
2501
2502 <para>In the text menu, actions can be selected from hierarchical lists.
2503 Note that the menus for the graphical interface are organized in the
2504 exactly same way. After an action has been chosen, the option values
2505 have to be entered one after the other. After the last option value has
2506 been given, the action is executed and the result printed to the
2507 screen.</para>
2508
2509 <para>With regards to the other functionality, it is very much the same
2510 as the command-line interface above.</para>
2511 </section>
2512
2513 <section>
2514 <title linkend="GUI">Graphical user interface</title>
2515
2516 <para>The main point of the GUI is that it renders the atoms and
2517 molecules visually. These are represented by the common
2518 stick-and-ball-model. Single or multiple atoms and molecules can easily
2519 be accessed, activated and manipulated via tables. Changes made in the
2520 tables cause immediate update of the visual representation. Under the
2521 hood each of these manipulations is nothing but the call to an action,
2522 hence is fully undo- and redoable.</para>
2523
2524 <para>This is mostly helpful to design more advanced structures that are
2525 conceptually difficult to imagine without visual aid. At the end, a
2526 session may be stored and this script can then be used to construct
2527 various derived or slightly modified structures.</para>
2528
2529 <section>
2530 <title>Basic view</title>
2531
2532 <para>Let us first give an impression of the basic view of the gui
2533 after a molecule has been loaded.</para>
2534
2535 <figure>
2536 <title>Screenshot of the basic view of the GUI after loading a file
2537 with eight water molecules.</title>
2538
2539 <mediaobject>
2540 <imageobject>
2541 <imagedata entityref="example_basic_view" scalefit="1" width="100%"/>
2542 </imageobject>
2543 </mediaobject>
2544 </figure>
2545
2546 <section>
2547 <title>3D view</title>
2548
2549 <para>In the above figure, you see the stick-and-ball representation
2550 of the water molecules, the dreibein giving the positive axis
2551 direction and the cuboidal domain on a black background.</para>
2552 </section>
2553
2554 <section>
2555 <title>Information Tabs</title>
2556
2557 <para>Beneath this 3D view that you can rotate at will your mouse
2558 and zoom in and out with your scroll wheel, you find to the right a
2559 part containing two tabs named Atom and Molecule. Look at where the
2560 mouse pointer is. It has colored the atom underneath in cyan
2561 (although it's also an oxygen atom and should bne coloured in rose
2562 as the rest). You can inspect its properties in the tab Atom: Name,
2563 element, mass, charge, position and number of bonds. If you switch
2564 to the Molecule tab, you would see the properties of the water
2565 molecule this specific atom belongs to.</para>
2566 </section>
2567
2568 <section>
2569 <title>Shape section</title>
2570
2571 <para>Beneath these information tabs you find the shape sections.
2572 There you find a list of all currently created shapes and you can
2573 manipulate them via the buttons beneath this list.</para>
2574 </section>
2575
2576 <section>
2577 <title>Timeline</title>
2578
2579 <para>Directly below the 3D view there is a long slider. If a loaded
2580 file has multiple time step entries, this slider allows you to
2581 smoothly select one time frame after another. Sliding it with the
2582 mouse from left to right will reveal the animation that is hidden
2583 behind the distinct snapshots stored in the configuration
2584 file.</para>
2585 </section>
2586
2587 <section>
2588 <title>Selection tables</title>
2589
2590 <para>Underneath the time line there is another place for
2591 tabs.</para>
2592
2593 <para>The first is on molecules, listing all present molecules of
2594 the molecular system in a list view. If you click on a specific
2595 molecule, the one will get selected or unselected depending on its
2596 current selection state (see below for details on this with respect
2597 to the GUI).</para>
2598
2599 <para>The next tab enumerates all elements known to MoleCuilder
2600 where the ones are greyed out that are not present in the molecular
2601 system. Clicking on a present element will select all atoms of this
2602 specific element. A subsequent click unselects again.</para>
2603
2604 <para>Subsequent follow tabs on enumerating the fragments and their
2605 fragment energies if calculated and the homologies along with
2606 graphical depiction (via QWT) if present.</para>
2607 </section>
2608 </section>
2609
2610 <section>
2611 <title>Selections</title>
2612
2613 <para>Selections work generally always by selecting the respective
2614 action from the pull-down menu.</para>
2615
2616 <para>However, it may also be accessed directly. The row of icons
2617 above the 3D view has two icons depicting the selection of individual
2618 atoms or molecules. If either of them is selected, clicking with the
2619 left mouse button on an atom will either (un)select the atom or its
2620 associated molecule. Multiple atoms can be selected in this
2621 manner.</para>
2622
2623 <para>Also the selection tabs may be used by clicking on the name of a
2624 molecule as stated above or at an element.</para>
2625
2626 <para>Similarly, if shapes are present in the shape section, clicking
2627 them with select them and also cause a translucent visualization to
2628 appear in the 3D view. Note that this visualization is quite costly
2629 right now and not suited to complex shapes.</para>
2630 </section>
2631
2632 <section>
2633 <title>Dialogs</title>
2634
2635 <para>Most essential, however, to the GUI are the dialogs. Each action
2636 calls forth such a dialog even if no options are required (the
2637 execution of the action has at least to be confirmed). Each dialog
2638 consisting of queries for a particular option value. As each option
2639 value has a specific type, we briefly go into the details of how these
2640 queries look like.</para>
2641
2642 <note>
2643 <para>Each dialog's Ok is greyed out until all entered option values
2644 are valid.</para>
2645 </note>
2646
2647 <section>
2648 <title>Domain query</title>
2649
2650 <figure>
2651 <title>Screenshot of a dialog showing a domain query</title>
2652
2653 <mediaobject>
2654 <imageobject>
2655 <imagedata entityref="dialog_box" scalefit="1" width="100%"/>
2656 </imageobject>
2657 </mediaobject>
2658
2659 <para>In the domain query a 3x3 symmetric matrix has to be
2660 entered. In the above screenshots you notice that the only
2661 non-zero entries are on the main diagonal. Here, we have simply
2662 specified a cube of edge length 8. The ok button will be greyed
2663 out if the matrix is either singular or not symmetric.</para>
2664 </figure>
2665 </section>
2666
2667 <section>
2668 <title>Element query</title>
2669
2670 <figure>
2671 <title>Screenshot the add atom action containing an element
2672 query</title>
2673
2674 <mediaobject>
2675 <imageobject>
2676 <imagedata entityref="dialog_add-atom_tooltip" scalefit="1" width="100%"/>
2677 </imageobject>
2678 </mediaobject>
2679
2680 <para>Elements are picked from a pull-down box where all known
2681 elements are listed.</para>
2682
2683 <para>In this dialog you also notice that a tooltip is given,
2684 briefly explaining what the action does.</para>
2685 </figure>
2686 </section>
2687
2688 <section>
2689 <title>Complex query</title>
2690
2691 <figure>
2692 <title>Screenshot of a complex dialog consisting of multiple
2693 queries</title>
2694
2695 <mediaobject>
2696 <imageobject>
2697 <imagedata entityref="dialog_complex" scalefit="1" width="100%"/>
2698 </imageobject>
2699 </mediaobject>
2700
2701 <para>Here we show a more complex dialog. It queries for strings,
2702 for integer values (see the increase/decrease arrows), for
2703 booleans and for files (the "choose" buttons opens a file
2704 dialog).</para>
2705 </figure>
2706 </section>
2707
2708 <section>
2709 <title>Exit query</title>
2710
2711 <figure>
2712 <title>Screenshort showing the exit dialog</title>
2713
2714 <mediaobject>
2715 <imageobject>
2716 <imagedata entityref="dialog_exit" scalefit="1" width="100%"/>
2717 </imageobject>
2718 </mediaobject>
2719
2720 <para>Finally, we show the dialog that will pop up when exiting
2721 the graphical interface. It will ask whether it should store the
2722 current state of the system in the input file or not. You may
2723 cancel the exit, close without saving or save the current
2724 state.</para>
2725 </figure>
2726 </section>
2727 </section>
2728 </section>
2729
2730 <section>
2731 <title>Python interface</title>
2732
2733 <para>Last but not least we elaborate on the python interface. We have
2734 already discusses this interface to some extent. The current session,
2735 i.e. the queue of actions you have executed, can be stored as a python
2736 script and subsequently executed independently of the user interface it
2737 was created with. More general, MoleCuilder can execute arbitrary python
2738 scripts where prior to its execution a specific module is loaded by
2739 default enabling access to MoleCuilder's actions from inside the
2740 script.</para>
2741
2742 <para>MoleCuilder's python module is called pyMoleCuilder. it is
2743 essentially a library that can be imported into python just as any other
2744 module. Let us assume you have started the python interpreter and you
2745 have added the destination of the <filename>pyMoleCuilder</filename>
2746 library to the <varname>PYTHONPATH</varname> variable.</para>
2747
2748 <programlisting>import pyMoleCuilder as mol</programlisting>
2749
2750 <para>Subsequently, you can access the help via</para>
2751
2752 <programlisting>help(mol)</programlisting>
2753
2754 <para>This will list all of MoleCuilder's actions with their function
2755 signatures within python as contained in the module pyMoleCuilder named
2756 as mol in the scope of the currently running interpreter. Note that the
2757 function names are not the names you know from the command-line
2758 interface, they might be called
2759 <computeroutput>WorldChangeBox(...)</computeroutput> or alike.</para>
2760
2761 <para>Let's try it out.</para>
2762
2763 <programlisting>print mol.CommandVersion()</programlisting>
2764
2765 <para>This will state the current version of the library.</para>
2766
2767 <para>Go ahead and try out other commands. Refer to the documentation
2768 under the command-line interface and look up the function name via
2769 help.</para>
2770 </section>
2771 </chapter>
2772
2773 <chapter>
2774 <title>Conclusions</title>
2775
2776 <para>This ends this user guide.</para>
2777
2778 <para>We have given you a brief introduction to the aim of the program and
2779 how each of the four interfaces are to be used. The rest is up to
2780 you.</para>
2781
2782 <para>Tutorials and more information is available online, see <link
2783 xlink:href="http://www.molecuilder.com/">MoleCuilder's website</link>.
2784 </para>
2785
2786 <para>Be aware that in general knowing how the code works allows you to
2787 understand what's going wrong if something's going wrong.</para>
2788
2789 <section>
2790 <title>Thanks</title>
2791
2792 <para>Huge thanks go out to Saskia Metzler who was patient enough to let
2793 me sit next to her while riding ten hours in a bus to Berlin.</para>
2794 </section>
2795 </chapter>
2796</book>
Note: See TracBrowser for help on using the repository browser.