pwtools.dcd.read_dcd_data_ref

pwtools.dcd.read_dcd_data_ref(fn, convang=False)[source]

Read dcd file. Pure Python version. Slow, only reference implementation. Use read_dcd_data() instead.

Parameters:
  • fn (str) – filename

  • convang (bool) – convert angles from cosine to degree (only useful for lammps style dcd files)

Returns:

ret – | cryst_const : (nstep,6) float64 array, (a,b,c,alpha,beta,gamma), | Angstrom, degrees | coords : (nstep, natoms, 3) float32 array, cartesian coords Angstrom

Return type:

(cryst_const, coords)

Examples

>>> # default settings read cp2k files
>>> cc,co = read_dcd_data_ref('cp2k.dcd')
>>> cc,co = read_dcd_data_ref('cp2k.dcd', convang=False)
>>> cc,co = read_dcd_data_ref('lammps.dcd', convang=True)