Skip to content

Commit

Permalink
Some sphinx fixes and removed private and special members from sphinx…
Browse files Browse the repository at this point in the history
… documentation.
  • Loading branch information
KaiSzuttor committed Aug 8, 2017
1 parent 6adebdb commit 49262af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 204 deletions.
3 changes: 1 addition & 2 deletions doc/sphinx/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,7 @@ texinfo_documents = [
# http://stackoverflow.com/questions/12206334/sphinx-autosummary-toctree-contains-reference-to-nonexisting-document-warnings
numpydoc_show_class_members = False
autodoc_mock_imports = ['featuredefs', ]
autodoc_default_flags = ['members', 'private-members',
'special-members',
autodoc_default_flags = ['members',
'show-inheritance', 'undoc-members']
# Replacements
rst_epilog = """
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx/dg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ Espresso uses two communication models, namely master-slave and synchronous.
involved in the communication. If this is not done, a deadlock will result.

Adding calls to the master-slave framework
-----------------------------------------
------------------------------------------

Using an instance of MpiCallback
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
206 changes: 5 additions & 201 deletions doc/sphinx/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,15 @@ re-registered when the same checkpoint id is used later.
Following the example above, the next example loads the last checkpoint,
restores the state of all checkpointed objects and registers a signal.

.. code:: python
.. code::
import espressomd from espressomd import checkpointing import signal
checkpoint = checkpointing.Checkpointing(checkpoint\_id=“mycheckpoint”)
checkpoint = checkpointing.Checkpointing(checkpoint_id=“mycheckpoint”)
checkpoint.load()
system = espressomd.System() system.cell\_system.skin = skin
system = espressomd.System()
system.cell_system.skin = skin
system.actors.add(p3m)
#signal.SIGINT: signal 2, is sent when ctrl+c is pressed
Expand Down Expand Up @@ -237,88 +239,6 @@ h5.write()
After the last write call, you have to call the close() method to remove
the backup file and to close the datasets etc.

Writing and reading binary files
--------------------------------
Binary files are written using the command
writemd …
This will write out particle data to the Tcl channel for all particles
in binary format. Apart from the mandatory particle id, only limited
information can be stored. The coordinates (, and ), velocities (, and )
and forces (, and ). Other information should be stored in a blockfile
or reconstructed differently. Note that since both ``blockfile`` and
``writemd`` are using a Tcl channel, it is actually possible to mix
them, so that you can write a single checkpoint file. However, the
``blockfile read auto`` mechanism cannot handle the binary section, thus
you need to read this section manually. Reading of binary particle data
happens through
readmd
For the exact format of the written binary sequence, see
``src/tcl/binary_file_tcl.cpp``.
MPI-IO
------
When using with MPI, blockfiles and writemd have the disadvantage, that
the master node does *all* the output. This is done by sequentially
communicating all particle data to the master node. MPI-IO offers the
possibility to write out particle data in parallel using binary IO. To
output variables and other non-array information, use normal blockfiles
(section [sec:structured-file-format]).
To dump data using MPI-IO, use the following syntax:
mpiio …
This command writes data to several files using as common filename
prefix. Beware, that must not be a Tcl channel but a string which must
not contain colons. The data can be positions (), velocities (),
particle types () and particle bonds () or any combination of these. The
particle ids are always dumped. For safety reasons, MPI-IO will not
overwrite existing files, so if the command fails and prints
``MPI_ERR_IO`` make sure the files are non-existent.
The files produced by this command are (assumed is1”):
1.head
Internal information (Dumped fields, bond partner num); always
produced
1.pref
Internal information (Exscan results of nlocalparts); always
produced
1.ids
Particle ids; always produced
1.type
Particle types; optional
1.pos
Particle positions; optional
1.vel
Particle velocities; optional
1.bond
Bond information; optional
1.boff
Internal bond prefix information; optional, necessary to read 1.bond
Currently, these files have to be read by exactly the same number of MPI
processes that was used to dump them, otherwise an error is signalled.
Also, the same type of machine (endianess, byte order) has to be used.
Otherwise only garbage will be read. The read command replaces the
particles, i.e. all previous existent particles will be *deleted*.
There is a python script (``tools/mpiio2blockfile.py``) which converts
MPI-IO snapshots to regular blockfiles.
Writing VTF files
-----------------

Expand Down Expand Up @@ -431,122 +351,6 @@ vtfpid
If is the id of a particle as used in , this command returns the atom id
used in the VTF, VSF or VCF formats.

``writevtk``: Particle Visualization in paraview
------------------------------------------------
This feature allows to export the particle positions in a paraview [3]_
compatible VTK file. Paraview is a powerful and easy to use open-source
visualization program for scientific data. Since can export the
lattice-Boltzmann velocity field [ssec:LBvisualization] in the VTK
format as well and paraview allows to visualize particles with glyphs
and vector fields with stream lines, glyphs, contourplots, etc., one can
use it so completely visualize a coupled lattice-Boltzmann MD
simulation. It can also create videos without much effort if one exports
data of individual time steps into separate files with filenames
including a running index (``data_0.vtk``, ``data_1.vtk``, ...).
writevtk
Name of the file to export the particle positions into.
Specifies a list of particle types which should be exported. The default
is . Alternatively, a list of type number can be given. Exporting the
positions of all particles but in separate files might make sense if one
wants to distinguish the different particle types in the visualization
(i.e. by color or size). To export a type ``1`` use something along
``writevtk test.tcl 1``. To export types ``1``, ``5``, ``7``, which are
not to be distinguished in the visualization, use
``writevtk test.tcl 7 1 5``. The order in the list is arbitrary, but
duplicates are *not* ignored!
Reading and Writing PDB/PSF files
---------------------------------
The PDB (Brookhaven Protein DataBase) format is a widely used format for
describing atomistic configurations. PSF is a format that is used to
describe the topology of a PDB file.
When visualizing your system with VMD, it is recommended to use the VTF
format instead (see section [sec:vtf]), as it was specifically designed
for visualizations with VMD. In contrast to the PDB/PSF formats, in VTF
files it is possible to specify the VDW radii of the particles, to have
a varying simulation box size, etc.
: Writing the topology
~~~~~~~~~~~~~~~~~~~~~~
writepsf
Writes the current topology to the file (here, is not a channel, since
additional information cannot be written anyway). , and so on are
parameters describing a system consisting of equally long charged
polymers, counterions and salt. This information is used to set the
residue name and can be used to color the atoms in VMD. If you specify ,
the residue name is taken from the molecule identity of the particle. Of
course different kinds of topologies can also be handled by modified
versions of .
: Writing the coordinates
~~~~~~~~~~~~~~~~~~~~~~~~~
writepdb writepdbfoldchains writepdbfoldtopo
Variant writes the corresponding particle data.
Variant writes folded particle data where the folding is performed on
chain centers of mass rather than single particles. In order to fold in
this way the chain topology and box length must be specified. Note that
this method is outdated. Use variant instead.
Variant writes folded particle data where the folding is performed on
chain centers of mass rather than single particles. This method uses the
internal box length and topology information from espresso. If you wish
to shift particles prior to folding then supply the optional shift
information. should be a three member tcl list consisting of x, y, and z
shifts respectively and each number should be a floating point (ie with
decimal point).
: Reading the coordinates and interactions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| readpdb pdb\_file type first\_id
Reads the positions and possibly charges, types and Lennard-Jones
interactions from the file and a corresponding Gromacs topology file .
The topology file must contain the ``atoms`` and ``atomtypes`` sections,
it may be necessary to use the Gromacs preprocessor to obtain a complete
file from a system configuration and a force field.
Any offset of the particle positions if removed, such that the lower
left corner bounding box of the particles is in the origin. If
``fit_to_box`` is given, the box size if increased to hold the particles
if necessary. If it is not set and the particles do not fit into the
box, the behavior is undefined.
sets the particle type for the added particles. If there is a topology
file give that contains a types for the particles, the particles get
types by the order in the topology file plus . If the corresponding type
in the topology file has a charge, it is used, otherwise the particle
charge defaults to zero.
The particles get consecutive id’s in the order of the pdb file,
starting at . Please be aware that existing particles get overwritten by
values from the file.
The ``lj_with`` section produces Lennard-Jones interactions between the
type and the types defined by the topology file. The interaction
parameters are calculated as :math:`\epsilon_{\text{othertype},j} =
\sqrt{\epsilon_{\text{othertype}} \epsilon_j}` and
:math:`\sigma_{\text{othertype},j}
=\frac{1}{2}\left( \sigma_{\text{othertype}} + \sigma_j \right)`, where
:math:`j` runs over the atomtypes defined in the topology file. This
corresponds to the combination rule 2 of Gromacs. There may be multiple
such sections. The cutoff is determined by as
:math:`\text{cutoff}\times \sigma_{ij}` in a relative fashion. The
potential is shifted so that it vanishes at the cutoff. The command
returns the number of particles that were successfully added.
Reading bonded interactions and dihedrals is currently not supported.

Online-visualisation with Mayavi or OpenGL
------------------------------------------
Expand Down

0 comments on commit 49262af

Please sign in to comment.