source: doc/userguide/userguide.xml@ 5c8807

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 5c8807 was 5c8807, checked in by Frederik Heber <heber@…>, 10 years ago

Merge branch 'Experiment_Amylose_Water' into Candidate_v1.4.9

Conflicts:

doc/userguide/userguide.xml
tests/regression/Atoms/testsuite-atoms.at

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