espressomd.io.writer package¶
Submodules¶
espressomd.io.writer.h5md module¶
Interface module for the H5md core implementation.
-
class
espressomd.io.writer.h5md.
H5md
(write_ordered=True, **kwargs)[source]¶ Bases:
object
H5md file object.
Used for accessing the H5MD core implementation via the PScriptInterface.
Note
Bonds will be written to the file automatically if they exist.
Parameters: - filename (
str
) – Name of the trajectory file. - write_pos (
bool
, optional) – If positions should be written. - write_vel (
bool
, optional) – If velocities should be written. - write_force (
bool
, optional) – If forces should be written. - write_species (
bool
, optional) – If types (called ‘species’ in the H5MD specification) should be written. - write_mass (
bool
, optional) – If masses should be written. - write_charge (
bool
, opional) – If charges should be written. - write_ordered (
bool
, optional) – If particle properties should be ordered according to ids.
- filename (
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 VMDParameters: - 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 particles - fp (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 particles - fp (file) – File pointer to write to.