1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
|
diff -arNu aria2.2/cns/src/cns.f aria2.2.new/cns/src/cns.f
--- aria2.2/cns/src/cns.f 2007-08-22 17:25:51.000000000 +0200
+++ aria2.2.new/cns/src/cns.f 2009-06-14 15:28:39.907685273 +0200
@@ -12,7 +12,7 @@
C + J.Kuszewski, M.Nilges, N.S.Pannu, R.J.Read, +
C + L.M.Rice, T.Simonson, G.L.Warren +
C +===============================================================+
-C + Copyright 1997-2007 Yale University +
+C + Copyright 1997-2008 Yale University +
C +===============================================================+
C +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
@@ -470,6 +470,7 @@
INTEGER HNLEN, TMP, PTRSZ, STLEN
CHARACTER*(1) CNSPTMP
CHARACTER*(4) ST
+!$ integer omp_get_max_threads
C
C write header
WRITE(6,'(10X,A)')
@@ -511,7 +512,7 @@
&' J.Kuszewski, M.Nilges, N.S.Pannu, R.J.Read,',
&' L.M.Rice, T.Simonson, G.L.Warren.'
WRITE(6,'(10X,A)')
- &' Copyright (c) 1997-2007 Yale University'
+ &' Copyright (c) 1997-2008 Yale University'
WRITE(6,'(10X,A)')
&'============================================================'
C
@@ -526,6 +527,9 @@
WRITE(6,'(10X,7A)')
& ' Running on machine: ',HOSTNM(1:HNLEN),
& ' (',SYSNM(1:TMP),',',ST(1:STLEN),'-bit)'
+!$ write(6,'(31x,a,i3,a)') 'with',omp_get_max_threads(),
+!$ & ' threads'
+!$C (to change use setenv OMP_NUM_THREADS x)
C
CALL GETNAM(USERNM,12,TMP)
WRITE(6,'(10X,2A)')
diff -arNu aria2.2/cns/src/energy.f aria2.2.new/cns/src/energy.f
--- aria2.2/cns/src/energy.f 2006-12-18 16:26:49.000000000 +0100
+++ aria2.2.new/cns/src/energy.f 2009-06-14 14:47:57.421262637 +0200
@@ -23,7 +23,8 @@
INTEGER I, NDIM, N
DOUBLE PRECISION TOTAL
DOUBLE COMPLEX DCVAL
- DOUBLE COMPLEX EDUMMY
+CCC modifcation ATB 4/27/08
+ DOUBLE PRECISION EDUMMY
C parameters
DOUBLE PRECISION ZERO, ONE
PARAMETER (ZERO=0.0D0, ONE=1.0D0)
diff -arNu aria2.2/cns/src/noe.f aria2.2.new/cns/src/noe.f
--- aria2.2/cns/src/noe.f 2007-08-22 17:25:51.000000000 +0200
+++ aria2.2.new/cns/src/noe.f 2009-06-14 15:03:30.001587922 +0200
@@ -36,8 +36,8 @@
INTEGER ISLCT(*), JSLCT(*)
C local
INTEGER I, II, NISLCT, NJSLCT, ICL1, ICL2, NN, ITEMP, IEMODE
- CHARACTER*4 CLASS, CLASS2, STEMP, SRESET
- DOUBLE PRECISION SCALE, RTEMP, NOEDST, THRESH
+ CHARACTER*4 CLASS, CLASS2, STEMP, SRESET, DENMODE
+ DOUBLE PRECISION SCALE, RTEMP, NOEDST, THRESH, GAMMA, KAPPA
LOGICAL MATCH
C parameter
DOUBLE PRECISION ZERO, ONE, SIX
@@ -140,7 +140,7 @@
& NPEAKI,HEAP(HPNPID),HEAP(HPNSPC),
& HEAP(HPNPP1),HEAP(HPNPP2),HEAP(HPNHP1),HEAP(HPNHP2),
& HEAP(HPNVOL),HEAP(HPCDIS),HEAP(HPCVOL),NATOM,ISLCT,NISLCT,
- & JSLCT,NJSLCT,X,Y,Z)
+ & JSLCT,NJSLCT,X,Y,Z,HEAP(HPDENINIT))
C===================================================================
ELSE IF (WD(1:4).EQ.'? ') THEN
WRITE(6,'(A,I6,A,I6,A,/,A,F8.3,A,I6)')
@@ -167,7 +167,8 @@
C
C get the class name:
CALL NEXTA4('class-name=',CLASS)
- CALL NEXTF('AVERaging=',RTEMP)
+CCC modification ATB 4/27/08
+ CALL NEXTF('AVEXponent=',RTEMP)
DO I=1,NOECCN
CALL EQSTWC(NOECNM(I),4,CLASS,4,1,1,MATCH)
IF (MATCH) THEN
@@ -179,7 +180,8 @@
C
C get the class name:
CALL NEXTA4('class-name=',CLASS)
- CALL NEXTF('AVERaging=',RTEMP)
+CCC modification ATB 4/27/08
+ CALL NEXTF('OREXponent=',RTEMP)
DO I=1,NOECCN
CALL EQSTWC(NOECNM(I),4,CLASS,4,1,1,MATCH)
IF (MATCH) THEN
@@ -585,6 +587,38 @@
IF (NOEICV.GT.0) CALL NOEPRI(THRESH,1)
END IF
C====================================================================
+CCC modification ATB 5/02/08
+ ELSE IF (WD(1:4).EQ.'OUTD') THEN
+ CALL NOEOUT(0)
+ IF (NOEICV.GT.0) CALL NOEOUT(1)
+C====================================================================
+CCC modification ATB 4/25/08
+ ELSE IF (WD(1:3).EQ.'DEN') THEN
+ CALL NEXTWD('DEN>')
+ IF (WD(1:4).NE.'INIT'.AND.WD(1:4).NE.'UPDA') THEN
+ WRITE(6,'(A)') ' %NOE-ERR: DEN expects INIT or UPDAte'
+ ELSE
+ DENMODE=WD(1:4)
+ GAMMA=0.0D0
+ KAPPA=0.0D0
+ IF (DENMODE.EQ.'UPDA') THEN
+ CALL NEXTWD('DEN>')
+ IF (WD(1:4).NE.'GAMM') THEN
+ WRITE(6,'(A)') ' %NOE-ERR: DEN UPDAte expects GAMMa parameter'
+ ELSE
+ CALL NEXTF('GAMMa=',GAMMA)
+ CALL NEXTWD('DEN>')
+ IF (WD(1:4).NE.'KAPP') THEN
+ WRITE(6,'(A)') ' %NOE-ERR: DEN UPDAte expects KAPPa parameter'
+ ELSE
+ CALL NEXTF('KAPPa=',KAPPA)
+ END IF
+ END IF
+ END IF
+ CALL NOEDEN(DENMODE,GAMMA,KAPPA,0)
+ IF (NOEICV.GT.0) CALL NOEDEN(DENMODE,GAMMA,KAPPA,1)
+ END IF
+C====================================================================
ELSE IF (WD(1:4).EQ.'ANAL') THEN
CALL NEXTA4('ANALyse=',RANA)
C====================================================================
@@ -683,7 +717,7 @@
& NOEXCL,NPEAKI,NOEPID,NOESPC,NOEPP1,NOEPP2,NOEHP1,
$ NOEHP2,NOEVOL,NOECDI,
& NOECVO,NATOM,ISLCT,NISLCT,
- & JSLCT,NJSLCT,X,Y,Z)
+ & JSLCT,NJSLCT,X,Y,Z,NOEDENINIT)
C
C Subroutine parses an NOE ASSIgn statement and
C puts the information into the NOE restraints list
@@ -706,7 +740,7 @@
DOUBLE PRECISION NOEPP1(*),NOEPP2(*),NOEHP1(*),NOEHP2(*)
DOUBLE PRECISION NOEVOL(*), NOECDI(*),NOECVO(*)
INTEGER NATOM, ISLCT(*), NISLCT, JSLCT(*), NJSLCT
- DOUBLE PRECISION X(*), Y(*), Z(*)
+ DOUBLE PRECISION X(*), Y(*), Z(*), NOEDENINIT(*)
C local
INTEGER I, II, JJ, J, TISLCT, TJSLCT, PEAKID
LOGICAL SUCCES,OK
@@ -737,6 +771,10 @@
CALL NEXTF('lower-average-distance=',NOELOW(NOENUM))
CALL NEXTF('higher-average-distance=',NOEHIG(NOENUM))
C
+C initialize initial DEN distance
+ NOEDENINIT(NOENUM)=ZERO
+
+C
C initialize time-average and running average stuff
C
C set the time-averaged distance and
@@ -1732,6 +1770,232 @@
RETURN
END
C====================================================================
+ SUBROUTINE NOEOUT(ITEST)
+C
+C print a list of current NOE restraints
+C as assign statements
+C Front-end for NOEPR3
+ IMPLICIT NONE
+C I/O
+ INCLUDE 'cns.inc'
+ INCLUDE 'heap.inc'
+ INCLUDE 'noe.inc'
+ INTEGER ITEST
+C begin
+ CALL NOEPR3(ITEST,
+ & HEAP(HPNORR),HEAP(HPNIPR),HEAP(HPNILS),HEAP(HPNJPR),
+ & HEAP(HPNJLS),HEAP(HPNCND),HEAP(HPNRAV),HEAP(HPNRRV),
+ & HEAP(HPNDIS),HEAP(HPNLOW),HEAP(HPNHIG),
+ & HEAP(HPNVIO),HEAP(HPNCV), HEAP(HPNPID))
+
+ RETURN
+ END
+C====================================================================
+ SUBROUTINE NOEPR3(ITEST,
+ & NOEORR,NOEIPR,NOEILS,NOEJPR,
+ & NOEJLS,NOECND,NOERAV,NOERRV,
+ & NOEDIS,NOELOW,NOEHIG,
+ & NOEVIO,NOECV,NOEPID)
+ IMPLICIT NONE
+C I/O
+ INCLUDE 'cns.inc'
+ INCLUDE 'noe.inc'
+ INCLUDE 'mtf.inc'
+ INCLUDE 'pick.inc'
+ INCLUDE 'comand.inc'
+ INCLUDE 'numbers.inc'
+ INTEGER ITEST
+C
+C global NOE arrays on HEAP
+C restraint and atom pointers
+ INTEGER NOEORR(*),NOEIPR(*),NOEILS(*),NOEJPR(*),NOEJLS(*)
+C classes
+ INTEGER NOECND(*)
+C averages
+ DOUBLE PRECISION NOERAV(*),NOERRV(*)
+C target distance and errors
+ DOUBLE PRECISION NOEDIS(*),NOELOW(*),NOEHIG(*)
+C number of violations
+ INTEGER NOEVIO(*)
+C time average pointer, test set, restraint number
+ INTEGER NOECV(*), NOEPID(*)
+C
+C local
+ INTEGER N, K, I, J, CLASS, NORR
+ INTEGER I1, I2
+C begin
+ IF (NOENUM.GT.0) THEN
+C
+C loop over all classes
+ DO CLASS=1,NOECCN
+ IF (NOEPOT(CLASS).EQ.NOESYM.OR.
+ & NOEPOT(CLASS).EQ.NOEHDI.OR.
+ & NOEPOT(CLASS).EQ.NOE3DP) THEN
+ CALL WRNDIE(-5,'NOEPRI',
+ & 'DENOut not possible with POTEntial set to SYMM, HIGH, or 3DPO')
+ ELSE
+C
+C loop over all NOE's belonging to this class
+ DO N=1,NOENUM
+ IF ((ITEST.EQ.0.AND.NOECV(N).NE.NOEICV).OR.
+ & (ITEST.EQ.1.AND.NOECV(N).EQ.NOEICV)) THEN
+ IF (NOECND(N).EQ.CLASS) THEN
+C
+C WE ONLY TAKE THE FIRST FROM EACH SET
+ NORR=NOEORR(N)+1
+C
+C DO I=NOEIPR(NORR)+1,NOEIPR(NORR+1)
+C
+C WE ONLY TAKE THE FIRST FROM EACH SET
+ I=NOEIPR(NORR)+1
+ K=NOEILS(I)
+ I1=K
+C
+C WE ONLY TAKE THE FIRST FROM EACH SET
+ J=NOEJPR(NORR)+1
+ K=NOEJLS(J)
+ I2=K
+C
+ WRITE(PUNIT,'(A,I6,A,I6,A,F6.3,A,F6.3,A,F6.3)')
+ & 'ASSIGn (id ',
+ & I1, ' ) (id ', I2, ' ) ', NOEDIS(N),
+ & ' ', NOELOW(N), ' ', NOEHIG(N)
+C
+ END IF
+ END IF
+ END DO
+ END IF
+ END DO
+ END IF
+ RETURN
+ END
+C====================================================================
+ SUBROUTINE NOEDEN(DENMODE,GAMMA,KAPPA,ITEST)
+C
+C print a list of current NOE restraints
+C Front-end for NOEPR2
+ IMPLICIT NONE
+C I/O
+ INCLUDE 'cns.inc'
+ INCLUDE 'heap.inc'
+ INCLUDE 'noe.inc'
+ CHARACTER*4 DENMODE
+ DOUBLE PRECISION GAMMA, KAPPA
+ INTEGER ITEST
+C begin
+ CALL NOEDEN2(DENMODE,GAMMA,KAPPA,ITEST,
+ & HEAP(HPNORR),HEAP(HPNIPR),HEAP(HPNILS),HEAP(HPNJPR),
+ & HEAP(HPNJLS),HEAP(HPNCND),HEAP(HPNRAV),HEAP(HPNRRV),
+ & HEAP(HPNDIS),HEAP(HPNLOW),HEAP(HPNHIG),
+ & HEAP(HPNVIO),HEAP(HPNCV), HEAP(HPNPID),
+ & HEAP(HPDENINIT))
+
+ RETURN
+ END
+C====================================================================
+ SUBROUTINE NOEDEN2(DENMODE,GAMMA,KAPPA,ITEST,
+ & NOEORR,NOEIPR,NOEILS,NOEJPR,
+ & NOEJLS,NOECND,NOERAV,NOERRV,
+ & NOEDIS,NOELOW,NOEHIG,
+ & NOEVIO,NOECV,NOEPID,NOEDENINIT)
+ IMPLICIT NONE
+C I/O
+ INCLUDE 'cns.inc'
+ INCLUDE 'noe.inc'
+ INCLUDE 'mtf.inc'
+ INCLUDE 'pick.inc'
+ INCLUDE 'comand.inc'
+ INCLUDE 'numbers.inc'
+ CHARACTER*4 DENMODE
+ DOUBLE PRECISION GAMMA,KAPPA
+ INTEGER ITEST
+C
+C global NOE arrays on HEAP
+C restraint and atom pointers
+ INTEGER NOEORR(*),NOEIPR(*),NOEILS(*),NOEJPR(*),NOEJLS(*)
+C classes
+ INTEGER NOECND(*)
+C averages
+ DOUBLE PRECISION NOERAV(*),NOERRV(*)
+C target distance and errors
+ DOUBLE PRECISION NOEDIS(*),NOELOW(*),NOEHIG(*)
+C number of violations
+ INTEGER NOEVIO(*)
+C time average pointer, test set, restraint number
+ INTEGER NOECV(*), NOEPID(*)
+C initial den distance
+ DOUBLE PRECISION NOEDENINIT(*)
+C
+C local
+ DOUBLE PRECISION EN, NOERMS, NOERM2(NOECMX), THRESH
+ DOUBLE COMPLEX DBCOMP
+ DOUBLE PRECISION DBPREC
+ INTEGER NOENU2(NOECMX)
+ INTEGER NOEVIT
+ INTEGER N, K, I, J, CLASS, NOENUML, NORR
+ CHARACTER*6 SSAVE
+ CHARACTER*11 SSPOT
+ LOGICAL QHEAD
+C begin
+ THRESH=-0.1
+ NOERMS=ZERO
+ NOEVIT=0
+ NOENUML=0
+ IF (NOENUM.GT.0) THEN
+C
+C
+C loop over all classes
+ DO CLASS=1,NOECCN
+ NOENU2(CLASS)=0
+ NOERM2(CLASS)=ZERO
+ NOEVIO(CLASS)=0
+ IF (NOEPOT(CLASS).EQ.NOESYM.OR.
+ & NOEPOT(CLASS).EQ.NOEHDI.OR.
+ & NOEPOT(CLASS).EQ.NOE3DP) THEN
+ CALL WRNDIE(-5,'NOEPRI',
+ & 'DEN not possible with POTEntial set to SYMM, HIGH, or 3DPO')
+ ELSE
+C
+C loop over all NOE's belonging to this class
+ QHEAD=.TRUE.
+ DO N=1,NOENUM
+ IF ((ITEST.EQ.0.AND.NOECV(N).NE.NOEICV).OR.
+ & (ITEST.EQ.1.AND.NOECV(N).EQ.NOEICV)) THEN
+ IF (NOECND(N).EQ.CLASS) THEN
+ NOENUML=NOENUML+1
+C
+C get NOE energy, current distance (in PCDATA(PCGEOM), and other results
+ CALL ENOE(EN,'ANAL',N)
+ NOERMS=NOERMS+PCDATA(PCDEVI)**2
+ NOERM2(CLASS)=NOERM2(CLASS)+PCDATA(PCDEVI)**2
+ NOENU2(CLASS)=NOENU2(CLASS)+1
+ IF (ABS(PCDATA(PCDEVI)).GT.THRESH) THEN
+ NOEVIO(CLASS)=NOEVIO(CLASS)+1
+ NOEVIT=NOEVIT+1
+ END IF
+C
+ IF (DENMODE.EQ.'INIT') THEN
+C
+C initialization
+ NOEDENINIT(N)=PCDATA(PCGEOM)
+CCCCxxx NOEDIS(N)=PCDATA(PCGEOM)
+ ELSE
+C
+C update step
+ NOEDIS(N)=NOEDIS(N)+KAPPA*(GAMMA*(PCDATA(PCGEOM)-NOEDIS(N))+
+ & (ONE-GAMMA)*(NOEDENINIT(N)-NOEDIS(N)) )
+ END IF
+C
+ END IF
+ END IF
+ END DO
+ END IF
+ END DO
+C
+ END IF
+ RETURN
+ END
+C====================================================================
SUBROUTINE ENOE(EN,ANALYS,NA)
C
C Routine computes force field for NOE restraints
@@ -3357,6 +3621,7 @@
HPNRRV=0
HPNNSP=0
HPNDIS=0
+ HPDENINIT=0
HPNLOW=0
HPNHIG=0
HPNWGH=0
@@ -3373,7 +3638,6 @@
HPNVOL=0
HPCVOL=0
HPCDIS=0
- HPNPRD=0
C
C
C reset other variables
@@ -3463,6 +3727,7 @@
IF (HPNRRV.NE.0) CALL FREHP(HPNRRV,IREAL8(NOEMAX))
IF (HPNNSP.NE.0) CALL FREHP(HPNNSP,INTEG4(NOEMAX))
IF (HPNDIS.NE.0) CALL FREHP(HPNDIS,IREAL8(NOEMAX))
+ IF (HPDENINIT.NE.0) CALL FREHP(HPDENINIT,IREAL8(NOEMAX))
IF (HPNLOW.NE.0) CALL FREHP(HPNLOW,IREAL8(NOEMAX))
IF (HPNHIG.NE.0) CALL FREHP(HPNHIG,IREAL8(NOEMAX))
IF (HPNWGH.NE.0) CALL FREHP(HPNWGH,IREAL8(NOEMAX))
@@ -3495,6 +3760,7 @@
HPNRRV=0
HPNNSP=0
HPNDIS=0
+ HPDENINIT=0
HPNLOW=0
HPNHIG=0
HPNWGH=0
@@ -3511,7 +3777,6 @@
HPNVOL=0
HPCVOL=0
HPCDIS=0
- HPNPRD=0
C
C now allocate new space
IF (NOENEW.GT.0) THEN
@@ -3536,6 +3801,7 @@
HPNRRV=ALLHP(IREAL8(NOENEW))
HPNNSP=ALLHP(INTEG4(NOENEW))
HPNDIS=ALLHP(IREAL8(NOENEW))
+ HPDENINIT=ALLHP(IREAL8(NOENEW))
HPNCND=ALLHP(INTEG4(NOENEW))
HPNJLS=ALLHP(INTEG4(NOENEW))
HPNJPR=ALLHP(INTEG4(NOENEW))
diff -arNu aria2.2/cns/src/noe.inc aria2.2.new/cns/src/noe.inc
--- aria2.2/cns/src/noe.inc 2007-08-22 17:25:51.000000000 +0200
+++ aria2.2.new/cns/src/noe.inc 2009-06-14 15:24:50.995208687 +0200
@@ -29,6 +29,9 @@
C list for distances and +/- error estimates (heap pointers)
INTEGER HPNDIS, HPNLOW, HPNHIG
C
+C list for initial DEN distances
+ INTEGER HPDENINIT
+C
C individual weights on restraints
INTEGER HPNWGH
C
@@ -119,7 +122,7 @@
INTEGER HPNVIO, HPNEXC, HPNNUM
C peak identifier
- INTEGER NPEAKI, HPNPID, HPNPRD
+ INTEGER NPEAKI, HPNPID
C
C
C
@@ -142,7 +145,7 @@
& NMONO, RAVEXP, NOECOR, NOEICV,
& HPNVIO, HPNEXC, HPNNUM,
& NPEAKI, HPNPID, IDIMER, HPNPP1, HPNPP2,
- & HPNHP1, HPNHP2, HPNVOL, HPCVOL, HPCDIS, HPNPRD
+ & HPNHP1, HPNHP2, HPNVOL, HPCVOL, HPCDIS, HPDENINIT
C
C character string block
C
|