Disordered Structure Refinement (DSR)

The refinement of highly disordered solvents and moieties with SHELXL is an often slow or even difficult task. Therefore these voids frequently are "squeezed out" of the X-ray data. This practice is often not necessary. To help with the routine work of refining disordered solvents the program DSR was developed in Python.

DSR program flow

The program-package consists of a simple text-database with fragments of molecules and the DSR program itself. It acts as a preprocessor for SHELXL res-files. The user inserts a special command in the SHELXL .res file and the DSR program reads this information to place a molecular fragment with the desired atoms on the position of the target atoms or Q-peaks, respectively. Bond restraints are applied from the database to the fragment. DFIX restraints can be generated automatically, if desired. Ready to use fragments with sensual restraints can be imported from http://grade.globalphasing.org.

Please report bugs or annoying problems to dkratzert@gmx.de. I can only fix bugs that are known to me. Also wishes for new fragments or program features are very welcome!

You may cite DSR (or FragmentDB) as

D. Kratzert, I. Krossing, J. Appl. Cryst. 2018, 51, 928-934. doi: 10.1107/S1600576718004508 (direct download)

D. Kratzert, J.J. Holstein, I. Krossing, J. Appl. Cryst. 2015, 48, 933-938. doi:10.1107/S1600576715005580 (download)


You find a graphical user interface for DSR in ShelXle. Just select three source and three target atoms each and you can transfer the desired fragment from DSR into your structure in ShelXle. The edit window makes it easy to modify/create fragments. See a Youtube video how it works. You can also use DSR on the command line.

Known bugs

In ShelXle, you might encounter the appearance of black or colored boxes instead of atom labels. This bug is fixed in the newest version of ShelXle. Please update ShelXle in order to resolve the problem.

User Manual



Current release
DSR-setup-236.exe 2021-11-27 Windows 7 and up
dsr-236.deb 2021-10-19 Ubuntu Linux 16
DSR-236-0.noarch.rpm 2021-10-19 OpenSuSE Linux 15.2
DSR-236.dmg 2021-10-19 MacOS 11.6

Recent Changes


Virus Scanners

Some antivirus scanners don't seem to like DSR. If you have problems installing DSR, please let me know. Most antivirus vendors allow the correction of false-positive virus detections.


  • You prefer Olex2? Then you might want to use the FragmentDB plugin. It is a port of DSR to Olex2.
  • You just need a parser for SHELX files? Then you might be interested in my ShelXFile project.

Some molecular fragments are taken from the "Idealized Molecular Geometry Library" of Ilia A. Guzei
(I. A. Guzei, J. Appl. Cryst. 2014, 47, 806-809).

DSR uses the following Python libraries:

Fredrik Johansson et.al. mpmath: a Python library for arbitrary-precision floating-point arithmetic (version 0.18), December 2013, http://mpmath.org/.

A. Hagberg, D. Schult, P. Swart, NetworkX: package for the creation, manipulation, and study of complex networks (version 1.8.1) 2013, http://networkx.github.io/.


DSR is free software and licensed under the beerware license.