shnitsel.io.xyz

Submodules

Functions

parse_xyz(f)

Read the inputs from a text file stream into a tuple of atom names, atom numbers and positions.

get_dipoles_per_xyz(file, n, m)

Read full dipole matrix from an xyz file

Package Contents

parse_xyz(f)

Read the inputs from a text file stream into a tuple of atom names, atom numbers and positions.

Parameters:

f (TextIOWrapper) – The File wrapper providing the contents of a .xyz file

Returns:

The tuple of (atom_symbols, atom_numbers, atom_positions), where the latter has dimensions [timestep][atom][direction]

Return type:

Tuple[List[str], List[int], np.ndarray]

get_dipoles_per_xyz(file, n, m)

Read full dipole matrix from an xyz file

Parameters:
  • file (TextIOWrapper) – Wrapper providing the contents of an .xyz file

  • n (int) – First index length of the dipole matrix

  • m (int) – Second index length of the dipole matrix

Returns:

The matrix of the dipole contents

Return type:

np.ndarray