Skip to content

Commit 58bd672

Browse files
committed
implemented printPDBnotfound option
1 parent 6840b6b commit 58bd672

File tree

5 files changed

+71
-25
lines changed

5 files changed

+71
-25
lines changed

input/inputfile.inp

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ printlinks no
1616
linkdir ./links
1717

1818
# What cross-links to compute (all/reactive/observed)
19-
2019
compute observed
2120
#compute reactive
2221
#compute all
@@ -99,14 +98,15 @@ end experiment DSS
9998

10099
search_limit relative 1.5 # Search for topological distances of up to search_range*dmaxlink
101100

102-
printallfound no # Prints, or not, the structure of the links that were found but violate the distances
101+
printallfound no # Prints, or not, the structure of the links that were found but violate the distances
102+
printPDBnotfound no # Prints, or not, PDB files for the links which were not found at all (prints a straight line)
103103

104104
pgood 0.70 # Probability of observing a link which is within link reach
105105
pbad 0.01 # Probability of observing a link which is NOT within linker reach
106106

107107
vdwrad 3. # Radius to be used for excluded atom volume computation
108108
print 0 # Extensive or concise printing
109-
printnotfound yes # Print data for pairs for which links were not found
109+
printnotfound yes # Print data for pairs for links which were not found
110110
quitgood no # Quit whenever a valid link is found (stop searching for shortest one)
111111
dbond 1.5 # Bond distance of link "atoms"
112112
kbond 10. # Energy constant for link bonds

src/inputoptions.f90

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ module inputoptions
2929
logical :: printlinks
3030
logical :: printallfound
3131
logical :: printnotfound
32+
logical :: printPDBnotfound
3233
logical :: observedscores
3334
logical :: mimicchain
3435
logical :: printaccessible

src/link_to_pdb.f90

+45-21
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ subroutine link_to_pdb(link,nlinkatoms,linkdir,pdbfile,natoms,atom,n,x)
1010
implicit none
1111

1212
integer :: ioerr
13-
integer :: j, ix, iy, iz
14-
integer :: natoms, nlinkatoms
13+
integer :: j, ix, iy, iz, index
14+
integer :: natoms, nlinkatoms, nsteps
1515

1616
type(specific_link) :: link
1717
type(pdbatom) :: writeatom, atom(natoms)
@@ -20,7 +20,7 @@ subroutine link_to_pdb(link,nlinkatoms,linkdir,pdbfile,natoms,atom,n,x)
2020
character(len=4) :: char1, char2
2121

2222
integer :: n
23-
double precision :: x(n)
23+
double precision :: x(n), stepx, stepy, stepz
2424
double precision :: overlap, stretch
2525
character(len=13) :: statuschar
2626

@@ -41,33 +41,57 @@ subroutine link_to_pdb(link,nlinkatoms,linkdir,pdbfile,natoms,atom,n,x)
4141
stop
4242
end if
4343
write(11,"( 'REMARK EUCLIDEAN DISTANCE: ', (tr2,f12.5) )") link%euclidean
44-
write(11,"( 'REMARK TOPOLOGICAL DISTANCE: ', (tr2,f12.5) )") link%topodist
45-
write(11,"( 'REMARK OVERLAP and STRETCH: ', 2(tr2,f12.5) )") overlap(n,x), stretch(n,x)
4644
write(11,"( 'REMARK LINK STATUS: ', a13 )") statuschar(link%status)
45+
if ( link%found ) then
46+
write(11,"( 'REMARK TOPOLOGICAL DISTANCE: ', (tr2,f12.5) )") link%topodist
47+
write(11,"( 'REMARK OVERLAP and STRETCH: ', 2(tr2,f12.5) )") overlap(n,x), stretch(n,x)
48+
end if
49+
index = 1
4750
writeatom = atom(link%atom1%index)
4851
writeatom%residue%name = "LINK"
4952
writeatom%residue%chain = "A"
5053
writeatom%residue%index = 1
51-
writeatom%index = 1
54+
writeatom%index = index
5255
write(11,"(a)") trim(print_pdbhetatm(writeatom))
53-
do j = 1, nlinkatoms
54-
ix = (j-1)*3 + 1
55-
iy = ix + 1
56-
iz = ix + 2
57-
writeatom%index = j + 1
58-
writeatom%name = "O"
59-
writeatom%residue%name = "LINK"
60-
writeatom%residue%chain = "A"
61-
writeatom%residue%index = 1
62-
writeatom%x = x(ix)
63-
writeatom%y = x(iy)
64-
writeatom%z = x(iz)
65-
write(11,"(a)") trim(print_pdbhetatm(writeatom))
66-
end do
56+
if ( link%found ) then
57+
do j = 1, nlinkatoms
58+
index = index + 1
59+
ix = (j-1)*3 + 1
60+
iy = ix + 1
61+
iz = ix + 2
62+
writeatom%index = index
63+
writeatom%name = "N"
64+
writeatom%residue%name = "LINK"
65+
writeatom%residue%chain = "A"
66+
writeatom%residue%index = 1
67+
writeatom%x = x(ix)
68+
writeatom%y = x(iy)
69+
writeatom%z = x(iz)
70+
write(11,"(a)") trim(print_pdbhetatm(writeatom))
71+
end do
72+
else
73+
nsteps = int(link%euclidean)-2
74+
stepx = (link%atom2%x - link%atom1%x)/nsteps
75+
stepy = (link%atom2%y - link%atom1%y)/nsteps
76+
stepz = (link%atom2%z - link%atom1%z)/nsteps
77+
do j = 1, nsteps
78+
index = index + 1
79+
writeatom%index = index
80+
writeatom%name = "O"
81+
writeatom%residue%name = "LINK"
82+
writeatom%residue%chain = "A"
83+
writeatom%residue%index = 1
84+
writeatom%x = link%atom1%x + j*stepx
85+
writeatom%y = link%atom1%y + j*stepy
86+
writeatom%z = link%atom1%z + j*stepz
87+
write(11,"(a)") trim(print_pdbhetatm(writeatom))
88+
end do
89+
end if
90+
index = index + 1
6791
writeatom = atom(link%atom2%index)
6892
writeatom%residue%name = "LINK"
6993
writeatom%residue%chain = "A"
70-
writeatom%residue%index = 1
94+
writeatom%residue%index = index
7195
writeatom%index = nlinkatoms + 2
7296
write(11,"(a)") trim(print_pdbhetatm(writeatom))
7397
close(11)

