File: observers.rst

package info (click to toggle)
openstructure 2.9.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 205,228 kB
  • sloc: cpp: 188,129; python: 35,361; ansic: 34,298; fortran: 3,275; sh: 286; xml: 146; makefile: 29
file content (55 lines) | stat: -rw-r--r-- 1,485 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Observers
================================================================================

.. currentmodule:: ost.mol.mm

Observers can be registered to a :class:`Simulation` and get called at a 
defined interval.


Trajectory observers
--------------------------------------------------------------------------------

.. class:: TrajObserver(rhythm) 

  Stores and updates the md trajectory produced by a :class:`Simulation`
  in memory

  :param rhythm:        Frequency, at which the observer gets
                        notified by the simulation
  :type rhythm:         :class:`int`

  .. method:: GetTraj()

    Get current Trajectory

    :returns:           :class:`ost.mol.CoordGroupHandle`

  .. method:: Rhythm()

    :returns:           :class:`int` calling rythm


.. class:: TrajWriter(rythm, pdb_filename, dcd_filename)

  Writes the MD trajectory produced by a :class:`Simulation` directly to
  disk in dcd format 

  :param rythm:         Frequency, at which the observer gets
                        notified by the simulation
  :param pdb_filename:  Name of produced pdb file
  :param dcd_filename:  Name of produced dcd file

  :type rythm:          :class:`int`
  :type pdb_filename:   :class:`str`
  :type dcd_filename:   :class:`str`

  .. method:: Rhythm()

    :returns:           :class:`int` calling rhythm

  .. method:: Finalize()

    Obligatory function to be called after the last simulation step to
    write missing information into the dcd header