<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.uni-konstanz.de/ccp4/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pozharski</id>
	<title>CCP4 wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.uni-konstanz.de/ccp4/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pozharski"/>
	<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php/Special:Contributions/Pozharski"/>
	<updated>2026-04-12T12:51:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=How_to_compile_PHASER_to_run_on_multiple_CPUs_(Linux)&amp;diff=2073</id>
		<title>How to compile PHASER to run on multiple CPUs (Linux)</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=How_to_compile_PHASER_to_run_on_multiple_CPUs_(Linux)&amp;diff=2073"/>
		<updated>2011-11-10T22:02:54Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: Created page with &amp;quot;Download the latest phaser source package, e.g. from [ftp://ftp.ccp4.ac.uk/ccp4/6.2.0/ccp4-6.2.0-phaser-cctbx-src.tar.gz CCP4 ftp server].  Untar the source code (this takes awhi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Download the latest phaser source package, e.g. from [ftp://ftp.ccp4.ac.uk/ccp4/6.2.0/ccp4-6.2.0-phaser-cctbx-src.tar.gz CCP4 ftp server].&lt;br /&gt;
&lt;br /&gt;
Untar the source code (this takes awhile)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;tar xvzf ccp4-6.2.0-phaser-cctbx-src.tar.gz&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Configure&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;python ccp4-6.2.0/lib/cctbx/cctbx_sources/cctbx_project/libtbx/configure.py --repository=ccp4-6.2.0/src/phaser/source phaser --build-boost-python-extensions=False --enable-openmp-if-possible=True --static-exe&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Setup compilation (assuming bash)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;. ./setpaths.sh&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now compile&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;libtbx.scons&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The phaser binary is in &#039;&#039;exe&#039;&#039; folder.  If you prefer dynamic linking, omit the &#039;&#039;--static-exe&#039;&#039; flag.&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=PHASER&amp;diff=2072</id>
		<title>PHASER</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=PHASER&amp;diff=2072"/>
		<updated>2011-11-10T21:30:17Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: Created page with &amp;quot;Official PHASER documentation can be found on the [http://www.phaser.cimr.cam.ac.uk/ official website].  How to compile PHASER to run on multiple CPUs (Linux)&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Official PHASER documentation can be found on the [http://www.phaser.cimr.cam.ac.uk/ official website].&lt;br /&gt;
&lt;br /&gt;
[[How to compile PHASER to run on multiple CPUs (Linux)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Combine_multiple_pdb_files_into_NMR-style_model&amp;diff=2065</id>
		<title>Combine multiple pdb files into NMR-style model</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Combine_multiple_pdb_files_into_NMR-style_model&amp;diff=2065"/>
		<updated>2011-10-06T18:12:21Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An example here assumes that you have 10 pdb files generated by the simulated annealing in CNS, i.e. the files are named model_anneal_1.pdb, model_anneal_2.pdb, ..., model_anneal_10.pdb.  Modify accordingly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bash one-liner ==&lt;br /&gt;
&lt;br /&gt;
Well, technically it&#039;s a bash script but it&#039;s formatted as a one-liner.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notice that  if you have a file named output.pdb in the folder, it will be overwritten!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
echo -n &amp;gt; output.pdb; for i in {1..10}; do printf &amp;quot;MODEL     %4d\n&amp;quot; $i &amp;gt;&amp;gt; output.pdb; grep ATOM model_anneal_$i.pdb &amp;gt;&amp;gt; output.pdb; printf &amp;quot;ENDMDL\n&amp;quot; &amp;gt;&amp;gt; output.pdb; done&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Combine_multiple_pdb_files_into_NMR-style_model&amp;diff=2064</id>
		<title>Combine multiple pdb files into NMR-style model</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Combine_multiple_pdb_files_into_NMR-style_model&amp;diff=2064"/>
		<updated>2011-10-06T17:59:06Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: Created page with &amp;quot;An example here assumes that you have 10 pdb files generated by the simulated annealing in CNS, i.e. the files are named model_anneal_1.pdb, model_anneal_2.pdb, ..., model_anneal...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An example here assumes that you have 10 pdb files generated by the simulated annealing in CNS, i.e. the files are named model_anneal_1.pdb, model_anneal_2.pdb, ..., model_anneal_10.pdb.  Modify accordingly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bash one-liner ==&lt;br /&gt;
&lt;br /&gt;
Well, technically it&#039;s a bash script but it&#039;s formatted as a one-liner.&lt;br /&gt;
&lt;br /&gt;
echo -n &amp;gt; output.pdb; for i in {1..10}; do printf &amp;quot;MODEL     %4d\n&amp;quot; $i &amp;gt;&amp;gt; output.pdb; grep ATOM model_anneal_$i.pdb &amp;gt;&amp;gt; output.pdb; printf &amp;quot;ENDMDL\n&amp;quot; &amp;gt;&amp;gt; output.pdb; done&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=2063</id>
		<title>Useful scripts (aka smart piece of code)</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=2063"/>
		<updated>2011-10-06T17:53:39Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a collection of scripts used to resolve variety of minor problems.  Posts include brief description and the code.  The list is still very short, so there is no hierarchy.&lt;br /&gt;
&lt;br /&gt;
DISCLAIMER: Reasonable effort has been made to test these bits of bash/awk/perl/python programming.  However, there is no guarantee that they are completely bug-free.  Use at your own risk and make sure your data files are always backed up.&lt;br /&gt;
&lt;br /&gt;
* [[Get systematic absences from .sca file]]&lt;br /&gt;
* [[Print the shifts in individual atom positions]]&lt;br /&gt;
* [[Calculate average I/sigma from .sca file]]&lt;br /&gt;
* [[Renumber files]]&lt;br /&gt;
* [[Split NMR-style multiple model pdb files into individual models]]&lt;br /&gt;
* [[Combine multiple pdb files into NMR-style model]]&lt;br /&gt;
&lt;br /&gt;
Back to [[Xtal computing]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Conditions_prone_to_salt_crystallization&amp;diff=1927</id>
		<title>Conditions prone to salt crystallization</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Conditions_prone_to_salt_crystallization&amp;diff=1927"/>
		<updated>2011-02-17T16:33:57Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For some background information please see [[I have crystals, but are they salt?#Are they salt crystals?|I have crystals, but are they salt?]].&lt;br /&gt;
&lt;br /&gt;
This list shall not include instances when significant drying of the drop occurred. This list should not be taken to mean that the given conditions always produce salt crystals, but they apparently sometimes do.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border = &amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Screen and #&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Condition&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Protein buffer&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Confirmed by diffraction&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Signature and comment&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/b&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Hampton PEG/ion #1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0.2M NaF, 20% PEG3350, pH7.1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;10mM Tris pH7.5, 150mM NaCl&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;I&#039;ve seen this condition produce salt crystals at least twice.--[[User:Pozharski|Ed]] 16:18, 23 May 2008 (CEST) &amp;lt;br&amp;gt; Ditto - NaF has caused me trouble many times - buyer beware! [[User:DaveB|DaveB]] 11:01, 24 May 2008 (CEST) &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt; Qiagen &lt;br /&gt;
Plate 3&lt;br /&gt;
MembFac &amp;amp; Natrix equivalent&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1M Ammonium Sulfate, 0.1M Sodium Acetate &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;25mM NaPO4 pH8, 150mM NaCl &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Crystals reproduced with proteins and with buffer alone at least twice  --[[User:Emeric.gueneau|Emeric.gueneau]] 18:21, 16 July 2008 (CEST)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Qiagen/Nextal Anions #5 and #6&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0.3 M and 0.6 M NaF in NaOAc pH 4.6 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20mM Hepes pH7.5, 150mM NaCl &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;yes &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Gives hexagon shaped crystals every time- see line one - beware with NaF --[[User:Tom Brett|Tom Brett]] 15:35, 23 July 2008 (CEST)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Hampton Crystal Screen #38&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0.1 M Hepes pH 7.5, 1.4 M Sodium Citrate &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;no&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt; Sodium Citrate crystallizes at cold room temp&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;JCSG+ #1 (A1) &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt; 0.2M Li2SO4, 0.1M NaOAc pH &lt;br /&gt;
4.5, 50.0% v/v PEG-400&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Mixture must be made by adding water first, else precipitates. Also, crystallizes/precipitates with 10mM CaCl in protein buffer, perhaps even less. Others report needle crystals in well solution. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Hampton stockoptions salt as additive &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NaF &amp;gt;0.24M, 100mM sodium citrate pH&amp;lt;5.6 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20 mM Tris, 150 mM NaCl, 5 mM DTT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Yes &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;I would expect NaF to be more soluble at low pH (if anything) because of a secondary equilibrium with HF. Nothing in the reservoir, only in the drop; anything under 5.6 gives a few hexagons. If equilibration is slow it will give thick birefringent rods. I&#039;m thinking even minimal contamination by phosphate could give rise to something like fluorapatite, since NaF crystals would be cubic I would think. I have also seen higher concentrations of ammonium fluoride cause the drop to spread all the way over the cover slip and give rise to concentric rings of hexagons (NH4F is actually a hexagonal crystal though as opposed to NaF). Glass etching due to insufficient siliconization? Anyway, beware fluorides in general&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Nextal Classics #6&lt;br /&gt;
&lt;br /&gt;
= Hampton Crystal Screen #24&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0.2M CaCl2, 0.1M Na acetate pH4.6, 20% isopropanol&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;20 mM Tris, 5 mM DTT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Yes&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Nice-looking crystals observed for two different proteins.  I suspect DTT may play some part.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Make a copy of this row for the next person to fill in&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Please copy and paste the empty row for the next person to fill in&#039;&#039;&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1840</id>
		<title>Split NMR-style multiple model pdb files into individual models</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1840"/>
		<updated>2011-01-04T21:45:58Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: /* Bash/awk one-liner */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This assumes that you have a correctly formatted pdb file that contains both MODEL and ENDMDL records.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bash/awk one-liner ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This one-liner splits the file models.pdb into individual pdb files named model_###.pdb.&lt;br /&gt;
&lt;br /&gt;
  grep -n &#039;MODEL\|ENDMDL&#039; models.pdb | cut -d: -f 1 | \&lt;br /&gt;
  awk &#039;{if(NR%2) printf &amp;quot;sed -n %d,&amp;quot;,$1+1; else printf &amp;quot;%dp models.pdb &amp;gt; model_%03d.pdb\n&amp;quot;, $1-1,NR/2;}&#039; |  bash -sf&lt;br /&gt;
&lt;br /&gt;
== Bash script ==&lt;br /&gt;
&lt;br /&gt;
  i=1&lt;br /&gt;
  while read -a line; do&lt;br /&gt;
    echo &amp;quot;${line[@]}&amp;quot; &amp;gt;&amp;gt; model_${i}.pdb&lt;br /&gt;
    [[ ${line[0]} == ENDMDL ]] &amp;amp;&amp;amp; ((i++))&lt;br /&gt;
  done &amp;lt; /path/to/file.pdb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Awk script ==&lt;br /&gt;
&lt;br /&gt;
Should be called as &lt;br /&gt;
&lt;br /&gt;
  awk -f script.awk &amp;lt; models.pdb&lt;br /&gt;
&lt;br /&gt;
  BEGIN {file = 0; filename = &amp;quot;model_&amp;quot;  file &amp;quot;.pdb&amp;quot;}&lt;br /&gt;
  /ENDMDL/ {getline; file ++; filename = &amp;quot;model_&amp;quot; file &amp;quot;.pdb&amp;quot;}&lt;br /&gt;
  {print $0 &amp;gt; filename}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Perl script ==&lt;br /&gt;
&lt;br /&gt;
  $base=&#039;1g9e&#039;;open(IN,&amp;quot;&amp;lt;$base.pdb&amp;quot;);@indata = &amp;lt;IN&amp;gt;;$i=0;&lt;br /&gt;
  foreach $line(@indata) {&lt;br /&gt;
  if($line =~ /^MODEL/) {++$i;$file=&amp;quot;${base}_$i.pdb&amp;quot;;open(OUT,&amp;quot;&amp;gt;$file&amp;quot;);next}&lt;br /&gt;
  if($line =~ /^ENDMDL/) {next}&lt;br /&gt;
  if($line =~ /^ATOM/ || $line =~ /^HETATM/) {print OUT &amp;quot;$line&amp;quot;}&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1831</id>
		<title>Split NMR-style multiple model pdb files into individual models</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1831"/>
		<updated>2010-12-16T15:08:58Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This assumes that you have a correctly formatted pdb file that contains both MODEL and ENDMDL records.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bash/awk one-liner ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This one-liner splits the file models.pdb into individual pdb files named model_###.pdb.&lt;br /&gt;
&lt;br /&gt;
  grep -n &#039;MODEL\|ENDMDL&#039; models.pdb | cut -d: -f 1 | \&lt;br /&gt;
  awk &#039;{if(NR%2) printf &amp;quot;sed -n %d,&amp;quot;,$1+1; else printf &amp;quot;%dp &amp;gt; model_%03d.pdb\n&amp;quot;, $1-1,NR/2;}&#039; |  bash -sf&lt;br /&gt;
&lt;br /&gt;
== Bash script ==&lt;br /&gt;
&lt;br /&gt;
  i=1&lt;br /&gt;
  while read -a line; do&lt;br /&gt;
    echo &amp;quot;${line[@]}&amp;quot; &amp;gt;&amp;gt; model_${i}.pdb&lt;br /&gt;
    [[ ${line[0]} == ENDMDL ]] &amp;amp;&amp;amp; ((i++))&lt;br /&gt;
  done &amp;lt; /path/to/file.pdb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Awk script ==&lt;br /&gt;
&lt;br /&gt;
Should be called as &lt;br /&gt;
&lt;br /&gt;
  awk -f script.awk &amp;lt; models.pdb&lt;br /&gt;
&lt;br /&gt;
  BEGIN {file = 0; filename = &amp;quot;model_&amp;quot;  file &amp;quot;.pdb&amp;quot;}&lt;br /&gt;
  /ENDMDL/ {getline; file ++; filename = &amp;quot;model_&amp;quot; file &amp;quot;.pdb&amp;quot;}&lt;br /&gt;
  {print $0 &amp;gt; filename}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Perl script ==&lt;br /&gt;
&lt;br /&gt;
  $base=&#039;1g9e&#039;;open(IN,&amp;quot;&amp;lt;$base.pdb&amp;quot;);@indata = &amp;lt;IN&amp;gt;;$i=0;&lt;br /&gt;
  foreach $line(@indata) {&lt;br /&gt;
  if($line =~ /^MODEL/) {++$i;$file=&amp;quot;${base}_$i.pdb&amp;quot;;open(OUT,&amp;quot;&amp;gt;$file&amp;quot;);next}&lt;br /&gt;
  if($line =~ /^ENDMDL/) {next}&lt;br /&gt;
  if($line =~ /^ATOM/ || $line =~ /^HETATM/) {print OUT &amp;quot;$line&amp;quot;}&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Calculate_average_I/sigma_from_.sca_file&amp;diff=1830</id>
		<title>Calculate average I/sigma from .sca file</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Calculate_average_I/sigma_from_.sca_file&amp;diff=1830"/>
		<updated>2010-12-16T15:06:25Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This python script will analyze a .sca-file and print out the key statistics missing from the standard SCALEPACK log-file, namely &amp;lt;math&amp;gt;&amp;lt;I/sigma&amp;gt;&amp;lt;/math&amp;gt; per resolution shell.  Syntax is quite simple&lt;br /&gt;
&lt;br /&gt;
  ./ioversigma.py &amp;lt;.sca-file name&amp;gt; &amp;lt;number of shells&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of shells is an optional parameter and defaults to 10 if omitted.&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/uc?id=0Bxe0ET6Vsx-kZmM2YWZkNmYtMjQxZS00N2U3LTg1YTgtM2EwMTY5MzFlNjAw&amp;amp;export=download&amp;amp;hl=en Get ioversigma.py here]&lt;br /&gt;
&lt;br /&gt;
This works on &#039;&#039;&#039;merged&#039;&#039;&#039; intensities, i.e. the standard scalepack output.  An alternative below uses the &#039;&#039;&#039;unmerged&#039;&#039;&#039; output from scalepack.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
An alternative is to use SCALA (you will also need to assign the cell and symmetry) after pointless :&lt;br /&gt;
&lt;br /&gt;
 pointless -c scain ... &lt;br /&gt;
&lt;br /&gt;
 scala hklin from_pointless.mtz hklout merged.mtz &amp;lt;&amp;lt; eof&lt;br /&gt;
 run 1 all&lt;br /&gt;
 scales constant&lt;br /&gt;
 sdcorrection noadjust norefine both 1 0 0&lt;br /&gt;
 cycles 0&lt;br /&gt;
 eof&lt;br /&gt;
&lt;br /&gt;
This will just remerge the measurements and give you the usual merging analysis from Scala. &lt;br /&gt;
Same trick also works with data from XDS/XSCALE; in that case use&lt;br /&gt;
 pointless xdsin ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Print_the_shifts_in_individual_atom_positions&amp;diff=1829</id>
		<title>Print the shifts in individual atom positions</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Print_the_shifts_in_individual_atom_positions&amp;diff=1829"/>
		<updated>2010-12-16T15:06:00Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This can be done with one command line (albeit a rather long one). It also implies a rather recent version of awk, some older versions won&#039;t support the fixed width argument splitting.  Below is the code with (remove backslashes if pasting as a single line) &lt;br /&gt;
&lt;br /&gt;
  grep &#039;ATOM\|HETATM&#039; file1.pdb file2.pdb | \&lt;br /&gt;
  grep -v REMARK | \&lt;br /&gt;
  cut -d: -f 2 | \&lt;br /&gt;
  cut -c 13-54 | \&lt;br /&gt;
  sort | \&lt;br /&gt;
  awk &#039;BEGIN {FIELDWIDTHS = &amp;quot;14 28&amp;quot;; pt=&amp;quot;&amp;quot;} {if(pt==$1) print pr,$2; pt=$1; pr=$0;}&#039; | \&lt;br /&gt;
  awk &#039;BEGIN {FIELDWIDTHS = &amp;quot;14 4 8 8 8 5 8 8 8&amp;quot;} {printf &amp;quot;%s %8.4f\n&amp;quot;,$1,sqrt(($3-$7)^2+($4-$8)^2+($5-$9)^2);}&#039; | \&lt;br /&gt;
  awk &#039;BEGIN {FIELDWIDTHS = &amp;quot;4 1 3 1 1 5 9&amp;quot;} {printf &amp;quot;%s %s %s %s %s\n&amp;quot;, $3,$5,$6,$1,$7;}&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Get_systematic_absences_from_.sca_file&amp;diff=1828</id>
		<title>Get systematic absences from .sca file</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Get_systematic_absences_from_.sca_file&amp;diff=1828"/>
		<updated>2010-12-16T15:05:22Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Scalepack outputs only systematic absences, and not the rest of reflections.  The best way to identify screw axis is probably to look at the whole set of reflections, so that you can compare systematic absences with present reflections.  Another relevant situation is when you need to identify which axis are screw in, say, P2221.  You have to run scalepack at least twice to do it.&lt;br /&gt;
&lt;br /&gt;
So, the general rule is:&lt;br /&gt;
&lt;br /&gt;
1.  Run scalepack in the spacegroup with no screw axis (e.g. P2, P222, I422, etc).&lt;br /&gt;
&lt;br /&gt;
2.  Use the following python script to extract specific reflection types.&lt;br /&gt;
&lt;br /&gt;
The syntax is &lt;br /&gt;
&lt;br /&gt;
  ./gethkl &amp;lt;file-name&amp;gt; &#039;absence code&#039;&lt;br /&gt;
&lt;br /&gt;
Absence code should be in quotes but has a human(e) format, such as (0,0,l), (0,2k,0), etc.  Other examples are (h,0,0), (h,1,2), (h,2k,4) and so on. &lt;br /&gt;
&lt;br /&gt;
Enjoy.  (Tested on Ubuntu Gutsy, hence python 2.5).  &lt;br /&gt;
&lt;br /&gt;
Click here for the code [http://docs.google.com/Doc?id=d64gxmg_0gvpgt9zq]&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Renumber_files&amp;diff=1827</id>
		<title>Renumber files</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Renumber_files&amp;diff=1827"/>
		<updated>2010-12-16T15:04:45Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Let&#039;s say you have a list of images named something_###.img with ### spanning 381-560, and you want to renumber them to be from 1 to 180.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bash/awk one-liner ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  echo | awk &#039;{for(i=1;i&amp;lt;181;i++) printf &amp;quot;mv something_%03d.img something_%03d.img\n&amp;quot;,i+380,i;}&#039; | bash -sf&lt;br /&gt;
&lt;br /&gt;
will do it.  Notice that &amp;quot;%03d&amp;quot; will make sure that numbers are padded with zeros (and if you need 4 digits total, just use %04d instead).  Also, always pipe it to less first before piping to bash, just to make sure that you are not going to inadvertently delete something.&lt;br /&gt;
&lt;br /&gt;
== Bash one-liner ==&lt;br /&gt;
&lt;br /&gt;
  c=1 &amp;amp;&amp;amp; for f in something_{381..560}.img ; do mv $f something_`printf &amp;quot;%03d&amp;quot; &amp;quot;$c&amp;quot;`.img ; c=$(($c+1)) ; done&lt;br /&gt;
&lt;br /&gt;
== Bash script ==&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  # set your first desired image number&lt;br /&gt;
  c=1&lt;br /&gt;
  &lt;br /&gt;
  # loop on the input file names.  the {X..Y} is called brace expansion.&lt;br /&gt;
  for f in something_{381..560}.img ; do&lt;br /&gt;
  &lt;br /&gt;
  # infinitely useful printf as you noted&lt;br /&gt;
    mv $f something_`printf &amp;quot;%03d&amp;quot; &amp;quot;$c&amp;quot;`.img&lt;br /&gt;
  &lt;br /&gt;
  # increment the counter&lt;br /&gt;
    c=$(($c+1))&lt;br /&gt;
  done # loop ends&lt;br /&gt;
&lt;br /&gt;
== Perl one-liner ==&lt;br /&gt;
&lt;br /&gt;
  perl -e &#039;for(&amp;lt;*&amp;gt;) {rename $_,$1.($2-380).$3 if /(.+?)(\d+)(.img)$/}&#039; &lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1826</id>
		<title>Split NMR-style multiple model pdb files into individual models</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1826"/>
		<updated>2010-12-15T14:46:59Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This assumes that you have a correctly formatted pdb file that contains both MODEL and ENDMDL records.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bash/awk one-liner ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This one-liner splits the file models.pdb into individual pdb files named model_###.pdb.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;grep -n &#039;MODEL\|ENDMDL&#039; models.pdb | &#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;cut -d: -f 1 | &#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;awk &#039;{if(NR%2) printf &amp;quot;sed -n %d,&amp;quot;,$1+1; else printf &amp;quot;%dp &amp;gt; model_%03d.pdb\n&amp;quot;, $1-1,NR/2;}&#039; | &#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;bash -sf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Bash script ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;i=1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;while read -a line; do&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;    echo &amp;quot;${line[@]}&amp;quot; &amp;gt;&amp;gt; model_${i}.pdb&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;    [[ ${line[0]} == ENDMDL ]] &amp;amp;&amp;amp; ((i++))&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;done &amp;lt; /path/to/file.pdb&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Awk script ==&lt;br /&gt;
&lt;br /&gt;
Should be called as &lt;br /&gt;
&lt;br /&gt;
awk -f script.awk &amp;lt; models.pdb&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;BEGIN {file = 0; filename = &amp;quot;model_&amp;quot;  file &amp;quot;.pdb&amp;quot;}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;/ENDMDL/ {getline; file ++; filename = &amp;quot;model_&amp;quot; file &amp;quot;.pdb&amp;quot;}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;{print $0 &amp;gt; filename}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Perl script ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$base=&#039;1g9e&#039;;open(IN,&amp;quot;&amp;lt;$base.pdb&amp;quot;);@indata = &amp;lt;IN&amp;gt;;$i=0;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;foreach $line(@indata) {&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;if($line =~ /^MODEL/) {++$i;$file=&amp;quot;${base}_$i.pdb&amp;quot;;open(OUT,&amp;quot;&amp;gt;$file&amp;quot;);next}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;if($line =~ /^ENDMDL/) {next}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;if($line =~ /^ATOM/ || $line =~ /^HETATM/) {print OUT &amp;quot;$line&amp;quot;}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1825</id>
		<title>Split NMR-style multiple model pdb files into individual models</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1825"/>
		<updated>2010-12-15T14:43:35Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This assumes that you have a correctly formatted pdb file that contains both MODEL and ENDMDL records.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bash/awk one-liner ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This one-liner splits the file models.pdb into individual pdb files named model_###.pdb.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;grep -n &#039;MODEL\|ENDMDL&#039; models.pdb | &#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;cut -d: -f 1 | &#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;awk &#039;{if(NR%2) printf &amp;quot;sed -n %d,&amp;quot;,$1+1; else printf &amp;quot;%dp &amp;gt; model_%03d.pdb\n&amp;quot;, $1-1,NR/2;}&#039; | &#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;bash -sf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Bash script ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;i=1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;while read -a line; do&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;    echo &amp;quot;${line[@]}&amp;quot; &amp;gt;&amp;gt; model_${i}.pdb&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;    [[ ${line[0]} == ENDMDL ]] &amp;amp;&amp;amp; ((i++))&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;done &amp;lt; /path/to/file.pdb&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Perl script ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$base=&#039;1g9e&#039;;open(IN,&amp;quot;&amp;lt;$base.pdb&amp;quot;);@indata = &amp;lt;IN&amp;gt;;$i=0;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;foreach $line(@indata) {&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;if($line =~ /^MODEL/) {++$i;$file=&amp;quot;${base}_$i.pdb&amp;quot;;open(OUT,&amp;quot;&amp;gt;$file&amp;quot;);next}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;if($line =~ /^ENDMDL/) {next}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;if($line =~ /^ATOM/ || $line =~ /^HETATM/) {print OUT &amp;quot;$line&amp;quot;}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1824</id>
		<title>Split NMR-style multiple model pdb files into individual models</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1824"/>
		<updated>2010-12-15T14:40:43Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: /* Bash/awk one-liner */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This assumes that you have a correctly formatted pdb file that contains both MODEL and ENDMDL records.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bash/awk one-liner ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This one-liner splits the file models.pdb into individual pdb files named model_###.pdb.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;grep -n &#039;MODEL\|ENDMDL&#039; models.pdb | &#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;cut -d: -f 1 | &#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;awk &#039;{if(NR%2) printf &amp;quot;sed -n %d,&amp;quot;,$1+1; else printf &amp;quot;%dp &amp;gt; model_%03d.pdb\n&amp;quot;, $1-1,NR/2;}&#039; | &#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;bash -sf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Perl script ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$base=&#039;1g9e&#039;;open(IN,&amp;quot;&amp;lt;$base.pdb&amp;quot;);@indata = &amp;lt;IN&amp;gt;;$i=0;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;foreach $line(@indata) {&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;if($line =~ /^MODEL/) {++$i;$file=&amp;quot;${base}_$i.pdb&amp;quot;;open(OUT,&amp;quot;&amp;gt;$file&amp;quot;);next}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;if($line =~ /^ENDMDL/) {next}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;if($line =~ /^ATOM/ || $line =~ /^HETATM/) {print OUT &amp;quot;$line&amp;quot;}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1823</id>
		<title>Split NMR-style multiple model pdb files into individual models</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1823"/>
		<updated>2010-12-14T14:51:28Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This assumes that you have a correctly formatted pdb file that contains both MODEL and ENDMDL records.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bash/awk one-liner ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This one-liner splits the file models.pdb into individual pdb files names model_###.pdb.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;grep -n &#039;MODEL\|ENDMDL&#039; models.pdb | &#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;cut -d: -f 1 | &#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;awk &#039;{if(NR%2) printf &amp;quot;sed -n %d,&amp;quot;,$1+1; else printf &amp;quot;%dp &amp;gt; model_%03d.pdb\n&amp;quot;, $1-1,NR/2;}&#039; | &#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;bash -sf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Perl script ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;$base=&#039;1g9e&#039;;open(IN,&amp;quot;&amp;lt;$base.pdb&amp;quot;);@indata = &amp;lt;IN&amp;gt;;$i=0;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;foreach $line(@indata) {&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;if($line =~ /^MODEL/) {++$i;$file=&amp;quot;${base}_$i.pdb&amp;quot;;open(OUT,&amp;quot;&amp;gt;$file&amp;quot;);next}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;if($line =~ /^ENDMDL/) {next}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;if($line =~ /^ATOM/ || $line =~ /^HETATM/) {print OUT &amp;quot;$line&amp;quot;}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;}&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Print_the_shifts_in_individual_atom_positions&amp;diff=1822</id>
		<title>Print the shifts in individual atom positions</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Print_the_shifts_in_individual_atom_positions&amp;diff=1822"/>
		<updated>2010-12-14T14:49:44Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This can be done with one command line (albeit a rather long one). It also implies a rather recent version of awk, some older versions won&#039;t support the fixed width argument splitting.  Below is the code with (remove backslashes if pasting as a single line) &lt;br /&gt;
&lt;br /&gt;
grep &#039;ATOM\|HETATM&#039; file1.pdb file2.pdb | \&lt;br /&gt;
&lt;br /&gt;
grep -v REMARK | \&lt;br /&gt;
&lt;br /&gt;
cut -d: -f 2 | \&lt;br /&gt;
&lt;br /&gt;
cut -c 13-54 | \&lt;br /&gt;
&lt;br /&gt;
sort | \&lt;br /&gt;
&lt;br /&gt;
awk &#039;BEGIN {FIELDWIDTHS = &amp;quot;14 28&amp;quot;; pt=&amp;quot;&amp;quot;} {if(pt==$1) print pr,$2; pt=$1; pr=$0;}&#039; | \&lt;br /&gt;
&lt;br /&gt;
awk &#039;BEGIN {FIELDWIDTHS = &amp;quot;14 4 8 8 8 5 8 8 8&amp;quot;} {printf &amp;quot;%s %8.4f\n&amp;quot;,$1,sqrt(($3-$7)^2+($4-$8)^2+($5-$9)^2);}&#039; | \&lt;br /&gt;
&lt;br /&gt;
awk &#039;BEGIN {FIELDWIDTHS = &amp;quot;4 1 3 1 1 5 9&amp;quot;} {printf &amp;quot;%s %s %s %s %s\n&amp;quot;, $3,$5,$6,$1,$7;}&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1821</id>
		<title>Useful scripts (aka smart piece of code)</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1821"/>
		<updated>2010-12-14T14:47:58Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a collection of scripts used to resolve variety of minor problems.  Posts include brief description and the code.  The list is still very short, so there is no hierarchy.&lt;br /&gt;
&lt;br /&gt;
DISCLAIMER: Reasonable effort has been made to test these bits of bash/awk/perl/python programming.  However, there is no guarantee that they are completely bug-free.  Use at your own risk and make sure your data files are always backed up.&lt;br /&gt;
&lt;br /&gt;
* [[Get systematic absences from .sca file]]&lt;br /&gt;
* [[Print the shifts in individual atom positions]]&lt;br /&gt;
* [[Calculate average I/sigma from .sca file]]&lt;br /&gt;
* [[Renumber files]]&lt;br /&gt;
* [[Split NMR-style multiple model pdb files into individual models]]&lt;br /&gt;
&lt;br /&gt;
Back to [[Xtal computing]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1820</id>
		<title>Split NMR-style multiple model pdb files into individual models</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1820"/>
		<updated>2010-12-14T14:42:58Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This assumes that you have a correctly formatted pdb file that contains both MODEL and ENDMDL records.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bash/awk one-liner ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This one-liner splits the file models.pdb into individual pdb files names model_###.pdb.&lt;br /&gt;
&lt;br /&gt;
grep -n &#039;MODEL\|ENDMDL&#039; models.pdb | &lt;br /&gt;
cut -d: -f 1 | &lt;br /&gt;
awk &#039;{if(NR%2) printf &amp;quot;sed -n %d,&amp;quot;,$1+1; else printf &amp;quot;%dp &amp;gt; model_%03d.pdb\n&amp;quot;, $1-1,NR/2;}&#039; | &lt;br /&gt;
bash -sf&lt;br /&gt;
&lt;br /&gt;
== Perl script ==&lt;br /&gt;
&lt;br /&gt;
$base=&#039;1g9e&#039;;open(IN,&amp;quot;&amp;lt;$base.pdb&amp;quot;);@indata = &amp;lt;IN&amp;gt;;$i=0;&lt;br /&gt;
&lt;br /&gt;
foreach $line(@indata) {&lt;br /&gt;
&lt;br /&gt;
if($line =~ /^MODEL/) {++$i;$file=&amp;quot;${base}_$i.pdb&amp;quot;;open(OUT,&amp;quot;&amp;gt;$file&amp;quot;);next}&lt;br /&gt;
&lt;br /&gt;
if($line =~ /^ENDMDL/) {next}&lt;br /&gt;
&lt;br /&gt;
if($line =~ /^ATOM/ || $line =~ /^HETATM/) {print OUT &amp;quot;$line&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1819</id>
		<title>Split NMR-style multiple model pdb files into individual models</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1819"/>
		<updated>2010-12-14T14:42:15Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This assumes that you have a correctly formatted pdb file that contains both MODEL and ENDMDL records.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Bash/awk one-liner ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This one-liner splits the file models.pdb into individual pdb files names model_###.pdb.&lt;br /&gt;
&lt;br /&gt;
grep -n &#039;MODEL\|ENDMDL&#039; models.pdb | &lt;br /&gt;
cut -d: -f 1 | &lt;br /&gt;
awk &#039;{if(NR%2) printf &amp;quot;sed -n %d,&amp;quot;,$1+1; else printf &amp;quot;%dp &amp;gt; model_%03d.pdb\n&amp;quot;, $1-1,NR/2;}&#039; | &lt;br /&gt;
bash -sf&lt;br /&gt;
&lt;br /&gt;
== Perl script ==&lt;br /&gt;
&lt;br /&gt;
$base=&#039;1g9e&#039;;open(IN,&amp;quot;&amp;lt;$base.pdb&amp;quot;);@indata = &amp;lt;IN&amp;gt;;$i=0;&lt;br /&gt;
&lt;br /&gt;
foreach $line(@indata) {&lt;br /&gt;
&lt;br /&gt;
if($line =~ /^MODEL/) {++$i;$file=&amp;quot;${base}_$i.pdb&amp;quot;;open(OUT,&amp;quot;&amp;gt;$file&amp;quot;);next}&lt;br /&gt;
&lt;br /&gt;
if($line =~ /^ENDMDL/) {next}&lt;br /&gt;
&lt;br /&gt;
if($line =~ /^ATOM/ || $line =~ /^HETATM/) {print OUT &amp;quot;$line&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1818</id>
		<title>Split NMR-style multiple model pdb files into individual models</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Split_NMR-style_multiple_model_pdb_files_into_individual_models&amp;diff=1818"/>
		<updated>2010-12-14T14:38:37Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: Created page with &amp;#039;This assumes that you have a correctly formatted pdb file that contains both MODEL and ENDMDL records.  It gets split into individual pdb files names model_###.pdb.  grep -n &amp;#039;MOD…&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This assumes that you have a correctly formatted pdb file that contains both MODEL and ENDMDL records.  It gets split into individual pdb files names model_###.pdb.&lt;br /&gt;
&lt;br /&gt;
grep -n &#039;MODEL\|ENDMDL&#039; models.pdb | &lt;br /&gt;
cut -d: -f 1 | &lt;br /&gt;
awk &#039;{if(NR%2) printf &amp;quot;sed -n %d,&amp;quot;,$1+1; else printf &amp;quot;%dp &amp;gt; model_%03d.pdb\n&amp;quot;, $1-1,NR/2;}&#039; | &lt;br /&gt;
bash -sf&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1817</id>
		<title>Useful scripts (aka smart piece of code)</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1817"/>
		<updated>2010-12-14T14:31:40Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a collection of scripts used to resolve variety of minor problems.  Posts include brief description and the code.  The list is still very short, so there is no hierarchy.&lt;br /&gt;
&lt;br /&gt;
* [[Get systematic absences from .sca file]]&lt;br /&gt;
* [[Print the shifts in individual atom positions]]&lt;br /&gt;
* [[Calculate average I/sigma from .sca file]]&lt;br /&gt;
* [[Renumber files]]&lt;br /&gt;
* [[Split NMR-style multiple model pdb files into individual models]]&lt;br /&gt;
&lt;br /&gt;
Back to [[Xtal computing]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1813</id>
		<title>Useful scripts (aka smart piece of code)</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1813"/>
		<updated>2010-12-10T15:32:43Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a collection of scripts used to resolve variety of minor problems.  Posts include brief description and the code.  The list is still very short, so there is no hierarchy.&lt;br /&gt;
&lt;br /&gt;
* [[Get systematic absences from .sca file]]&lt;br /&gt;
* [[Print the shifts in individual atom positions]]&lt;br /&gt;
* [[Calculate average I/sigma from .sca file]]&lt;br /&gt;
* [[Renumber files]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[Xtal computing]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Renumber_files&amp;diff=1812</id>
		<title>Renumber files</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Renumber_files&amp;diff=1812"/>
		<updated>2010-12-10T15:31:12Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Let&#039;s say you have a list of images named something_###.img with ### spanning 381-560, and you want to renumber them to be from 1 to 180.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;echo | awk &#039;{for(i=1;i&amp;lt;181;i++) printf &amp;quot;mv something_%03d.img something_%03d.img\n&amp;quot;,i+380,i;}&#039; | bash -sf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
will do it.  Notice that &amp;quot;%03d&amp;quot; will make sure that numbers are padded with zeros (and if you need 4 digits total, just use %04d instead).  Also, always pipe it to less first before piping to bash, just to make sure that you are not going to inadvertently delete something.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Calculate_average_I/sigma_from_.sca_file&amp;diff=1811</id>
		<title>Calculate average I/sigma from .sca file</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Calculate_average_I/sigma_from_.sca_file&amp;diff=1811"/>
		<updated>2010-12-10T15:30:57Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This python script will analyze a .sca-file and print out the key statistics missing from the standard SCALEPACK log-file, namely &amp;lt;math&amp;gt;&amp;lt;I/sigma&amp;gt;&amp;lt;/math&amp;gt; per resolution shell.  Syntax is quite simple&lt;br /&gt;
&lt;br /&gt;
./ioversigma.py &amp;lt;.sca-file name&amp;gt; &amp;lt;number of shells&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of shells is an optional parameter and defaults to 10 if omitted.&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/uc?id=0Bxe0ET6Vsx-kZmM2YWZkNmYtMjQxZS00N2U3LTg1YTgtM2EwMTY5MzFlNjAw&amp;amp;export=download&amp;amp;hl=en Get ioversigma.py here]&lt;br /&gt;
&lt;br /&gt;
This works on &#039;&#039;&#039;merged&#039;&#039;&#039; intensities, i.e. the standard scalepack output.  An alternative below uses the &#039;&#039;&#039;unmerged&#039;&#039;&#039; output from scalepack.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
An alternative is to use SCALA (you will also need to assign the cell and symmetry) after pointless :&lt;br /&gt;
&lt;br /&gt;
 pointless -c scain ... &lt;br /&gt;
&lt;br /&gt;
 scala hklin from_pointless.mtz hklout merged.mtz &amp;lt;&amp;lt; eof&lt;br /&gt;
 run 1 all&lt;br /&gt;
 scales constant&lt;br /&gt;
 sdcorrection noadjust norefine both 1 0 0&lt;br /&gt;
 cycles 0&lt;br /&gt;
 eof&lt;br /&gt;
&lt;br /&gt;
This will just remerge the measurements and give you the usual merging analysis from Scala. &lt;br /&gt;
Same trick also works with data from XDS/XSCALE; in that case use&lt;br /&gt;
 pointless xdsin ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Print_the_shifts_in_individual_atom_positions&amp;diff=1810</id>
		<title>Print the shifts in individual atom positions</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Print_the_shifts_in_individual_atom_positions&amp;diff=1810"/>
		<updated>2010-12-10T15:30:40Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This can be done with one command line (albeit a rather long one). Below is the code with (remove backslashes if pasting as a single line) &lt;br /&gt;
&lt;br /&gt;
grep &#039;ATOM\|HETATM&#039; file1.pdb file2.pdb | \&lt;br /&gt;
&lt;br /&gt;
grep -v REMARK | \&lt;br /&gt;
&lt;br /&gt;
cut -d: -f 2 | \&lt;br /&gt;
&lt;br /&gt;
cut -c 13-54 | \&lt;br /&gt;
&lt;br /&gt;
sort | \&lt;br /&gt;
&lt;br /&gt;
awk &#039;BEGIN {FIELDWIDTHS = &amp;quot;14 28&amp;quot;; pt=&amp;quot;&amp;quot;} {if(pt==$1) print pr,$2; pt=$1; pr=$0;}&#039; | \&lt;br /&gt;
&lt;br /&gt;
awk &#039;BEGIN {FIELDWIDTHS = &amp;quot;14 4 8 8 8 5 8 8 8&amp;quot;} {printf &amp;quot;%s %8.4f\n&amp;quot;,$1,sqrt(($3-$7)^2+($4-$8)^2+($5-$9)^2);}&#039; | \&lt;br /&gt;
&lt;br /&gt;
awk &#039;BEGIN {FIELDWIDTHS = &amp;quot;4 1 3 1 1 5 9&amp;quot;} {printf &amp;quot;%s %s %s %s %s\n&amp;quot;, $3,$5,$6,$1,$7;}&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Get_systematic_absences_from_.sca_file&amp;diff=1809</id>
		<title>Get systematic absences from .sca file</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Get_systematic_absences_from_.sca_file&amp;diff=1809"/>
		<updated>2010-12-10T15:29:36Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Scalepack outputs only systematic absences, and not the rest of reflections.  The best way to identify screw axis is probably to look at the whole set of reflections, so that you can compare systematic absences with present reflections.  Another relevant situation is when you need to identify which axis are screw in, say, P2221.  You have to run scalepack at least twice to do it.&lt;br /&gt;
&lt;br /&gt;
So, the general rule is:&lt;br /&gt;
&lt;br /&gt;
1.  Run scalepack in the spacegroup with no screw axis (e.g. P2, P222, I422, etc).&lt;br /&gt;
&lt;br /&gt;
2.  Use the following python script to extract specific reflection types.&lt;br /&gt;
&lt;br /&gt;
The syntax is &lt;br /&gt;
&lt;br /&gt;
./gethkl &amp;lt;file-name&amp;gt; &#039;absence code&#039;&lt;br /&gt;
&lt;br /&gt;
Absence code should be in quotes but has a human(e) format, such as (0,0,l), (0,2k,0), etc.  Other examples are (h,0,0), (h,1,2), (h,2k,4) and so on. &lt;br /&gt;
&lt;br /&gt;
Enjoy.  (Tested on Ubuntu Gutsy, hence python 2.5).  &lt;br /&gt;
&lt;br /&gt;
Click here for the code [http://docs.google.com/Doc?id=d64gxmg_0gvpgt9zq]&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Renumber_files&amp;diff=1808</id>
		<title>Renumber files</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Renumber_files&amp;diff=1808"/>
		<updated>2010-12-10T15:28:28Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Let&#039;s say you have a list of images named something_###.img with ### spanning 381-560, and you want to renumber them to be from 1 to 180.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;echo | awk &#039;{for(i=1;i&amp;lt;181;i++) printf &amp;quot;mv something_%03d.img something_%03d.img\n&amp;quot;,i+380,i;}&#039; | bash -sf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
will do it.  Notice that &amp;quot;%03d&amp;quot; will make sure that numbers are padded with zeros (and if you need 4 digits total, just use %04d instead).  Also, always pipe it to less first before piping to bash, just to make sure that you are not going to inadvertently delete something.&lt;br /&gt;
&lt;br /&gt;
Back to [[Useful_scripts_%28aka_smart_piece_of_code%29]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Renumber_files&amp;diff=1807</id>
		<title>Renumber files</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Renumber_files&amp;diff=1807"/>
		<updated>2010-12-10T15:27:01Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: Created page with &amp;#039;Let&amp;#039;s say you have a list of images named something_###.img with ### spanning 381-560, and you want to renumber them to be from 1 to 180.  &amp;#039;&amp;#039;&amp;#039;echo | awk &amp;#039;{for(i=1;i&amp;lt;181;i++) prin…&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Let&#039;s say you have a list of images named something_###.img with ### spanning 381-560, and you want to renumber them to be from 1 to 180.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;echo | awk &#039;{for(i=1;i&amp;lt;181;i++) printf &amp;quot;mv something_%03d.img something_%03d.img\n&amp;quot;,i+380,i;}&#039; | bash -sf&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
will do it.  Notice that &amp;quot;%03d&amp;quot; will make sure that numbers are padded with zeros (and if you need 4 digits total, just use %04d instead).  Also, always pipe it to less first before piping to bash, just to make sure that you are not going to inadvertently delete something.&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1806</id>
		<title>Useful scripts (aka smart piece of code)</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1806"/>
		<updated>2010-12-10T15:06:27Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a collection of scripts used to resolve variety of minor problems.  Posts include brief description and the code.  The list is still very short, so there is no hierarchy.&lt;br /&gt;
&lt;br /&gt;
* [[Get systematic absences from .sca file]]&lt;br /&gt;
* [[Print the shifts in individual atom positions]]&lt;br /&gt;
* [[Calculate average I/sigma from .sca file]]&lt;br /&gt;
* [[Renumber files]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Calculate_average_I/sigma_from_.sca_file&amp;diff=1782</id>
		<title>Calculate average I/sigma from .sca file</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Calculate_average_I/sigma_from_.sca_file&amp;diff=1782"/>
		<updated>2010-11-04T14:48:06Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This python script will analyze a .sca-file and print out the key statistics missing from the standard SCALEPACK log-file, namely &amp;lt;math&amp;gt;&amp;lt;I/sigma&amp;gt;&amp;lt;/math&amp;gt; per resolution shell.  Syntax is quite simple&lt;br /&gt;
&lt;br /&gt;
./ioversigma.py &amp;lt;.sca-file name&amp;gt; &amp;lt;number of shells&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of shells is an optional parameter and defaults to 10 if omitted.&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/uc?id=0Bxe0ET6Vsx-kZmM2YWZkNmYtMjQxZS00N2U3LTg1YTgtM2EwMTY5MzFlNjAw&amp;amp;export=download&amp;amp;hl=en Get ioversigma.py here]&lt;br /&gt;
&lt;br /&gt;
This works on &#039;&#039;&#039;merged&#039;&#039;&#039; intensities, i.e. the standard scalepack output.  An alternative below uses the &#039;&#039;&#039;unmerged&#039;&#039;&#039; output from scalepack.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
An alternative is to use SCALA (you will also need to assign the cell and symmetry) after pointless :&lt;br /&gt;
&lt;br /&gt;
 pointless -c scain ... &lt;br /&gt;
&lt;br /&gt;
 scala hklin from_pointless.mtz hklout merged.mtz &amp;lt;&amp;lt; eof&lt;br /&gt;
 run 1 all&lt;br /&gt;
 scales constant&lt;br /&gt;
 sdcorrection noadjust norefine both 1 0 0&lt;br /&gt;
 cycles 0&lt;br /&gt;
 eof&lt;br /&gt;
&lt;br /&gt;
This will just remerge the measurements and give you the usual merging analysis from Scala. &lt;br /&gt;
Same trick also works with data from XDS/XSCALE; in that case use&lt;br /&gt;
 pointless xdsin ...&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Calculate_average_I/sigma_from_.sca_file&amp;diff=1777</id>
		<title>Calculate average I/sigma from .sca file</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Calculate_average_I/sigma_from_.sca_file&amp;diff=1777"/>
		<updated>2010-11-02T03:52:39Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: Created page with &amp;#039;This python script will analyze a .sca-file and print out the key statistics missing from the standard SCALEPACK log-file, namely &amp;lt;math&amp;gt;&amp;lt;I/sigma&amp;gt;&amp;lt;/math&amp;gt; per resolution shell.  Sy…&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This python script will analyze a .sca-file and print out the key statistics missing from the standard SCALEPACK log-file, namely &amp;lt;math&amp;gt;&amp;lt;I/sigma&amp;gt;&amp;lt;/math&amp;gt; per resolution shell.  Syntax is quite simple&lt;br /&gt;
&lt;br /&gt;
./ioversigma.py &amp;lt;.sca-file name&amp;gt; &amp;lt;number of shells&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of shells is an optional parameter and defaults to 10 if omitted.&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/uc?id=0Bxe0ET6Vsx-kZmM2YWZkNmYtMjQxZS00N2U3LTg1YTgtM2EwMTY5MzFlNjAw&amp;amp;export=download&amp;amp;hl=en Get ioversigma.py here]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1776</id>
		<title>Useful scripts (aka smart piece of code)</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1776"/>
		<updated>2010-11-02T03:42:40Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a collection of scripts used to resolve variety of minor problems.  Posts include brief description and the code.  The list is still very short, so there is no hierarchy.&lt;br /&gt;
&lt;br /&gt;
* [[Get systematic absences from .sca file]]&lt;br /&gt;
* [[Print the shifts in individual atom positions]]&lt;br /&gt;
* [[Calculate average I/sigma from .sca file]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1775</id>
		<title>Useful scripts (aka smart piece of code)</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1775"/>
		<updated>2010-11-02T03:41:45Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a collection of scripts used to resolve variety of minor problems.  Posts include brief description and the code.  The list is still very short, so there is no hierarchy.&lt;br /&gt;
&lt;br /&gt;
* [[Get systematic absences from .sca file]]&lt;br /&gt;
* [[Print the shifts in individual atom positions]]&lt;br /&gt;
* [[Calculate &amp;lt;math&amp;gt;&amp;lt;I/sigma&amp;gt;&amp;lt;/math&amp;gt; from .sca file]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Morph_with_Chimera&amp;diff=1671</id>
		<title>Morph with Chimera</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Morph_with_Chimera&amp;diff=1671"/>
		<updated>2010-07-14T16:40:27Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Making a morph movie with UCSF Chimera is extremely easy.  There are tutorials on the website [http://www.cgl.ucsf.edu/chimera/tutorials/tutorials.html], but here is an outline:&lt;br /&gt;
&lt;br /&gt;
1.  Prepare your files.  Chimera may get a bit confused if sequence numbering is messed up, so remove all the things you don&#039;t actually need (e.g. waters) and make sure the initial and final conformation have perfectly aligned sequences.&lt;br /&gt;
&lt;br /&gt;
2.  Make the morph as described here [http://www.cgl.ucsf.edu/chimera/current/docs/ContributedSoftware/morph/morph.html].  In a nutshell, activate Tools-&amp;gt;Structure Comparison-&amp;gt;Morph conformations, add the start and end structures (should be loaded into chimera first; if you want the morph movie run in a loop add the start model as the third item) and change the number of steps to 40 for smoother motion.&lt;br /&gt;
&lt;br /&gt;
3.  Save the morph as PDB file - it will be NMR-style with multiple models.&lt;br /&gt;
&lt;br /&gt;
4.  Open the PDB file with morph in PyMOL.&lt;br /&gt;
&lt;br /&gt;
5.  There are plenty of tutorials and how to make a movie with PyMOL.  A simplistic way is to check the &amp;quot;Ray trace frames&amp;quot; and &amp;quot;Cache frame images&amp;quot; in movie menu, hit the play, wait for PyMOL to render all the images (it will eat cpu until it&#039;s done) button and the File-&amp;gt;Save Movie As-&amp;gt;PNG Images.  This will create the numbered sequence of PNG files.&lt;br /&gt;
&lt;br /&gt;
Alternatively, the following command &lt;br /&gt;
&lt;br /&gt;
grep MODEL morph.pdb | sort -k2 -nr | sed -n 1p | awk &#039;{for(i=1;i&amp;lt;=$2;i++) printf &amp;quot;set state, %d\nray 640,480\npng image%d.png\n&amp;quot;,i,i;}&#039; &amp;gt; pngmaker.pml&lt;br /&gt;
&lt;br /&gt;
will create the pngmaker.pml which is the script file to run from pymol (after you loaded your morph.pdb and chose the presentation you want) to generate the sequence of 640x480 pixel ray-traced images. &lt;br /&gt;
&lt;br /&gt;
6.  Make the movie file with the following command (but of course there are other more GUIsh ways to do this)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ffmpeg -qscale 5 -r 20 -b 9600 -i image%04d.png movie.mpg&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Morph_with_Chimera&amp;diff=1670</id>
		<title>Morph with Chimera</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Morph_with_Chimera&amp;diff=1670"/>
		<updated>2010-07-14T16:39:53Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Making a morph movie with UCSF Chimera is extremely easy.  There are tutorials on the website [http://www.cgl.ucsf.edu/chimera/tutorials/tutorials.html], but here is an outline:&lt;br /&gt;
&lt;br /&gt;
1.  Prepare your files.  Chimera may get a bit confused if sequence numbering is messed up, so remove all the things you don&#039;t actually need (e.g. waters) and make sure the initial and final conformation have perfectly aligned sequences.&lt;br /&gt;
&lt;br /&gt;
2.  Make the morph as described here [http://www.cgl.ucsf.edu/chimera/current/docs/ContributedSoftware/morph/morph.html].  In a nutshell, activate Tools-&amp;gt;Structure Comparison-&amp;gt;Morph conformations, add the start and end structures (should be loaded into chimera first; if you want the morph movie run in a loop add the start model as the third item) and change the number of steps to 40 for smoother motion.&lt;br /&gt;
&lt;br /&gt;
3.  Save the morph as PDB file - it will be NMR-style with multiple models.&lt;br /&gt;
&lt;br /&gt;
4.  Open the PDB file with morph in PyMOL.&lt;br /&gt;
&lt;br /&gt;
5.  There are plenty of tutorials and how to make a movie with PyMOL.  A simplistic way is to check the &amp;quot;Ray trace frames&amp;quot; and &amp;quot;Cache frame images&amp;quot; in movie menu, hit the play, wait for PyMOL to render all the images (it will eat cpu until it&#039;s done) button and the File-&amp;gt;Save Movie As-&amp;gt;PNG Images.  This will create the numbered sequence of PNG files.&lt;br /&gt;
&lt;br /&gt;
Alternatively, the following command &lt;br /&gt;
&lt;br /&gt;
grep MODEL morph.pdb | sort -k2 -nr | sed -n 1p | awk &#039;{for(i=1;i&amp;lt;=$2;i++) printf &amp;quot;set state, %d\nray 640,480\npng image%d.png\n&amp;quot;,i,i;}&#039; &amp;gt; pngmaker.pml&lt;br /&gt;
&lt;br /&gt;
will create the pngmaker.pml which is the script file to run from pymol (after you loaded your morph.pdb and chose the presentation you want) to generate the sequence of ray-traced images. &lt;br /&gt;
&lt;br /&gt;
6.  Make the movie file with the following command (but of course there are other more GUIsh ways to do this)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ffmpeg -qscale 5 -r 20 -b 9600 -i image%04d.png movie.mpg&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Morph_with_Chimera&amp;diff=1669</id>
		<title>Morph with Chimera</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Morph_with_Chimera&amp;diff=1669"/>
		<updated>2010-07-14T16:28:51Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Making a morph movie with UCSF Chimera is extremely easy.  There are tutorials on the website [http://www.cgl.ucsf.edu/chimera/tutorials/tutorials.html], but here is an outline:&lt;br /&gt;
&lt;br /&gt;
1.  Prepare your files.  Chimera may get a bit confused if sequence numbering is messed up, so remove all the things you don&#039;t actually need (e.g. waters) and make sure the initial and final conformation have perfectly aligned sequences.&lt;br /&gt;
&lt;br /&gt;
2.  Make the morph as described here [http://www.cgl.ucsf.edu/chimera/current/docs/ContributedSoftware/morph/morph.html].  In a nutshell, activate Tools-&amp;gt;Structure Comparison-&amp;gt;Morph conformations, add the start and end structures (should be loaded into chimera first; if you want the morph movie run in a loop add the start model as the third item) and change the number of steps to 40 for smoother motion.&lt;br /&gt;
&lt;br /&gt;
3.  Save the morph as PDB file - it will be NMR-style with multiple models.&lt;br /&gt;
&lt;br /&gt;
4.  Open the PDB file with morph in PyMOL.&lt;br /&gt;
&lt;br /&gt;
5.  There are plenty of tutorials and how to make a movie with PyMOL.  A simplistic way is to check the &amp;quot;Ray trace frames&amp;quot; and &amp;quot;Cache frame images&amp;quot; in movie menu, hit the play, wait for PyMOL to render all the images (it will eat cpu until it&#039;s done) button and the File-&amp;gt;Save Movie As-&amp;gt;PNG Images.  This will create the numbered sequence of PNG files.&lt;br /&gt;
&lt;br /&gt;
6.  Make the movie file with the following command (but of course there are other more GUIsh ways to do this)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ffmpeg -qscale 5 -r 20 -b 9600 -i image%04d.png movie.mpg&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Morph_with_Chimera&amp;diff=1659</id>
		<title>Morph with Chimera</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Morph_with_Chimera&amp;diff=1659"/>
		<updated>2010-07-03T16:53:35Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: Created page with &amp;#039;Making a morph movie with UCSF Chimera is extremely easy.  There are tutorials on the website [http://www.cgl.ucsf.edu/chimera/tutorials/tutorials.html], but here is an outline: …&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Making a morph movie with UCSF Chimera is extremely easy.  There are tutorials on the website [http://www.cgl.ucsf.edu/chimera/tutorials/tutorials.html], but here is an outline:&lt;br /&gt;
&lt;br /&gt;
1.  Prepare your files.  Chimera may get a bit confused if sequence numbering is messed up, so remove all the things you don&#039;t actually need (e.g. waters) and make sure the initial and final conformation have perfectly aligned sequences.&lt;br /&gt;
&lt;br /&gt;
2.  Make the morph as described here [http://www.cgl.ucsf.edu/chimera/current/docs/ContributedSoftware/morph/morph.html]&lt;br /&gt;
&lt;br /&gt;
3.  Save the morph as PDB file - it will be NMR-style with multiple models.&lt;br /&gt;
&lt;br /&gt;
4.  Open the PDB file with morph in PyMOL.&lt;br /&gt;
&lt;br /&gt;
5.  There are plenty of tutorials and how to make a movie with PyMOL.  A simplistic way is to check the &amp;quot;Ray trace frames&amp;quot; and &amp;quot;Cache frame images&amp;quot; in movie menu, hit the play, wait for PyMOL to render all the images (it will eat cpu until it&#039;s done) button and the File-&amp;gt;Save Movie As-&amp;gt;PNG Images.  This will create the numbered sequence of PNG files.&lt;br /&gt;
&lt;br /&gt;
6.  Make the movie file with the following command (but of course there are other more GUIsh ways to do this)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;ffmpeg -qscale 5 -r 20 -b 9600 -i image%04d.png movie.mpg&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Morphing&amp;diff=1658</id>
		<title>Morphing</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Morphing&amp;diff=1658"/>
		<updated>2010-07-03T16:37:39Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Morphing denotes the process of calculating intermediate structures between two (or more) given structures, and to visualize the resulting conformational changes.&lt;br /&gt;
&lt;br /&gt;
* morph server http://molmovdb.mbb.yale.edu/molmovdb/morph/ [http://molmovdb.mbb.yale.edu/cgi-bin/beta.cgi submission]&lt;br /&gt;
* [[morph with Chimera]] [http://www.cgl.ucsf.edu/chimera/]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Print_the_shifts_in_individual_atom_positions&amp;diff=1657</id>
		<title>Print the shifts in individual atom positions</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Print_the_shifts_in_individual_atom_positions&amp;diff=1657"/>
		<updated>2010-07-03T16:33:49Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: Created page with &amp;#039;This can be done with one command line (albeit a rather long one). Below is the code with (remove backslashes if pasting as a single line)   grep &amp;#039;ATOM\|HETATM&amp;#039; file1.pdb file2.p…&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This can be done with one command line (albeit a rather long one). Below is the code with (remove backslashes if pasting as a single line) &lt;br /&gt;
&lt;br /&gt;
grep &#039;ATOM\|HETATM&#039; file1.pdb file2.pdb | \&lt;br /&gt;
&lt;br /&gt;
grep -v REMARK | \&lt;br /&gt;
&lt;br /&gt;
cut -d: -f 2 | \&lt;br /&gt;
&lt;br /&gt;
cut -c 13-54 | \&lt;br /&gt;
&lt;br /&gt;
sort | \&lt;br /&gt;
&lt;br /&gt;
awk &#039;BEGIN {FIELDWIDTHS = &amp;quot;14 28&amp;quot;; pt=&amp;quot;&amp;quot;} {if(pt==$1) print pr,$2; pt=$1; pr=$0;}&#039; | \&lt;br /&gt;
&lt;br /&gt;
awk &#039;BEGIN {FIELDWIDTHS = &amp;quot;14 4 8 8 8 5 8 8 8&amp;quot;} {printf &amp;quot;%s %8.4f\n&amp;quot;,$1,sqrt(($3-$7)^2+($4-$8)^2+($5-$9)^2);}&#039; | \&lt;br /&gt;
&lt;br /&gt;
awk &#039;BEGIN {FIELDWIDTHS = &amp;quot;4 1 3 1 1 5 9&amp;quot;} {printf &amp;quot;%s %s %s %s %s\n&amp;quot;, $3,$5,$6,$1,$7;}&#039;&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1656</id>
		<title>Useful scripts (aka smart piece of code)</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1656"/>
		<updated>2010-07-03T16:30:35Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a collection of scripts used to resolve variety of minor problems.  Posts include brief description and the code.  The list is still very short, so there is no hierarchy.&lt;br /&gt;
&lt;br /&gt;
* [[Get systematic absences from .sca file]]&lt;br /&gt;
* [[Print the shifts in individual atom positions]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Get_systematic_absences_from_.sca_file&amp;diff=1265</id>
		<title>Get systematic absences from .sca file</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Get_systematic_absences_from_.sca_file&amp;diff=1265"/>
		<updated>2008-12-11T23:21:11Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Scalepack outputs only systematic absences, and not the rest of reflections.  The best way to identify screw axis is probably to look at the whole set of reflections, so that you can compare systematic absences with present reflections.  Another relevant situation is when you need to identify which axis are screw in, say, P2221.  You have to run scalepack at least twice to do it.&lt;br /&gt;
&lt;br /&gt;
So, the general rule is:&lt;br /&gt;
&lt;br /&gt;
1.  Run scalepack in the spacegroup with no screw axis (e.g. P2, P222, I422, etc).&lt;br /&gt;
&lt;br /&gt;
2.  Use the following python script to extract specific reflection types.&lt;br /&gt;
&lt;br /&gt;
The syntax is &lt;br /&gt;
&lt;br /&gt;
./gethkl &amp;lt;file-name&amp;gt; &#039;absence code&#039;&lt;br /&gt;
&lt;br /&gt;
Absence code should be in quotes but has a human(e) format, such as (0,0,l), (0,2k,0), etc.  Other examples are (h,0,0), (h,1,2), (h,2k,4) and so on. &lt;br /&gt;
&lt;br /&gt;
Enjoy.  (Tested on Ubuntu Gutsy, hence python 2.5).  &lt;br /&gt;
&lt;br /&gt;
Click here for the code [http://docs.google.com/Doc?id=d64gxmg_0gvpgt9zq]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Get_systematic_absences_from_.sca_file&amp;diff=1264</id>
		<title>Get systematic absences from .sca file</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Get_systematic_absences_from_.sca_file&amp;diff=1264"/>
		<updated>2008-12-11T23:20:39Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: New page: Scalepack outputs only systematic absences, and not the rest of reflections.  The best way to identify screw axis is probably to look at the whole set of reflections, so that you can compa...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Scalepack outputs only systematic absences, and not the rest of reflections.  The best way to identify screw axis is probably to look at the whole set of reflections, so that you can compare systematic absences with present reflections.  Another relevant situation is when you need to identify which axis are screw in, say, P2221.  You have to run scalepack at least twice to do it.&lt;br /&gt;
&lt;br /&gt;
So, the general rule is:&lt;br /&gt;
&lt;br /&gt;
1.  Run scalepack in the spacegroup with no screw axis (e.g. P2, P222, I422, etc).&lt;br /&gt;
2.  Use the following python script to extract specific reflection types.&lt;br /&gt;
&lt;br /&gt;
The syntax is &lt;br /&gt;
&lt;br /&gt;
./gethkl &amp;lt;file-name&amp;gt; &#039;absence code&#039;&lt;br /&gt;
&lt;br /&gt;
Absence code should be in quotes but has a human(e) format, such as (0,0,l), (0,2k,0), etc.  Other examples are (h,0,0), (h,1,2), (h,2k,4) and so on. &lt;br /&gt;
&lt;br /&gt;
Enjoy.  (Tested on Ubuntu Gutsy, hence python 2.5).  &lt;br /&gt;
&lt;br /&gt;
Click here for the code [http://docs.google.com/Doc?id=d64gxmg_0gvpgt9zq]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1263</id>
		<title>Useful scripts (aka smart piece of code)</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1263"/>
		<updated>2008-12-11T23:01:07Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a collection of scripts used to resolve variety of minor problems.  Posts include brief description and the code.  The list is still very short, so there is no hierarchy.&lt;br /&gt;
&lt;br /&gt;
* [[Get systematic absences from .sca file]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1262</id>
		<title>Useful scripts (aka smart piece of code)</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1262"/>
		<updated>2008-12-11T22:58:14Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a collection of scripts used to resolve variety of minor problems.  Posts include brief description and the code.  The list is still very short, so there is no hierarchy.&lt;br /&gt;
[[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1261</id>
		<title>Useful scripts (aka smart piece of code)</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Useful_scripts_(aka_smart_piece_of_code)&amp;diff=1261"/>
		<updated>2008-12-11T22:53:35Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: New page: This page is a collection of scripts used to resolve variety of minor problems.  Posts include brief description and the code.  The list is still very short, so there is no hierarchy.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is a collection of scripts used to resolve variety of minor problems.  Posts include brief description and the code.  The list is still very short, so there is no hierarchy.&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Xtal_computing&amp;diff=1260</id>
		<title>Xtal computing</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Xtal_computing&amp;diff=1260"/>
		<updated>2008-12-11T22:50:56Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Computer hardware]]&lt;br /&gt;
&lt;br /&gt;
* [[Operating systems and Linux distributions]]&lt;br /&gt;
&lt;br /&gt;
* [[Programming and programming languages]]&lt;br /&gt;
&lt;br /&gt;
* [[Visualization: graphics cards and 3D|Graphics cards and 3D]]&lt;br /&gt;
** [[Stereo]]&lt;br /&gt;
&lt;br /&gt;
* [[Useful scripts (aka smart piece of code)]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Operating_systems_and_Linux_distributions&amp;diff=974</id>
		<title>Operating systems and Linux distributions</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Operating_systems_and_Linux_distributions&amp;diff=974"/>
		<updated>2008-06-26T13:33:34Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: /* Irix (SGI) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Operating Systems=&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Linux GNU/Linux] aims to be a free and open-source unix (or unix-like) operating system that will run on most types of computer hardware and uses an [http://en.wikipedia.org/wiki/X_Window_System X11 graphical user interface]. Various [http://en.wikipedia.org/wiki/Linux_distribution distributions of GNU/Linux] exist that have different package management systems and other features. Most of these are ideal platforms for X-ray crystallography and other scientific computational requirements.&lt;br /&gt;
&lt;br /&gt;
===Linux Distributions===&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ubuntu_%28Linux_distribution%29 Ubuntu]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Debian Debian]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux Red Hat] with its clones (binary compatible; produced from the source provided by Red Hat) [[CentOS]] and [https://www.scientificlinux.org Scientific Linux]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fedora_%28Linux_distribution%29 Fedora]&lt;br /&gt;
&lt;br /&gt;
These differ greatly in the time they support their releases:&lt;br /&gt;
* OpenSuse: 2 years&lt;br /&gt;
* Fedora: 18 months&lt;br /&gt;
* Ubuntu: 18 months&lt;br /&gt;
* Ubuntu LTS: Server 5 years, Desktop 3 years&lt;br /&gt;
* CentOS: 7 years&lt;br /&gt;
* Gentoo: less relevant; &amp;quot;rolling releases&amp;quot;&lt;br /&gt;
* Debian: 1 year after a new release; thus usually 2.5 - 3.5 yrs&lt;br /&gt;
&lt;br /&gt;
===Useful Links===&lt;br /&gt;
&lt;br /&gt;
* [http://xanana.ucsc.edu/~wgscott/xtal/wiki/index.php/Crystallography_on_Ubuntu Crystallography on Ubuntu Linux]&lt;br /&gt;
* [http://linux.dell.com/wiki/index.php/Repository Dell&#039;s RPMs for Linux machines, including BIOS-update stuff]&lt;br /&gt;
&lt;br /&gt;
==Mac OS X==&lt;br /&gt;
&lt;br /&gt;
Mac OS X is a proprietary [http://en.wikipedia.org/wiki/FreeBSD BSD]-unix-derived operating system that runs on Apple&#039;s computers. The BSD-subsystem, called [http://en.wikipedia.org/wiki/Darwin_(operating_system) Darwin], attempts to be open-source. Unlike most other flavors of unix, OS X is not based on an [http://en.wikipedia.org/wiki/X_Window_System  X11 windowing system], but instead uses a proprietary [http://en.wikipedia.org/wiki/Aqua_(user_interface) Aqua] graphical user interface. For crystallographers and others who need the conventional X11 windowing system, an [http://trac.macosforge.org/projects/xquartz Xserver for OS X] is available, and installs by default on the most current version of OS X.&lt;br /&gt;
&lt;br /&gt;
===Links:===&lt;br /&gt;
&lt;br /&gt;
* [http://www.apple.com/macosx/technology/unix.html Apple&#039;s Mac OS X Unix] page.&lt;br /&gt;
&lt;br /&gt;
* [http://xanana.ucsc.edu/xtal/ Crystallography on OS X]&lt;br /&gt;
&lt;br /&gt;
==Irix (SGI)==&lt;br /&gt;
&lt;br /&gt;
By all accounts, SGIs are now obsolete.  They are more expensive and perhaps offer higher productivity, but it is not worth the money when $500 Linux box takes 1/2 hour to calculate a simulated annealing omit map.  There are some examples of software (such as [http://wiki.c2b2.columbia.edu/honiglab_public/index.php/Software:GRASP GRASP]) that you can only run on SGIs, not Linux.  O is also wicked fast on SGIs.&lt;br /&gt;
&lt;br /&gt;
Irix is a flavor of UNIX and is still supported by [http://www.sgi.com/products/software/irix/ SGI].&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Crystals&amp;diff=880</id>
		<title>Crystals</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Crystals&amp;diff=880"/>
		<updated>2008-05-23T16:11:35Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: /* Crystal Growth */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Crystal Growth ==&lt;br /&gt;
&lt;br /&gt;
* [[Modifying the protein to crystallize better]]&lt;br /&gt;
* [[Crystallization screens and methods]]&lt;br /&gt;
* [[I have crystals, but are they salt?]]&lt;br /&gt;
* [[Conditions prone to salt crystallization]]&lt;br /&gt;
* [[Biophysical methods]] for evaluation of crystallization tendency&lt;br /&gt;
* [[Robots for crystallization setup]]&lt;br /&gt;
* [[Visualization of crystal growth]]&lt;br /&gt;
* [[Robots for crystal mounting]]&lt;br /&gt;
* [[Crystal growth: Tips and Tricks]]&lt;br /&gt;
&lt;br /&gt;
== Data collection ==&lt;br /&gt;
* [[X-ray generators and detectors]] (experiences) &lt;br /&gt;
* [http://www.esrf.eu/UsersAndScience/Links/Synchrotrons Synchrotron beamlines]&lt;br /&gt;
* [[Cryo]]&lt;br /&gt;
* [[Strategies]]&lt;br /&gt;
* [[Data quality]]&lt;br /&gt;
* [[Radiation damage]]&lt;br /&gt;
* [[Data collection: Tips and Tricks]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Crystals&amp;diff=879</id>
		<title>Crystals</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Crystals&amp;diff=879"/>
		<updated>2008-05-23T16:11:11Z</updated>

		<summary type="html">&lt;p&gt;Pozharski: /* Crystal Growth */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Crystal Growth ==&lt;br /&gt;
&lt;br /&gt;
* [[Modifying the protein to crystallize better]]&lt;br /&gt;
* [[Crystallization screens and methods]]&lt;br /&gt;
* [[I have crystals, but are they salt?]]&lt;br /&gt;
* [[Biophysical methods]] for evaluation of crystallization tendency&lt;br /&gt;
* [[Robots for crystallization setup]]&lt;br /&gt;
* [[Visualization of crystal growth]]&lt;br /&gt;
* [[Robots for crystal mounting]]&lt;br /&gt;
* [[Crystal growth: Tips and Tricks]]&lt;br /&gt;
* [[Conditions prone to salt crystallization]]&lt;br /&gt;
&lt;br /&gt;
== Data collection ==&lt;br /&gt;
* [[X-ray generators and detectors]] (experiences) &lt;br /&gt;
* [http://www.esrf.eu/UsersAndScience/Links/Synchrotrons Synchrotron beamlines]&lt;br /&gt;
* [[Cryo]]&lt;br /&gt;
* [[Strategies]]&lt;br /&gt;
* [[Data quality]]&lt;br /&gt;
* [[Radiation damage]]&lt;br /&gt;
* [[Data collection: Tips and Tricks]]&lt;/div&gt;</summary>
		<author><name>Pozharski</name></author>
	</entry>
</feed>