| Quick navigation: | Home | Site Map || References | Biography || Copyright | Other copyright | Contact us | Advert | | |
Re: [ccp4bb] Calculation of angle between two helix of different subunits |
||
- Protein crystallographyMain steps:- Protein purification- Crystallisation Special:- Programs for crystallography- X-ray detectors Basic tutorials:- Chemistry- Protein - Peptide - Amino Acids Xtal community:- CCP4BB |
CCP4bb navigationCCP4bb <-- 1999 <-- November 1999 <-- 30 November 1999Subject: Re: Calculation of angle between two helix of different subunits From: Clemens Vonrhein vonrhein {- at -} GLOBALPHASING {- dot -} COM Date: 2009-04-16 #!/bin/sh version="Time-stamp: <2009-04-16 12:47:59 vonrhein>" # # Copyright 2008 by Global Phasing Limited # # All rights reserved. # # Author (2008) Clemens Vonrhein # # Contact buster-develop@GlobalPhasing.com # #---------------------------------------------------------------------- # BEGIN OF USER INPUT #---------------------------------------------------------------------- #---------------------------------------------------------------------- # END OF USER INPUT #---------------------------------------------------------------------- echo " " >&2 echo " ============================================================================ " >&2 echo " " >&2 echo " Copyright (C) 2008 by Global Phasing Limited" >&2 echo " " >&2 echo " All rights reserved." >&2 echo " " >&2 echo " ---------------------------------------------------------------------------- " >&2 echo " " >&2 echo " Contact: buster-develop@GlobalPhasing.com" >&2 echo " " >&2 ShortVersion=`echo $version cut -f2- -d':' sed "s/ [a-z0-9][a-z0-9][a-z0-9]*>/>/g"` echo " Program: `basename $0` version ${ShortVersion} " >&2 echo " " >&2 echo " ============================================================================ " >&2 echo " " >&2 #---------------------------------------------------------------------- # BEGIN OF SCRIPT #---------------------------------------------------------------------- usage () { echo " " echo " USAGE: $0 echo " " echo " echo " " echo " echo " " } [ $# -ne 6 ] && usage && exit 1 echo $@ awk 'BEGIN{ PI = 4*atan2(1,1) DTOR = PI/180 RTOD = 180/PI } function Sin(x) { return sin(x*DTOR) } function Cos(x) { return cos(x*DTOR) } function Tan(x) { return Sin(x)/Cos(x) } function ASin(x) { return atan2(x,sqrt(1 - x * x))*RTOD } function ACos(x) { return atan2(sqrt(1 - x * x),x)*RTOD } function ATan2(y,x){ return atan2(y,x)*RTOD } { ax=$1;ay=$2;az=$3 l=sqrt(ax*ax+ay*ay+az*az) x1=ax/l;y1=ay/l;z1=az/l bx=$4;by=$5;bz=$6 l=sqrt(bx*bx+by*by+bz*bz) x2=bx/l;y2=by/l;z2=bz/l dot=x1*x2+y1*y2+z1*z2 ang=ACos(dot) printf(" %15.5f %15.5f ",ax,bx) printf(" angle between %15.5f and %15.5f = %15.5f degree ",ay,by,ang) printf(" %15.5f %15.5f ",az,bz) printf(" ") }' #---------------------------------------------------------------------- # END OF SCRIPT #---------------------------------------------------------------------- CCP4bb navigationCCP4bb <-- 1999 <-- November 1999 <-- 30 November 1999 |
|
| ProteinCrystallography.org: Copyright 2006-2010 by Quid United Ltd |