DumpConfigurations - read/write xyz files

espressopp.tools.DumpConfigurations.fastwritexyz(filename, system, velocities=True, unfolded=True, append=False, scale=1.0)
espressopp.tools.DumpConfigurations.fastwritexyz_standard(filename, system, unfolded=False, append=False)

Fast write standard xyz file. Generally standard xyz file is

>>>  number of particles
>>>  comment line
>>>  type x y z
>>>  ......
>>>  ......
>>>  ......

Additional information can be found here: Wiki: http://en.wikipedia.org/wiki/XYZ_file_format OpenBabel: http://openbabel.org/wiki/XYZ_%28format%29

In this case one can choose folded or unfolded coordinates. Currently it writes only particle type = 0 and pid is a line number. Later different types should be implemented.

espressopp.tools.DumpConfigurations.writexyz(filename, system, velocities=True, unfolded=False, append=False)
espressopp.tools.DumpConfigurations.xyzfilewrite(filename, system, append=False, atomtypes={0: 'Fe', 1: 'O', 2: 'C'}, velocities=False, charge=False)

This method creates a xyz file with the data from a specific system: 1. row: number of the atoms 2. row: REMARK generated by ESPResSo++ following rows: atomsymbol positionX positionY positionZ (velocityX velocityY velocityZ) (charge) last row: END

The method needs the following parameters:

  • filename

    name of the file where the table schould be saved in

  • system

    ESPResSo system which creates the data e.g.:

    >>> system, integrator = espressopp.standard_system.LennardJones(100,(10,10,10))
  • append


    the data in the file will be overwritten


    the data will be appended

  • atomtypes the xyz file needs atom symbols, so it has to translate the numbers insert a dictionary with the right translation

  • velocities


    does not save the velocity vectors


    creates collumns for the velocity vectors and saves the data

  • charge


    does not save the charge


    creates collumns for the charges and saves the data