NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #3304 most downloaded on PyPI
library for structural biology
Last release 7 months ago
02 Mar 2026
Ships on a steady schedule
a new release about every 3 months
Some releases are documented
notes for 25 of 55 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
55 releases · first in 2018
a new drg subcommand: aiming at reproducing acedrg -c (background and some details in #401)
drg subcommand: aiming at reproducing acedrg -c (background and some details in #401)gemmi drgAdd calculation of hydrogen bonds according to the venerable DSSP method (implementation of the whole DSSP method was considered, attempted and postpo
_struct_ref_seq.populate_structure_from_block() (#383)stop_ is a keyword, but stop_it is not)--pow which outputs, for instance, a Pattterson map--asus that list asymmetric units that are in contact with 1_555,
not individual contacts.--add-tls didn't work for mmCIF input python -m gemmi.fetch 3abcread_structure_string()One column per quarter.
Until now parse_triplet("h,k,l") was equivalent to parse_triplet("x,y,z"). This is not how it's handled in cctbx and in, for example Pointless. In the
A breaking change in Op:
Until now parse_triplet("h,k,l") was equivalent to parse_triplet("x,y,z").
This is not how it's handled in cctbx and in, for example Pointless.
In the Pointless documentation of the REINDEX keyword there is such a note:
Note that the real and reciprocal space operators correspond to mutually transposed matrices, eg "x-y,-y,-z" corresponds to "h,-h-k,-l".
Gemmi Op was changed to store the notation kind that was used at creation,
so now parse_triplet("h,k,l") .triplet() gives "h,k,l", not "x,y,z".
New Op methods have been added: is_hkl(), as_hkl() and as_xyz()
Apart from this, in case of hkl-Ops parse_triplet and triplet silently transpose the rotation matrix. See #359 for details.
This change was extensively tested with Mtz::reindex() – against Pointless.
It could happen that it causes problems in other scenarios.
DDL2: added alternate (deposition) checks
Mtz: added C++ Mtz::write_to_buffer() and Python Mtz.write_to_bytes() (used for streaming MTZ files from web servers) and C++ size_to_write() These new C++ functions are currently undocumented, not sure if they are useful. Changed Mtz::write_to_string() to clear the string instead of appending to it. Probably nobody expected the latter. Reorganized MTZ reading to avoid fseek() – so we can read a stream or gzipped file, without storing/unpacking it into memory buffer as we did before (i.e. reading huge gzipped MTZ files uses less memory)
added UnitCell::find_nearest_pbc_images()
CIF reading: added optional argument int check_level=1 (see docs for details)
Form factors: support for custom form factors (in the form of sums of 5 Gaussians) – for a Cambridge project on chemistry-dependent form factors.
to_mmcif: write _atom_site_anisotrop.pdbx_PDB_model_num if there are 2+ models
to_pdb: split option use_linkr into use_linkr and use link_id
the built-in residue list is now partly editable (example in docs)
mmcif: workaround for a problem with reading 7pvv.cif (#369) occupancy and B_iso_or_equiv are now optional (because of #375)
pdb: added option ignore_ter to PdbReadOptions
started working on secondary structure determination – that's unfinished and unusable yet
renamed interpolate_grid_of_aligned_model2() to interpolate_grid_around_model()
added functions interpolate_points() and interpolate_grid_flexible() (#363), needed in Pandda2
--depo to check against PDB's deposition criteria (from DDL2)reading mmcif: added reading of TLS information
Logger also in classes Ddl and CifToMtz (Logger is now used in all library functions that output warnings or messages)read_ccp4_header() for reading only map header when a map is a huge fileMtz.filtered() and XdsAscii.filtered()cif.read_file() and gemmi.read_small_structure() didn't)gemmi fprime supports ranges of energiesgemmi merge – added new options, most importantly --stats to print quality metricsgemmi convert – option --add-tls to convert "residual" B-factors (from Refmac) to full B-factorsgemmi mask – solvent masking that takes into account alternative conformers and atom occupancy (experimental)C++14 (or later) is required to build the library, C++17 (or later) to build Python bindings. Expect breaking changes, especially in Python bindings.…
C++14 (or later) is required to build the library, C++17 (or later) to build Python bindings. Expect breaking changes, especially in Python bindings. The lists below are not complete, but should cover most of the changes.
Model::name with int Model::numorder that can be 0 (nearest value), 1 (linear interpolation), or 3 (cubic). In C++ there are also functions such as trilinear_interpolation() to ensure no overhead.[metals] and [nonmetals].read_cif args__array__ methods.
For NumPy, you can also use .array properties that were available also in the previous releases.site-packages/gemmi/ (this change should be invisible to the user)pdbx_F_calc_with_solvent to F-model (+phase)This is primarily a bug-fix release. New Python bindings are not included yet.
This is primarily a bug-fix release. New Python bindings are not included yet.
Enhancements:
New subcommand gemmi set for changing coordinates, B-factors and occupancies in coordinate files (mmCIF and PDB). Unlike other tools, it replaces numbers while leaving the rest of the file intact. An alternative to CCP4 PDBSET keywords: BFACTOR, OCCUPANCY, SHIFT, NOISE. Note that gemmi convert offers overlapping capabilities. For instance, gemmi convert --apply-symop=x+0.123,y,z shifts the coordinates similarly to gemmi set --shift='9.3 0 0' (the latter takes the shift in Angstroms).
Improved anisotropic scaling of structure factors. More work is planned in this area.
Fixes:
_atom_site.auth_seq_idgemmi convert --assign-records)gemmi convert --sifts-num for UniProt sequence numbers >5000And various minor changes that are hard to describe concisely.
DensityCalculator: deprecated function set_grid_cell_and_spacegroup(), use grid.setup_from()
Library:
IT92::ignore_charge to true (i.e. charges are now ignored by default; before version 0.6.3 they were always ignored)ensure_loop() that converts tag-value pairs into a loop; might be needed before calling append_row()set_grid_cell_and_spacegroup(), use grid.setup_from()calculate_b_iso_range() and calculate_b_aniso_range(); the first one can be used to detect if pLDDT is in the range 0-100 (like from AlphaFold) or 0-1 (like from ESMFold)Entity::reflects_microhetero that shows if sequences were read from SEQRES (and don't account for point mutations) or from _entity_poly_seq; new function add_microhetero_to_sequences() changes the former to the latterProgram:
--assign-records[=A|H], improved --sifts-num, adding microheterogeneities to _entity_poly_seq when converting from PDB-t for basic comparison of values for a single tagOther:
and a number of less important changes
gemmi can now be built with zlib-ng, a faster fork of zlib (good for working with large, compressed files)
Library:
ABCDE ↔ ~DE) for PDB files_chem_comp_atom.alt_atom_id) from the monomer library (the names in the CCD and therefore also in the ML change occasionally), print better diagnostic; added function MonLib::update_old_atom_names() to update the names in a Structureadd_entity_ids() when called with overwrite=true)Intensities::prepare_merged_mtz()Python bindings:
cif.Loop.val() has been replaced with __getitem__/__setitem__Mtz.Batch.ints and Mtz.Batch.floatsProgram
Note: this list is meant to show important changes only.
completely changed build system for Python module, from setuptools to scikit-build-core
Library
Program
new: normalization of amplitudes using so-called "Karle" approach, similar as in the CCP4 program ECALC
a number of fixes, mostly in topology preparation
data_) used to have the name set to "#", now it's " "changed how CISPEP is stored: previously, it was assumed that a link between two residues is either TRANS or CIS; if the residues have atoms with alte
_atom_site.auth_atom_id and auth_comp_id, which are skipped by default (because they are always the same as label_…_id)C++ library is no longer header-only, several function were moved from headers to src/ to make compilation faster
gemmi program has new subcommand xds2mtz that converts from XDS_ASCII to multirecord MTZ
save_doc that stores cif.Document if the read file is mmCIF or mmJSONdeprecated count_hydrogen_sites(): can be replaced with has_hydrogen() or count_atom_sites(Selection("[H,D]"))
calculating ASU brick for given space group settings
style to Op.triplet()determining lattice symmetry and (psuedo-)merohedral twinning laws
new sub-program under development: gemmi-prep
API change: changed arguments for Ccp4.setup()
various bug fixes and small improvements, many of them for the MTZ -> mmCIF conversion
support for huge MTZ files (>2GB) using the format extension added in CCP4 8.0 – implemented by Claus
gemmi program: enhancements in mtz2cif, cif2mtz and merge
mtz2cif, cif2mtz and mergecentred to primitive lattce transformation
UnitCell::is_compatible_with_spacegroup()SMat33::elements() and change_basis() were replaced – each was replaced with two new functionsgemmi mtz2cif --depo.merge_atoms_in_expanded_model() – sort out atoms on special positions after expanding NCS or making bioassembly,
Python porting note: CIF parsing may raise ValueError; opening a file may rise IOError. Previously it was RuntimeError.
Python porting note: CIF parsing may raise ValueError; opening a file may rise IOError. Previously it was RuntimeError.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →