Subject: phi,psi computation - a summary

From: [email-masked] (Lim Teck Sin)
Date: Sat, 4 Nov 1995 08:41:41 +0800

Hi,

   I received the following replies about phi,psi computation. Thanks!

-----------------------------------------------------------------------
From: [email-masked]
Date: Wed, 1 Nov 1995 18:32:12 -0500
CHARMM is able to compute phi, psi angles of peptide backbones.
Hope this will help,
Istvan

Date: Thu, 2 Nov 1995 11:07:21 +1100
From: Tracy Nero <[email-masked]>
There should be a program to calculate these angles deposited in the PDB
databank, they have a number of small programs to calculate various
parameters/extract information.
In case you don't have the PDB address
anonymous ftp site          pdb.pdb.bnl.gov
gopher site                 pdb.pdb.bnl.gov:70
WWW site                    http://www.pdb.bnl.gov/
Cheers
Tracy Nero
[email-masked]

Date: Thu, 2 Nov 1995 09:37:03 -0500
From: [email-masked] (Swamy Kandadai)
The pdb has a program for computing the phi and psi angles from the
xyz coordinates in the pdb format. 
Thanks
Swamy Kandadai

From: cbas25 <[email-masked]>
Date: Wed, 1 Nov 1995 20:37:36 +0000 (GMT)
The program INTERCHEM will compute values of phi and psi given protein 
structures in a native format which can easily be derived from the pdb 
format using a tool called PROTEINS.  Both programs are available from QCPE.
Yours sincerely,
Peter Bladon

From: cbas25 <[email-masked]>
Subject: Re: QCPE
Date: Thu, 2 Nov 1995 10:06:00 +0000 (GMT)
QCPE is the abrreviation for:-
Quantum Chemistry Program Exchange
Creative Arts Building 181
Indiana University
Bloomington, IN 47405
USA
Phone +1 812 855 4784
Fax   +1 812 855 5539
email  [email-masked]
The person in charge is Dr. Richard Counts
QCPE holds copies of many programs (notably MOPAC) and distributes them
at minimal costs.
The INTERCHEM suite of programs costs $3000 for a non-academic license or 
$600 for an academic license.  More information on INTERCHEM can be got 
from the world-wide web-page:-
http://interchem.chem.strath.ac.uk/inter/interprobe.html
I hope this helps
Yours sincerely

Date: Thu, 02 Nov 1995 08:36:29 -0600
From: Akbar Nayeem <[email-masked]>
This is easily done in the Sybyl/Biopolymer module from Tripos.
Akbar Nayeem
Biopolymer Scientist
Tripos Inc.

From: David Wild <[email-masked]>
Date: Thu, 2 Nov 1995 13:02:10 +0000
Hi there
I've got hold of a fortran program from a guy called Mike Williamson 
at the molecular biology department here. I'm afraid I don't have any 
documentation for it, but I'll enclose it anyway. If you want to get 
in touch with him, his E-mail is [email-masked]
Best Wishes
David Wild

C Reads PDB file, works out phi and psi for all residues
c Modification of phipsi.f for all chi
c Modified again to give omega too.
      DIMENSION atom(8000),ires(8000),res(8000),x(8000)
      DIMENSION y(8000),z(8000),phi(800),psi(800),chi(800)
      DIMENSION seq(800),chi2(800),chi3(800),chi4(800)
      DIMENSION iphires(4,800),ipsires(4,800),ichires(4,800)
      DIMENSION ichi2res(4,800),ichi3res(4,800),omega(800)
      DIMENSION ichi4res(4,800),iomegares(4,800)
      CHARACTER FN1*40,line*80,res*3,atom*4,FN2*40,seq*3
      COMMON x,y,z
      type *,'Input file?'
      accept 999,FN1
      type *,'Output file?'
      accept 999,FN2
999   format(A)
      open(1,file=FN1,status='OLD')
      open(2,file=FN2)
      iatom=0
