Skip to main content

Module python

Module python 

Source
Expand description

Python interface for taco_format using PyO3.

This module exposes functions to save and load ASE Atoms objects from Python.

Example::

>>> import ase
>>> import taco_format
>>> atoms = ase.Atoms('H2O')
>>> taco_format.save_ase('test.taco', atoms)
>>> atoms2 = taco_format.load_ase('test.taco')
>>> assert atoms == atoms2

For trajectories::

>>> atoms_list = [ase.Atoms('H2O') for _ in range(10)]
>>> taco_format.save_trajectory('traj.taco', atoms_list)
>>> atoms_list2 = taco_format.load_trajectory('traj.taco')

Functions§

calc_rmsd
Calculate root-mean-square deviation (RMSD) between two coordinate sets
center_of_mass
Calculate the center of mass of a set of positions
cli_main
CLI entry point for the installed ‘taco’ command
copy_frames
Copy frames from one TACO file to another
extract_atoms
Extract a subset of atoms from a TACO file
extract_subset
Extract a subset of atoms from positions
get_file_info
Get file information as a string
is_taco_file
Check if a file is a TACO file
read
Read ASE Atoms object(s) from a TACO file.
read_frame_range
Read a range of frames from a TACO file.
read_frames
Read specific frames from a TACO file.
run_cli
Run the TACO CLI with the given arguments
save_ase
Save an ASE Atoms object to a TACO file.
write
Write ASE Atoms object(s) to a TACO file.
write_frames
Write a list of ASE Atoms objects to a TACO file.