pyqmmm.qm.xyz_flipper

Reverses an xyz trajectory, for example if it was run backwards for better convergence.

Module Contents

Functions

read_xyz(file)

Read an xyz trajectory file and return a list of frames.

write_xyz(file, frames)

Write frames to an xyz trajectory file.

xyz_flipper(input_file)

Takes an xyz file and reverses the order of the frames.

pyqmmm.qm.xyz_flipper.read_xyz(file)[source]

Read an xyz trajectory file and return a list of frames.

Parameters:

file (str) – The name of the xyz file to read.

Returns:

frames – A list of tuples containing the number of atoms, title, and atom lines for each frame.

Return type:

list

pyqmmm.qm.xyz_flipper.write_xyz(file, frames)[source]

Write frames to an xyz trajectory file.

Parameters:
  • file (str) – The name of the output xyz file.

  • frames (list) – A list of tuples containing the number of atoms, title, and atom lines for each frame.

pyqmmm.qm.xyz_flipper.xyz_flipper(input_file)[source]

Takes an xyz file and reverses the order of the frames.

Parameters:

input_file (str) – The name of the input xyz file to reverse.

Notes

The input file should be an xyz trajectory file, usually named scan_optim in TeraChem. The output file will be named as “{input_file}_reversed.xyz”.