pyqmmm.qm.traj_merger

Combine frames into a single file.

Module Contents

Functions

get_xyz_filenames()

Search the current directory for all xyz files and remove non-trajectories.

request_frames(xyz_filename)

Get the request frames for each file from the user.

multiframe_xyz_to_list(xyz_filename)

Turns an xyz trajectory file into a list of lists where each element is a frame.

combine_xyz_files()

Combines two xyz files into one.

xyz_merger()

Reaction path calculations often need to be restarted from a later point.

pyqmmm.qm.traj_merger.get_xyz_filenames()[source]

Search the current directory for all xyz files and remove non-trajectories.

Parameters:

atoms (list) – List of atoms indices

Returns:

trajectory_list – List string names of all the trajectory xyz files in the directory.

Return type:

list

pyqmmm.qm.traj_merger.request_frames(xyz_filename)[source]

Get the request frames for each file from the user.

Parameters:

xyz_filename (str) – The filename of the current xyz trajectory of interest.

Returns:

frames – The frames the user requested to be extracted from the xyz trajectory.

Return type:

list

pyqmmm.qm.traj_merger.multiframe_xyz_to_list(xyz_filename)[source]

Turns an xyz trajectory file into a list of lists where each element is a frame.

Parameters:

xyz_filename (string) – The file name of a trajectory.

Returns:

trajectory_list – List of lists containing the trajectory with each frame saved as an element.

Return type:

list

pyqmmm.qm.traj_merger.combine_xyz_files()[source]

Combines two xyz files into one.

pyqmmm.qm.traj_merger.xyz_merger()[source]

Reaction path calculations often need to be restarted from a later point.

For example, when rerunning a scan of the peak to get higher resolution TS. Afterwards, the .xyz files of the two scans need to be stitched together. Here, users can specify the frames from each file that need to be combined. The script will generate a new combined file.