10    read(1,999)line
      if(line(1:4).eq.'END ') goto 100
      if(line(1:4).ne.'ATOM') goto 10
      iatom=iatom+1
      read(line(13:16),'(A4)') atom(iatom)
      read(line(18:20),'(A3)') res(iatom)
      read(line(23:26),'(I4)') ires(iatom)
c     ires(iatom)=ires(iatom)-508
      read(line(31:38),'(F8.3)') x(iatom)
      read(line(39:46),'(F8.3)') y(iatom)
      read(line(47:54),'(F8.3)') z(iatom)
      goto 10
100   continue
      write(2,998)ires(iatom),FN1
998   format(1X,I4,' residues detected for ',A)
      write(2,995)
995   format('NB The omega angle is for the bond AFTER ther residue')
      write(2,997)
997   format
     1('  Residue    Omega    Phi     Psi    Chi1    Chi2    Chi3   Chi4
     2')
C locate line numbers for phi and psi calculation
      do 20 I=1,iatom
      if(atom(I).eq.' N  ') then
       iomegares(3,ires(i)-1)=i
       iphires(2,ires(i))=i
       ipsires(1,ires(i))=i
       ipsires(4,ires(i)-1)=i
       ichires(1,ires(i))=i
      endif
      if(atom(i).eq.' CA ') then
       iomegares(1,ires(i))=i
       iomegares(4,ires(i)-1)=i
       iphires(3,ires(i))=i
       ipsires(2,ires(i))=i
       ichires(2,ires(i))=i
       ichi2res(1,ires(i))=i
       seq(ires(i))=res(i)
      endif
      if(atom(i).eq.' C  ') then
       iomegares(2,ires(i))=i
       iphires(4,ires(i))=i
       iphires(1,ires(i)+1)=i
       ipsires(3,ires(i))=i
      endif
      if(atom(i).eq.' CB ') then
       ichires(3,ires(i))=i
       ichi2res(2,ires(i))=i
       ichi3res(1,ires(i))=i
      endif
      if(atom(i)(3:3).eq.'G') then
       if(res(i).eq.'ILE'.and.atom(i).eq.' CG2') goto 20
       if(res(i).eq.'THR'.and.atom(i).eq.' CG2') goto 20
       if(res(i).eq.'VAL'.and.atom(i).eq.' CG2') goto 20
        ichires(4,ires(i))=i
        ichi2res(3,ires(i))=i
        ichi3res(2,ires(i))=i
        ichi4res(1,ires(i))=i
      endif
      if(atom(i)(3:3).eq.'D') then
       if(atom(i)(4:4).eq.'2') goto 20
        ichi2res(4,ires(i))=i
        ichi3res(3,ires(i))=i
        ichi4res(2,ires(i))=i
      endif
      if(atom(i)(3:3).eq.'E') then
       if(atom(i)(4:4).eq.'2') goto 20
       if(res(i).eq.'PHE') goto 20
       if(res(i).eq.'TYR') goto 20
       if(res(i).eq.'TRP') goto 20
       if(res(i).eq.'HIS') goto 20
        ichi3res(4,ires(i))=i
        ichi4res(3,ires(i))=i
      endif
      if(atom(i)(3:3).eq.'Z') then
        ichi4res(4,ires(i))=i
      endif
20    continue
      do 30 I=ires(1),ires(iatom)
      omega(i)=angle(iomegares(1,I),iomegares(2,I),
     1 iomegares(3,I),iomegares(4,I))
      phi(i)=angle(iphires(1,I),iphires(2,I),iphires(3,I),
     1 iphires(4,I))
      psi(i)=angle(ipsires(1,I),ipsires(2,I),ipsires(3,I),
     1 ipsires(4,I))
      chi(i)=angle(ichires(1,I),ichires(2,I),ichires(3,I),
     1 ichires(4,I))
      chi2(i)=angle(ichi2res(1,I),ichi2res(2,I),
     1 ichi2res(3,I),ichi2res(4,I))
      chi3(i)=angle(ichi3res(1,I),ichi3res(2,I),
     1 ichi3res(3,I),ichi3res(4,I))
      chi4(i)=angle(ichi4res(1,I),ichi4res(2,I),
     1 ichi4res(3,I),ichi4res(4,I))
30    continue
      do 40 I=ires(1),ires(iatom)
      write(2,996) I,seq(I),omega(I),phi(I),psi(I),chi(I),
     1 chi2(I),chi3(I),chi4(I)
996   format(I5,1X,A3,1X,7F8.2)
40    continue
      stop
      end
      FUNCTION angle(i1,i2,i3,i4)
C Gets line numbers i1 to i4, makes vectors i1-i2, i3-i4,
C calculates vector and scalar products to get cos(angle) and
C phi(angle), then angle
      DIMENSION x(8000),y(8000),z(8000)
      DIMENSION v21(3),v23(3),v34(3),v123(3),v234(3),v(3)
      COMMON x,y,z
      iresult=0
c     if(x(i1).eq.0.0.or.x(i2).eq.0.0.or.x(i3).eq.0.0.or.x(i4).
c    1 eq.0.0)iresult=1
      if(i1.eq.0.or.i2.eq.0.or.i3.eq.0.or.i4.eq.0)iresult=1
      v21(1)=x(i1)-x(i2)
      v21(2)=y(i1)-y(i2)
      v21(3)=z(i1)-z(i2)
      v23(1)=x(i3)-x(i2)
      v23(2)=y(i3)-y(i2)
      v23(3)=z(i3)-z(i2)
      v34(1)=x(i4)-x(i3)
      v34(2)=y(i4)-y(i3)
      v34(3)=z(i4)-z(i3)
      call vprod(v21,v23,v123,r1,st)
      call vprod(v23,v34,v234,r2,st)
      call vscal(v123,v234,scalp,cthet)
      call vprod(v123,v234,v,r3,sthet)
      call vscal(v,v23,scum,chet)
       if(chet.gt.0.0)chet=1.0
       if(chet.lt.0.0)chet=-1.0
       if(chet.eq.0.0) stop'CHET=0'
      angle=atan2((sthet*chet),cthet)*57.29578
      angle=angle-180.0
      if(angle.lt.-180.0)angle=angle+360.0
      if(angle.gt.180.0)angle=angle-360.0
c     if(iresult.eq.1)angle=-999.0
      if(iresult.eq.1)angle=0
      return
      end
      SUBROUTINE VPROD(a,b,p,r,sthet)
      DIMENSION a(3),b(3),p(3)
       P(1)=A(2)*B(3)-A(3)*B(2)
       P(2)=A(3)*B(1)-A(1)*B(3)
       P(3)=A(1)*B(2)-A(2)*B(1)
       R=SQRT(P(1)*P(1)+P(2)*P(2)+P(3)*P(3))
       RA=SQRT(A(1)*A(1)+A(2)*A(2)+A(3)*A(3))
       RB=SQRT(B(1)*B(1)+B(2)*B(2)+B(3)*B(3))
       STHET=R/(RA*RB)
       RETURN
       END
       SUBROUTINE VSCAL(A,B,SC,THET)
       DIMENSION A(3),B(3)
       SC=A(1)*B(1)+A(2)*B(2)+A(3)*B(3)
       RA=SQRT(A(1)*A(1)+A(2)*A(2)+A(3)*A(3))
       RB=SQRT(B(1)*B(1)+B(2)*B(2)+B(3)*B(3))
       THET=SC/(RA*RB)
       RETURN
       END

Dr David Wild, Department of Information Studies,
University of Sheffield, Sheffield S10 2TN, U.K.
Tel +44-(0)114 282 5093, Fax +44-(0)114 278 0300
Email [email-masked] 
http://www.shef.ac.uk/uni/academic/I-M/is/rstaff/
davewild.html 

----------------------------------------------end of summary

best regards - tecksin