Skip to content

Commit 79a26df

Browse files
committed
changed search_range for search_limit, and added the corresponding options
1 parent ad1d7f7 commit 79a26df

File tree

4 files changed

+33
-19
lines changed

4 files changed

+33
-19
lines changed

input/inputfile.inp

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ end experiment DSS
9797

9898
# Optional parameters
9999

100-
search_range 1.5 # Search for topological distances of up to search_range*dmaxlink
100+
search_limit relative 1.5 # Search for topological distances of up to search_range*dmaxlink
101101

102102
printallfound no # Prints, or not, the structure of the links that were found but violate the distances
103103

src/inputoptions.f90

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ module inputoptions
1818
double precision :: pgood
1919
double precision :: pbad
2020
double precision :: scorecut
21-
double precision :: search_range
21+
double precision :: search_limit
22+
integer :: search_limit_type
2223

2324
character(len=max_string_length) :: pdbfile
2425
character(len=max_string_length) :: readlog

src/printdata.f90

+7-12
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,14 @@ subroutine printdata(print,link)
7575
ib = 9 - len(trim(adjustl(chardist)))
7676
chardist(ib:ib) = " "
7777

78-
! Otherwise, report that it is greater than dsearch, or than the
79-
! the euclidean distance, if this one is greater still
80-
8178
else
82-
if ( link%status == 3 ) then
83-
write(chardist,"( f9.3 )") link%euclidean
84-
ib = 9 - len(trim(adjustl(chardist)))
85-
chardist(ib:ib) = ">"
86-
else
87-
write(chardist,"( f9.3 )") link%dsearch
88-
ib = 9 - len(trim(adjustl(chardist)))
89-
chardist(ib:ib) = ">"
90-
end if
79+
80+
! Otherwise, report that it is greater than dsearch, or than
81+
! the euclidean distance, the one which is greater
82+
83+
write(chardist,"( f9.3 )") max(link%dsearch,link%euclidean)
84+
ib = 9 - len(trim(adjustl(chardist)))
85+
chardist(ib:ib) = ">"
9186
end if
9287

9388
ra1 = "Y" ; if ( .not. link%atom1%residue%accessible ) ra1 = "N"

src/topolink.f90

+23-5
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ program topolink
8686
printaccessible = .false.
8787
warning = .false.
8888
interchain = .false.
89-
search_range = 1.5
89+
search_limit = 1.5
90+
search_limit_type = 1
9091

9192
! Format of output
9293
floatout="(tr1,a,f12.7)"
@@ -201,9 +202,20 @@ program topolink
201202
if ( keyvalue(record,1) == 'observed' ) compute = 1
202203
if ( keyvalue(record,1) == 'reactive' ) compute = 2
203204
if ( keyvalue(record,1) == 'all' ) compute = 3
204-
case ("search_range")
205-
record = keyvalue(record,1)
206-
read(record,*) search_range
205+
case ("search_limit")
206+
if ( keyvalue(record,1) == 'relative' ) then
207+
search_limit_type = 1
208+
else if ( keyvalue(record,1) == 'sum' ) then
209+
search_limit_type = 2
210+
else if ( keyvalue(record,1) == 'fixed' ) then
211+
search_limit_type = 3
212+
else
213+
write(*,*) ' ERROR: search_limit must be relative, sum, or fixed. '
214+
write(*,*) ' Default: search_limit relative 1.5 '
215+
stop
216+
end if
217+
record = keyvalue(record,2)
218+
read(record,*) search_limit
207219
case ("pgood")
208220
record = keyvalue(record,1)
209221
read(record,*) pgood
@@ -1092,7 +1104,13 @@ program topolink
10921104
if ( link(i)%exp(iexp)%obs_reactive ) link(i)%obs_reactive = .true.
10931105
if ( link(i)%exp(iexp)%type_reactive ) link(i)%type_reactive = .true.
10941106
end do
1095-
link(i)%dsearch = search_range*link(i)%dmaxlink
1107+
if ( search_limit_type == 1 ) then
1108+
link(i)%dsearch = search_limit*link(i)%dmaxlink
1109+
else if ( search_limit_type == 2 ) then
1110+
link(i)%dsearch = search_limit + link(i)%dmaxlink
1111+
else if ( search_limit_type == 3 ) then
1112+
link(i)%dsearch = search_limit
1113+
end if
10961114
link(i)%nbeads = int(link(i)%dsearch/dbond)+1
10971115
link(i)%topodist = -1.d0
10981116
nmax = max(nmax,link(i)%nbeads)

0 commit comments

Comments
 (0)