Changelog
Additions
- Support for unit cells and simulation boxes
- Added
box
attribute forstructure.AtomArray
andstructure.AtomArrayStack
that represents the three box vectors - The
box
attribute is automatically read from and written into all supported structure file formats - Added methods for handling boxes in
structure
packagevectors_from_unitcell()
andunitcell_from_vectors()
faciliate the conversion between box vectors and lengths/anglescoord_to_fraction()
andfraction_to_coord
allow expressing coordinates as fraction of box vectorsrepeat_box()
andrepeat_box_coord()
create periodic copies of coordinates or an atom array (stack).box_volume()
calculates the volume of a boxis_orthogonal()
is used to check whether a box is orthogonalcheck_in_box()
checks whether atoms of a structure are outside the box
- Added
structure.index_xxx()
versions of functions for geometric measurements (e.g.structure.index_distance()
)- The functions take an atom array (stack) and referring indices, similar to MDTraj.
- Optionally use a minimum-image convention based on the
box
attribute displacement()
andindex_displacement()
are used for calculation of displacement vectors
structure.CellList
optionally uses minimum-image convention for distance calculation based on thebox
attribute
- Added
- Added
structure.io.pdb.get_structure()
andstructure.io.pdb.set_structure()
as thin wrappers around the corresponding methods ofstructure.io.pdb.PDBFile
Changes
structure.io.mmtf.MMTFFile
andstructure.io.pdbx.PDBxFile
implementMutableMapping
, offering a wider range of dictionary-like methods- Cython language level is set to 3
Fixes
- A single model can now be read from a
structure.io.pdb.PDBFile
, if the models in the file have a different amount of atoms - Clarified in the documentation that Biotite uses Å as base unit