biotite.structure.io#

A subpackage for reading and writing structure related data.

Macromolecular structure files (PDB, PDBx/mmCIF, BinaryCIF, etc.) and small molecule files (MOL, SDF, etc.) can be used to load an AtomArray or AtomArrayStack.

Since the data model for the AtomArray and AtomArrayStack class does not support duplicate atoms, only one altloc can be chosen for each atom. Hence, the amount of atoms may be lower in the atom array (stack) than in respective structure file.

The recommended format for reading structure files is BinaryCIF. It has by far the shortest parsing time and file size.

Besides the mentioned structure formats, common trajectory formats can be loaded as well.

Content#

TrajectoryFile

This file class represents a trajectory file interfacing a trajectory file class from biotraj.

load_structure

Load an AtomArray or class`AtomArrayStack` from a structure file without the need to manually instantiate a File object.

save_structure

Save an AtomArray or class`AtomArrayStack` to a structure file without the need to manually instantiate a File object.

Subpackages#

biotite.structure.io.mol

The MOL format is used to depict atom positions and bonds for small molecules.

biotite.structure.io.xtc

This subpackage is used for reading and writing trajectories in the compressed Gromacs XTC format.

biotite.structure.io.netcdf

This subpackage is used for reading and writing trajectories in the AMBER NetCDF format.

biotite.structure.io.dcd

This subpackage is used for reading and writing trajectories in the CDC format used by software like CHARMM, OpenMM and NAMD.

biotite.structure.io.gro

This subpackage is used for reading and writing an AtomArray or AtomArrayStack using the Gro format used by the gromacs software package.

biotite.structure.io.pdb

This subpackage is used for reading and writing an AtomArray or AtomArrayStack using the popular PDB format.

biotite.structure.io.trr

This subpackage is used for reading and writing trajectories in the uncompressed Gromacs TRR format.

biotite.structure.io.pdbqt

This subpackage is used for reading and writing an AtomArray or AtomArrayStack using the PDBQT format used by the AutoDock software series.

biotite.structure.io.pdbx

This subpackage provides support for the the modern PDBx file formats.