From 0211dd487cf8d4f3815273d993838cd8369a9f83 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 20 Oct 2021 15:28:19 +0200 Subject: Add "plain" MTZ file layout, distinct from "Bijvoet" layout Closes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/52 --- src/get_hkl.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'src/get_hkl.c') diff --git a/src/get_hkl.c b/src/get_hkl.c index e80383e5..82bf5815 100644 --- a/src/get_hkl.c +++ b/src/get_hkl.c @@ -94,9 +94,10 @@ static void show_help(const char *s) " equivalent reflections.\n" "\n" "Don't forget to specify the output filename:\n" -" -o, --output= Output filename (default: stdout).\n" -" --output-format=mtz Output in MTZ format.\n" -" --output-format=xds Output in XDS format.\n" +" -o, --output= Output filename (default: stdout).\n" +" --output-format=mtz Output in MTZ format.\n" +" --output-format=mtz-bij Output in MTZ format, Bijvoet pairs together\n" +" --output-format=xds Output in XDS format.\n" ); } @@ -916,7 +917,19 @@ int main(int argc, char *argv[]) r = 1; } else { r = write_to_mtz(input, mero, cell, 0, INFINITY, output, - "dataset", "crystal", "project"); + "dataset", "crystal", "project", 0); + } + } else if ( strcasecmp(output_format_str, "mtz-bij") == 0 ) { + if ( !libcrystfel_can_write_mtz() ) { + ERROR("Sorry, this version of CrystFEL was compiled " + "without MTZ support (libccp4 is required)\n"); + r = 1; + } else if ( output == NULL ) { + ERROR("You must provide the MTZ output filename.\n"); + r = 1; + } else { + r = write_to_mtz(input, mero, cell, 0, INFINITY, output, + "dataset", "crystal", "project", 1); } } else if ( strcasecmp(output_format_str, "xds") == 0 ) { if ( output == NULL ) { -- cgit v1.2.3