dyadkin 195f898af3
ci publish (linux + win + macos) / linux (push) Successful in 3s
ci publish (linux + win + macos) / mac (push) Successful in 9s
ci publish (linux + win + macos) / win (push) Successful in 10s
ci publish (linux + win + macos) / promote (push) Successful in 0s
ci publish (linux + win + macos) / cleanup-staging (push) Successful in 0s
Fix clippy warnings
2026-07-02 11:03:36 +02:00
2026-07-01 16:20:37 +02:00
2026-07-02 11:03:36 +02:00
2026-04-28 10:41:37 +02:00
2026-04-28 21:56:17 +02:00
2026-04-29 16:31:14 +02:00

seq_shel

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.

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).

Build

cargo build --release
S
Description
Set of tools for processing multiple datasets in crysalis
Readme
139 KiB
0 Stars 1 Watchers 0 Forks
2026-05-01 13:03:02 +02:00
Languages
Rust 100%