[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ccp4bb]: list of residues buried in an interface
*** For details on how to be removed from this list visit the ***
*** CCP4 home page http://www.ccp4.ac.uk ***
"Fred. Vellieux" wrote:
>
> Is there some program around that takes a number of coordinate files
> (understand: PDB files) corresponding to an "aggregate" (e.g. a dimer)
> and to the separate subunits, and provides a table of the residues
> buried in the subunit-subunit interface(s)?
>
A related question, which may be equivalent depending on what you want
to use the list for, is "Which atoms in molecule A are within a threshold
distance of an atom in mol B?" This list can be printed by the appended
FORTRAN code PDBDIST3. Using the script pdbd3 lets you put all the parameters
on a single line so in tcsh you can hit <up arrow> and edit the line to run
it again with different threshold distance or pdb file:
sb20 19% pdbd3 b.pdb a.pdb 3.5
Listing intermolecular contacts closer than 3.500000
between b.pdb and a.pdb
CB ARG B 113 CB TYR A 4 3.3
O PRO B 43 CD1 TYR A 4 3.1
O PRO B 43 CE1 TYR A 4 3.3
CB PRO B 43 CD2 LEU A 8 3.5
OE1 GLU B 373 CB THR A 34 3.3
OE1 GLU B 373 OG1 THR A 34 3.4
CZ ARG B 287 OE1 GLU A 60 3.5
NH1 ARG B 287 OE1 GLU A 60 3.1
NH2 ARG B 287 OE1 GLU A 60 3.1
CD ARG B 287 ND1 HIS A 61 3.4
NE ARG B 287 ND1 HIS A 61 3.5
CD ARG B 287 CE1 HIS A 61 3.3
It's a trivial program compared to rolling sphere algorithms (or anything else
except "hello world"), but if what you want is a list of atoms (residues)
involved in a contact, I think this is the most direct answer. I presume the
same function is available in some of the standard software packages.
===========================================================================
The script pdbd3:
#!/bin/csh -f
/path/pdbdist3 <<eof
$1
$2
$3 3.5 #fortran will get first number on line, 3.5 if nothing entered for $3
eof
========================================================
The fortran pdbdist3:
(Note the first PDB file's coordinates are stored in aray M1 which is here
dimensioned for 7000 atoms. If that value is exceeded the program prints
out a warning then goes on working with only the first 7000 atoms. )
CHARACTER*40 INFILE1,INFILE2,FILENAME
CHARACTER*70 ASTRING
LOGICAL EFLG
real*8 M1(3,7000),M2(3),d
INTEGER*4 I,J,k
character*14 nres(7000),nres2
1200 FORMAT(A)
write(6,*)'Read 2 .PDB files and list all pairs of atoms '
write(6,*) 'in one file within threshold distance'
write(6,*) 'of atom in other file'
c read first file into m1
6 WRITE(6,*) 'ENTER NAME OF 1st pdb file:'
READ(5,1200) INFILE1
IF (INFILE1(:5).EQ.' ') STOP
INQUIRE(FILE=INFILE1, NAME=FILENAME,EXIST=EFLG)
IF (.NOT.EFLG) GOTO 6
OPEN (UNIT=2,FILE=INFILE1,STATUS='OLD',READONLY)
8 WRITE(6,*) 'ENTER NAME OF 2nd pdb file:'
READ(5,1200) INFILE2
IF (INFILE2(:5).EQ.' ') STOP
INQUIRE(FILE=INFILE2, NAME=FILENAME,EXIST=EFLG)
IF (.NOT.EFLG) GOTO 8
OPEN (UNIT=3,FILE=INFILE2,STATUS='OLD',READONLY)
write(6,*)'List atoms closer than R. R=?'
read (5,*) thresh
write(6,*)'Listing intermolecular contacts closer than ',thresh
write(6,*) ' between ',INFILE1(:15),' and ',INFILE2(:15)
k=1
c read coord
c50 read(2,51,end=85) nres(k),(m1(i,k),I=1,3)
50 read(2,1200,end=85) ASTRING
if ((ASTRING(1:6).eq.'ATOM ').or.(ASTRING(1:6).eq.'HETATM')) then
c write(6,*) ASTRING
DECODE(70,51,ASTRING) nres(k),(m1(i,k),I=1,3)
c51 format (30x,3d8.3,2f6.2)
51 format (12x,A14,4x,3d8.3,2f6.2)
c write(6,*) k,nres(k),(m1(i,k),I=1,3)
k=k+1
if (k.gt.7000) write(6,*) 'dimensioned for <7000 atoms in first file!'
if (k.gt.7000) goto 85
endif
80 goto 50
85 read(3,1200,end=1160) ASTRING
if ((ASTRING(1:6).eq.'ATOM ').or.(ASTRING(1:6).eq.'HETATM')) then
DECODE(70,51,ASTRING) nres2,(m2(i),I=1,3)
c write(6,*) nres2,(m2(i),I=1,3)
do 110 j=1,k-1
88 x=0.
do 90 i=1,3
90 x=x+(m1(i,j)-m2(i))**2
d=sqrt(x)
c write(6,*) j,nres(j),(m1(i,j),I=1,3), nres2,(m2(i),I=1,3),d
110 if (d.le.thresh) write (6,111) nres(j),nres2,d
111 format (' ',2A20,16f6.1)
endif
goto 85
1160 CLOSE(UNIT=2)
if (k.gt.7000) write(6,*)'***First file truncated after',k-1,' Atoms!***'
END