espressomd.MDA_ESP package

Module contents

This modules allows to expose ESPREsSo’s coordinates and particle attributes to MDAnalysis without need to save information to files.

The main class is Stream(), which is used to initialize the stream of data to MDAnalysis’ readers. These are the topology reader ESPParser(TopologyReaderBase) and the coordinates reader ESPReader(SingleFrameReaderBase).

A minimal working example is the following:

>>> # imports
>>> import espressomd
>>> from espressomd import MDA_ESP
>>> import MDAnalysis as mda
>>> # system setup
>>> system = espressomd.System()
>>> system.time_step = 1.
>>> system.cell_system.skin = 1.
>>> system.box_l = [10.,10.,10.]
>>> system.part.add(id=0,pos=[1.,2.,3.])
>>> # set up the stream
>>> eos = MDA_ESP.Stream(system)
>>> # feed Universe with a topology and with coordinates
>>> u = mda.Universe(eos.topology,eos.trajectory)
>>> print u
<Universe with 1 atoms>
class espressomd.MDA_ESP.ESPParser(filename, **kwargs)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

An MDAnalysis reader of espresso’s topology

format = 'ESP'
parse()[source]

Access ESPResSo data and return the topology object

Returns:
Return type:an MDAnalysis Topology object
class espressomd.MDA_ESP.ESPReader(*args, **kwargs)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

An MDAnalysis single frame reader for the stream provided by Stream()

format = 'ESP'
units = {'length': 'nm', 'time': None, 'velocity': 'nm/ps'}
class espressomd.MDA_ESP.Stream(system)[source]

Bases: object

trajectory

Particles’ coordinates at the current time

Returns:
Return type:A named stream in the format that can be parsed by ESPReader()
class espressomd.MDA_ESP.Timestep(*args, **kwargs)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

dimensions