XDSGUI User tools: Difference between revisions
Jump to navigation
Jump to search
(Created page with "This page is for sharing useful scripts to use in XDSGUI User tools --- "Update beam center" Read beam center from IDXREF.LP, then adjust location to frame coordinates in case of 2-theta offset Formatted code: <pre> X=$(perl -e ' # Read IDXREF.LP to get refined beam center, save in $x, $y open(F,"<IDXREF.LP"); while(<F>){ if(/BEAM +(\S*\d) +(\S*\d)/){ $x=$1; $y=$2; } # get X,Y beam } # Read XDS.INP to get parameters needed to adjust for horizontal 2-theta offset (ver...") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
This page is for sharing useful scripts to use in XDSGUI User tools | This page is for sharing useful scripts to use in XDSGUI User tools | ||
===Update beam center=== | |||
Read beam center from IDXREF.LP, then adjust location to frame coordinates in case of 2-theta offset | Read beam center from IDXREF.LP, then adjust location to frame coordinates in case of 2-theta offset | ||
Line 9: | Line 8: | ||
X=$(perl -e ' | X=$(perl -e ' | ||
# Read IDXREF.LP to get refined beam center, save in $x, $y | # Read IDXREF.LP to get refined beam center, save in $x, $y | ||
open(F,"<IDXREF.LP"); | open(F,"<IDXREF.LP") or die; | ||
while(<F>){ | while(<F>){ | ||
if(/BEAM +(\S*\d) +(\S*\d)/){ $x=$1; $y=$2; } # get X,Y beam | if(/BEAM +(\S*\d) +(\S*\d)/){ $x=$1; $y=$2; } # get X,Y beam | ||
} | } | ||
# Read XDS.INP to get parameters needed to adjust for horizontal 2-theta offset ( | # Read XDS.INP to get parameters needed to adjust for horizontal 2-theta offset (vertical offsets not supported) | ||
open(F,"<XDS.INP"); | open(F,"<XDS.INP") or die; | ||
while(<F>){ | while(<F>){ | ||
if(/^[^!]*DETECTOR_DISTANCE= *(\S*\d)/){ $d=$1; } # d = detector distance | if(/^[^!]*DETECTOR_DISTANCE= *(\S*\d)/) { $d=$1; } # d = detector distance | ||
if(/^[^!]*DIRECTION_OF_DETECTOR_X-AXIS= *(\S*\d) +\S*\d +(\S*\d)/){ $x1=$1; $x3=$2; } # x1,x3 = horizontal rotation part of X-axis | if(/^[^!]*DIRECTION_OF_DETECTOR_X-AXIS= *(\S*\d) +\S*\d +(\S*\d)/) { $x1=$1; $x3=$2; } # x1,x3 = horizontal rotation part of X-axis | ||
if(/^[^!]*QX= *(\S*\d)/){$qx=$1;} # qx = detector | if(/^[^!]*QX= *(\S*\d)/) { $qx=$1;} # qx = detector resolution | ||
} | } | ||
printf "ORGX=%.2f ORGY=%.2f\n",$x-$x3/$x1*$d/$qx, $y;' | printf "ORGX=%.2f ORGY=%.2f\n",$x-$x3/$x1*$d/$qx, $y;' | ||
Line 27: | Line 26: | ||
<pre> | <pre> | ||
X=$(perl -e 'open(F,"<IDXREF.LP");while(<F>){if(/BEAM +(\S*\d) +(\S*\d)/){$x=$1;$y=$2;}}open(F,"<XDS.INP");while(<F>){if(/^[^!]*DETECTOR_DISTANCE= *(\S*\d)/){$d=$1;}if(/^[^!]*DIRECTION_OF_DETECTOR_X-AXIS= *(\S*\d) +\S*\d +(\S*\d)/){$x1=$1;$x3=$2;}if(/^[^!]*QX= *(\S*\d)/){$qx=$1;}}printf "ORGX=%.2f ORGY=%.2f\n",$x-$x3/$x1*$d/$qx,$y;')&& sed -e 's/^ *\(ORGX=\)/'"$X"' !\1/;' XDS.INP>x && mv -f x XDS.INP | X=$(perl -e 'open(F,"<IDXREF.LP");while(<F>){if(/BEAM +(\S*\d) +(\S*\d)/){$x=$1;$y=$2;}}open(F,"<XDS.INP");while(<F>){if(/^[^!]*DETECTOR_DISTANCE= *(\S*\d)/){$d=$1;}if(/^[^!]*DIRECTION_OF_DETECTOR_X-AXIS= *(\S*\d) +\S*\d +(\S*\d)/){$x1=$1;$x3=$2;}if(/^[^!]*QX= *(\S*\d)/){$qx=$1;}}printf "ORGX=%.2f ORGY=%.2f\n",$x-$x3/$x1*$d/$qx,$y;')&& sed -e 's/^ *\(ORGX=\)/'"$X"' !\1/;' XDS.INP>x && mv -f x XDS.INP | ||
</pre> | |||
===Run Phenix xtriage=== | |||
Run phenix xtriage, and display the result in a text viewer. Change gview if necessary | |||
<pre> | |||
phenix.xtriage output_file_name.mtz scaling.input.xray_data.obs_labels=IMEAN,SIGIMEAN >xtriage.log && gview xtriage.log | |||
</pre> | </pre> |
Latest revision as of 04:19, 31 May 2023
This page is for sharing useful scripts to use in XDSGUI User tools
Update beam center
Read beam center from IDXREF.LP, then adjust location to frame coordinates in case of 2-theta offset
Formatted code:
X=$(perl -e ' # Read IDXREF.LP to get refined beam center, save in $x, $y open(F,"<IDXREF.LP") or die; while(<F>){ if(/BEAM +(\S*\d) +(\S*\d)/){ $x=$1; $y=$2; } # get X,Y beam } # Read XDS.INP to get parameters needed to adjust for horizontal 2-theta offset (vertical offsets not supported) open(F,"<XDS.INP") or die; while(<F>){ if(/^[^!]*DETECTOR_DISTANCE= *(\S*\d)/) { $d=$1; } # d = detector distance if(/^[^!]*DIRECTION_OF_DETECTOR_X-AXIS= *(\S*\d) +\S*\d +(\S*\d)/) { $x1=$1; $x3=$2; } # x1,x3 = horizontal rotation part of X-axis if(/^[^!]*QX= *(\S*\d)/) { $qx=$1;} # qx = detector resolution } printf "ORGX=%.2f ORGY=%.2f\n",$x-$x3/$x1*$d/$qx, $y;' ) && sed -e 's/^ *\(ORGX=\)/'"$X"' !\1/;' XDS.INP > x && mv -f x XDS.INP
One-liner for use in XDSGUI
X=$(perl -e 'open(F,"<IDXREF.LP");while(<F>){if(/BEAM +(\S*\d) +(\S*\d)/){$x=$1;$y=$2;}}open(F,"<XDS.INP");while(<F>){if(/^[^!]*DETECTOR_DISTANCE= *(\S*\d)/){$d=$1;}if(/^[^!]*DIRECTION_OF_DETECTOR_X-AXIS= *(\S*\d) +\S*\d +(\S*\d)/){$x1=$1;$x3=$2;}if(/^[^!]*QX= *(\S*\d)/){$qx=$1;}}printf "ORGX=%.2f ORGY=%.2f\n",$x-$x3/$x1*$d/$qx,$y;')&& sed -e 's/^ *\(ORGX=\)/'"$X"' !\1/;' XDS.INP>x && mv -f x XDS.INP
Run Phenix xtriage
Run phenix xtriage, and display the result in a text viewer. Change gview if necessary
phenix.xtriage output_file_name.mtz scaling.input.xray_data.obs_labels=IMEAN,SIGIMEAN >xtriage.log && gview xtriage.log