espressomd.io.writer package¶
Submodules¶
espressomd.io.writer.h5md module¶
Interface module for the H5md core implementation.
-
class
espressomd.io.writer.h5md.
H5md
(file_path, unit_system=<espressomd.io.writer.h5md.UnitSystem object>)[source]¶ Bases:
object
H5md file object.
Used for accessing the H5MD core implementation.
Note
Bonds will be written to the file automatically if they exist.
- Parameters
file_path (
str
) – Path to the trajectory file.unit_system (
UnitSystem
, optional) – Physical units for the data.
-
class
espressomd.io.writer.h5md.
UnitSystem
(**kwargs)[source]¶ Bases:
object
Data class for writing H5MD trajectories with physical units <https://nongnu.org/h5md/modules/units.html>. There are four settable units: ‘mass’, ‘length’, ‘time’, ‘charge’. Units should be written as strings following the specifications defined here <https://nongnu.org/h5md/modules/units.html#unit-string>, e.g.
UnitSystem(time='ps', mass='u', length='nm', charge='e')
.
espressomd.io.writer.vtf module¶
-
espressomd.io.writer.vtf.
vtf_pid_map
(system, types='all')[source]¶ Generates a VTF particle index map to ESPResSo
id
. This fills the gap for particle ID’s as required by VMD- Parameters
system (espressomd.System() object)
types (
str
) – Specifies the particle types. The id mapping depends on which particles are going to be printed. This should be the same as the one used in writevsf() and writevsf().
- Returns
dict
- Return type
A dictionary where the values are the VTF indices and the keys are the ESPresSo particle
id
-
espressomd.io.writer.vtf.
writevcf
(system, fp, types='all')[source]¶ writes a VCF (VTF Coordinate Format) to a file. This can be used to write a timestep to a VTF file.
- Parameters
system (espressomd.System() object)
types (
str
) – Specifies the particle types. The string ‘all’ will write all particlesfp (file) – File pointer to write to.
-
espressomd.io.writer.vtf.
writevsf
(system, fp, types='all')[source]¶ writes a VST (VTF Structure Format) to a file. This can be used to write the header of a VTF file.
- Parameters
system (espressomd.System() object)
types (
str
) – Specifies the particle types. The string ‘all’ will write all particlesfp (file) – File pointer to write to.