<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://viper.lbl.gov:8080/cctbx.xfel/index.php?action=history&amp;feed=atom&amp;title=Cppxfel_Indexing_with_DIALS</id>
	<title>Cppxfel Indexing with DIALS - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://viper.lbl.gov:8080/cctbx.xfel/index.php?action=history&amp;feed=atom&amp;title=Cppxfel_Indexing_with_DIALS"/>
	<link rel="alternate" type="text/html" href="http://viper.lbl.gov:8080/cctbx.xfel/index.php?title=Cppxfel_Indexing_with_DIALS&amp;action=history"/>
	<updated>2026-05-03T10:54:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.15</generator>
	<entry>
		<id>http://viper.lbl.gov:8080/cctbx.xfel/index.php?title=Cppxfel_Indexing_with_DIALS&amp;diff=1169&amp;oldid=prev</id>
		<title>Helenginn: Starting &quot;indexing with DIALS&quot; page</title>
		<link rel="alternate" type="text/html" href="http://viper.lbl.gov:8080/cctbx.xfel/index.php?title=Cppxfel_Indexing_with_DIALS&amp;diff=1169&amp;oldid=prev"/>
		<updated>2016-05-04T00:58:54Z</updated>

		<summary type="html">&lt;p&gt;Starting &amp;quot;indexing with DIALS&amp;quot; page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This covers the generation of indexing solutions using DIALS within the [[Cppxfel|&amp;#039;&amp;#039;cppxfel&amp;#039;&amp;#039; distribution]]. This assumes a successful [[Cppxfel Installation | installation of cppxfel]] including the DIALS dependency.&lt;br /&gt;
&lt;br /&gt;
== Downloading test data ==&lt;br /&gt;
&lt;br /&gt;
Data can be downloaded as a [[https://dials.lbl.gov/datasets/ginn_jac_cpv17.tgz zip file]] from the DIALS website and should be extracted to a new folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar zxvf ginn_jac_cpv17.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running DIALS on the set of 1000 images ==&lt;br /&gt;
&lt;br /&gt;
The scripts included in &amp;#039;&amp;#039;cppxfel&amp;#039;&amp;#039; to run DIALS uses four cores by default. If you have more cores available on the current machine, this can be edited by setting the environment variable NSLOTS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export NSLOTS=16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
DIALS uses the options found in the two files &amp;lt;code&amp;gt;find_spots.options&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;index.options&amp;lt;/code&amp;gt; for spotfinding/indexing the data. These should be generated for &amp;lt;code&amp;gt;find_spots.options&amp;lt;/code&amp;gt; with these parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat &amp;gt; find_spots.options &amp;lt;&amp;lt; EOF&lt;br /&gt;
gain=14.0 min_spot_size=1 global_threshold=100&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, in the tcsh shell, this is not a valid way of creating a text file. In this case, create an appropriate file in your favourite text editor with the text &amp;lt;code&amp;gt;gain=14.0 min_spot_size=1 global_threshold=100&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This should be similarly created for &amp;lt;code&amp;gt;index.options&amp;lt;/code&amp;gt;. This is an appropriate options file for a DIALS distribution built after 20th Feb:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat &amp;gt; index.options &amp;lt;&amp;lt; EOF&lt;br /&gt;
unit_cell=106.1,106.1,106.1 space_group=I23 minimum_number_of_reflections=20 detector.fix=all beam.fix=all recycle_unindexed_reflections=1 refinement.reflections.outlier.algorithm=null refinement_protocol.n_macro_cycles=1 refinement.reflections.weighting_strategy.override=stills&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, in the tcsh shell, this is not a valid way of creating a text file. In this case, create an appropriate file in your favourite text editor with the text &amp;lt;code&amp;gt;unit_cell=106.1,106.1,106.1 space_group=I23 minimum_number_of_reflections=20 detector.fix=all beam.fix=all recycle_unindexed_reflections=1 refinement.reflections.outlier.algorithm=null refinement_protocol.n_macro_cycles=1 refinement.reflections.weighting_strategy.override=stills&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The DIALS scripts can now be run as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cppxfel.run_dials shot*.pickle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Assessing the output of DIALS indexing ==&lt;br /&gt;
&lt;br /&gt;
The output from each DIALS find_spots and indexing event are stored in the &amp;lt;code&amp;gt;*find_spots.log&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;*index.log&amp;lt;/code&amp;gt; files for each image name. The strong spots found in each individual image are stored in &amp;lt;code&amp;gt;_*_strong.pickle&amp;lt;/code&amp;gt; for each respective image name. Any successfully indexed images follow the format &amp;lt;code&amp;gt;_*_experiments.json&amp;lt;/code&amp;gt;. The number of indexed images can be roughly counted as so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
find _*_experiments.json | wc -l&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Converting the results of DIALS indexing for &amp;#039;&amp;#039;cppxfel&amp;#039;&amp;#039;==&lt;br /&gt;
&lt;br /&gt;
The images and matrices indexed by DIALS should be converted to a new format for reading into &amp;#039;&amp;#039;cppxfel&amp;#039;&amp;#039;. This is achieved by running the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cppxfel.input_gen&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This runs on the number of cores specified by the &amp;lt;code&amp;gt;NSLOTS&amp;lt;/code&amp;gt; environment variable to extract the appropriate image data, and also generates several input files: &amp;lt;code&amp;gt;panels.txt&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;integrate.txt&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;refine.txt&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;merge.txt&amp;lt;/code&amp;gt;, which will be explained in the following tutorials. The indexed images are extracted to &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; files. This also produces a &amp;lt;code&amp;gt;matrices.dat&amp;lt;/code&amp;gt; file which contains all the indexing solutions generated by DIALS.&lt;br /&gt;
&lt;br /&gt;
Next step: [[Cppxfel Initial Orientation Matrix Refinement]]&lt;/div&gt;</summary>
		<author><name>Helenginn</name></author>
	</entry>
</feed>