XDSGUI: Difference between revisions

From XDSwiki
Jump to navigation Jump to search
(→‎Frame: mention HKL indices display)
 
(131 intermediate revisions by 4 users not shown)
Line 1: Line 1:
XDSGUI is a GUI (graphical user interface) for XDS that is supposed to help both novice and experienced users.  
XDSGUI is a GUI (graphical user interface) for XDS that is supposed to help both novice and experienced users.  
It graphically displays the ASCII and [http://www.bernstein-plus-sons.com/software/CBF cbf] files that XDS writes, and can run useful shell commands with a simple mouse click. The design goal of the program is to enable XDS data processing without the commandline, and to supply additional graphical information, in a simple, user-modifiable and user-extensible way.
It graphically displays the ASCII and [http://www.bernstein-plus-sons.com/software/CBF cbf] files that XDS writes, and can run useful shell commands with a simple mouse click. The design goal of the program is to enable XDS data processing without the commandline, and to supply additional graphical information, in a simple, user-modifiable and user-extensible way.
XDSGUI gives access to George Sheldrick's SHELXC, SHELXD and SHELXE programs, via the [[XDSGUI#SHELX|SHELX]] tab, and to Isabel Uson's ARCIMBOLDO programs, via the [[XDSGUI#ARCIMBOLDO|ARCIMBOLDO]] tab.
The XDSGUI paper (Brehm, Triviño, Krahn, Usón and Diederichs (2023) XDSGUI: a graphical user interface for XDS, SHELX and ARCIMBOLDO. J. Appl. Cryst. 56) is open access at https://doi.org/10.1107/S1600576723007057 .


== How to use XDSGUI ==
== How to use XDSGUI ==


The program may be used to analyze graphically any existing directory with files earlier written by XDS, or may be used to create these files. It should be started in a terminal window, which will later show the output of the programs that are run (XDS, pointless, XDSCONV, ...).  
The program may be used to analyze graphically any existing directory with files earlier written by XDS, or may be used to create these files. '''It should be started in a terminal window''', which will later show the output of the programs that are run (XDS, pointless, XDSCONV, ...).  


The user is supposed to use the tabs on the top, from left to right.  
The user is supposed to use the tabs on the top, from left to right.  
Line 11: Line 16:
After finally moving to the [[XDSGUI#XDS.INP|XDS.INP]] tab, other parameters can be adjusted by the user, and finally XDS may be run by clicking a button. The resulting output files from XDS will then be displayed in the next tabs.  
After finally moving to the [[XDSGUI#XDS.INP|XDS.INP]] tab, other parameters can be adjusted by the user, and finally XDS may be run by clicking a button. The resulting output files from XDS will then be displayed in the next tabs.  


After finishing this first round of processing, the [[XDSGUI#TOOLS|TOOLS]] tab may be used, which - among other things - offers those three options that I found most useful to optimize the data processing. After choosing (by mouse click) one of these three options, the user should go back to the [[XDSGUI#XDS.INP|XDS.INP]] tab, specify JOBS=DEFPIX INTEGRATE CORRECT, and run XDS again. Ideally, each of the three options should be tried separately, and its effect should be compared with the previous processing to verify that it ''really'' improved the processed data. A significant increase in [[ISa]] (> 1%) indicates that the processing has improved; a slight decrease in ISa (<1%) often is accompanied by an increase of CC1/2 at high resolution, and thus should be tolerated.  
After finishing this first round of processing, the [[XDSGUI#TOOLS|TOOLS]] tab may be used, which - among other things - offers those three options that I found most useful to optimize the data processing. After choosing (by mouse click) one of these three options, the user should go back to the [[XDSGUI#XDS.INP|XDS.INP]] tab, specify JOB=DEFPIX INTEGRATE CORRECT, and run XDS again. Ideally, each of the three options should be tried separately, and its effect should be compared with the previous processing to verify that it ''really'' improved the processed data. A significant increase in [[ISa]] (> 1%) indicates that the processing has improved; a slight decrease in ISa (<1%) often is accompanied by an increase of CC1/2 at high resolution, and thus should be tolerated.  
Those options that improve ISa can then be used in combination.
Those options that improve ISa can then be used in combination.


Line 18: Line 23:
=== Technical aspects of XDSGUI usage ===
=== Technical aspects of XDSGUI usage ===


* the simple editor operating in the XDS.INP, XDSCONV and XSCALE tabs understands ctrl-X (cut), ctrl-c (copy), ctrl-v (paste), ctrl-z (undo) and ctrl-Z (redo).
* the simple editor operating in the tabs understands ctrl-X (cut), ctrl-c (copy), ctrl-v (paste), ctrl-z (undo) and ctrl-Z (redo); ctrl-+ (control-plus) and ctrl-- (control-minus) enlarge or decrease the font size of characters.
* ctrl-+ (control-plus) and ctrl-- (control-minus) enlarge or decrease the font size of characters (available since April 22, 2014).
* with SHIFT+(left-mouse-click) in the "Frame" tab one can set the direct beam impact position.
* flexibility of operation: all commands in the TOOLS tab may be modified by the user, simply by modifying the (bash) code in the text field below the button. The user-changed command is automagically and permanently stored in ~/.xds-gui . The user may also change what is written on a button, by editing ~/.xds-gui.
* flexibility of operation: all commands in the [[XDSGUI#TOOLS|TOOLS]] tab may be modified by the user, simply by modifying the (bash) code in the text field below the button. The user-changed command is automagically and permanently stored in ~/.xds-gui . The user may also change what is written on a button, by editing ~/.xds-gui. It should be obvious what to change.
* Menu / Settings is used for specifying: In "Paths" the "generic library" (e.g. /usr/local/lib64/dectris-neggia.so) for reading HDF5 files and for binaries (xds_par, xscale_par, shelxc/d/e, ...), in "Appearance" (font size and default plot height), and in "User Buttons" the names for user defined tool buttons. The Settings menu can be opened on the Mac by clicking upper-left on "xdsgui", then "Preferences ...", or pressing the "Command" (⌘) key and the "," key. Changed settings are automatically stored in ~/.xdsgui .


== Tabs ==
== Tabs ==
Line 32: Line 38:
=== Frame ===
=== Frame ===


to display existing 2-dimensional data frames, or to start XDS data processing by displaying a raw data frame. In the latter case, the "generate XDS.INP" button runs the [[generate_XDS.INP]] script to create a first XDS.INP from the header of the raw data frame that is being displayed. (Note: this button needs to be used only once per dataset; all later changes to XDS.INP are done by different means - manually or scripted) The blue circle(s) delineate(s) the area(s) of the detector within TRUSTED_REGION; the green circles correspond to INCLUDE_RESOLUTION_RANGE, and the red hatched regions correspond to EXCLUDE_RESOLUTION_RANGEs. The locations of the circles are not as accurate as those that XDS uses internally, because a simplified formula (and only values from XDS.INP, not the refined ones from XPARM.XDS) is used to calculate the resolution; this e.g. does not take care of detector swingout or otherwise skew geometry.  
to display existing 2-dimensional data frames, or to start XDS data processing by displaying a raw data frame. In the latter case, the "generate XDS.INP" button runs the [[generate_XDS.INP]] script to create a first XDS.INP from the header of the raw data frame that is being displayed. (Note: this button needs to be used only once per dataset; all later changes to XDS.INP are done by different means - manually or scripted) The blue circle(s) delineate(s) the area(s) of the detector within TRUSTED_REGION; the green circles correspond to INCLUDE_RESOLUTION_RANGE, and the red [[XDSGUI#Technical aspects of XDSGUI usage|hatched]] regions correspond to EXCLUDE_RESOLUTION_RANGEs. The locations of the circles are not as accurate as those that XDS uses internally, because only values from XDS.INP, not the refined ones from XPARM.XDS) are used to calculate the resolution. After XDS has indexed spots, they can be visualized with the *predictions* button. Prediction display can be toggled off and on to refresh predictions from an updated XPARM.XDS, and with refined BEAM_DIVERGENCE from INTEGRATE.


Untrusted areas can be specified by the user, using two (UNTRUSTED_ELLIPSE; UNTRUSTED_RECTANGLE) or four (UNTRUSTED QUADRILATERAL) right mouse clicks. The resulting areas are shown with red outline, and the keyword/parameter pairs are shown in the XDS.INP tab. Step-by-step:
When predictions are displayed, the corresponding HKL indices will be displayed in the pixel value panel. HKL indices depend on the current spacegroup, which is also displayed, and will be P1 if SPACE_GROUP_NUMBER is not defined in XDS.INP.
* "Load" a raw frame or a CBF file (e.g. FRAME.cbf) to have it displayed. The pane can be "dragged" with the left mouse button; the mouse wheel zooms. The parameters in the XDS.INP tab are taken for resolution calculations (i.e. the frame header is not being interpreted in any way).
 
* if XDS.INP does not yet exist, click "generate XDS.INP" (this ''will'' read the header). Check the XDS.INP tab afterwards but then go back to the Frame tab. Note that the current generate_XDS.INP works well for Pilatus, ADSC, Mar and some Rigaku detectors; for other kinds of detectors the values marked XXX in XDS.INP have to be filled in manually. The [[Eiger]] detector is not yet implemented in the script, but this will eventually come.
Untrusted areas can be specified by the user, using two (UNTRUSTED_ELLIPSE; UNTRUSTED_RECTANGLE) or four (UNTRUSTED_QUADRILATERAL) right mouse clicks. The resulting areas are shown with red outline, and the keyword/parameter pairs are placed in the XDS.INP tab. Step-by-step:
* "Load" a data file (e.g. FRAME.cbf) to have it displayed. The pane can be "dragged" with the left mouse button; the mouse wheel zooms. For HDF5 data, the *master.h5 file must be loaded; this will automatically show its first frame (note that for this to work, the path to the correct [[XDSGUI#Technical aspects of XDSGUI usage|"generic library"]] must be specified in Menu/Settings). The frame number can be chosen with the selection box on the right, or the up-down arrows. The parameters in the XDS.INP tab are taken for resolution calculations (i.e. the frame header is not being interpreted in any way).
* if XDS.INP does not yet exist, click "generate XDS.INP" (this ''will'' read the header). Check the XDS.INP tab afterwards but then go back to the Frame tab. Note that the current [[generate_XDS.INP]] works well for Pilatus, ADSC, Mar, [[Eiger]] and some Rigaku detectors; for other kinds of detectors the values marked XXX in XDS.INP have to be filled in manually.
* left-click on "Untrusted areas" -> a pulldown menu appears
* left-click on "Untrusted areas" -> a pulldown menu appears
* left-click on (say) "Untrusted Rectangle (2 clicks)"
* left-click on (say) "Untrusted Rectangle (2 clicks)"
Line 43: Line 51:
* with two more right-clicks you get another rectangle, and so on
* with two more right-clicks you get another rectangle, and so on
* you can choose "Untrusted Ellipse (2 clicks)" or "Untrusted Quadrilateral (4 clicks)" and these work in exactly the same way
* you can choose "Untrusted Ellipse (2 clicks)" or "Untrusted Quadrilateral (4 clicks)" and these work in exactly the same way
* if you remove a UNTRUSTED_* line from XDS.INP then its shape will be removed from the Frame tab.
* if you remove an UNTRUSTED_* line from XDS.INP then its shape will be removed from the Frame tab.
Unfortunately this interactive mode of establishing untrusted areas does not currently work well over a ssh (or NXclient) connection, probably because the lines/circles are re-drawn at high frequency. So it is recommended to run the program locally.
* You can remove the recently added UNTRUSTED_** line by pressing Ctrl-Z (Command-Z on Mac), useful for re-drawing if you made an error.
For best performance, it is recommended to run the program locally rather than through a ssh network connection.


=== XDS.INP ===
=== XDS.INP ===
this shows the current [[XDS.INP]] file. Coloured items correspond to the circles of the FRAME tab. Changes can be made with a simple editor, and the new version can be saved. A run of xds_par can be started (and killed). <br>
this shows the current [[XDS.INP]] file. Coloured items correspond to the circles of the FRAME tab. Changes can be made with a simple editor, and the new version can be saved. A run of xds_par can be started (and killed). <br>
The XDS.INP tab is directly connected with the FRAME tab; changing a value in the XDS.INP tab results in immediate change in the FRAME tab. This means that e.g. an UNTRUSTED area that was positioned wrongly can be edited or simply removed in the XDS.INP tab. <br>
The XDS.INP tab is directly connected with the FRAME tab; changing a value in the XDS.INP tab results in immediate change in the FRAME tab. This means that e.g. an UNTRUSTED area that was positioned wrongly can be edited or simply removed in the XDS.INP tab. <br>
The origin of XDS.INP does not matter - it may e.g. be derived from a detector template, or written by the beamline software, or obtained by clicking the "generate_XDS.INP" button in the FRAME tab.
The origin of XDS.INP does not matter - it may e.g. be derived from a detector template, or written by the beamline software, or obtained by clicking the "[[generate_XDS.INP]]" button in the FRAME tab.


=== XYCORR ===
=== XYCORR ===
Line 61: Line 70:


=== [[IDXREF]] ===
=== [[IDXREF]] ===
detailed explanation of output: see [[IDXREF.LP]]
detailed explanation of output: see [[IDXREF.LP]].
The right side of the tab shows the indexed (black) and not-indexed (red) reflections of [https://xds.mr.mpg.de/html_doc/xds_files.html#SPOT.XDS SPOT.XDS].


=== DEFPIX ===
=== DEFPIX ===
Line 83: Line 93:
Several such scripts are pre-defined; the user may create her own scripts. If scripts are modified, they are saved to ~/.xds-gui . The names of the buttons (e.g. "User defined command 1") can be changed by editing ~/.xds-gui .
Several such scripts are pre-defined; the user may create her own scripts. If scripts are modified, they are saved to ~/.xds-gui . The names of the buttons (e.g. "User defined command 1") can be changed by editing ~/.xds-gui .


* The first item of the left panel ("Show frame with predicted spots") generates the predicted pattern of reflections for a user-specified frame, overlaid on the frame, for display with [[XDS-viewer]]. The file FRAME.cbf (produced by INTEGRATE) is renamed to FRAME_$X.cbf (where X is the user-specified frame number) and remains in the temp subdirectory. It may of course be opened in the FRAME tab, but starting XDS-viewer automatically has the advantage that several frames with predictions may be inspected on the screen, at the same time. Please note: if the XDS directory resides in a FAT32 filesystem (which is often the case on a USB stick or disk), then "ln -s" (of the script line) should be replaced by "cp -p" since FAT32 does not support symlinks. Also note: for the script to work correctly, NAME_TEMPLATE_OF_DATA_FRAMES in XDS.INP has to specify an absolute, not a relative path.
* The first item of the left panel ("Show frame with predicted spots") generates the predicted pattern of reflections for a user-specified frame, overlaid on the frame, for display with [[XDS-viewer]]. The file FRAME.cbf (produced by INTEGRATE) is renamed to FRAME_$X.cbf (where X is the user-specified frame number) and remains in the temp subdirectory. It may of course be opened in the FRAME tab, but starting XDS-viewer automatically has the advantage that several frames with predictions may be inspected on the screen, at the same time. Please note: if the XDS directory resides in a FAT32 filesystem (which is often the case on a USB stick or disk), then "ln -s" (of the script line) should be replaced by "cp -p" since FAT32 does not support symlinks. Also note: for the script to work correctly, NAME_TEMPLATE_OF_DATA_FRAMES in XDS.INP has to specify an absolute, not a relative path. In the new release, predictions can also visualized in the Frame tab.  


* The second item ("Optimizing data quality") offers commands that manipulate [[XDS.INP]] in several ways. Please note: the popup "XDS.INP has been changed externally" is emitted by the Qt system and cannot be switched off. It appears if one of the scripts changes XDS.INP while it is opened by XDSGUI (which is always the case) . Thus, one should simply press the "Reload" button. The user-definable commandline may be used e.g. for
* The second item ("Saving and comparing good results") offers commands to save/restore the current data processing files to/from a "save" directory. Make sure to replace "xdiff" with "xxdiff" or "tkdiff", if one of the latter is available. If [http://www.globalphasing.com/autoproc autoPROC] is installed, I suggest to use the "User defined command 2" for <code>mkdir staraniso; cd staraniso; aP_scale -hkl ../XDS_ASCII.HKL; echo anisotropy-corrected files are in staraniso subdirectory</code>.
grep -v "JOB=" XDS.INP > x; echo "JOB= DEFPIX INTEGRATE CORRECT" > XDS.INP; cat x >> XDS.INP


* The third item ("Saving and comparing good results") offers commands to save/restore the current data processing files to/from a "save" directory. Make sure to replace "xdiff" with "xxdiff" or "tkdiff", if one of the latter is available.
* The third item ("Optimizing data quality") offers commands that manipulate [[XDS.INP]] in several ways. Please note: the popup "XDS.INP has been changed externally" is emitted by the Qt system and cannot be switched off. It appears if one of the scripts changes XDS.INP while it is opened by XDSGUI (which is always the case) . Thus, one should simply press the "Reload" button. The user-definable command may be used e.g. for <pre>echo RELRAD=7 ! default is 5 >x; grep -v BEAM_DIVERGENCE XDS.INP >>x; cat x > XDS.INP; rm x</pre> This provides more pixels to the background estimation (for another INTEGRATE), and is useful for weakly exposed data sets which have mostly pixels with zero counts.


* The last item ("Further analyses") may be used for commands, e.g. running [[pointless]] against the XDS_ASCII.HKL file. The user-definable commandline may be used e.g. for
* The last item ("Further analyses") offers useful commands. "determine spacegroup with pointless" runs [[pointless]] against the XDS_ASCII.HKL file. The button "show spots in reciprocal space" runs [[spot2pdb]] to show you the reflections of SPOT.XDS in reciprocal space, with coot. You see the reflections that could be indexed in IDXREF in yellow, the not-indexed ones in pink, the rotation axis in blue and the origin as a blue cross. Ice rings and additional lattices can be easily identified - see [[spot2pdb]] for examples!
phenix.xtriage XDS_ASCII.HKL
* Useful scripts for user tools are shared in [[XDSGUI User tools]]


=== statistics ===
=== statistics ===
Line 104: Line 113:
=== XDSCONV ===
=== XDSCONV ===


a simple XDSCONV.INP is provided by default. It may be edited by the user, and saved. Upon clicking a button, [[xdsconv]] is run and if necessary a MTZ file is produced. XDSCONV.LP may be displayed.
A simple XDSCONV.INP is provided by default. It may be edited by the user, and saved. Upon clicking a button, [[xdsconv]] is run and if necessary a MTZ file is produced. XDSCONV.LP may be displayed. Note that you do not need to run XSCALE first. Reflections are already scaled in XDS_ASCII.HKL by CORRECT.


=== XSCALE ===
=== XSCALE ===


a simple XSCALE.INP is provided by default. It may be edited by the user, and saved. Upon clicking a button, [[xscale]] is run. XSCALE.LP may be displayed.
A simple XSCALE.INP is provided by default. It may be edited by the user, and saved. Upon clicking a button, [[xscale]] is run. XSCALE.LP may be displayed.
 
=== SHELX ===
 
This gives access to SHELXC, SHELXD and SHELXE ([http://shelx.uni-goettingen.de/ documentation]) in a similar manner to [[ccp4com:Hkl2map|hkl2map]]. As in other tabs, the commands for running these programs are shown, and the user can modify and customize them.
 
=== ARCIMBOLDO ===
 
This gives access to ARCIMBOLDO ([http://chango.ibmb.csic.es/ documentation]). As in other tabs, the commands for running these programs are shown, and the user can modify and customize them.


== Availability ==
== Availability ==


The [http://sourceforge.net/projects/xdsgui/ program's source code] is released under the terms of the [https://gnu.org/licenses/old-licenses/gpl-2.0.txt GPLv2]; it uses the [http://www.qt.io/ Qt library] which was released under the terms of the [https://gnu.org/licenses/lgpl.txt LGPL]. The program is under development and probably has bugs. If it crashes, it should simply be restarted. A crash of the program ''does not interfere'' with the operation of [[XDS]]; likewise, closing the program window does not influence any XDS run started from XDSGUI.  
The [https://sourceforge.net/u/joseptrivino/xdsgui/ci/master/tree/ program's source code] is released under the terms of the [https://gnu.org/licenses/old-licenses/gpl-2.0.txt GPL]; it uses the [http://www.qt.io/ Qt library] which was released under the terms of the [https://gnu.org/licenses/lgpl.txt LGPL]. The program is under development and probably has bugs. If it crashes, it should simply be restarted. A crash of the program ''does not interfere'' with the operation of [[XDS]]; likewise, closing the program window does not influence any XDS run started from XDSGUI.  


=== Dependencies ===
=== Dependencies ===


XDSGUI depends on [[generate_XDS.INP]], [[XDS-viewer]], and of course [[XDS]] (both the xds and xds_par binaries!), [[XDSCONV]], and [[2cbf]]. The ''statistics'' tab requires [[XDSSTAT]] and [[XDSCC12]]. [[Eiger]] data processing requires <code>h5dump</code> and <code>H5ToXds</code> (or equivalent). One of the items in the <code>tools</code> tab calls a graphical file comparison program; if the default (xdiff) is not available, [http://furius.ca/xxdiff xxdiff] or [http://sourceforge.net/projects/tkdiff tkdiff] or [http://kdiff3.sourceforge.net/ kdiff3] or [http://meldmerge.org/ meld] may be used - please adjust the commandline below the button accordingly. See also [[Installation]].
XDSGUI depends on [[generate_XDS.INP]], [[XDS-viewer]], and of course [[XDS]] (both the xds and xds_par binaries!), [[XDSCONV]], and [[2cbf]]. The ''statistics'' tab requires [[XDSSTAT]] and [[XDSCC12]]. For visualization of the raw data frames in the ''Frame'' tab, [[Eiger]] data processing requires a "generic library" (see above) specified in Menu/Settings. As a deprecated fallback, either the [https://www.dectris.com/features/features-eiger-x/h5toxds/ <code>H5ToXds</code>] binary or the [https://www.globalphasing.com/autoproc/wiki/index.cgi?DataProcessingHdf5 <code>hdf2mini-cbf</code>] binary (from GlobalPhasing's autoPROC) could be used. Only the latter works for the .h5 files produced at Diamond Light Source; if hdf2mini-cbf should be used, it needs to be symlinked under the name H5ToXds (because XDSGUI has the name H5ToXds hardwired). ([https://github.com/biochem-fan/eiger2cbf <code>eiger2cbf</code>] does not seem to work with Eiger2 .h5 files.)
 
One of the items in the ''tools'' tab calls a graphical file comparison program; if the default (xdiff) is not available, [http://furius.ca/xxdiff xxdiff] or [http://sourceforge.net/projects/tkdiff tkdiff] or [http://kdiff3.sourceforge.net/ kdiff3] or [http://meldmerge.org/ meld] may be used - please adjust the command line (below the button) accordingly.  
 
The XDSCONV functionality requires a working CCP4 installation for conversion to MTZ files. Likewise, XDSSTAT (in the ''statistics'' tab) needs CCP4.
 
Technically, the word "dependency" means that these scripts/programs should be in your $PATH - an 'alias' is often not good enough because the commands in the ''tools'' tab use <code>bash</code> as a shell, and that shell does not inherit the aliases from e.g. (t)csh.


Technically, the word "dependency" means that these scripts/programs should be in your $PATH - an 'alias' is often not good enough because the ''TOOLS'' commands use <code>bash</code> as a shell, and that shell does not inherit the aliases from e.g. (t)csh.
If you use the <code>get_folder.sh</code> script as explained in [[Installation]], most of these dependencies are checked, and binaries are downloaded.


=== Installation ===
=== Installation ===


The current version of the program can be downloaded, by academic users, for Linux [ftp://turn5.biologie.uni-konstanz.de/pub/xdsgui.rhel6.64 64bit] (compiled on RHEL6), [ftp://turn5.biologie.uni-konstanz.de/pub/xdsgui.rhel6.32 32bit] (compiled on RHEL6), or [ftp://turn5.biologie.uni-konstanz.de/pub/xdsgui.dmg Mac] (works on OSX 10.6 and up).
The program can be downloaded, by academic users, as binary for Linux [https://{{SERVERNAME}}/pub/linux_bin/xdsgui 64bit] (compiled on RHEL7) and for Mac ([https://{{SERVERNAME}}/pub/mac_bin/xdsgui_mac_intel.dmg Intel]. compiled on Catalina, and [https://{{SERVERNAME}}/pub/mac_bin/xdsgui_mac_silicon.dmg Apple Silicon], compiled on Big Sur, respectively).  
Industrial users of XDS: pls contact me directly.


In case of '''Linux''', after downloading the binary file, its name should be changed to "xdsgui" and then be made executable ("chmod a+x xdsgui"). The binary may then be copied into e.g. the directory /usr/local/bin by the administrator, or to the $HOME/bin directory by the user. Any other directory should be suitable as long as it is in your $PATH.  
Industrial users: pls contact me directly.


In case of a '''Mac''', the DMG file may be installed in the usual way, by double-clicking it and dragging the icon into the Applications folder. '''It is advantageous to place a symbolic link, like'''
The easiest way to install XDSGUI, and all XDSGUI-related programs is documented in [[Installation]].
 
If you want to install manually, in case of Linux, after downloading the binary file, its name should be changed to "xdsgui" and then be made executable ("chmod a+x xdsgui"). The binary may then be copied into e.g. the directory /usr/local/bin by the administrator, or to the $HOME/bin directory by the user. Any other directory should be suitable as long as it is in your $PATH. In case of MacOS, the DMG file may be installed in the usual way, by double-clicking it and dragging the icon into the Applications folder. It is advantageous to place a symbolic link, like
  sudo ln -s /Applications/xdsgui.app/Contents/MacOS/xdsgui /usr/local/bin/xdsgui
  sudo ln -s /Applications/xdsgui.app/Contents/MacOS/xdsgui /usr/local/bin/xdsgui
'''and to start the GUI from a terminal window, by typing xdsgui'''. In a similar way, XDS-viewer should be put into the $PATH under the name xds-viewer, e.g. using
'''and to start the GUI from a terminal window, by typing xdsgui'''. In a similar way, XDS-viewer should be put into the $PATH under the name xds-viewer, e.g. using
  sudo ln -s /Applications/XDS-Viewer.app/Contents/MacOS/xds-viewer-bin /usr/local/bin/xds-viewer
  sudo ln -s /Applications/XDS-Viewer.app/Contents/MacOS/XDS-Viewer /usr/local/bin/xds-viewer


==== Libraries that the program depends on ====
==== Libraries and software that the program depends on ====
In case of Fedora or Redhat Enterprise Linux distributions, you may have to
yum install qt qt-x11
if you get the error message
xdsgui: error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory
or similar for libQtCore.so.4.


'''Ubuntu 14.04''' has libmng2 instead of libmng. Therefore, on 32bit systems you should try
Procedures for identifying and installing missing libraries are given in the [[Installation]] article.
sudo ln -s /usr/lib/i386-linux-gnu/libmng.so.2 /usr/lib/i386-linux-gnu/libmng.so.1
and on 64bit systems
sudo ln -s /usr/lib/x86_64-linux-gnu/libmng.so.2 /usr/lib/x86_64-linux-gnu/libmng.so.1
if you get the error message
xdsgui: error while loading shared libraries: libmng.so.1: cannot open shared object file: No such file or directory


On the '''Mac''' (e.g. Yosemite) one needs [https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12 Xcode] installed, seemingly before XDSGUI is installed. Otherwise one may obtain a popup error “You can’t open the application because it is not supported on this type of Mac.
On the '''Mac''', one needs to install the (free)  Xcode command line tools (with <code>xcode-select –install</code>).
 
If on '''Linux''' you get an error message like
xdsgui: error while loading shared libraries: libQtGui.so.5: cannot open shared object file: No such file or directory
or similar for libQtCore.so.5 or libQtOpenGL.so.5 , you should install the Qt5 libraries.


== Known bugs, problems and workarounds ==
== Known bugs, problems and workarounds ==
# ''Question concerning TOOLS: "Show frame..."  on Mac: it creates everything shown in the commandline but it seem to us that everything runs in the background. Therefore xds-viewer does not open anywhere as it is not seen. Also, it would be great if this image together with the predictions would be re-directed to the FRAME tab.'' <br> Answer: On Linux, the xds-viewer window is brought to the foreground automatically, whereas on the Mac this does not seem to happen. However, an icon for xds-viewer appears in the dock (on the right) and I can double-click it to see the xds-viewer window. I have no idea how to bring xds-viewer to the foreground automatically, and I need input from people who know Macs and tell me how to do it. The reason why we do not open automatically in the FRAME tab is that one can have several xds-viewer windows open at the same time, and compare the patterns. As a '''workaround''', you can manually open the resulting temp/FRAME_$X.cbf in the FRAME tab.
# ''Question concerning TOOLS: "Show frame..."  on Mac: it creates everything shown in the commandline but it seem to us that everything runs in the background. Therefore xds-viewer does not open anywhere as it is not seen. Also, it would be great if this image together with the predictions would be re-directed to the FRAME tab.'' <br> Answer: On Linux, the xds-viewer window is brought to the foreground automatically, whereas on the Mac this does not seem to happen. However, an icon for xds-viewer appears in the dock (on the right) and I can double-click it to see the xds-viewer window. I have no idea how to bring xds-viewer to the foreground automatically, and I need input from people who know Macs and tell me how to do it. The reason why we do not open automatically in the FRAME tab is that one can have several xds-viewer windows open at the same time, and compare the patterns. As a '''workaround''', you can manually open the resulting temp/FRAME_$X.cbf in the FRAME tab.
# ''Another question concerning TOOLS: "Further analyses" on Mac: again pointless runs nicely but there is no output for the user.'' <br> Answer: Could it be that you started xdsgui by double-clicking its icon in the Finder? In that case, there is no output visible, because there is no console. Unfortunately, for all the Tools, the output is in the console window where xdsgui was started. Thus, you should really start xdsgui in a console window.
# ''Another question concerning TOOLS: "Further analyses" on Mac: again pointless runs nicely but there is no output for the user.'' <br> Answer: Could it be that you started xdsgui by double-clicking its icon in the Finder? In that case, there is no output visible, because there is no console. Unfortunately, for all the Tools, the output is in the console window where xdsgui was started. Thus, you should really start xdsgui in a console window.
# both generate_XDS.INP and [[XDS]] do not seem to like spaces ("blanks") in file/directory names. While frame names rarely have a space in them, directories might, e.g. if an external disk has the label "John's USB disk" then this would be mounted on Linux as /media/John's USB disk/ and that would result in a error message from generate_XDS.INP and/or XDS. The '''workaround''' is to use a symlink on a different hard disk.  
# both generate_XDS.INP and [[XDS]] do not tolerate spaces ("blanks") in file/directory names. While frame names rarely have a space in them, directories might, e.g. if an external disk has the label "John's USB disk" then this would be mounted on Linux as /media/John's USB disk/ and that would result in a error message from generate_XDS.INP and/or XDS. The '''workaround''' is to use a symlink on a different hard disk.  
# ''Problem description: On the Mac, after loading frames, by clicking “generate XDS.INP”, the program gives some strange symbol “” in XDS.INP. And the more you click “save” button, the more “” appeared. This looks like <br>SPACE_GROUP_NUMBER=0  ! 0 if unknown <br>UNIT_CELL_CONSTANTS= 70 80 90 90 90 90  .''<br> The problem is due to the “Rich text” format in TextEdit when saving "generate_XDS.INP". It is solved by re-downloading the script, and changing format to Plain - everything is working now.
# ''Problem description: On the Mac, after loading frames, by clicking “generate XDS.INP”, the program gives some strange symbol “” in XDS.INP. And the more you click “save” button, the more “” appeared. This looks like <br>SPACE_GROUP_NUMBER=0  ! 0 if unknown <br>UNIT_CELL_CONSTANTS= 70 80 90 90 90 90  .''<br> The problem is due to the “Rich text” format in TextEdit when saving "generate_XDS.INP". It is solved by changing format to Plain in TextEdit, and re-downloading the script.
# Frames from HDF5-files (*master.h5) are not being displayed: the symptom is that the frames appear to be empty/blank. This means you have not specified the correct "generic library" - see [[XDSGUI#Technical aspects of XDSGUI usage|Technical aspects of XDSGUI usage]]. The fix is: go to (upper left) "Menu"->"Settings"->insert the string "/usr/local/lib64/dectris-neggia.so" as "generic library", or try "/usr/local/lib64/durin-plugin.so" for DIAMOND data. Ask the system administrator for the exact path! If none of these works, leave "generic library" empty and install <code>H5ToXds</code> or <code>hdf2mini-cbf</code> as explained above.


If you find a bug, please send email to Kay dot Diederichs at uni-konstanz dot de , with enough information/data to reproduce the bug.
If you find a bug, please send email to Kay dot Diederichs at uni-konstanz dot de , with enough information/data to reproduce the bug ("it does not work" is not enough!).


== Limitations ==
== Limitations ==


* The program depends on [[generate_XDS.INP]] to interpret the header of the frames, so is currently limited to Dectris (Pilatus), ADSC (Quantum), Rigaku (several types), MAR (CCD and image plate) detectors, and the Bruker PHOTON II. Other detectors need some values to be manually filled into XDS.INP - the relevant places are marked with XXX. These are detector properties (type, pixel size and number, min and max counts in a pixel), and experimental parameters like oscillation range, wavelength, distance, and direct beam position (or rather: point of detector that is closest to the crystal). For fine-tuning of detector parameters, see the [http://xds.mpimf-heidelberg.mpg.de/html_doc/xds_prepare.html detector-specific templates].
* The program depends on [[generate_XDS.INP]] to interpret the header of the frames, so is currently limited to Dectris (Pilatus, Eiger), ADSC (Quantum), Rigaku (several types), MAR (CCD and image plate) detectors, and the Bruker PHOTON II. Other detectors need some values to be manually filled into XDS.INP - the relevant places are marked with XXX. These are detector properties (type, pixel size and number, min and max counts in a pixel), and experimental parameters like ROTATION_AXIS, OSCILLATION_RANGE, X-RAY_WAVELENGTH, DETECTOR_DISTANCE, and XORG, YORG. For fine-tuning of detector parameters, see the [http://xds.mpimf-heidelberg.mpg.de/html_doc/xds_prepare.html detector-specific templates].
* The authors of [[generate_XDS.INP]] have made a "best effort" to provide a XDS.INP that results in the correct sign of the anomalous signal. In the case of one detector type (internally called Rigaku SMV) this requires reversal of one detector axis, and a negative DETECTOR_DISTANCE, as is found in some of the [http://xds.mpimf-heidelberg.mpg.de/html_doc/xds_prepare.html detector-specific templates]. '''For an unusual or unknown detector setup, the correct sign of the anomalous signal needs to be established and verified e.g. with a good dataset from a test crystal that has a anomalous signal.''' The authors do not take any responsibility for problems arising from incorrect sign of the anomalous signal, nor - obviously! - for any other mischief arising in or from data processing.
* At some beamlines, the ROTATION_AXIS should be -1 0 0 ("backwards") instead of the usual 1 0 0 ("horizontal"), or even 0 1 0 ("vertical") like at one of the PETRA Hamburg BLs, or even 0 -1 0 (vertical and backwards) like for some measurements at Diamond's ID24. We have no exhaustive list of these beamlines, and the frame headers do not always have this information, so the default chosen by [[generate_XDS.INP]] may be wrong and need manual correction.
* The display of large frames in the FRAME tab may be slow over the network.
* The display of large frames in the FRAME tab may be slow over the network.
* Eiger data may be used like this: a) run <code>generate_XDS.INP /path/to/XXX_master.h5</code> in an empty directory, to produce XDS.INP. b) start XDSGUI in the same directory (or navigate there, from its ''Projects'' tab) c) you will not be able to use the ''Frame'' tab for looking at the raw data, but you could use the tab to look at FRAME.cbf or other XDS-produced images. d) you should use/check/modify XDS.INP as usual; all the other tabs work normally.
* The green INCLUDE_RESOLUTION_RANGE and red semi-transparent EXCLUDE_RESOLUTION_RANGE circles in the Frame tab as well as all resolution values in the Frame and IDXREF tabs are calculated from values in XDS.INP (rather than from the refined values in XPARM.XDS, which XDS uses). For the (segmented) Pilatus 12M, the calculations in XDSGUI do not give the correct results - this is fixed in versions from Sep-2023 onwards.
* The path (e.g. /usr/local/lib64/dectris-neggia.so) to the <code>dectris-neggia</code> library (available from Dectris) or the <code>durin-plugin</code> library (download from Diamond Light Source, DLS) should be entered into the "generic frame library" entry, in Menu->Settings, to enable visualization of raw data from Eiger detectors, but this mechanism may not work properly. Therefore, <code>H5ToXds</code> or (better because maintained by GlobalPhasing)<code>hdf2mini-cbf</code> may be installed as explained above.


== News ==
== News ==
update June 19, 2013: Fixes for TRUSTED_REGION on Pilatus, and for XDSCONV tab (thanks Folmer!).
(changes before 2023 were deleted on Oct 4, 2023)


update July 5, 2013: INTEGRATE plot showing crystal rotation; several bugfixes. Commandline name is now xdsgui.
update May 5, 2023: lots of bugfixes and enhancements mainly by Juno Krahn. Should evaluate the environment variable NEGGIA_PATH and DURIN_PATH, as does generate_XDS.INP from v1.14 onwards. Binaries for Linux, Intel Mac and Silicon Mac.


update November 26, 2013: new XSCALE tab (rudimentary at present). PDF and PNG versions of all plots can be produced by right mouse click (PDF file lets you choose the output file name with a filesystem browser; PNG file is simply written as "output.png" to the current directory. The latter "feature" will be changed to also use a filesystem browser soon). Many bugfixes.
update Sep 2023: segmented detectors (Juno Krahn)


update Jan 10, 2014: fix crashes on startup.
The XDSGUI paper Brehm, Triviño, Krahn, Usón and Diederichs (2023) XDSGUI: a graphical user interface for XDS, SHELX and ARCIMBOLDO. J. Appl. Cryst. 56, is open access at https://doi.org/10.1107/S1600576723007057


update Jan 23, 2014: fix crashes (most notably coredump on Mac in CORRECT tab), and several other bugs.
Version 2023-11-21 fixes a bug (predictions were only available if XDS.INP was older than XPARM.XDS). To update XPARM.XDS, run JOB=IDXREF or "cp GXPARM.XDS XPARM.XDS" in the Tools tab. Please note that hkl values in predictions are based on the spacegroup in XPARM.XDS, not on the spacegroup in XDS.INP .


update Mar 19, 2014: fix bugs, and make somewhat faster over slow connection.
Version 2023-12-29 now displays CBF files written at PETRA-III BLs.


update May 12, 2014: fix bugs; brightness, contrast and zoom remember their values between frames; ctrl-+ (Control and plus sign pressed together) and ctrl-- (Control and minus sign pressed together) change font size in the tabs; the direct beam position is now indicated with a "+" in the Frame tab, whereas ORGX ORGY are shown with a "X" (these are different if the detector is swung out or the beam is slightly non-perpendicular to the detector). Individual projects may be removed from the "Projects" tab with right mouse click / hide.
== See also ==


update June 2, 2014: fix bugs
Video [https://www.youtube.com/watch?v=yN2gk_PtWeY Running XDS (and xdsgui) on Windows 10 build 14361] by Gustavo Machado Alvares de Lima


update December 11, 2014: fix bugs; SETTING SYMMETRY-BASED for [[pointless]] (in the TOOLS tab); radiation damage (R_d) plot with recommended limit shown in the XDSSTAT tab
[[Installation]]
 
update Sep 17, 2015: belatedly updated xdsgui.rhel6.* - this version correctly visualizes the tables of INTEGRATE.LP which have a different format since XDS version June-2015


update May 20, 2016: many bug fixes, rename XDSSTAT tab to <code>statistics</code> tab, include delta-CC<sub>1/2</sub> plot.
Qt environment variables (scaling etc): [https://doc.qt.io/qt-6/highdpi.html]
 
== See also ==
 
[[Installation]]

Latest revision as of 04:10, 20 January 2024

XDSGUI is a GUI (graphical user interface) for XDS that is supposed to help both novice and experienced users. It graphically displays the ASCII and cbf files that XDS writes, and can run useful shell commands with a simple mouse click. The design goal of the program is to enable XDS data processing without the commandline, and to supply additional graphical information, in a simple, user-modifiable and user-extensible way.

XDSGUI gives access to George Sheldrick's SHELXC, SHELXD and SHELXE programs, via the SHELX tab, and to Isabel Uson's ARCIMBOLDO programs, via the ARCIMBOLDO tab.

The XDSGUI paper (Brehm, Triviño, Krahn, Usón and Diederichs (2023) XDSGUI: a graphical user interface for XDS, SHELX and ARCIMBOLDO. J. Appl. Cryst. 56) is open access at https://doi.org/10.1107/S1600576723007057 .

How to use XDSGUI

The program may be used to analyze graphically any existing directory with files earlier written by XDS, or may be used to create these files. It should be started in a terminal window, which will later show the output of the programs that are run (XDS, pointless, XDSCONV, ...).

The user is supposed to use the tabs on the top, from left to right. Thus, one starts with the choice of the processing directory (Projects tab), and then advances to the Frame tab to display a raw dataframe or a .cbf file written by XDS or a .pck file written by XDSSTAT. Within the Frame tab, XDS.INP may be generated; for this to work, a raw dataframe has to be displayed. While still in the Frame tab, untrusted (shaded) areas may be marked with the mouse which will write the appropriate lines to XDS.INP; ORGX ORGY may be corrected if necessary, and the INCLUDE_RESOLUTION_RANGE, EXCLUDE_RESOLUTION_RANGE and TRUSTED_REGION adjusted as required. The latter operations are interactive in the sense that the user modifies the values in the XDS.INP tab, and then checks the result in the Frame tab. In other words, the user moves back and forth between the Frame and the XDS.INP tabs.

After finally moving to the XDS.INP tab, other parameters can be adjusted by the user, and finally XDS may be run by clicking a button. The resulting output files from XDS will then be displayed in the next tabs.

After finishing this first round of processing, the TOOLS tab may be used, which - among other things - offers those three options that I found most useful to optimize the data processing. After choosing (by mouse click) one of these three options, the user should go back to the XDS.INP tab, specify JOB=DEFPIX INTEGRATE CORRECT, and run XDS again. Ideally, each of the three options should be tried separately, and its effect should be compared with the previous processing to verify that it really improved the processed data. A significant increase in ISa (> 1%) indicates that the processing has improved; a slight decrease in ISa (<1%) often is accompanied by an increase of CC1/2 at high resolution, and thus should be tolerated. Those options that improve ISa can then be used in combination.

After CORRECT, the data may be analyzed using the XDSSTAT tab, and the resulting XDS_ASCII.HKL may be converted to e.g. MTZ, using the XDSCONV tab.

Technical aspects of XDSGUI usage

  • the simple editor operating in the tabs understands ctrl-X (cut), ctrl-c (copy), ctrl-v (paste), ctrl-z (undo) and ctrl-Z (redo); ctrl-+ (control-plus) and ctrl-- (control-minus) enlarge or decrease the font size of characters.
  • with SHIFT+(left-mouse-click) in the "Frame" tab one can set the direct beam impact position.
  • flexibility of operation: all commands in the TOOLS tab may be modified by the user, simply by modifying the (bash) code in the text field below the button. The user-changed command is automagically and permanently stored in ~/.xds-gui . The user may also change what is written on a button, by editing ~/.xds-gui. It should be obvious what to change.
  • Menu / Settings is used for specifying: In "Paths" the "generic library" (e.g. /usr/local/lib64/dectris-neggia.so) for reading HDF5 files and for binaries (xds_par, xscale_par, shelxc/d/e, ...), in "Appearance" (font size and default plot height), and in "User Buttons" the names for user defined tool buttons. The Settings menu can be opened on the Mac by clicking upper-left on "xdsgui", then "Preferences ...", or pressing the "Command" (⌘) key and the "," key. Changed settings are automatically stored in ~/.xdsgui .

Tabs

The main window of XDSgui has the following sub-windows organized as tabs:

Projects

stores names of directories which contain files from XDS processing. If none of these is selected, the current directory is used. A new directory may be created. The list of project directories is saved to ~/.xds-gui . A project may be removed from the list by right-clicking a project and selecting "hide", or by editing ~/.xds-gui .

Frame

to display existing 2-dimensional data frames, or to start XDS data processing by displaying a raw data frame. In the latter case, the "generate XDS.INP" button runs the generate_XDS.INP script to create a first XDS.INP from the header of the raw data frame that is being displayed. (Note: this button needs to be used only once per dataset; all later changes to XDS.INP are done by different means - manually or scripted) The blue circle(s) delineate(s) the area(s) of the detector within TRUSTED_REGION; the green circles correspond to INCLUDE_RESOLUTION_RANGE, and the red hatched regions correspond to EXCLUDE_RESOLUTION_RANGEs. The locations of the circles are not as accurate as those that XDS uses internally, because only values from XDS.INP, not the refined ones from XPARM.XDS) are used to calculate the resolution. After XDS has indexed spots, they can be visualized with the *predictions* button. Prediction display can be toggled off and on to refresh predictions from an updated XPARM.XDS, and with refined BEAM_DIVERGENCE from INTEGRATE.

When predictions are displayed, the corresponding HKL indices will be displayed in the pixel value panel. HKL indices depend on the current spacegroup, which is also displayed, and will be P1 if SPACE_GROUP_NUMBER is not defined in XDS.INP.

Untrusted areas can be specified by the user, using two (UNTRUSTED_ELLIPSE; UNTRUSTED_RECTANGLE) or four (UNTRUSTED_QUADRILATERAL) right mouse clicks. The resulting areas are shown with red outline, and the keyword/parameter pairs are placed in the XDS.INP tab. Step-by-step:

  • "Load" a data file (e.g. FRAME.cbf) to have it displayed. The pane can be "dragged" with the left mouse button; the mouse wheel zooms. For HDF5 data, the *master.h5 file must be loaded; this will automatically show its first frame (note that for this to work, the path to the correct "generic library" must be specified in Menu/Settings). The frame number can be chosen with the selection box on the right, or the up-down arrows. The parameters in the XDS.INP tab are taken for resolution calculations (i.e. the frame header is not being interpreted in any way).
  • if XDS.INP does not yet exist, click "generate XDS.INP" (this will read the header). Check the XDS.INP tab afterwards but then go back to the Frame tab. Note that the current generate_XDS.INP works well for Pilatus, ADSC, Mar, Eiger and some Rigaku detectors; for other kinds of detectors the values marked XXX in XDS.INP have to be filled in manually.
  • left-click on "Untrusted areas" -> a pulldown menu appears
  • left-click on (say) "Untrusted Rectangle (2 clicks)"
  • move mouse pointer to one corner of desired rectangle and right-click.
  • move mouse pointer (... a changing rectangle appears ...) to opposite corner and right-click: the rectangle is now fixed, and the UNTRUSTED_RECTANGLE keyword together with its parameters appears in XDS.INP tab, in red letters (you do not have to activate the XDS.INP tab to check it, but of course you could).
  • with two more right-clicks you get another rectangle, and so on
  • you can choose "Untrusted Ellipse (2 clicks)" or "Untrusted Quadrilateral (4 clicks)" and these work in exactly the same way
  • if you remove an UNTRUSTED_* line from XDS.INP then its shape will be removed from the Frame tab.
  • You can remove the recently added UNTRUSTED_** line by pressing Ctrl-Z (Command-Z on Mac), useful for re-drawing if you made an error.

For best performance, it is recommended to run the program locally rather than through a ssh network connection.

XDS.INP

this shows the current XDS.INP file. Coloured items correspond to the circles of the FRAME tab. Changes can be made with a simple editor, and the new version can be saved. A run of xds_par can be started (and killed).
The XDS.INP tab is directly connected with the FRAME tab; changing a value in the XDS.INP tab results in immediate change in the FRAME tab. This means that e.g. an UNTRUSTED area that was positioned wrongly can be edited or simply removed in the XDS.INP tab.
The origin of XDS.INP does not matter - it may e.g. be derived from a detector template, or written by the beamline software, or obtained by clicking the "generate_XDS.INP" button in the FRAME tab.

XYCORR

this just shows the output of the XYCORR step - normally not important to look at.

INIT

this just shows the output of the INIT step - you can find out e.g. what the average background counts are. Not crucial to look at, though.

COLSPOT

this just shows the output of the COLSPOT step - normally not crucial to look at. But you could find out about the number of strong reflections on each frame of the SPOT_RANGE. This may be interesting to see radiation damage, or change of crystal volume in the beam.

IDXREF

detailed explanation of output: see IDXREF.LP. The right side of the tab shows the indexed (black) and not-indexed (red) reflections of SPOT.XDS.

DEFPIX

this just shows the output of the DEFPIX step - normally not important to look at.

INTEGRATE

shows INTEGRATE.LP on the left side. During the INTEGRATE step, the temporary files are displayed. On the right side, plots of the tabular quantities given for each frame, or for each batch of data are shown. For the refined quantities, only the changes are plotted. The beam divergence E.S.D. and mosaicity E.S.D. plots show these quantities estimated from each frame (blue), refined for each batch (green) and averaged over the whole dataset (red horizontal line).
The border between the left and right side of the window may be adjusted with the mouse.

CORRECT

shows CORRECT.LP on the left, and plots of tabular quantities on the right. The upper line in the I/sigma (unmerged data) plot gives [math]\displaystyle{ {I/Sigma(I)}^{asymptotic} }[/math] ([Diederichs, Acta Cryst. (2010). D66, 733-740 http://dx.doi.org/10.1107/S0907444910014836]). The three lines in the Chi^2 plot are the Chi^2 values obtained during scaling, for the ABSORP, MODPIX and DECAY corrections, respectively.
In the lower plots, the colored lines correspond to the nine resolution shells for which values are found in the tables.
The border between the left and right side of the window may be adjusted with the mouse.

tools

offers possibilities for running short scripts.

Several such scripts are pre-defined; the user may create her own scripts. If scripts are modified, they are saved to ~/.xds-gui . The names of the buttons (e.g. "User defined command 1") can be changed by editing ~/.xds-gui .

  • The first item of the left panel ("Show frame with predicted spots") generates the predicted pattern of reflections for a user-specified frame, overlaid on the frame, for display with XDS-viewer. The file FRAME.cbf (produced by INTEGRATE) is renamed to FRAME_$X.cbf (where X is the user-specified frame number) and remains in the temp subdirectory. It may of course be opened in the FRAME tab, but starting XDS-viewer automatically has the advantage that several frames with predictions may be inspected on the screen, at the same time. Please note: if the XDS directory resides in a FAT32 filesystem (which is often the case on a USB stick or disk), then "ln -s" (of the script line) should be replaced by "cp -p" since FAT32 does not support symlinks. Also note: for the script to work correctly, NAME_TEMPLATE_OF_DATA_FRAMES in XDS.INP has to specify an absolute, not a relative path. In the new release, predictions can also visualized in the Frame tab.
  • The second item ("Saving and comparing good results") offers commands to save/restore the current data processing files to/from a "save" directory. Make sure to replace "xdiff" with "xxdiff" or "tkdiff", if one of the latter is available. If autoPROC is installed, I suggest to use the "User defined command 2" for mkdir staraniso; cd staraniso; aP_scale -hkl ../XDS_ASCII.HKL; echo anisotropy-corrected files are in staraniso subdirectory.
  • The third item ("Optimizing data quality") offers commands that manipulate XDS.INP in several ways. Please note: the popup "XDS.INP has been changed externally" is emitted by the Qt system and cannot be switched off. It appears if one of the scripts changes XDS.INP while it is opened by XDSGUI (which is always the case) . Thus, one should simply press the "Reload" button. The user-definable command may be used e.g. for
    echo RELRAD=7 ! default is 5 >x; grep -v BEAM_DIVERGENCE XDS.INP >>x; cat x > XDS.INP; rm x
    This provides more pixels to the background estimation (for another INTEGRATE), and is useful for weakly exposed data sets which have mostly pixels with zero counts.
  • The last item ("Further analyses") offers useful commands. "determine spacegroup with pointless" runs pointless against the XDS_ASCII.HKL file. The button "show spots in reciprocal space" runs spot2pdb to show you the reflections of SPOT.XDS in reciprocal space, with coot. You see the reflections that could be indexed in IDXREF in yellow, the not-indexed ones in pink, the rotation axis in blue and the origin as a blue cross. Ice rings and additional lattices can be easily identified - see spot2pdb for examples!
  • Useful scripts for user tools are shared in XDSGUI User tools

statistics

This tab allows to run XDSSTAT and XDSCC12 with a mouseclick.

As soon as XDSSTAT.LP exists, the main plots derived from it are displayed (second and further panes). The "view" button allows to run XDS-viewer to visualize the control images that XDSSTAT generates, namely anom.pck, scales.pck, rf.pck, misfits.pck, corr.pck, rlps.pck, peaks.pck and nobs.pck .

Likewise, as soon as the output file XDSCC12.LP exists, a plot derived from those lines starting with "a:" and "b:" will be generated. In black, this shows the overall contribution of a frame, or of several frames pooled, to the CC1/2 value of those reflections that this frame (or these frames) contributes to. The rainbow-coloured curves divide the total resolution range into a user-selectable number (chosen with the -nbin option of XDSCC12) of resolution ranges; blue is low resolution and red is high resolution. Fine-sliced frames (0.1°) can be pooled into 1°-pseudoframes by using the -t option, to increase the number of reflections contributing to the plot and to make it less noisy.

XDSCONV

A simple XDSCONV.INP is provided by default. It may be edited by the user, and saved. Upon clicking a button, xdsconv is run and if necessary a MTZ file is produced. XDSCONV.LP may be displayed. Note that you do not need to run XSCALE first. Reflections are already scaled in XDS_ASCII.HKL by CORRECT.

XSCALE

A simple XSCALE.INP is provided by default. It may be edited by the user, and saved. Upon clicking a button, xscale is run. XSCALE.LP may be displayed.

SHELX

This gives access to SHELXC, SHELXD and SHELXE (documentation) in a similar manner to hkl2map. As in other tabs, the commands for running these programs are shown, and the user can modify and customize them.

ARCIMBOLDO

This gives access to ARCIMBOLDO (documentation). As in other tabs, the commands for running these programs are shown, and the user can modify and customize them.

Availability

The program's source code is released under the terms of the GPL; it uses the Qt library which was released under the terms of the LGPL. The program is under development and probably has bugs. If it crashes, it should simply be restarted. A crash of the program does not interfere with the operation of XDS; likewise, closing the program window does not influence any XDS run started from XDSGUI.

Dependencies

XDSGUI depends on generate_XDS.INP, XDS-viewer, and of course XDS (both the xds and xds_par binaries!), XDSCONV, and 2cbf. The statistics tab requires XDSSTAT and XDSCC12. For visualization of the raw data frames in the Frame tab, Eiger data processing requires a "generic library" (see above) specified in Menu/Settings. As a deprecated fallback, either the H5ToXds binary or the hdf2mini-cbf binary (from GlobalPhasing's autoPROC) could be used. Only the latter works for the .h5 files produced at Diamond Light Source; if hdf2mini-cbf should be used, it needs to be symlinked under the name H5ToXds (because XDSGUI has the name H5ToXds hardwired). (eiger2cbf does not seem to work with Eiger2 .h5 files.)

One of the items in the tools tab calls a graphical file comparison program; if the default (xdiff) is not available, xxdiff or tkdiff or kdiff3 or meld may be used - please adjust the command line (below the button) accordingly.

The XDSCONV functionality requires a working CCP4 installation for conversion to MTZ files. Likewise, XDSSTAT (in the statistics tab) needs CCP4.

Technically, the word "dependency" means that these scripts/programs should be in your $PATH - an 'alias' is often not good enough because the commands in the tools tab use bash as a shell, and that shell does not inherit the aliases from e.g. (t)csh.

If you use the get_folder.sh script as explained in Installation, most of these dependencies are checked, and binaries are downloaded.

Installation

The program can be downloaded, by academic users, as binary for Linux 64bit (compiled on RHEL7) and for Mac (Intel. compiled on Catalina, and Apple Silicon, compiled on Big Sur, respectively).

Industrial users: pls contact me directly.

The easiest way to install XDSGUI, and all XDSGUI-related programs is documented in Installation.

If you want to install manually, in case of Linux, after downloading the binary file, its name should be changed to "xdsgui" and then be made executable ("chmod a+x xdsgui"). The binary may then be copied into e.g. the directory /usr/local/bin by the administrator, or to the $HOME/bin directory by the user. Any other directory should be suitable as long as it is in your $PATH. In case of MacOS, the DMG file may be installed in the usual way, by double-clicking it and dragging the icon into the Applications folder. It is advantageous to place a symbolic link, like

sudo ln -s /Applications/xdsgui.app/Contents/MacOS/xdsgui /usr/local/bin/xdsgui

and to start the GUI from a terminal window, by typing xdsgui. In a similar way, XDS-viewer should be put into the $PATH under the name xds-viewer, e.g. using

sudo ln -s /Applications/XDS-Viewer.app/Contents/MacOS/XDS-Viewer /usr/local/bin/xds-viewer

Libraries and software that the program depends on

Procedures for identifying and installing missing libraries are given in the Installation article.

On the Mac, one needs to install the (free) Xcode command line tools (with xcode-select –install).

If on Linux you get an error message like

xdsgui: error while loading shared libraries: libQtGui.so.5: cannot open shared object file: No such file or directory

or similar for libQtCore.so.5 or libQtOpenGL.so.5 , you should install the Qt5 libraries.

Known bugs, problems and workarounds

  1. Question concerning TOOLS: "Show frame..." on Mac: it creates everything shown in the commandline but it seem to us that everything runs in the background. Therefore xds-viewer does not open anywhere as it is not seen. Also, it would be great if this image together with the predictions would be re-directed to the FRAME tab.
    Answer: On Linux, the xds-viewer window is brought to the foreground automatically, whereas on the Mac this does not seem to happen. However, an icon for xds-viewer appears in the dock (on the right) and I can double-click it to see the xds-viewer window. I have no idea how to bring xds-viewer to the foreground automatically, and I need input from people who know Macs and tell me how to do it. The reason why we do not open automatically in the FRAME tab is that one can have several xds-viewer windows open at the same time, and compare the patterns. As a workaround, you can manually open the resulting temp/FRAME_$X.cbf in the FRAME tab.
  2. Another question concerning TOOLS: "Further analyses" on Mac: again pointless runs nicely but there is no output for the user.
    Answer: Could it be that you started xdsgui by double-clicking its icon in the Finder? In that case, there is no output visible, because there is no console. Unfortunately, for all the Tools, the output is in the console window where xdsgui was started. Thus, you should really start xdsgui in a console window.
  3. both generate_XDS.INP and XDS do not tolerate spaces ("blanks") in file/directory names. While frame names rarely have a space in them, directories might, e.g. if an external disk has the label "John's USB disk" then this would be mounted on Linux as /media/John's USB disk/ and that would result in a error message from generate_XDS.INP and/or XDS. The workaround is to use a symlink on a different hard disk.
  4. Problem description: On the Mac, after loading frames, by clicking “generate XDS.INP”, the program gives some strange symbol “” in XDS.INP. And the more you click “save” button, the more “” appeared. This looks like
    SPACE_GROUP_NUMBER=0  ! 0 if unknown
    UNIT_CELL_CONSTANTS= 70 80 90 90 90 90 Â .

    The problem is due to the “Rich text” format in TextEdit when saving "generate_XDS.INP". It is solved by changing format to Plain in TextEdit, and re-downloading the script.
  5. Frames from HDF5-files (*master.h5) are not being displayed: the symptom is that the frames appear to be empty/blank. This means you have not specified the correct "generic library" - see Technical aspects of XDSGUI usage. The fix is: go to (upper left) "Menu"->"Settings"->insert the string "/usr/local/lib64/dectris-neggia.so" as "generic library", or try "/usr/local/lib64/durin-plugin.so" for DIAMOND data. Ask the system administrator for the exact path! If none of these works, leave "generic library" empty and install H5ToXds or hdf2mini-cbf as explained above.

If you find a bug, please send email to Kay dot Diederichs at uni-konstanz dot de , with enough information/data to reproduce the bug ("it does not work" is not enough!).

Limitations

  • The program depends on generate_XDS.INP to interpret the header of the frames, so is currently limited to Dectris (Pilatus, Eiger), ADSC (Quantum), Rigaku (several types), MAR (CCD and image plate) detectors, and the Bruker PHOTON II. Other detectors need some values to be manually filled into XDS.INP - the relevant places are marked with XXX. These are detector properties (type, pixel size and number, min and max counts in a pixel), and experimental parameters like ROTATION_AXIS, OSCILLATION_RANGE, X-RAY_WAVELENGTH, DETECTOR_DISTANCE, and XORG, YORG. For fine-tuning of detector parameters, see the detector-specific templates.
  • The display of large frames in the FRAME tab may be slow over the network.
  • The green INCLUDE_RESOLUTION_RANGE and red semi-transparent EXCLUDE_RESOLUTION_RANGE circles in the Frame tab as well as all resolution values in the Frame and IDXREF tabs are calculated from values in XDS.INP (rather than from the refined values in XPARM.XDS, which XDS uses). For the (segmented) Pilatus 12M, the calculations in XDSGUI do not give the correct results - this is fixed in versions from Sep-2023 onwards.
  • The path (e.g. /usr/local/lib64/dectris-neggia.so) to the dectris-neggia library (available from Dectris) or the durin-plugin library (download from Diamond Light Source, DLS) should be entered into the "generic frame library" entry, in Menu->Settings, to enable visualization of raw data from Eiger detectors, but this mechanism may not work properly. Therefore, H5ToXds or (better because maintained by GlobalPhasing)hdf2mini-cbf may be installed as explained above.

News

(changes before 2023 were deleted on Oct 4, 2023)

update May 5, 2023: lots of bugfixes and enhancements mainly by Juno Krahn. Should evaluate the environment variable NEGGIA_PATH and DURIN_PATH, as does generate_XDS.INP from v1.14 onwards. Binaries for Linux, Intel Mac and Silicon Mac.

update Sep 2023: segmented detectors (Juno Krahn)

The XDSGUI paper Brehm, Triviño, Krahn, Usón and Diederichs (2023) XDSGUI: a graphical user interface for XDS, SHELX and ARCIMBOLDO. J. Appl. Cryst. 56, is open access at https://doi.org/10.1107/S1600576723007057

Version 2023-11-21 fixes a bug (predictions were only available if XDS.INP was older than XPARM.XDS). To update XPARM.XDS, run JOB=IDXREF or "cp GXPARM.XDS XPARM.XDS" in the Tools tab. Please note that hkl values in predictions are based on the spacegroup in XPARM.XDS, not on the spacegroup in XDS.INP .

Version 2023-12-29 now displays CBF files written at PETRA-III BLs.

See also

Video Running XDS (and xdsgui) on Windows 10 build 14361 by Gustavo Machado Alvares de Lima

Installation

Qt environment variables (scaling etc): [1]