src/printdata.f90

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ subroutine printdata(print,link)
1919

2020
if ( print == -1 ) then
2121
write(str,dashes) ; call writelog(str)
22-
write(str,"( ' RESIDUE1 ATOM1 RESIDUE2 ATOM2 EUCLDIST TOPODIST OBSERVED&
22+
write(str,"( '> RESIDUE1 ATOM1 RESIDUE2 ATOM2 EUCLDIST TOPODIST OBSERVED&
2323
& DMIN DMAX RESULT OBSRES REACRES RA AA')") ; call writelog(str)
2424
write(str,dashes) ; call writelog(str)
2525
return

src/topolink.f90

+21
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ program topolink
8080
printlinks = .false.
8181
printnotfound = .false.
8282
printallfound = .false.
83+
printPDBnotfound = .false.
8384
compute = 2
8485
pgood = -1.d0
8586
pbad = -1.d0
@@ -227,6 +228,9 @@ program topolink
227228
case ("printnotfound")
228229
if ( keyvalue(record,1) == 'yes' ) printnotfound = .true.
229230
if ( keyvalue(record,1) == 'no' ) printnotfound = .false.
231+
case ("printPDBnotfound")
232+
if ( keyvalue(record,1) == 'yes' ) printPDBnotfound = .true.
233+
if ( keyvalue(record,1) == 'no' ) printPDBnotfound = .false.
230234
case ("printaccessible")
231235
if ( keyvalue(record,1) == 'yes' ) printaccessible = .true.
232236
if ( keyvalue(record,1) == 'no' ) printaccessible = .false.
@@ -1307,6 +1311,11 @@ program topolink
13071311
call linkconsistency(link(i),nexp,experiment)
13081312
call printdata(print,link(i))
13091313
end if
1314+
if ( printlinks ) then
1315+
if ( printPDBnotfound ) then
1316+
call link_to_pdb(link(i),nlinkatoms,linkdir,pdbfile,natoms,atom,n,xbest)
1317+
end if
1318+
end if
13101319
cycle allpairs
13111320
end if
13121321

@@ -1319,6 +1328,11 @@ program topolink
13191328
call linkconsistency(link(i),nexp,experiment)
13201329
call printdata(print,link(i))
13211330
end if
1331+
if ( printlinks ) then
1332+
if ( printPDBnotfound ) then
1333+
call link_to_pdb(link(i),nlinkatoms,linkdir,pdbfile,natoms,atom,n,xbest)
1334+
end if
1335+
end if
13221336
cycle allpairs
13231337
end if
13241338

@@ -1456,13 +1470,20 @@ program topolink
14561470
if ( printallfound .or. &
14571471
( link(i)%status == 0 .or. link(i)%status == 5 ) ) then
14581472
call link_to_pdb(link(i),nlinkatoms,linkdir,pdbfile,natoms,atom,n,xbest)
1473+
else if( printPDBnotfound ) then
1474+
call link_to_pdb(link(i),nlinkatoms,linkdir,pdbfile,natoms,atom,n,xbest)
14591475
end if
14601476
end if
14611477

14621478
else
14631479

14641480
! If a topological distance was not found for this pair
14651481
if ( printnotfound ) call printdata(print,link(i))
1482+
if ( printlinks ) then
1483+
if ( printPDBnotfound ) then
1484+
call link_to_pdb(link(i),nlinkatoms,linkdir,pdbfile,natoms,atom,n,xbest)
1485+
end if
1486+
end if
14661487

14671488
end if
14681489

0 commit comments

Comments
 (0)