Skip to content

Commit e32779e

Browse files
committed
added proper error message for improper experiment definition
1 parent fe20ba3 commit e32779e

File tree

3 files changed

+108
-2
lines changed

3 files changed

+108
-2
lines changed

input/inputfile.inp

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ endread ENDMDL # Use this to stop reading atoms if this keyword is found (comme
1212
readatoms heavy # Which atoms to consider (all/heavy(no-H)/backbone/backplusCB)
1313

1414
# Output directory for links (comment if you do not want the PDB files, that may be a lot)
15-
printlinks yes
15+
printlinks no
1616
linkdir ./links
1717

1818
# What cross-links to compute (all/reactive/observed)

input/teste.inp

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
#
2+
# TOPOLINK input file example
3+
#
4+
# L. Martinez - Institute of Chemistry, University of Campinas
5+
# http://leandro.iqm.unicamp.br
6+
#
7+
8+
# PDB file (can be provided in the command line, overwriting this definition)
9+
pdbfile ./protein.pdb
10+
11+
endread ENDMDL # Use this to stop reading atoms if this keyword is found (comment otherwise)
12+
readatoms heavy # Which atoms to consider (all/heavy(no-H)/backbone/backplusCB)
13+
14+
# Output directory for links (comment if you do not want the PDB files, that may be a lot)
15+
printlinks no
16+
linkdir ./links
17+
18+
# What cross-links to compute (all/reactive/observed)
19+
20+
compute observed
21+
#compute reactive
22+
#compute all
23+
24+
# If only inter-domain (inter-chain) links are of interested, uncomment the following line
25+
#interchain
26+
27+
# Only consider observed links with score greater than scorecut
28+
29+
scorecut 0.d0
30+
31+
# Cross-links observed:
32+
33+
experiment 1,6-diaminohexane
34+
35+
# Possible types of cross-links and maximum distances
36+
# ResType Chain ResNum AtomType ResType Chain ResNum AtomType MaxDist
37+
linktype GLU all all CB GLU all all CB 15.1
38+
linktype GLU all all CB ASP all all CB 14.3
39+
linktype ASP all all CB ASP all all CB 13.5
40+
41+
observed GLU A 37 GLU A 53
42+
observed ASP A 22 GLU A 4
43+
observed ASP A 75 GLU A 86
44+
observed GLU A 32 GLU A 53
45+
observed GLU A 62 GLU A 86
46+
observed ASP A 22 GLU A 13
47+
observed ASP A 38 GLU A 53
48+
observed ASP A 38 GLU A 46
49+
observed GLU A 20 GLU A 13
50+
51+
52+
53+
experiment Zero-length
54+
55+
# Possible types of cross-links and maximum distances
56+
# ResType Chain ResNum AtomType ResType Chain ResNum AtomType MaxDist
57+
linktype ASP all all CB LYS all all CB 9.7
58+
linktype GLU all all CB LYS all all CB 10.5
59+
linktype GLU all all CB SER all all CB 7.7
60+
linktype ASP all all CB SER all all CB 7.0
61+
62+
observed SER A 71 GLU A 86
63+
observed SER A 116 GLU A 111
64+
observed GLU A 86 LYS A 99
65+
observed SER A 71 ASP A 75
66+
observed SER A 57 ASP A 75
67+
68+
end experiment zerolength
69+
70+
71+
# Optional parameters
72+
73+
search_range 1.5 # Search for topological distances of up to search_range*dmaxlink
74+
75+
printallfound no # Prints, or not, the structure of the links that were found but violate the distances
76+
77+
pgood 0.70 # Probability of observing a link which is within link reach
78+
pbad 0.01 # Probability of observing a link which is NOT within linker reach
79+
80+
vdwrad 3. # Radius to be used for excluded atom volume computation
81+
print 0 # Extensive or concise printing
82+
printnotfound yes # Print data for pairs for which links were not found
83+
quitgood no # Quit whenever a valid link is found (stop searching for shortest one)
84+
dbond 1.5 # Bond distance of link "atoms"
85+
kbond 10. # Energy constant for link bonds
86+
kpath 10. # Energy constant for the complete path distension, used for computing probability
87+
kvdw 2. # Force constant of overlap function
88+
89+
# Technical parameters for the optimization method
90+
91+
ntrial 200 # Maximum number of trials for best link search
92+
nbest 5 # Number of times the same best link is found until satisfied
93+
maxfunc 50 # Maximum number of function evaluations of CG-Newton
94+
maxcg 20 # Maximum number of CG iterations
95+
seed random # Seed for random number generator (random or integer number)
96+
97+
exit # You can add anything after this
98+

src/topolink.f90

+9-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ program topolink
3636
character(len=max_string_length), allocatable :: logline(:)
3737
character(len=20) :: floatout, intout, intout2
3838
character(len=13) :: statuschar
39-
logical :: error, r1, r2, inexp, warning, interchain
39+
logical :: error, r1, r2, inexp, warning, interchain, expstart
4040

4141
external :: computef, computeg
4242

@@ -132,6 +132,7 @@ program topolink
132132

133133
nexp = 0
134134
error = .false.
135+
expstart = .false.
135136
input : do
136137
read(10,string_read,iostat=ioerr) record
137138
if ( ioerr /= 0 ) exit
@@ -163,8 +164,15 @@ program topolink
163164
case ("linktype")
164165
cycle
165166
case ("experiment")
167+
if ( expstart ) then
168+
write(*,*) ' ERROR: New experiment defined without ending previous one. '
169+
write(*,*) ' At line: ', trim(adjustl(record))
170+
stop
171+
end if
172+
expstart = .true.
166173
nexp = nexp + 1
167174
case ("end")
175+
expstart = .false.
168176
cycle
169177
case ("print")
170178
record = keyvalue(record,1)

0 commit comments

Comments
 (0)