1 C Chemical shift calculation, to read in multiple NMR structures
2 C (with protons) and calculate sd for each
3 C Will also read Xray structures and add protons
4 C Current limit is 5000 heavy atoms 3000 protons and 50 rings
5 C Author - Mike Williamson Jan 94
6 C see M P Williamson and T Asakura, J Magn Reson Ser B 101 63-71 1993
7 DIMENSION SHIFT
(3000) !Shift values
for each proton
8 DIMENSION ANISCO
(3000),ANISCN
(3000),SHIFTE
(3000)
9 DIMENSION sum
(3000),exptln
(3000)
10 DIMENSION EXPTL
(3000) !Exptl shifts
(external file
)
11 DIMENSION IRES
(5000),RES
(5000),ANAME
(5000),FINAL
(3000)
12 DIMENSION X
(5000), Y
(5000), Z
(5000) !Heavy atom input
13 DIMENSION IRESH
(3000),RESH
(3000),ANAMEH
(3000)
14 DIMENSION XH
(3000), YH
(3000), ZH
(3000) !H atom input
15 DIMENSION vx
(3),vy
(3),vz
(3),CEN
(3),rh
(3),pregam
(3),yy
(3)
16 C (Anisotropy tensor plus anisotropy centre)
17 DIMENSION vca
(3),vc
(3),vo
(3),vn
(3),calctemp
(3000)
18 DIMENSION datres
(179),datnam
(179),datshift
(179)
20 DIMENSION IACODE
(50),IRATPT
(9,50),IRATS
(50)
21 DIMENSION shiftt
(3000),exptlt
(3000),VCHN
(3)
22 dimension rn
(3,50),cent
(3,50),signr
(50)
23 dimension iexp
(2000),atexp
(2000),pexp
(2000),eexp
(2000)
24 CHARACTER ANAME*4
,RES*3
,FN1*60
,FN3*40
,junk*80
25 CHARACTER ans*1
,FN4*40
,pexp*3
,resh*3
,anameh*4
,prott*3
26 CHARACTER datres*3
,datnam*4
,YN*1
,atexp*4
,FN9*60
,RFILE*60
27 integer AT1
,AT2
,AT3
,INDX
(3000)
29 C Set values for anisotropies, atomic charges and multiplication
30 C factor for electric field: shift=-Ez*sigmaE
31 DATA XCO1
/-13.0/,XCO2
/-4.0/,XCN1
/-11.0/,XCN2
/1.40/
32 DATA sigmaE
/0.60/,Qc
/1.60/,Qn
/-1.70/,Qo
/-2.30/
34 C NB The atomic charges are in esu
36 C******************FILE INPUT************************************
45 type
*,'Calculate for HA[1], HN[2] or all protons[3]?'
47 print
*,'icalculate=',icalculate
48 C NB Actually calculates all protons, just prints differently
50 type
*,' Are you comparing calc. to experimental shifts? [N]'
53 OPEN
(1,file
=FN1
,STATUS
='OLD',readonly
)
55 type
*,' Random file ?'
57 open
(4,file
=RFILE
,status
='old',readonly
)
58 do 25 I
=1,179 !Random coil shifts
59 read(4,998) datres
(I
),datnam
(I
),datshift
(I
)
60 998 format(A3
,1X
,A4
,F5
.2
)
62 if(yn
.eq
.'Y'.or
.yn
.eq
.'y') then
63 type
*,' File containing experimental shifts?'
65 OPEN
(UNIT
=8,FILE
=FN4
,STATUS
='OLD')
66 C This file should contain 2-line header, no. of protons (I5) plus list
67 type
*,'Name of protein in this file?'
74 read (8,996) iexp
(ii
),atexp
(ii
),pexp
(ii
),eexp
(ii
)
75 996 format(I3
,7X
,A4
,5X
,A3
,27X
,F9
.5
)
81 C PDB file should end with TER or END or preferably both
83 READ (1,99,end=777) JUNK
84 if (junk
(1:5).eq
.'MODEL') then
85 read(junk
(6:14),'(I9)') nmodel
88 if (junk
(1:6).eq
.'ENDMDL') goto 11
89 if (junk
(1:4).eq
.'END') then
90 if (imodel
.eq
.1) goto 777
93 C Replace D by H for neutron structures
94 if (junk
(14:14).eq
.'D') junk
(14:14)='H'
95 if (junk
(1:4).eq
.'TER ') goto 11
96 if (junk
(1:4).eq
.'ATOM') then
97 if(junk
(27:27).ne
.' ') print
601,junk
(23:26)
98 601 format('WARNING: substituted residue present at ',A4
)
99 if(junk
(22:22).ne
.' '.and
.iwarning
.eq
.1) then
101 type
*,'WARNING: more than one chain present'
103 if(junk
(17:17).ne
.' ') print
602,junk
(23:26)
104 602 format('WARNING: alternate conformations at residue ',A4
)
105 C Next line reads HN in as heavy atom, for Electric field calc.
106 if((junk
(14:14).ne
.'H').or
.(junk
(13:15).eq
.' H ')) then
107 iheavyatom
=iheavyatom
+1
108 read(junk
(13:16),'(A4)') aname
(iheavyatom
)
109 read(junk
(18:20),'(A3)') res
(iheavyatom
)
110 read(junk
(23:26),'(I4)') ires
(iheavyatom
)
111 read(junk
(31:54),'(3F8.0)') x
(iheavyatom
),
112 . y
(iheavyatom
),z
(iheavyatom
)
114 if(junk
(14:14).eq
.'H') then
115 if((icalculate
.eq
.1).and
.(junk
(14:15).ne
.'HA'))goto 10
116 if((icalculate
.eq
.2).and
.(junk
(14:15).ne
.'H '))goto 10
118 read(junk
(13:16),'(A4)') anameh
(iproton
)
119 read(junk
(18:20),'(A3)') resh
(iproton
)
120 read(junk
(23:26),'(I4)') iresh
(iproton
)
121 read(junk
(31:38),'(F8.3)') xh
(iproton
)
122 read(junk
(39:46),'(F8.3)') yh
(iproton
)
123 read(junk
(47:54),'(F8.3)') zh
(iproton
)
128 C To avoid calculating for water molecules
129 if(res
(1).eq
.'WAT'.or
.res
(2).eq
.'WAT') goto 777
130 C Now see if protons are present and add them if not
132 C Next Line hacked (DvdS, 12/94)
133 if ((iproton
.eq
.0) .or
. (icalculate
.eq
.3)) then
134 type
*,'Adding protons'
135 type
*,'Print out file with protons?'
137 call addprot
(x
,y
,z
,xh
,yh
,zh
,Iheavyatom
,Iproton
,
138 & aname
,anameh
,res
,resh
,ires
,iresh
)
139 if(ans
.eq
.'Y'.or
.ans
.eq
.'y') then
141 if(FN1
(I
:I
).eq
.' ')goto 671
144 if(ilength
.lt
.40) then
145 FN9
=FN1
(1:ilength
-4)//'_protonated.pdb'
147 FN9
=FN1
(ilength
-8:ilength
-4)//'_protonated.pdn'
150 669 format('Output going to ',A
)
153 660 format('REMARK Generated from ',60A
)
155 iresend
=ires
(iheavyatom
)
157 do 668 icount
=iresstart
,iresend
158 do 661 I
=1,iheavyatom
159 if(aname
(I
).eq
.' H ') goto 661
160 if(ires
(I
).eq
.icount
) then
162 write(9,662)iline
,aname
(I
),res
(I
),ires
(I
),x
(I
),y
(I
),z
(I
)
164 662 format('ATOM',I7
,1X
,A4
,1X
,A3
,2X
,I4
,4X
,3F8
.3
)
167 if(iresh
(I
).eq
.icount
) then
169 write(9,662)iline
,anameh
(I
),resh
(I
),iresh
(I
),xh
(I
),yh
(I
),zh
(I
)
180 shift
(I
)=0.0 !initialise
186 type
*,' All atoms read...initialising'
187 if(imodel
.eq
.1) type
774, nmodel
188 774 format(' Calculating shifts for model',I9
)
189 C***********Calculate number of aromatic residues, rearrange order of
190 C ring atoms, and set pointers to line numbers of aromatic atoms
191 C (NB each Trp counts as two rings)
193 do 105 I
=1,iheavyatom
194 if((res
(I
).eq
.'TRP'.or
.res
(I
).eq
.'TYR'.or
.res
(I
).eq
.'PHE'.
195 1 or
.res
(I
).eq
.'HIS').and
.(aname
(I
).eq
.' CB ')) THEN
198 IRATPT
(Iring
,narom
)=0
200 IACODE
(narom
)=IRES
(I
)
201 IF ((res
(I
).eq
.'PHE').or
.(res
(I
).eq
.'TYR')) THEN
204 IF(ires
(I
+K
).eq
.ires
(I
).and
.
205 & aname
(I
+K
).eq
.' CG ') IRATPT
(1,narom
)=I
+K
206 IF(ires
(I
+K
).eq
.ires
(I
).and
.
207 & aname
(I
+K
).eq
.' CD1') IRATPT
(2,narom
)=I
+K
208 IF(ires
(I
+K
).eq
.ires
(I
).and
.
209 & aname
(I
+K
).eq
.' CE1') IRATPT
(3,narom
)=I
+K
210 IF(ires
(I
+K
).eq
.ires
(I
).and
.
211 & aname
(I
+K
).eq
.' CZ ') IRATPT
(4,narom
)=I
+K
212 IF(ires
(I
+K
).eq
.ires
(I
).and
.
213 & aname
(I
+K
).eq
.' CE2') IRATPT
(5,narom
)=I
+K
214 IF(ires
(I
+K
).eq
.ires
(I
).and
.
215 & aname
(I
+K
).eq
.' CD2') IRATPT
(6,narom
)=I
+K
217 ELSE IF (res
(I
).eq
.'HIS') THEN
220 IF(ires
(I
+K
).eq
.ires
(I
).and
.
221 & aname
(I
+K
).eq
.' CG ') IRATPT
(1,narom
)=I
+K
222 IF(ires
(I
+K
).eq
.ires
(I
).and
.
223 & aname
(I
+K
).eq
.' CD2') IRATPT
(2,narom
)=I
+K
224 IF(ires
(I
+K
).eq
.ires
(I
).and
.
225 & aname
(I
+K
).eq
.' NE2') IRATPT
(3,narom
)=I
+K
226 IF(ires
(I
+K
).eq
.ires
(I
).and
.
227 & aname
(I
+K
).eq
.' CE1') IRATPT
(4,narom
)=I
+K
228 IF(ires
(I
+K
).eq
.ires
(I
).and
.
229 & aname
(I
+K
).eq
.' ND1') IRATPT
(5,narom
)=I
+K
232 C Trp counts as two aromatic rings (5 then 6)
235 IF(ires
(I
+K
).eq
.ires
(I
).and
.
236 & aname
(I
+K
).eq
.' CG ') IRATPT
(1,narom
)=I
+K
237 IF(ires
(I
+K
).eq
.ires
(I
).and
.
238 & aname
(I
+K
).eq
.' CD1') IRATPT
(2,narom
)=I
+K
239 IF(ires
(I
+K
).eq
.ires
(I
).and
.
240 & aname
(I
+K
).eq
.' NE1') IRATPT
(3,narom
)=I
+K
241 IF(ires
(I
+K
).eq
.ires
(I
).and
.
242 & aname
(I
+K
).eq
.' CE2') IRATPT
(4,narom
)=I
+K
243 IF(ires
(I
+K
).eq
.ires
(I
).and
.
244 & aname
(I
+K
).eq
.' CD2') IRATPT
(5,narom
)=I
+K
247 IACODE
(narom
)=IRES
(I
)
250 IF(ires
(I
+K
).eq
.ires
(I
).and
.
251 & aname
(I
+K
).eq
.' CE2') IRATPT
(1,narom
)=I
+K
252 IF(ires
(I
+K
).eq
.ires
(I
).and
.
253 & aname
(I
+K
).eq
.' CD2') IRATPT
(2,narom
)=I
+K
254 IF(ires
(I
+K
).eq
.ires
(I
).and
.
255 & aname
(I
+K
).eq
.' CE3') IRATPT
(3,narom
)=I
+K
256 IF(ires
(I
+K
).eq
.ires
(I
).and
.
257 & aname
(I
+K
).eq
.' CZ3') IRATPT
(4,narom
)=I
+K
258 IF(ires
(I
+K
).eq
.ires
(I
).and
.
259 & aname
(I
+K
).eq
.' CH2') IRATPT
(5,narom
)=I
+K
260 IF(ires
(I
+K
).eq
.ires
(I
).and
.
261 & aname
(I
+K
).eq
.' CZ2') IRATPT
(6,narom
)=I
+K
264 endif !End of loop
for each aromatic residue
267 if(iratpt
(1,j
).eq
.0.or
.iratpt
(2,j
).eq
.0.or
.iratpt
(3,j
).eq
.0.
268 & or
.iratpt
(4,j
).eq
.0.or
.iratpt
(5,j
).eq
.0) print
960,
269 & ires
(iacode
(j
)),res
(ires
(iacode
(j
)))
271 960 format(1X
,'Ring atom missing for ',I4
,1X
,A3
)
272 DO 115 L
=1,iproton
!Initialise all ring current shifts
to zero
275 C ******************************************************************
276 type
*,' Calculating ring current shifts....'
278 DO 116 J
=1,NAROM
!FOR EACH AROMATIC RESIDUE
279 C Now set up rn (ring normal) and cent for each ring.
280 C Determined using atoms 1, 3 and 5 only of ring.
281 C Much of this is lifted from a version of AMBER provided by Dave Case
282 call plane
(IRATPT
(1,j
),IRATPT
(3,j
),IRATPT
(5,j
),x
,y
,z
,rn
(1,j
),
284 c From pts 1, 3 and 5 calculates rn(ring normal), drn (deriv. of
285 c ring normal) and centre of ring
287 c -- check on signr of normal vector
290 d1cx
= x
(IRATPT
(1,j
)) - cent
(1,j
)
291 d1cy
= y
(IRATPT
(1,j
)) - cent
(2,j
)
292 d1cz
= z
(IRATPT
(1,j
)) - cent
(3,j
)
293 d2cx
= x
(IRATPT
(3,j
)) - cent
(1,j
)
294 d2cy
= y
(IRATPT
(3,j
)) - cent
(2,j
)
295 d2cz
= z
(IRATPT
(3,j
)) - cent
(3,j
)
296 vp1
= d1cy*d2cz
- d1cz*d2cy
297 vp2
= d1cz*d2cx
- d1cx*d2cz
298 vp3
= d1cx*d2cy
- d1cy*d2cx
299 if ((vp3*rn
(3,j
)+vp2*rn
(2,j
)+vp1*rn
(1,j
))
300 . .gt
.0.0) signr
(j
) = -1.0
301 119 DO 120 L
=1,iproton
!For each proton
303 C Next line includes self aromatic shift for HA only
304 IF(IRESH
(L
).EQ
.IRES
(IRATPT
(1,J
)).AND
.(ANAMEH
(L
)(2:3).NE
.
305 & 'HA'.AND
.ANAMEH
(L
)(2:3).NE
.'H ')) GOTO 120
307 c -- skip rings whose centre is more than 15A away
309 relc
= (xh
(ip
)-cent
(1,j
))**2 + (yh
(ip
)-cent
(2,j
))**2
310 . +(zh
(ip
)-cent
(3,j
))**2
311 if (relc
.gt
.225.) go to 120
313 c -- loop over pairs of bonded atoms in the ring
317 if (kp1
.gt
.irats
(j
)) kp1
= 1
319 call hm
(ip
,iratpt
(k
,j
),iratpt
(kp1
,j
),x
,y
,z
,xh
,yh
,zh
,
321 rcnet
(ip
) = rcnet
(ip
)+ signr
(j
)*5.4548*shifthm
325 120 continue !PROTON LOOP
327 C *************BEGIN ANISOTROPY CALCULATION**********************
328 C ****Locate all backbone C=O and calculate anisotropic shift****
329 type
*,' Calculating CO anisotropy...'
331 if (aname
(I
).ne
.' CA ') goto 30
333 IF ((ANAME
(I
+J
).EQ
.' C ').AND
.(IRES
(I
).EQ
.IRES
(I
+J
)))
340 95 format (' C atom not found for residue ',I5
)
342 38 IF (ANAME
(Inext
+1).NE
.' O ') then
344 94 format (' O atom not found for residue ',I5
)
347 C Atoms CA, C and O now located at I, Inext and (Inext+1)
351 CALL VEC
(at1
,at2
,at3
,vx
,vy
,vz
,r
)
352 C Returns vectors vx,vy,vz, and distance r between at1 and at2
353 CALL CENTRE
(vz
,x
(at1
),y
(at1
),z
(at1
),1.1,cen
)
355 C Now loop through all H, calculating shift due to this C=O
357 IF(IRESH
(K
).EQ
.IRES
(AT1
)) GOTO 40 !SELF SHIFT
358 CALL RHAT
(xh
(k
),yh
(k
),zh
(k
),cen
,rh
,rlen
)
359 C Returns vector rh, length rlen, between HA and CEN
360 IF(RLEN
.GT
.12.0) GOTO 40 !distance cutoff
361 CALL VPROD
(rh
,vy
,pregam
,stheta
,tempab
)
362 C Returns sine of angle theta between rh and vy
363 CALL VPROD
(pregam
,vx
,yy
,sgamma
,tempab
)
364 calc1
=XCO1*
((3.0*stheta*stheta
)-2.0)
365 calc2
=XCO2*
(1.0-(3.0*stheta*stheta*sgamma*sgamma
))
366 calc3
=(calc1
+calc2
)/(3.0*rlen*rlen*rlen
)
367 shift
(k
)=shift
(k
)-calc3
368 anisco
(k
)=anisco
(k
)-calc3
371 C if(XCO1.ne.9999.9) goto 9999 !To skip sidechain CO calculation
372 C *********************************************************
373 C *******************Sidechain CO from Asn, Gln************
374 do 530 I
=1,iheavyatom
375 if(res
(I
).ne
.'ASN'.and
.res
(I
).ne
.'GLN') goto 530
376 if (aname
(I
).ne
.' CB ') goto 530
377 if(res
(I
).eq
.'ASN') then
378 if (aname
(I
+1).ne
.' CG '.or
.aname
(I
+2).ne
.' OD1') then
381 595 format (' Missing atoms for ASN ',I5
)
386 else if(res
(I
).eq
.'GLN') then
387 if (aname
(I
+1).ne
.' CG '.or
.aname
(I
+2).ne
.' CD '.or
.
388 1 aname
(I
+3).ne
.' OE1')then
391 596 format (' Missing atoms for GLN ',I5
)
397 CALL VEC
(at1
,at2
,at3
,vx
,vy
,vz
,r
)
398 CALL CENTRE
(vz
,x
(at1
),y
(at1
),z
(at1
),1.1,cen
)
399 C Now loop through all HA, calculating shift due to this C=O
401 CALL RHAT
(xh
(k
),yh
(k
),zh
(k
),cen
,rh
,rlen
)
402 IF(RLEN
.GT
.12.0) GOTO 540
403 CALL VPROD
(rh
,vy
,pregam
,stheta
,tempab
)
404 CALL VPROD
(pregam
,vx
,yy
,sgamma
,tempab
)
405 calc1
=XCO1*
((3.0*stheta*stheta
)-2.0)
406 calc2
=XCO2*
(1.0-(3.0*stheta*stheta*sgamma*sgamma
))
407 calc3
=(calc1
+calc2
)/(3.0*rlen*rlen*rlen
)
408 shift
(k
)=shift
(k
)-calc3
409 anisco
(k
)=anisco
(k
)-calc3
412 C *****************************************************
413 C *****************Sidechain CO from Asp, Glu**********
414 do 630 I
=1,iheavyatom
415 if(res
(I
).ne
.'ASP'.and
.res
(I
).ne
.'GLU') goto 630
416 if (aname
(I
).ne
.' CB ') goto 630
417 if(res
(I
).eq
.'ASP') then
418 if (aname
(I
+1).ne
.' CG '.or
.aname
(I
+2).ne
.' OD1'.or
.
419 1 aname
(I
+3).ne
.' OD2') then
422 695 format (' Missing atoms for ASP ',I5
)
427 else if(res
(I
).eq
.'GLU') then
428 if (aname
(I
+1).ne
.' CG '.or
.aname
(I
+2).ne
.' CD '.or
.
429 1 aname
(I
+3).ne
.' OE1'.or
.aname
(I
+4).ne
.' OE2')then
432 696 format (' Missing atoms for GLU ',I5
)
438 do 650 Itmp
=1,iproton
441 do 667 Icalc
=0,1 !loop
for two C
-O
443 CALL VEC
(at1
,at2
,at3
,vx
,vy
,vz
,r
)
444 CALL CENTRE
(vz
,x
(at1
),y
(at1
),z
(at1
),1.1,cen
)
446 CALL RHAT
(xh
(k
),yh
(k
),zh
(k
),cen
,rh
,rlen
)
447 IF(RLEN
.GT
.12.0) GOTO 640
448 CALL VPROD
(rh
,vy
,pregam
,stheta
,tempab
)
449 CALL VPROD
(pregam
,vx
,yy
,sgamma
,tempab
)
450 calc1
=XCO1*
((3.0*stheta*stheta
)-2.0)
451 calc2
=XCO2*
(1.0-(3.0*stheta*stheta*sgamma*sgamma
))
452 calc3
=(calc1
+calc2
)/(3.0*rlen*rlen*rlen
)
453 calctemp
(K
)=calctemp
(K
)+calc3
457 shift
(kk
)=shift
(kk
)-(calctemp
(kk
)/2.0)
458 anisco
(kk
)=anisco
(kk
)-(calctemp
(kk
)/2.0)
462 C *******NOW DO (O=)C-N TOO *****************************
463 type
*,' Calculating CN anisotropy...'
464 do 130 I
=1,iheavyatom
465 if (aname
(I
).ne
.' C ') goto 130
466 IF (ANAME
(I
+1).NE
.' O ') then
471 if((aname
(I
+j
).eq
.' N ').and
.(ires
(I
).eq
.(ires
(i
+j
)-1)))
477 if(ires
(I
).ne
.ires
(iheavyatom
)) then
479 194 format(' N atom not found after residue ',I5
)
485 CALL VEC
(at1
,at2
,at3
,vx
,vy
,vz
,r
)
486 rbond
=r*0
.85
!i
.e
. 85% along C
-N bond
487 CALL CENTRE
(vz
,x
(at1
),y
(at1
),z
(at1
),rbond
,cen
)
489 CALL RHAT
(xh
(k
),yh
(k
),zh
(k
),cen
,rh
,rlen
)
490 IF(RLEN
.GT
.12.0) GOTO 140
491 if(anameh
(K
).eq
.' H '.and
.(iresh
(k
).eq
.ires
(Inext
)))
493 CALL VPROD
(rh
,vy
,pregam
,stheta
,tempab
)
494 CALL VPROD
(pregam
,vx
,yy
,sgamma
,tempab
)
495 calc1
=XCN1*
((3.0*stheta*stheta
)-2.0)
496 calc2
=XCN2*
(1.0-(3.0*stheta*stheta*sgamma*sgamma
))
497 calc3
=(calc1
+calc2
)/(3.0*rlen*rlen*rlen
)
498 shift
(k
)=shift
(k
)-calc3
499 aniscn
(k
)=aniscn
(k
)-calc3
502 C *************************************************
503 C *******Calculate electric field component********
504 C First find C(alpha)-H(alpha) pair, then work through
505 C all C, O and N finding field from them
506 type
*,' Calculating electric field shift...'
509 if(anameh
(ie
).eq
.' H ')goto 2000
512 do 2010 je
=1,iheavyatom
513 C Find attached heavy atom
514 if((ires
(je
).eq
.iresh
(ie
)).and
.(aname
(je
)(3:3).eq
.
515 1 anameh
(ie
)(3:3))) then
521 call VEC2
(iha
,ica
,vca
,rca
)
522 C Returns vector vca and length rca between H(ie) and CA(je)
523 C Now go through each C and add shift due to this
524 do 2030 je
=1,iheavyatom
525 if(ires
(je
).eq
.iresh
(iha
)) goto 2030
526 if(aname
(je
).eq
.' C ') then
527 call VEC2
(iha
,je
,vc
,rcc
)
528 if(rcc
.gt
.6.0) goto 2030 !Ignore
for distance
>6A
529 call VSCAL
(vca
,vc
,sc
,cthet
)
532 ELSE if(aname
(je
).eq
.' N ') then
533 call VEC2
(iha
,je
,vn
,rcn
)
534 if(rcn
.gt
.6.0) goto 2030
535 call VSCAL
(vca
,vn
,sc
,cthet
)
538 ELSE if(aname
(je
).eq
.' O ') then
539 call VEC2
(iha
,je
,vo
,rco
)
540 if(rco
.gt
.6.0) goto 2030
541 call VSCAL
(vca
,vo
,sc
,cthet
)
544 ELSE if(aname
(je
).eq
.' H ') then
545 call VEC2
(iha
,je
,vchn
,rchn
)
546 if(rchn
.gt
.6.0) goto 2030
547 call VSCAL
(vca
,vchn
,sc
,cthet
)
548 Efact
=Qhn
/(rchn*rchn
)
552 shift
(ie
)=shift
(ie
)+(Ez*sigmaE
)
553 shiftE
(ie
)=shiftE
(ie
)+(Ez*sigmaE
)
555 C ****************END OF CALCULATIONS PROPER********************
556 C *Correction of Gly HA shift by 0.22 ppm for random coil effect,
557 C subtract 0.20 from HN shift, subtract 0.65 from HA shift,
558 C convert to single precision, add random coil shift
559 do 2040 kkk
=1,iproton
560 shift
(kkk
)=shift
(kkk
) + rcnet
(kkk
)
561 if(anameh
(kkk
)(2:3).eq
.'HA') shift
(kkk
)=shift
(kkk
)-0.65
562 if(anameh
(kkk
)(2:3).eq
.'H ') shift
(kkk
)=shift
(kkk
)-0.20
563 sum
(kkk
)=rcnet
(kkk
)+anisco
(kkk
)+aniscn
(kkk
)+shiftE
(kkk
)
564 if((resh
(kkk
).eq
.'GLY').and
.(anameh
(kkk
).eq
.'1HA '.or
.
565 1 anameh
(kkk
).eq
.'2HA '.or
.anameh
(kkk
).eq
.' HA1'.or
.
566 2 anameh
(kkk
).eq
.' HA2')) shift
(kkk
)=shift
(kkk
)+0.22
568 IF ((datres
(L
).eq
.resh
(kkk
)).and
.(datnam
(L
)(2:4).eq
.
569 1 anameh
(kkk
)(2:4))) THEN
570 C This next bit replaces HA shifts for aromatics by 4.45 ppm
571 C (gives roughly best fit to data)
572 if((resh
(kkk
).eq
.'TYR'.or
.resh
(kkk
).eq
.'PHE'.or
.
573 1 resh
(kkk
).eq
.'TRP'.or
.resh
(kkk
).eq
.'HIS').and
.anameh
(kkk
).
575 final
(kkk
)=shift
(kkk
)+4.45
576 shift
(kkk
)=shift
(kkk
)+4.45-datshift
(L
)
578 final
(kkk
)=shift
(kkk
) + datshift
(L
)
585 C ***************** Output SHIFT to channel 3**********************
586 if(yn
.ne
.'Y'.and
.yn
.ne
.'y') goto 2100
589 IF(IEXP
(ii
).EQ
.IRESH
(KK
).AND
.pexp
(ii
).eq
.prott
.and
.
590 1 atexp
(ii
)(1:2).eq
.anameh
(kk
)(2:3)) THEN
592 C exptln is the experimental shift: now subtract random coil
594 IF ((datres
(L
).eq
.resh
(kk
)).and
.(datnam
(L
)(1:3).eq
.
595 1 anameh
(kk
)(1:3))) then
596 exptln
(kk
)=exptln
(kk
) - datshift
(L
)
604 if(imodel
.eq
.1) goto 501
606 988 format(' Proton name, followed by calc. and observed shift and
609 2052 format(' (as shift - random coil shift)')
610 do 500 iprnt
=1,iproton
611 if(exptln
(iprnt
).ne
.0.00)
612 1 write(3,991) iprnt
,iresh
(iprnt
),resh
(iprnt
),anameh
(iprnt
),
613 1 shift
(iprnt
),exptl
(iprnt
),(shift
(iprnt
)-exptl
(iprnt
))
614 991 format(I5
,I5
,1X
,A3
,2X
,A4
,3F10
.6
)
619 775 format(' Result for model number',I8
)
621 CALL STATS
(shift
,EXPTL
,iproton
,anameh
)
622 type
*,'Do you want output sorted? [N]'
624 if(ans
.ne
.'Y'.and
.ans
.ne
.'y') goto 1000
627 if(exptl
(I
).eq
.0.0) goto 505
629 shiftt
(itemp
)=shift
(I
)
630 exptlt
(itemp
)=exptl
(I
)
632 CALL INDEXX
(itemp
,shiftt
,indx
)
634 C990 format(' Calc Exptl Diff')
635 990 format(' Calc Diff')
637 C write (3,989) shiftt(indx(I)),exptlt(indx(I)),
638 write (3,983) shiftt
(indx
(I
)),
639 1 (shiftt
(indx
(I
))-exptlt
(indx
(I
)))
644 C **************Normal output starts here***************************
647 987 format(' Shift calculated for protons from ',A
)
649 986 format(' Added 0.22 for Gly, subtracted 0.65 (HA only), added
652 985 format(' Proton ring anisCO anisCN
655 if(icalculate
.eq
.1.and
.anameh
(ip
)(2:3).ne
.'HA') goto 510
656 if(icalculate
.eq
.2.and
.anameh
(ip
)(2:3).ne
.'H ') goto 510
657 C Now do averaging for Phe,Tyr,methyls
658 if((resh
(ip
).eq
.'VAL'.and
.(anameh
(ip
).eq
.'1HG1'.or
.anameh
(ip
).
659 1eq
.'1HG2')).or
.(resh
(ip
).eq
.'LEU'.and
.(anameh
(ip
).eq
.'1HD1'.or
.
660 2anameh
(ip
).eq
.'1HD2')).or
.(resh
(ip
).eq
.'ILE'.and
.(anameh
(ip
).eq
.
661 3'1HG2'.or
.anameh
(ip
).eq
.'1HD1')).or
.(resh
(ip
).eq
.'ALA'.and
.
662 4anameh
(ip
).eq
.'1HB ').or
.(resh
(ip
).eq
.'THR'.and
.anameh
(ip
).eq
.
664 final
(ip
)=final
(ip
)-sum
(ip
)
665 sum
(ip
)=(sum
(ip
)+sum
(ip
+1)+sum
(ip
+2))/3.0
666 anisco
(ip
)=(anisco
(ip
)+anisco
(ip
+1)+anisco
(ip
+2))/3.0
667 aniscn
(ip
)=(aniscn
(ip
)+aniscn
(ip
+1)+aniscn
(ip
+2))/3.0
668 shiftE
(ip
)=(shiftE
(ip
)+shiftE
(ip
+1)+shiftE
(ip
+2))/3.0
669 shift
(ip
)=(shift
(ip
)+shift
(ip
+1)+shift
(ip
+2))/3.0
670 final
(ip
)=final
(ip
)+sum
(ip
)
674 if(resh
(ip
).eq
.'TYR'.and
.anameh
(ip
).eq
.' HD1') then
675 if(anameh
(ip
+1).eq
.' HD2') then
676 final
(ip
)=final
(ip
)-sum
(ip
)
677 sum
(ip
)=(sum
(ip
)+sum
(ip
+1))/2.0
678 anisco
(ip
)=(anisco
(ip
)+anisco
(ip
+1))/2.0
679 aniscn
(ip
)=(aniscn
(ip
)+aniscn
(ip
+1))/2.0
680 shiftE
(ip
)=(shiftE
(ip
)+shiftE
(ip
+1))/2.0
681 shift
(ip
)=(shift
(ip
)+shift
(ip
+1))/2.0
682 final
(ip
)=final
(ip
)+sum
(ip
)
685 type
940,resh
(ip
),iresh
(ip
)
686 940 format(' Ring protons in unexpected order for ',A3
,I4
)
689 if(resh
(ip
).eq
.'TYR'.and
.anameh
(ip
).eq
.' HE1') then
690 if(anameh
(ip
+1).eq
.' HE2') then
691 final
(ip
)=final
(ip
)-sum
(ip
)
692 sum
(ip
)=(sum
(ip
)+sum
(ip
+1))/2.0
693 anisco
(ip
)=(anisco
(ip
)+anisco
(ip
+1))/2.0
694 aniscn
(ip
)=(aniscn
(ip
)+aniscn
(ip
+1))/2.0
695 shiftE
(ip
)=(shiftE
(ip
)+shiftE
(ip
+1))/2.0
696 shift
(ip
)=(shift
(ip
)+shift
(ip
+1))/2.0
697 final
(ip
)=final
(ip
)+sum
(ip
)
700 type
940,resh
(ip
),iresh
(ip
)
703 if(resh
(ip
).eq
.'PHE'.and
.anameh
(ip
).eq
.' HD1') then
704 if(anameh
(ip
+1).eq
.' HD2') then
705 final
(ip
)=final
(ip
)-sum
(ip
)
706 sum
(ip
)=(sum
(ip
)+sum
(ip
+1))/2.0
707 anisco
(ip
)=(anisco
(ip
)+anisco
(ip
+1))/2.0
708 aniscn
(ip
)=(aniscn
(ip
)+aniscn
(ip
+1))/2.0
709 shiftE
(ip
)=(shiftE
(ip
)+shiftE
(ip
+1))/2.0
710 shift
(ip
)=(shift
(ip
)+shift
(ip
+1))/2.0
711 final
(ip
)=final
(ip
)+sum
(ip
)
714 type
940,resh
(ip
),iresh
(ip
)
717 if(resh
(ip
).eq
.'PHE'.and
.anameh
(ip
).eq
.' HE1') then
718 if(anameh
(ip
+1).eq
.' HE2') then
719 final
(ip
)=final
(ip
)-sum
(ip
)
720 sum
(ip
)=(sum
(ip
)+sum
(ip
+1))/2.0
721 anisco
(ip
)=(anisco
(ip
)+anisco
(ip
+1))/2.0
722 aniscn
(ip
)=(aniscn
(ip
)+aniscn
(ip
+1))/2.0
723 shiftE
(ip
)=(shiftE
(ip
)+shiftE
(ip
+1))/2.0
724 shift
(ip
)=(shift
(ip
)+shift
(ip
+1))/2.0
725 final
(ip
)=final
(ip
)+sum
(ip
)
728 type
940,resh
(ip
),iresh
(ip
)
731 C ******Write out results*********************
732 if(final
(ip
).ne
.0.0) write(3,984)ip
,iresh
(ip
),resh
(ip
),
733 1 anameh
(ip
),rcnet
(ip
),anisco
(ip
),aniscn
(ip
),shiftE
(ip
),
734 2 shift
(ip
),final
(ip
)
735 984 format(I5
,I5
,1X
,A3
,2X
,A4
,6F10
.5
)
738 imodel
=1 !to make it work
for single structure
742 print
*,'Closing unit 3'
747 C *******************************************************
748 SUBROUTINE VEC
(at1
,at2
,at3
,vx
,vy
,vz
,r
)
750 DIMENSION X
(5000),Y
(5000),Z
(5000),vx
(3),vy
(3),vz
(3)
751 DIMENSION vvx
(3),vvy
(3),vvz
(3)
769 CALL VPROD
(vz
,vvz
,vvy
,sthet
,tempab
)
772 CALL VPROD
(vz
,vy
,vvx
,sthet
,tempab
)
776 C ******************************************************
777 SUBROUTINE UNITV
(U
,U1
,D
)
784 If (D
.EQ
.0.0) type
*,' D is zero in UNITV'
790 C **********************************************************
791 SUBROUTINE VPROD
(A
,B
,AB
,STHET
,tempab
)
792 DIMENSION A
(3),B
(3),AB
(3)
793 AB
(2)=A
(3)*B
(1) - A
(1)*B
(3)
794 AB
(1)=A
(2)*B
(3) - A
(3)*B
(2)
795 AB
(3)=A
(1)*B
(2) - A
(2)*B
(1)
797 c This is a stupid thing to do, but it's the only way I can get it
799 R1
=SQRT
(AB
(1)*AB
(1) + AB
(2)*AB
(2) + AB
(3)*AB
(3))
800 RA
=SQRT
(A
(1)*A
(1) + A
(2)*A
(2) + A
(3)*A
(3))
801 RB
=SQRT
(B
(1)*B
(1) + B
(2)*B
(2) + B
(3)*B
(3))
802 IF(RA
.EQ
.0.0.OR
.RB
.EQ
.0.0) THEN
803 type
*,' VPROD Zero divide...ignore',RA
,RB
810 C *******************************************************
811 SUBROUTINE CENTRE
(vz
,a1
,a2
,a3
,dist
,cen
)
812 DIMENSION vz
(3),cen
(3)
813 cen
(1)=a1
+(vz
(1)*dist
)
814 cen
(2)=a2
+(vz
(2)*dist
)
815 cen
(3)=a3
+(vz
(3)*dist
)
818 C ********************************************************
819 SUBROUTINE RHAT
(ax
,ay
,az
,cen
,rh
,rlen
)
820 DIMENSION cen
(3),rh
(3)
824 rlen
=sqrt
(rh
(1)*rh
(1)+rh
(2)*rh
(2)+rh
(3)*rh
(3))
827 C ********************************************************
828 SUBROUTINE STATS
(SSHIFT
,EXPTL
,iproton
,anameh
)
829 dimension sshift
(3000),exptl
(3000),anameh
(3000)
830 dimension zshift
(3000),zexptl
(3000)
831 C Calculates mean and sd of iproton values of shift and exptl
832 C also mean and sd of (shift-exptl) and regression coeff
833 C Values of exptl of 0.00 presumably not found in protha.out
837 if(exptl
(I
).eq
.0.0) goto 5
839 if(anameh
(I
).eq
.'1HA '.and
.anameh
(I
+1).eq
.'2HA ') then
840 sshift
(I
)=(sshift
(I
)+sshift
(I
+1))/2.0
842 zshift
(itemp
)=sshift
(I
)
843 zexptl
(itemp
)=exptl
(I
)
852 C sm1,sm2 are accumulated sums of shift and exptl
853 C sms1,sms2 are accumulated sums of shift**2 and exptl**2
857 sm3
=sm3
+(zshift
(L
)-zexptl
(L
))
863 sms1
=sms1
+((zshift
(L
)-sm1
)*(zshift
(L
)-sm1
))
864 sms2
=sms2
+((zexptl
(L
)-sm2
)*(zexptl
(L
)-sm2
))
865 sms3
=sms3
+((zshift
(L
)-zexptl
(L
)-sm3
)*(zshift
(L
)-zexptl
(L
)-sm3
))
867 sms1
=sqrt
(sms1
/float
(itemp
))
868 sms2
=sqrt
(sms2
/float
(itemp
))
869 sms3
=sqrt
(sms3
/float
(itemp
))
871 sm4
=sm4
+((zshift
(L
)-sm1
)*(zexptl
(L
)-sm2
))
873 sm4
=sm4
/(float
(itemp
)*sms1*sms2
)
874 write (3,1000) sm1
,sm2
875 1000 format(' Means of calc and exptl shifts: ',F6
.4
,
877 write (3,1001) sms1
,sms2
878 1001 format(' SD of calc and exptl shifts: ',F6
.4
,
880 write (3,1002) sm3
,sms3
881 1002 format(' Mean and SD of (calc-exptl shift): ',F6
.4
,
883 write (3,1003) sm4
,itemp
884 1003 format (' Correlation coefficient calc vs exptl: ',F7
.5
,
885 1 ' (',I4
,' protons )')
888 C ************************************************
889 SUBROUTINE VEC2
(iha
,ica
,vca
,rca
)
890 DIMENSION vca
(3),x
(5000),y
(5000),z
(5000)
891 DIMENSION xh
(3000),yh
(3000),zh
(3000)
892 COMMON x
,y
,z
,xh
,yh
,zh
893 vca
(1)=xh
(iha
)-x
(ica
)
894 vca
(2)=yh
(iha
)-y
(ica
)
895 vca
(3)=zh
(iha
)-z
(ica
)
896 rca
=sqrt
((vca
(1)*vca
(1))+(vca
(2)*vca
(2))+(vca
(3)*vca
(3)))
899 C *******************************************
900 SUBROUTINE VSCAL
(A
,B
,SC
,CTHET
)
902 SC
=A
(1)*B
(1)+A
(2)*B
(2)+A
(3)*B
(3)
903 RA
=SQRT
(A
(1)*A
(1)+A
(2)*A
(2)+A
(3)*A
(3))
904 RB
=SQRT
(B
(1)*B
(1)+B
(2)*B
(2)+B
(3)*B
(3))
908 C **********************************************
909 SUBROUTINE INDEXX
(N
,ARRIN
,INDX
)
910 C Indexes an array ARRIN of length N, i.e. outputs array INDX
911 C such that ARRIN(INDX(J)) is in ascending order.
912 C Taken from 'Numerical Recipes', W.H.Press et al, CUP 1989
913 DIMENSION ARRIN
(3000),INDX
(3000)
939 IF(ARRIN
(INDX
(J
)).LT
.ARRIN
(INDX
(J
+1)))J
=J
+1
941 IF(Q
.LT
.ARRIN
(INDX
(J
))) THEN
953 c**********************************************************
954 subroutine hm
(ip
,ir1
,ir2
,x
,y
,z
,xh
,yh
,zh
,rn
,shhm
)
956 c Subroutine Haigh-Mallion:
957 c -- given proton ip, and ring atoms ir1 and ir2, with
958 c coordinates x and ring normal vector rn;
959 c -- return Haigh-Maillion shift contribution shhm
961 dimension x
(5000),y
(5000),z
(5000),xh
(3000),yh
(3000)
962 dimension rn
(3),r1
(3),r2
(3),zh
(3000)
964 c --- extract coordinates from array x,y,z
966 r1
(1)=x
(ir1
) - xh
(ip
)
967 r1
(2)=y
(ir1
) - yh
(ip
)
968 r1
(3)=z
(ir1
) - zh
(ip
)
969 r2
(1)=x
(ir2
) - xh
(ip
)
970 r2
(2)=y
(ir2
) - yh
(ip
)
971 r2
(3)=z
(ir2
) - zh
(ip
)
973 c -- compute triple scalar product: later versions could
974 c hard-code this for efficiency, but this form is
975 c easier to read. (Triple scalar product=vol. of
976 c parallelepiped, =area of desired triangle)
978 s12
= r1
(1)*(r2
(2)*rn
(3) - r2
(3)*rn
(2))
979 . + r1
(2)*(r2
(3)*rn
(1) - r2
(1)*rn
(3))
980 . + r1
(3)*(r2
(1)*rn
(2) - r2
(2)*rn
(1))
982 c -- get radial factors
984 r1sq
= r1
(1)*r1
(1) + r1
(2)*r1
(2) + r1
(3)*r1
(3)
985 r2sq
= r2
(1)*r2
(1) + r2
(2)*r2
(2) + r2
(3)*r2
(3)
986 if (r1sq
.eq
.0.0 .or
. r2sq
.eq
.0.0) then
987 write(6,*) 'Geometry error in hm: ',ip
,r1
,r2
990 temp
= (1./r1sq**1
.5
+ 1./r2sq**1
.5
)*0.5 !distance bit
994 C****************************************************************
995 subroutine plane
(i1
, i2
, i3
, x
,y
,z
, rn
, cent
)
996 c**************************************************************
997 c --- given three atoms i1,i2 and i3, and coordinates x,y,z
998 c - returns rn(i) [i=1,2,3] components of the normalized
999 c vector normal to the plane containing the three
1000 c points and cent(1,2,3), the centre of the three atom.
1002 dimension x
(5000),y
(5000),z
(5000)
1003 dimension rn
(3),cent
(3)
1015 c ----- coefficients of the equation for the plane of atoms 1-3
1017 ax
= y1*z2
- y2*z1
+ y3*z1
- y1*z3
+ y2*z3
- y3*z2
1018 ay
= -(x1*z2
- x2*z1
+ x3*z1
- x1*z3
+ x2*z3
- x3*z2
)
1019 az
= x1*y2
- x2*y1
+ x3*y1
- x1*y3
+ x2*y3
- x3*y2
1020 anorm
= 1./sqrt
(ax*ax
+ ay*ay
+ az*az
)
1022 c ----- normalize to standard form for plane equation (i.e. such
1023 c ----- that length of the vector "a" is unity
1025 rn
(1) = ax*anorm
!ring normal unit vector
1026 rn
(2) = ay*anorm
!=(2-1)x
(3-1)
1027 rn
(3) = az*anorm
!divided by its magnitude
1029 cent
(1) = (x1
+x2
+x3
)/3.
1030 cent
(2) = (y1
+y2
+y3
)/3.
1031 cent
(3) = (z1
+z2
+z3
)/3.
1035 C ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1036 subroutine addprot
(x
,y
,z
,xh
,yh
,zh
,Iheavyatom
,Iproton
,
1037 & aname
,anameh
,res
,resh
,ires
,iresh
)
1038 C Does not add most exchangeable protons: N-terminal NH3,
1039 C Glu,Gln,Asp,Asn sidechain, Arg sidechain,Tyr HH, His HD1,
1040 C Trp HE1, Ser & Thr OH, Cys SH, Lys NH3
1041 C Goes through heavy atom list and adds in simple geometric way
1042 C NB Looks in neighbourhood of attached heavy atom for bonding
1043 C atoms. If the atom ordering is odd, this could cause problems.
1044 C Usually this would mean that the proton does not get added;
1045 C very occasionally it could lead to a proton being put on wrong.
1046 DIMENSION x
(5000),y
(5000),z
(5000),xh
(3000),yh
(3000),zh
(3000)
1047 DIMENSION aname
(5000),res
(5000),ires
(5000)
1048 DIMENSION anameh
(3000),resh
(3000),iresh
(3000)
1049 CHARACTER aname*4
,anameh*4
,res*3
,resh*3
1051 C NB This effectively deletes any protons that already were in the file
1052 do 10 I
=1,iheavyatom
1056 if(aname
(I
).eq
.' N '.and
.ires
(I
).gt
.1.and
.res
(I
).
1060 if(aname
(I
-J
).eq
.' C '.and
.ires
(I
-J
).eq
.ires
(I
)-1) then
1067 if(aname
(I
+J
).eq
.' CA '.and
.ires
(I
+J
).eq
.ires
(I
)) then
1073 if(iat2
.gt
.0.and
.iat3
.gt
.0) then
1075 iheavyatom
=iheavyatom
+1
1076 call addsp2
(x
,y
,z
,xh
,yh
,zh
,iproton
,iat1
,iat2
,iat3
,1)
1077 anameh
(iproton
)=' H '
1078 resh
(iproton
)=res
(iat1
)
1079 iresh
(iproton
)=ires
(iat1
)
1080 x
(iheavyatom
)=xh
(iproton
)
1081 y
(iheavyatom
)=yh
(iproton
)
1082 z
(iheavyatom
)=zh
(iproton
)
1083 aname
(iheavyatom
)=' H '
1084 res
(iheavyatom
)=res
(iat1
)
1085 ires
(iheavyatom
)=ires
(iat1
)
1086 C The final 1 signals that it is an NH ie use NH bond distance
1088 else if (aname
(I
).eq
.' CA '.and
.res
(I
).ne
.'GLY') then
1091 if(aname
(I
+J
).eq
.' N '.and
.ires
(I
+J
).eq
.ires
(I
)) then
1098 if(aname
(I
+J
).eq
.' C '.and
.ires
(I
+J
).eq
.ires
(I
)) then
1105 if(aname
(I
+J
).eq
.' CB '.and
.ires
(I
+J
).eq
.ires
(I
)) then
1111 if(iat2
.gt
.0.and
.iat3
.gt
.0.and
.iat4
.gt
.0) then
1113 call addonesp3
(x
,y
,z
,xh
,yh
,zh
,iproton
,iat1
,iat2
,iat3
,iat4
)
1114 anameh
(iproton
)=' HA '
1115 resh
(iproton
)=res
(iat1
)
1116 iresh
(iproton
)=ires
(iat1
)
1118 else if((aname
(I
).eq
.' CB '.and
.(res
(I
).eq
.'THR'.or
.
1119 & res
(I
).eq
.'VAL'.or
.res
(I
).eq
.'ILE')).or
.(aname
(I
).
1120 & eq
.' CG '.and
.res
(I
).eq
.'LEU')) then
1123 if(aname
(I
-J
).eq
.' CA '.and
.ires
(I
-J
).eq
.ires
(I
).
1124 & and
.res
(I
).ne
.'LEU') then
1131 if(res
(I
-J
).eq
.'LEU'.and
.aname
(I
-J
).eq
.' CB ') then
1138 if(res
(I
+J
).eq
.'THR'.and
.aname
(I
+J
)(2:3).eq
.'OG')
1140 if(res
(I
+J
).eq
.'THR'.and
.aname
(I
+J
)(2:3).eq
.'CG')
1142 if(res
(I
+J
).eq
.'VAL'.and
.aname
(I
+J
).eq
.' CG1') iat3
=I
+J
1143 if(res
(I
+J
).eq
.'VAL'.and
.aname
(I
+J
).eq
.' CG2') iat4
=I
+J
1144 if(res
(I
+J
).eq
.'ILE'.and
.aname
(I
+J
).eq
.' CG1') iat3
=I
+J
1145 if(res
(I
+J
).eq
.'ILE'.and
.aname
(I
+J
).eq
.' CG2') iat4
=I
+J
1146 if(res
(I
+J
).eq
.'LEU'.and
.aname
(I
+J
).eq
.' CD1') iat3
=I
+J
1147 if(res
(I
+J
).eq
.'LEU'.and
.aname
(I
+J
).eq
.' CD2') iat4
=I
+J
1149 if(iat2
.gt
.0.and
.iat3
.gt
.0.and
.iat4
.gt
.0) then
1151 call addonesp3
(x
,y
,z
,xh
,yh
,zh
,iproton
,iat1
,iat2
,iat3
,iat4
)
1152 if(res
(I
).eq
.'LEU') then
1153 anameh
(iproton
)=' HG '
1155 anameh
(iproton
)=' HB '
1157 resh
(iproton
)=res
(iat1
)
1158 iresh
(iproton
)=ires
(iat1
)
1160 else if(aname
(I
).eq
.' CA '.and
.res
(I
).eq
.'GLY') then
1163 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' N ')iat3
=I
+J
1164 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' C ')iat2
=I
+J
1166 if(iat2
.gt
.0.and
.iat3
.gt
.0) then
1168 call addtwosp3
(x
,y
,z
,xh
,yh
,zh
,iproton
,iat1
,iat2
,iat3
)
1169 anameh
(iproton
-1)='1HA '
1170 anameh
(iproton
)='2HA '
1171 resh
(iproton
-1)=res
(iat1
)
1172 resh
(iproton
)=res
(iat1
)
1173 iresh
(iproton
-1)=ires
(iat1
)
1174 iresh
(iproton
)=ires
(iat1
)
1176 else if(aname
(I
).eq
.' CB '.and
.(res
(I
).eq
.'CYS'.or
.res
(I
).
1177 1 eq
.'ASP'.or
.res
(I
).eq
.'GLU'.or
.res
(I
).eq
.'PHE'.or
.res
(I
).
1178 2 eq
.'HIS'.or
.res
(I
).eq
.'LYS'.or
.res
(I
).eq
.'LEU'.or
.res
(I
).
1179 3 eq
.'MET'.or
.res
(I
).eq
.'ASN'.or
.res
(I
).eq
.'PRO'.or
.res
(I
).
1180 4 eq
.'GLN'.or
.res
(I
).eq
.'ARG'.or
.res
(I
).eq
.'SER'.or
.res
(I
).
1181 5 eq
.'TRP'.or
.res
(I
).eq
.'TYR')) then
1184 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CA ')iat2
=I
+J
1185 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
)(3:3).eq
.'G')
1188 if(iat2
.gt
.0.and
.iat3
.gt
.0) then
1190 call addtwosp3
(x
,y
,z
,xh
,yh
,zh
,iproton
,iat1
,iat2
,iat3
)
1191 anameh
(iproton
-1)='1HB '
1192 anameh
(iproton
)='2HB '
1193 resh
(iproton
-1)=res
(iat1
)
1194 resh
(iproton
)=res
(iat1
)
1195 iresh
(iproton
-1)=ires
(iat1
)
1196 iresh
(iproton
)=ires
(iat1
)
1198 else if((aname
(I
).eq
.' CG '.and
.(res
(I
).eq
.'GLU'.or
.res
(I
).
1199 1 eq
.'LYS'.or
.res
(I
).eq
.'MET'.or
.res
(I
).eq
.'PRO'.or
.res
(I
).
1200 2 eq
.'GLN'.or
.res
(I
).eq
.'ARG')).or
.(aname
(I
).eq
.' CG1'.and
.
1201 3 res
(I
).eq
.'ILE')) then
1204 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CB ')iat2
=I
+J
1205 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
)(3:3).eq
.'D')
1208 if(iat2
.gt
.0.and
.iat3
.gt
.0) then
1210 call addtwosp3
(x
,y
,z
,xh
,yh
,zh
,iproton
,iat1
,iat2
,iat3
)
1211 anameh
(iproton
-1)='1HG '
1212 anameh
(iproton
)='2HG '
1213 if(res
(I
).eq
.'ILE')anameh
(iproton
-1)='1HG1'
1214 if(res
(I
).eq
.'ILE')anameh
(iproton
)='2HG1'
1215 resh
(iproton
-1)=res
(iat1
)
1216 resh
(iproton
)=res
(iat1
)
1217 iresh
(iproton
-1)=ires
(iat1
)
1218 iresh
(iproton
)=ires
(iat1
)
1220 else if(aname
(I
).eq
.' CD '.and
.(res
(I
).eq
.'LYS'.or
.res
(I
).
1221 1 eq
.'ARG'.or
.res
(I
).eq
.'PRO')) then
1224 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CG ')iat2
=I
+J
1225 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
)(3:3).eq
.'E')
1227 if(ires
(I
+J
).eq
.ires
(I
).and
.res
(I
).eq
.'PRO'.and
.
1228 & aname
(I
+J
).eq
.' N ')iat3
=I
+J
1230 if(iat2
.gt
.0.and
.iat3
.gt
.0) then
1232 call addtwosp3
(x
,y
,z
,xh
,yh
,zh
,iproton
,iat1
,iat2
,iat3
)
1233 anameh
(iproton
-1)='1HD '
1234 anameh
(iproton
)='2HD '
1235 resh
(iproton
-1)=res
(iat1
)
1236 resh
(iproton
)=res
(iat1
)
1237 iresh
(iproton
-1)=ires
(iat1
)
1238 iresh
(iproton
)=ires
(iat1
)
1240 else if(aname
(I
).eq
.' CE '.and
.res
(I
).eq
.'LYS') then
1243 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CD ')iat2
=I
+J
1244 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
)(3:3).eq
.'Z')
1247 if(iat2
.gt
.0.and
.iat3
.gt
.0) then
1249 call addtwosp3
(x
,y
,z
,xh
,yh
,zh
,iproton
,iat1
,iat2
,iat3
)
1250 anameh
(iproton
-1)='1HE '
1251 anameh
(iproton
)='2HE '
1252 resh
(iproton
-1)=res
(iat1
)
1253 resh
(iproton
)=res
(iat1
)
1254 iresh
(iproton
-1)=ires
(iat1
)
1255 iresh
(iproton
)=ires
(iat1
)
1257 else if(aname
(I
).eq
.' CB '.and
.res
(I
).eq
.'ALA') then
1260 if(ires
(I
-J
).eq
.ires
(I
).and
.aname
(I
-J
).eq
.' CA ')iat2
=I
-J
1261 if(ires
(I
-J
).eq
.ires
(I
).and
.aname
(I
-J
).eq
.' N ')iat3
=I
-J
1263 if(iat2
.gt
.0.and
.iat3
.gt
.0)goto 52
1264 else if((aname
(I
)(2:3).eq
.'CG'.and
.(res
(I
).eq
.'VAL'.or
.res
(I
).
1265 1 eq
.'THR')).or
.(aname
(I
).eq
.' CG2'.and
.res
(I
).eq
.'ILE'))then
1268 if(ires
(I
-J
).eq
.ires
(I
).and
.aname
(I
-J
).eq
.' CB ')iat2
=I
-J
1269 if(ires
(I
-J
).eq
.ires
(I
).and
.aname
(I
-J
).eq
.' CA ')iat3
=I
-J
1271 if(iat2
.gt
.0.and
.iat3
.gt
.0)goto 52
1272 else if(aname
(I
)(2:3).eq
.'CD'.and
.(res
(I
).eq
.'LEU'.or
.res
(I
).
1276 if(ires
(I
-J
).eq
.ires
(I
).and
.aname
(I
-J
)(2:3).eq
.'CG')iat2
=I
-J
1277 if(ires
(I
-J
).eq
.ires
(I
).and
.aname
(I
-J
).eq
.' CB ')iat3
=I
-J
1279 if(iat2
.gt
.0.and
.iat3
.gt
.0)goto 52
1280 else if(aname
(I
)(2:3).eq
.'CE'.and
.res
(I
).eq
.'MET')then
1283 if(ires
(I
-J
).eq
.ires
(I
).and
.aname
(I
-J
).eq
.' SD ')iat2
=I
-J
1284 if(ires
(I
-J
).eq
.ires
(I
).and
.aname
(I
-J
).eq
.' CG ')iat3
=I
-J
1286 if(iat2
.gt
.0.and
.iat3
.gt
.0) then
1287 52 iproton
=iproton
+3
1288 call addthreesp3
(x
,y
,z
,xh
,yh
,zh
,iproton
,iat1
,iat2
,iat3
)
1289 anameh
(iproton
-2)='1H '
1290 anameh
(iproton
-1)='2H '
1291 anameh
(iproton
)='3H '
1292 anameh
(iproton
-2)(3:4)=aname
(iat1
)(3:4)
1293 anameh
(iproton
-1)(3:4)=aname
(iat1
)(3:4)
1294 anameh
(iproton
)(3:4)=aname
(iat1
)(3:4)
1295 resh
(iproton
-2)=res
(iat1
)
1296 resh
(iproton
-1)=res
(iat1
)
1297 resh
(iproton
)=res
(iat1
)
1298 iresh
(iproton
-2)=ires
(iat1
)
1299 iresh
(iproton
-1)=ires
(iat1
)
1300 iresh
(iproton
)=ires
(iat1
)
1302 else if((res
(I
).eq
.'TYR'.or
.res
(I
).eq
.'PHE'.or
.res
(I
).eq
.
1303 1 'TRP').and
.aname
(I
).eq
.' CD1')then
1306 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CG ')iat2
=I
+J
1307 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
)(3:4).eq
.'E1')iat3
=I
+J
1309 if(iat2
.gt
.0.and
.iat3
.gt
.0) goto 62
1310 else if((res
(I
).eq
.'TYR'.or
.res
(I
).eq
.'PHE'.or
.res
(I
).eq
.
1311 1 'HIS').and
.aname
(I
).eq
.' CD2') then
1314 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CG ')iat2
=I
+J
1315 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
)(3:4).eq
.'E2')iat3
=I
+J
1317 if(iat2
.gt
.0.and
.iat3
.gt
.0) goto 62
1318 else if((res
(I
).eq
.'TYR'.or
.res
(I
).eq
.'PHE').and
.aname
(I
).
1322 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CD1')iat2
=I
+J
1323 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CZ ')iat3
=I
+J
1325 if(iat2
.gt
.0.and
.iat3
.gt
.0) goto 62
1326 else if((res
(I
).eq
.'TYR'.or
.res
(I
).eq
.'PHE').and
.aname
(I
).
1330 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CD2')iat2
=I
+J
1331 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CZ ')iat3
=I
+J
1333 if(iat2
.gt
.0.and
.iat3
.gt
.0) goto 62
1334 else if((res
(I
).eq
.'PHE').and
.aname
(I
).eq
.' CZ ') then
1337 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CE1')iat2
=I
+J
1338 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CE2')iat3
=I
+J
1340 if(iat2
.gt
.0.and
.iat3
.gt
.0) goto 62
1341 else if(res
(I
).eq
.'HIS'.and
.aname
(I
).eq
.' CE1') then
1344 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' ND1')iat2
=I
+J
1345 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' NE2')iat3
=I
+J
1347 if(iat2
.gt
.0.and
.iat3
.gt
.0) goto 62
1348 else if(res
(I
).eq
.'TRP'.and
.aname
(I
).eq
.' CE3') then
1351 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CD2')iat2
=I
+J
1352 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CZ3')iat3
=I
+J
1354 if(iat2
.gt
.0.and
.iat3
.gt
.0) goto 62
1355 else if(res
(I
).eq
.'TRP'.and
.aname
(I
).eq
.' CZ3') then
1358 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CE3')iat2
=I
+J
1359 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CH2')iat3
=I
+J
1361 if(iat2
.gt
.0.and
.iat3
.gt
.0) goto 62
1362 else if(res
(I
).eq
.'TRP'.and
.aname
(I
).eq
.' CH2') then
1365 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CZ3')iat2
=I
+J
1366 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CZ2')iat3
=I
+J
1368 if(iat2
.gt
.0.and
.iat3
.gt
.0) goto 62
1369 else if(res
(I
).eq
.'TRP'.and
.aname
(I
).eq
.' CZ2') then
1372 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CH2')iat2
=I
+J
1373 if(ires
(I
+J
).eq
.ires
(I
).and
.aname
(I
+J
).eq
.' CE2')iat3
=I
+J
1375 if(iat2
.gt
.0.and
.iat3
.gt
.0) then
1376 62 iproton
=iproton
+1
1377 call addsp2
(x
,y
,z
,xh
,yh
,zh
,iproton
,iat1
,iat2
,iat3
,2)
1378 anameh
(iproton
)=' H '
1379 anameh
(iproton
)(3:4)=aname
(iat1
)(3:4)
1380 resh
(iproton
)=res
(iat1
)
1381 iresh
(iproton
)=ires
(iat1
)
1384 C presumably a heavy atom that doesn't have protons, or one
1385 C with exchangeable protons that I can't be bothered to do
1390 C===================================================================
1391 subroutine addsp2
(x
,y
,z
,xh
,yh
,zh
,Ih
,Iat1
,Iat2
,Iat3
,Ibond
)
1392 DIMENSION x
(5000),y
(5000),z
(5000)
1393 DIMENSION xh
(3000),yh
(3000),zh
(3000)
1394 DIMENSION r12
(3),u12
(3),r13
(3),u13
(3),r14
(3),u14
(3)
1395 C If Ibond=1, it's a NH bond, if Ibond=2 it's a CH (aromatic) bond
1396 if(Ibond
.eq
.1)blength
=0.98
1397 if(Ibond
.eq
.2)blength
=1.08
1398 r12
(1)=x
(Iat1
)-x
(Iat2
)
1399 r12
(2)=y
(Iat1
)-y
(Iat2
)
1400 r12
(3)=z
(Iat1
)-z
(Iat2
)
1401 call unitv
(r12
,u12
,d
)
1402 r13
(1)=x
(Iat1
)-x
(Iat3
)
1403 r13
(2)=y
(Iat1
)-y
(Iat3
)
1404 r13
(3)=z
(Iat1
)-z
(Iat3
)
1405 call unitv
(r13
,u13
,d
)
1406 r14
(1)=u12
(1)+u13
(1)
1407 r14
(2)=u12
(2)+u13
(2)
1408 r14
(3)=u12
(3)+u13
(3)
1409 call unitv
(r14
,u14
,d
)
1410 xh
(Ih
)=x
(Iat1
)+blength*u14
(1)
1411 yh
(Ih
)=y
(Iat1
)+blength*u14
(2)
1412 zh
(Ih
)=z
(Iat1
)+blength*u14
(3)
1415 C------------------------------------------------------------------
1416 subroutine addonesp3
(x
,y
,z
,xh
,yh
,zh
,Ih
,Iat1
,Iat2
,Iat3
,Iat4
)
1417 DIMENSION x
(5000),y
(5000),z
(5000)
1418 DIMENSION xh
(3000),yh
(3000),zh
(3000)
1419 DIMENSION r12
(3),u12
(3),r13
(3),u13
(3),r14
(3),u14
(3)
1420 DIMENSION r15
(3),u15
(3)
1422 r12
(1)=x
(Iat1
)-x
(Iat2
)
1423 r12
(2)=y
(Iat1
)-y
(Iat2
)
1424 r12
(3)=z
(Iat1
)-z
(Iat2
)
1425 call unitv
(r12
,u12
,d
)
1426 r13
(1)=x
(Iat1
)-x
(Iat3
)
1427 r13
(2)=y
(Iat1
)-y
(Iat3
)
1428 r13
(3)=z
(Iat1
)-z
(Iat3
)
1429 call unitv
(r13
,u13
,d
)
1430 r14
(1)=x
(Iat1
)-x
(Iat4
)
1431 r14
(2)=y
(Iat1
)-y
(Iat4
)
1432 r14
(3)=z
(Iat1
)-z
(Iat4
)
1433 call unitv
(r14
,u14
,d
)
1434 r15
(1)=u12
(1)+u13
(1)+u14
(1)
1435 r15
(2)=u12
(2)+u13
(2)+u14
(2)
1436 r15
(3)=u12
(3)+u13
(3)+u14
(3)
1437 call unitv
(r15
,u15
,d
)
1438 xh
(Ih
)=x
(Iat1
)+blength*u15
(1)
1439 yh
(Ih
)=y
(Iat1
)+blength*u15
(2)
1440 zh
(Ih
)=z
(Iat1
)+blength*u15
(3)
1443 C------------------------------------------------------------------
1444 subroutine addtwosp3
(x
,y
,z
,xh
,yh
,zh
,Ih
,Iat1
,Iat2
,Iat3
)
1445 C This is based on the GEN routine in VNMR (J. Hoch)
1446 DIMENSION x
(5000),y
(5000),z
(5000)
1447 DIMENSION xh
(3000),yh
(3000),zh
(3000)
1448 DIMENSION r12
(3),r13
(3),side
(3),us
(3)
1449 DIMENSION add
(3),uadd
(3),sub
(3),usub
(3)
1451 alpha
=54.75*3.14159/180. !H
-C
-H
=109.5
1452 r12
(1)=x
(Iat1
)-x
(Iat2
)
1453 r12
(2)=y
(Iat1
)-y
(Iat2
)
1454 r12
(3)=z
(Iat1
)-z
(Iat2
)
1455 r13
(1)=x
(Iat1
)-x
(Iat3
)
1456 r13
(2)=y
(Iat1
)-y
(Iat3
)
1457 r13
(3)=z
(Iat1
)-z
(Iat3
)
1458 sub
(1)=r12
(1)-r13
(1)
1459 sub
(2)=r12
(2)-r13
(2)
1460 sub
(3)=r12
(3)-r13
(3)
1461 call unitv
(sub
,usub
,d
)
1462 add
(1)=r12
(1)+r13
(1)
1463 add
(2)=r12
(2)+r13
(2)
1464 add
(3)=r12
(3)+r13
(3)
1465 call unitv
(add
,uadd
,d
)
1466 call vprod
(usub
,uadd
,side
,sintemp
,tmp
)
1467 call unitv
(side
,us
,d
)
1468 xh
(Ih
-1)=x
(Iat1
)+blength*
(uadd
(1)*cos
(alpha
)-us
(1)*sin
(alpha
))
1469 yh
(Ih
-1)=y
(Iat1
)+blength*
(uadd
(2)*cos
(alpha
)-us
(2)*sin
(alpha
))
1470 zh
(Ih
-1)=z
(Iat1
)+blength*
(uadd
(3)*cos
(alpha
)-us
(3)*sin
(alpha
))
1471 xh
(Ih
)=x
(Iat1
)+blength*
(uadd
(1)*cos
(alpha
)+us
(1)*sin
(alpha
))
1472 yh
(Ih
)=y
(Iat1
)+blength*
(uadd
(2)*cos
(alpha
)+us
(2)*sin
(alpha
))
1473 zh
(Ih
)=z
(Iat1
)+blength*
(uadd
(3)*cos
(alpha
)+us
(3)*sin
(alpha
))
1476 C------------------------------------------------------------------
1477 subroutine addthreesp3
(x
,y
,z
,xh
,yh
,zh
,Ih
,Iat1
,Iat2
,Iat3
)
1478 C This is based on the GEN routine in VNMR (J. Hoch)
1479 DIMENSION x
(5000),y
(5000),z
(5000)
1480 DIMENSION xh
(3000),yh
(3000),zh
(3000),twist
(3),utw
(3)
1481 DIMENSION r12
(3),u12
(3),r23
(3),perp
(3),side
(3),uside
(3)
1484 beta
=70.5*3.14159/180. !180-109.5
1487 cosgam
=0.866 !cos
(30)
1488 c The methyl protons should be staggered to Iat3
1489 r12
(1)=x
(Iat1
)-x
(Iat2
)
1490 r12
(2)=y
(Iat1
)-y
(Iat2
)
1491 r12
(3)=z
(Iat1
)-z
(Iat2
)
1492 call unitv
(r12
,u12
,d
)
1493 r23
(1)=x
(Iat2
)-x
(Iat3
)
1494 r23
(2)=y
(Iat2
)-y
(Iat3
)
1495 r23
(3)=z
(Iat2
)-z
(Iat3
)
1496 vert
=(r12
(1)*r23
(1)+r12
(2)*r23
(2)+r12
(3)*r23
(3))/d
1500 side
(1)=r23
(1)-perp
(1)
1501 side
(2)=r23
(2)-perp
(2)
1502 side
(3)=r23
(3)-perp
(3)
1503 call unitv
(side
,uside
,d
)
1504 call vprod
(u12
,uside
,twist
,sintemp
,tmp
)
1505 call unitv
(twist
,utw
,d
)
1506 u12
(1)=u12
(1)*cosbeta
1507 u12
(2)=u12
(2)*cosbeta
1508 u12
(3)=u12
(3)*cosbeta
1509 xh
(Ih
-2)=x
(Iat1
)+blength*
(u12
(1)+uside
(1)*sinbeta
)
1510 yh
(Ih
-2)=y
(Iat1
)+blength*
(u12
(2)+uside
(2)*sinbeta
)
1511 zh
(Ih
-2)=z
(Iat1
)+blength*
(u12
(3)+uside
(3)*sinbeta
)
1512 xh
(Ih
-1)=x
(Iat1
)+blength*
(u12
(1)-sinbeta*
(
1513 & uside
(1)/2.0-utw
(1)*cosgam
))
1514 yh
(Ih
-1)=y
(Iat1
)+blength*
(u12
(2)-sinbeta*
(
1515 & uside
(2)/2.0-utw
(2)*cosgam
))
1516 zh
(Ih
-1)=z
(Iat1
)+blength*
(u12
(3)-sinbeta*
(
1517 & uside
(3)/2.0-utw
(3)*cosgam
))
1518 C NB The /2.0 is actually *sin(30)
1519 xh
(Ih
)=x
(Iat1
)+blength*
(u12
(1)-sinbeta*
(
1520 & uside
(1)/2.0+utw
(1)*cosgam
))
1521 yh
(Ih
)=y
(Iat1
)+blength*
(u12
(2)-sinbeta*
(
1522 & uside
(2)/2.0+utw
(2)*cosgam
))
1523 zh
(Ih
)=z
(Iat1
)+blength*
(u12
(3)-sinbeta*
(
1524 & uside
(3)/2.0+utw
(3)*cosgam
))