espressopp.io.DumpGRO¶
dump() write configuration to trajectory GRO file. By default filename is “out.gro”, coordinates are folded.
Properties
filename Name of trajectory file. By default trajectory file name is “out.gro”
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
length_unit It is length unit. Can be LJ, nm or A. By default - LJ
usage:
writing down trajectory
>>> dump_conf_gro = espressopp.io.DumpGRO(system, integrator, filename='trajectory.gro')
>>> for i in range (200):
>>> integrator.run(10)
>>> dump_conf_gro.dump()
writing down trajectory using ExtAnalyze extension
>>> dump_conf_gro = espressopp.io.DumpGRO(system, integrator, filename='trajectory.gro')
>>> ext_analyze = espressopp.integrator.ExtAnalyze(dump_conf_gro, 10)
>>> integrator.addExtension(ext_analyze)
>>> integrator.run(2000)
Both exapmles will give the same result: 200 configurations in trajectory .gro file.
setting up length scale
For example, the Lennard-Jones model for liquid argon with \(\sigma=0.34 [nm]\)
>>> dump_conf_gro = espressopp.io.DumpGRO(system, integrator, filename='trj.gro', unfolded=False, length_factor=0.34, length_unit='nm', append=True)
will produce trj.gro with in nanometers
-
espressopp.io.
DumpGRO
(system, integrator, filename, unfolded, length_factor, length_unit, append)¶ Parameters: - system –
- integrator –
- filename – (default: ‘out.gro’)
- unfolded – (default: False)
- length_factor (real) – (default: 1.0)
- length_unit – (default: ‘LJ’)
- append – (default: True)
-
espressopp.io.DumpGRO.
dump
()¶ Return type: