shnitsel-tools documentation

Getting started

First install,

pip install shnitsel-tools

then import.

import shnitsel as st
import shnitsel.xarray # Activate accessors
from shnitsel.data.tree import tree_to_frames

Reading data from…

…trajectories:

# One of the following:
db = st.read('path/to/Singlet_1/', kind='sharc')
db = st.read('path/to/Newton-X/', kind='nx')
db = st.read('path/to/PyRAI2MD/', kind='pyrai2md')
db = st.read('path/to/ase.db')

# And then:
ds = tree_to_frames(db)

…SHNITSEL-style NetCDF4:

ds = st.read('path/to/dataset.nc')

Saving data to…

…NetCDF4:

ds.st.write_shnitsel_file('path/to/dataset.nc')

Select…

…a variable:

ds['energy'] # ...or:
ds.energy

…a trajectory:

ds.sel(trajid=1)

…a point in time:

ds.sel(time=1)

Reference