Read module

Module for reading and processing input files.

sdanalysis.read.read_gsd_trajectory(infile, steps_max=None, linear_steps=100, keyframe_interval=1000000, keyframe_max=500)[source]

Perform analysis of a GSD file.

Return type

Iterator[Tuple[List[int], Frame]]

sdanalysis.read.read_lammps_trajectory(infile, steps_max=None)[source]
Return type

Iterator[Tuple[List[int], LammpsFrame]]

sdanalysis.read.open_trajectory(filename, progressbar=None, frame_interval=1)[source]

Open a simulation trajectory for processing.

This reads each configuration in turn from the trajectory, handling most of the common errors with reading a file.

This handles trajectories in both the gsd file format and simple lammpstrj files.

Parameters
  • filename (Path) – The path to the file which is to be opened.

  • progressbar – Whether to display a progress bar when reading the file.

Returns

Frame objects.

Return type

Generator which returns class

sdanalysis.read.process_file(infile, wave_number, steps_max=None, linear_steps=None, keyframe_interval=1000000, keyframe_max=500, mol_relaxations=None, outfile=None, scattering_function=False)[source]

Read a file and compute the dynamics quantities.

This computes the dynamic quantities from a file returning the result as a pandas DataFrame. This is only suitable for cases where all the data will fit in memory, as there is no writing to a file.

Args:

Returns

DataFrame with the dynamics quantities.

Return type

(py:class:pandas.DataFrame)