espressomd.MDA_ESP package¶
Module contents¶
This modules exposes ESPResSo’s coordinates and particle attributes to MDAnalysis without the need to save any 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
and the coordinates reader ESPReader.
A minimal working example is the following:
>>> import espressomd
>>> import espressomd.MDA_ESP
>>> import MDAnalysis as mda
>>> # system setup
>>> system = espressomd.System(box_l=[10., 10., 10.])
>>> system.time_step = 1.
>>> system.cell_system.skin = 1.
>>> system.part.add(pos=[1., 2., 3.])
>>> # set up the stream
>>> eos = espressomd.MDA_ESP.Stream(system)
>>> # feed Universe with a topology and coordinates
>>> u = mda.Universe(eos.topology, eos.trajectory)
>>> print(u)
<Universe with 1 atoms>
- class espressomd.MDA_ESP.ESPParser(filename, **kwargs)[source]¶
Bases:
MDAnalysis.topology.base.TopologyReaderBaseAn MDAnalysis reader of ESPResSo’s topology.
- format = 'ESP'¶
- class espressomd.MDA_ESP.ESPReader(filename, convert_units=True, n_atoms=None, **kwargs)[source]¶
Bases:
MDAnalysis.coordinates.base.SingleFrameReaderBaseAn MDAnalysis single frame reader for the stream provided by
Stream.- format = 'ESP'¶
- units = {'length': 'nm', 'time': None, 'velocity': 'nm/ps'}¶
dict with units of of time and length (and velocity, force, … for formats that support it)
- class espressomd.MDA_ESP.Stream(system)[source]¶
Bases:
objectCreate an object that provides a MDAnalysis topology and a coordinate reader
>>> eos = espressomd.MDA_ESP.Stream(system) >>> u = mda.Universe(eos.topology, eos.trajectory)
- Parameters
system (
espressomd.system.System)
- class espressomd.MDA_ESP.Timestep(n_atoms, **kwargs)[source]¶
Bases:
MDAnalysis.coordinates.base.Timestep- property dimensions¶
unitcell dimensions (A, B, C, alpha, beta, gamma)
lengths a, b, c are in the MDAnalysis length unit (Å), and angles are in degrees.
Setting dimensions will populate the underlying native format description of box dimensions