Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

seq_shel: Sequential run of Crysalis and shelx

Sequential runner of Crysalis and SHELX for batches of single-crystal X-ray diffraction datasets. Walks a directory of per-dataset subdirectories and performs one of four operations across all of them.

Better description can be found in the ECM Poster.

seq_shel is open source software covered by the GPLv3 license.

Download

The today’s build of seq_shel can be downloaded from here: seq_shel latest package



Subcommands

cell

Extracts unit-cell parameters from each subdirectory’s CIF and writes a whitespace-separated table:

#ID a ae b be c ce alpha alphae beta betae gamma gammae v ve rfactor

(value, margin) pairs come from CIF entries like 3.456(2) and the final rfactor is _diffrn_reflns_av_R_equivalents. Use --re to extract an ID from each subdirectory name (first capture group) instead of using the full name. For example, a typical T-dep dataset:

...
T90K/
T91K/
T92K/
...

with --re "T(\d+)K" would be extracted with numbers instead of dir names, i.e.:

...
90 ...
91 ...
92 ...
...

line

Picks a single line (1-based) out of every CIF and emits it next to the dataset ID. By default, fields shaped like 1.02(3) are expanded into two columns (1.02 0.03); pass --no-fix to keep them verbatim. --part N (repeatable) keeps only selected whitespace-separated fields from the line.

proffit

Generates a Crysalis .mac macro that runs PROFFITBATCH across all dataset subdirectories. For each subdirectory it emits:

XX SAVEUB
XX SELECTEXPNOGUI "<abs path>/<dataset>/<run-stem>"
XX RECALLUB
XX PROFFIT FILE "<abs path>/proffitbatch"

run-stem is derived from the first *.run file found in the subdirectory. Output uses CRLF line endings (Crysalis is a Windows tool). --reverse processes subdirectories in reverse alphabetical order.

shelx

Runs shelxl against each subdirectory. For every dataset:

  1. Take the previous refinement’s .res content as the template.
  2. Patch CELL and ZERR lines from the dataset’s CIF.
  3. Write <dataset>/struct/tmp/<name>.ins and run shelxl.
  4. Read the resulting .res, replace every WGHT line with the second (refined) WGHT, and run shelxl once more.
  5. Carry the new .res forward as the template for the next dataset.

Errors in any one dataset are logged (under --verbose) and the run continues.

Common flags

  • -d, --dir <DIR>: dataset directory (default: .).
  • -v, --verbose: print progress and skip reasons to stderr.
  • -r, --re <REGEX> (cell, line): extract dataset ID from subdirectory name.
  • -o, --out <FILE> (cell, line): output file (default: stdout).

Source code

Source code is freely available at the git repository:

Changelog

  • 2026.5.1 - v0.2.0:

    • Porting to Rust
    • Add proffit –reverse (-r) parameter to create reversed directory processing list
  • 2019.8.27 - v0.1.2:

    • Prints help if no subcommand provided
  • 2019.8.27 - v0.1.1:

    • Add help
  • 2019.2.19 - v0.1.0:

    • Initial release