espressopp.io.DumpXYZ¶
dump()
write configuration to trajectory XYZ file. By default filename is
out.xyz
, coordinates are folded. DumpXYZ works also for Multiple communicators.Properties
filename Name of trajectory file. By default trajectory file name is
out.xyz
unfolded False if coordinates are folded, True if unfolded. By default - False
append True if new trajectory data is appended to existing trajectory file. By default - True
length_factor If length dimension in current system is nm, and unit is 0.23 nm, for example, then
length_factor
should be 0.23 Default: 1.0length_unit It is length unit. Can be
LJ
,nm
orA
. By default -LJ
- store_pids
True if you want to store pids as fastwritexyz does. False otherwise (standard XYZ) Default: False
- store_velocities
True if you want to store velocities. False otherwise (XYZ doesn’t require it) Default: False
usage:
writing down trajectory
>>> dump_conf_xyz = espressopp.io.DumpXYZ(system, integrator, filename='trajectory.xyz')
>>> for i in range (200):
>>> integrator.run(10)
>>> dump_conf_xyz.dump()
writing down trajectory using ExtAnalyze extension
>>> dump_conf_xyz = espressopp.io.DumpXYZ(system, integrator, filename='trajectory.xyz')
>>> ext_analyze = espressopp.integrator.ExtAnalyze(dump_conf_xyz, 10)
>>> integrator.addExtension(ext_analyze)
>>> integrator.run(2000)
Both examples will give the same result: 200 configurations in trajectory .xyz file.
setting up length scale
For example, the Lennard-Jones model for liquid argon with \(\sigma=0.34 [nm]\)
>>> dump_conf_xyz = espressopp.io.DumpXYZ(system, integrator, filename='trj.xyz', \
>>> unfolded=False, length_factor=0.34, \
>>> length_unit='nm', store_pids=True, \
>>> store_velocities = True, append=True)
will produce trj.xyz with in nanometers
-
espressopp.io.
DumpXYZ
(system, integrator, filename=out.xyz, unfolded=False, length_factor=1.0, length_unit='LJ', store_pids=False, store_velocities=False, append=True)¶ Parameters: - system –
- integrator –
- filename –
- unfolded (bool) –
- length_factor (real) –
- length_unit –
- store_pids (bool) –
- store_velocities (bool) –
- append (bool) –
-
espressopp.io.DumpXYZ.
dump
()¶ Return type: