3 C Read the parameters of the probability distributions of the virtual-bond
4 C valence angles and the side chains and energy parameters.
6 C Important! Energy-term weights ARE NOT read here; they are read from the
7 C main input file instead, because NO defaults have yet been set for these
10 implicit real*8 (a-h,o-z)
16 include 'COMMON.IOUNITS'
17 include 'COMMON.CHAIN'
18 include 'COMMON.INTERACT'
20 include 'COMMON.LOCAL'
21 include 'COMMON.TORSION'
22 include 'COMMON.SCCOR'
23 include 'COMMON.SCROT'
24 include 'COMMON.FFIELD'
25 include 'COMMON.NAMES'
26 include 'COMMON.SBRIDGE'
27 include 'COMMON.LAGRANGE'
29 include 'COMMON.LANGEVIN'
31 include 'COMMON.LANGEVIN.lang0'
33 include 'COMMON.SETUP'
34 include 'COMMON.CONTROL'
35 include 'COMMON.SHIELD'
37 character*1 onelett(4) /"G","A","P","D"/
38 character*1 toronelet(-2:2) /"p","a","G","A","P"/
40 dimension blower(3,3,maxlob)
43 character*3 lancuch,ucase
44 character*1000 weightcard
46 C For printing parameters after they are read set the following in the UNRES
49 C setenv PRINT_PARM YES
51 C To print parameters in LaTeX format rather than as ASCII tables:
55 call getenv_loc("PRINT_PARM",lancuch)
56 lprint = (ucase(lancuch).eq."YES" .or. ucase(lancuch).eq."Y")
57 call getenv_loc("LATEX",lancuch)
58 LaTeX = (ucase(lancuch).eq."YES" .or. ucase(lancuch).eq."Y")
60 dwa16=2.0d0**(1.0d0/6.0d0)
63 C Assign virtual-bond length
68 c Read the virtual-bond parameters, masses, and moments of inertia
69 c and Stokes radii of the peptide group and side chains
72 read (ibond,*) vbldp0,vbldpdum,akp,mp,ip,pstok
75 read (ibond,*) vbldsc0(1,i),aksc(1,i),msc(i),isc(i),restok(i)
80 dsc_inv(i)=1.0D0/dsc(i)
84 read (ibond,*) junk,vbldp0,vbldpdum,akp,rjunk,mp,ip,pstok
86 read (ibond,*) nbondterm(i),(vbldsc0(j,i),aksc(j,i),abond0(j,i),
87 & j=1,nbondterm(i)),msc(i),isc(i),restok(i)
92 dsc_inv(i)=1.0D0/dsc(i)
97 write(iout,'(/a/)')"Dynamic constants of the interaction sites:"
98 write (iout,'(a10,a3,6a10)') 'Type','N','VBL','K','A0','mass',
100 write(iout,'(a10,i3,6f10.5)') "p",1,vbldp0,akp,0.0d0,mp,ip,pstok
102 write (iout,'(a10,i3,6f10.5)') restyp(i),nbondterm(i),
103 & vbldsc0(1,i),aksc(1,i),abond0(1,i),msc(i),isc(i),restok(i)
105 write (iout,'(13x,3f10.5)')
106 & vbldsc0(j,i),aksc(j,i),abond0(j,i)
110 C reading lipid parameters
112 write (iout,*) "iliptranpar",iliptranpar
115 read(iliptranpar,*) pepliptran
117 read(iliptranpar,*) liptranene(i)
122 C Read the parameters of the probability distribution/energy expression
123 C of the virtual-bond valence angles theta
126 read (ithep,*,err=111,end=111) a0thet(i),(athet(j,i,1,1),j=1,2),
127 & (bthet(j,i,1,1),j=1,2)
128 read (ithep,*,err=111,end=111) (polthet(j,i),j=0,3)
129 read (ithep,*,err=111,end=111) (gthet(j,i),j=1,3)
130 read (ithep,*,err=111,end=111) theta0(i),sig0(i),sigc0(i)
134 athet(1,i,1,-1)=athet(1,i,1,1)
135 athet(2,i,1,-1)=athet(2,i,1,1)
136 bthet(1,i,1,-1)=-bthet(1,i,1,1)
137 bthet(2,i,1,-1)=-bthet(2,i,1,1)
138 athet(1,i,-1,1)=-athet(1,i,1,1)
139 athet(2,i,-1,1)=-athet(2,i,1,1)
140 bthet(1,i,-1,1)=bthet(1,i,1,1)
141 bthet(2,i,-1,1)=bthet(2,i,1,1)
145 athet(1,i,-1,-1)=athet(1,-i,1,1)
146 athet(2,i,-1,-1)=-athet(2,-i,1,1)
147 bthet(1,i,-1,-1)=bthet(1,-i,1,1)
148 bthet(2,i,-1,-1)=-bthet(2,-i,1,1)
149 athet(1,i,-1,1)=athet(1,-i,1,1)
150 athet(2,i,-1,1)=-athet(2,-i,1,1)
151 bthet(1,i,-1,1)=-bthet(1,-i,1,1)
152 bthet(2,i,-1,1)=bthet(2,-i,1,1)
153 athet(1,i,1,-1)=-athet(1,-i,1,1)
154 athet(2,i,1,-1)=athet(2,-i,1,1)
155 bthet(1,i,1,-1)=bthet(1,-i,1,1)
156 bthet(2,i,1,-1)=-bthet(2,-i,1,1)
161 polthet(j,i)=polthet(j,-i)
164 gthet(j,i)=gthet(j,-i)
172 & 'Parameters of the virtual-bond valence angles:'
173 write (iout,'(/a/9x,5a/79(1h-))') 'Fourier coefficients:',
174 & ' ATHETA0 ',' A1 ',' A2 ',
177 write(iout,'(a3,i4,2x,5(1pe14.5))') restyp(i),i,
178 & a0thet(i),(athet(j,i,1,1),j=1,2),(bthet(j,i,1,1),j=1,2)
180 write (iout,'(/a/9x,5a/79(1h-))')
181 & 'Parameters of the expression for sigma(theta_c):',
182 & ' ALPH0 ',' ALPH1 ',' ALPH2 ',
183 & ' ALPH3 ',' SIGMA0C '
185 write (iout,'(a3,i4,2x,5(1pe14.5))') restyp(i),i,
186 & (polthet(j,i),j=0,3),sigc0(i)
188 write (iout,'(/a/9x,5a/79(1h-))')
189 & 'Parameters of the second gaussian:',
190 & ' THETA0 ',' SIGMA0 ',' G1 ',
193 write (iout,'(a3,i4,2x,5(1pe14.5))') restyp(i),i,theta0(i),
194 & sig0(i),(gthet(j,i),j=1,3)
198 & 'Parameters of the virtual-bond valence angles:'
199 write (iout,'(/a/9x,5a/79(1h-))')
200 & 'Coefficients of expansion',
201 & ' theta0 ',' a1*10^2 ',' a2*10^2 ',
202 & ' b1*10^1 ',' b2*10^1 '
204 write(iout,'(a3,1h&,2x,5(f8.3,1h&))') restyp(i),
205 & a0thet(i),(100*athet(j,i,1,1),j=1,2),
206 & (10*bthet(j,i,1,1),j=1,2)
208 write (iout,'(/a/9x,5a/79(1h-))')
209 & 'Parameters of the expression for sigma(theta_c):',
210 & ' alpha0 ',' alph1 ',' alph2 ',
211 & ' alhp3 ',' sigma0c '
213 write (iout,'(a3,1h&,2x,5(1pe12.3,1h&))') restyp(i),
214 & (polthet(j,i),j=0,3),sigc0(i)
216 write (iout,'(/a/9x,5a/79(1h-))')
217 & 'Parameters of the second gaussian:',
218 & ' theta0 ',' sigma0*10^2 ',' G1*10^-1',
221 write (iout,'(a3,1h&,2x,5(f8.3,1h&))') restyp(i),theta0(i),
222 & 100*sig0(i),gthet(1,i)*0.1D0,gthet(2,i),gthet(3,i)*10.0D0
227 IF (tor_mode.eq.0) THEN
229 C Read the parameters of Utheta determined from ab initio surfaces
230 C Kozlowska et al., J. Phys.: Condens. Matter 19 (2007) 285203
232 read (ithep,*,err=111,end=111) nthetyp,ntheterm,ntheterm2,
233 & ntheterm3,nsingle,ndouble
234 write (iout,*) "ithep",ithep
236 nntheterm=max0(ntheterm,ntheterm2,ntheterm3)
237 read (ithep,*,err=111,end=111) (ithetyp(i),i=1,ntyp1)
239 ithetyp(i)=-ithetyp(-i)
242 do i=-maxthetyp,maxthetyp
243 do j=-maxthetyp,maxthetyp
244 do k=-maxthetyp,maxthetyp
245 aa0thet(i,j,k,iblock)=0.0d0
247 aathet(l,i,j,k,iblock)=0.0d0
251 bbthet(m,l,i,j,k,iblock)=0.0d0
252 ccthet(m,l,i,j,k,iblock)=0.0d0
253 ddthet(m,l,i,j,k,iblock)=0.0d0
254 eethet(m,l,i,j,k,iblock)=0.0d0
260 ffthet(mm,m,l,i,j,k,iblock)=0.0d0
261 ggthet(mm,m,l,i,j,k,iblock)=0.0d0
269 c VAR:iblock means terminally blocking group 1=non-proline 2=proline
271 c VAR:ntethtyp is type of theta potentials type currently 0=glycine
272 c VAR:1=non-glicyne non-proline 2=proline
273 c VAR:negative values for D-aminoacid
275 do j=-nthetyp,nthetyp
276 do k=-nthetyp,nthetyp
277 read (ithep,'(6a)',end=111,err=111) res1
278 read (ithep,*,end=111,err=111) aa0thet(i,j,k,iblock)
279 c VAR: aa0thet is variable describing the average value of Foureir
280 c VAR: expansion series
281 c VAR: aathet is foureir expansion in theta/2 angle for full formula
282 c VAR: look at the fitting equation in Kozlowska et al., J. Phys.:
283 Condens. Matter 19 (2007) 285203 and Sieradzan et al., unpublished
284 read (ithep,*,end=111,err=111)
285 &(aathet(l,i,j,k,iblock),l=1,ntheterm)
286 read (ithep,*,end=111,err=111)
287 & ((bbthet(lll,ll,i,j,k,iblock),lll=1,nsingle),
288 & (ccthet(lll,ll,i,j,k,iblock),lll=1,nsingle),
289 & (ddthet(lll,ll,i,j,k,iblock),lll=1,nsingle),
290 & (eethet(lll,ll,i,j,k,iblock),lll=1,nsingle),
292 read (ithep,*,end=111,err=111)
293 & (((ffthet(llll,lll,ll,i,j,k,iblock),
294 & ffthet(lll,llll,ll,i,j,k,iblock),
295 & ggthet(llll,lll,ll,i,j,k,iblock),
296 & ggthet(lll,llll,ll,i,j,k,iblock),
297 & llll=1,lll-1),lll=2,ndouble),ll=1,ntheterm3)
302 C For dummy ends assign glycine-type coefficients of theta-only terms; the
303 C coefficients of theta-and-gamma-dependent terms are zero.
304 C IF YOU WANT VALENCE POTENTIALS FOR DUMMY ATOM UNCOMENT BELOW (NOT
305 C RECOMENTDED AFTER VERSION 3.3)
309 c aathet(l,i,j,nthetyp+1,iblock)=aathet(l,i,j,1,iblock)
310 c aathet(l,nthetyp+1,i,j,iblock)=aathet(l,1,i,j,iblock)
312 c aa0thet(i,j,nthetyp+1,iblock)=aa0thet(i,j,1,iblock)
313 c aa0thet(nthetyp+1,i,j,iblock)=aa0thet(1,i,j,iblock)
316 c aathet(l,nthetyp+1,i,nthetyp+1,iblock)=aathet(l,1,i,1,iblock)
318 c aa0thet(nthetyp+1,i,nthetyp+1,iblock)=aa0thet(1,i,1,iblock)
321 C AND COMMENT THE LOOPS BELOW
325 aathet(l,i,j,nthetyp+1,iblock)=0.0d0
326 aathet(l,nthetyp+1,i,j,iblock)=0.0d0
328 aa0thet(i,j,nthetyp+1,iblock)=0.0d0
329 aa0thet(nthetyp+1,i,j,iblock)=0.0d0
332 aathet(l,nthetyp+1,i,nthetyp+1,iblock)=0.0d0
334 aa0thet(nthetyp+1,i,nthetyp+1,iblock)=0.0d0
338 C Substitution for D aminoacids from symmetry.
341 do j=-nthetyp,nthetyp
342 do k=-nthetyp,nthetyp
343 aa0thet(i,j,k,iblock)=aa0thet(-i,-j,-k,iblock)
345 aathet(l,i,j,k,iblock)=aathet(l,-i,-j,-k,iblock)
349 bbthet(lll,ll,i,j,k,iblock)=bbthet(lll,ll,-i,-j,-k,iblock)
350 ccthet(lll,ll,i,j,k,iblock)=-ccthet(lll,ll,-i,-j,-k,iblock)
351 ddthet(lll,ll,i,j,k,iblock)=ddthet(lll,ll,-i,-j,-k,iblock)
352 eethet(lll,ll,i,j,k,iblock)=-eethet(lll,ll,-i,-j,-k,iblock)
358 ffthet(llll,lll,ll,i,j,k,iblock)=
359 & ffthet(llll,lll,ll,-i,-j,-k,iblock)
360 ffthet(lll,llll,ll,i,j,k,iblock)=
361 & ffthet(lll,llll,ll,-i,-j,-k,iblock)
362 ggthet(llll,lll,ll,i,j,k,iblock)=
363 & -ggthet(llll,lll,ll,-i,-j,-k,iblock)
364 ggthet(lll,llll,ll,i,j,k,iblock)=
365 & -ggthet(lll,llll,ll,-i,-j,-k,iblock)
374 C Control printout of the coefficients of virtual-bond-angle potentials
377 write (iout,'(//a)') 'Parameter of virtual-bond-angle potential'
380 do j=-nthetyp,nthetyp
381 do k=-nthetyp,nthetyp
382 write (iout,'(//4a)')
383 & 'Type ',toronelet(i),toronelet(j),toronelet(k)
384 write (iout,'(//a,10x,a)') " l","a[l]"
385 write (iout,'(i2,1pe15.5)') 0,aa0thet(i,j,k,iblock)
386 write (iout,'(i2,1pe15.5)')
387 & (l,aathet(l,i,j,k,iblock),l=1,ntheterm)
389 write (iout,'(//2h m,4(9x,a,3h[m,,i1,1h]))')
390 & "b",l,"c",l,"d",l,"e",l
392 write (iout,'(i2,4(1pe15.5))') m,
393 & bbthet(m,l,i,j,k,iblock),ccthet(m,l,i,j,k,iblock),
394 & ddthet(m,l,i,j,k,iblock),eethet(m,l,i,j,k,iblock)
398 write (iout,'(//3hm,n,4(6x,a,5h[m,n,,i1,1h]))')
399 & "f+",l,"f-",l,"g+",l,"g-",l
402 write (iout,'(i1,1x,i1,4(1pe15.5))') n,m,
403 & ffthet(n,m,l,i,j,k,iblock),
404 & ffthet(m,n,l,i,j,k,iblock),
405 & ggthet(n,m,l,i,j,k,iblock),
406 & ggthet(m,n,l,i,j,k,iblock)
419 C here will be the apropriate recalibrating for D-aminoacid
420 read (ithep,*,end=121,err=121) nthetyp
421 do i=-nthetyp+1,nthetyp-1
422 read (ithep,*,end=121,err=121) nbend_kcc_Tb(i)
423 do j=0,nbend_kcc_Tb(i)
424 read (ithep,*,end=121,err=121) ijunk,v1bend_chyb(j,i)
429 & "Parameters of the valence-only potentials"
430 do i=-nthetyp+1,nthetyp-1
431 write (iout,'(2a)') "Type ",toronelet(i)
432 do k=0,nbend_kcc_Tb(i)
433 write(iout,'(i5,f15.5)') k,v1bend_chyb(k,i)
440 c write (2,*) "Start reading THETA_PDB",ithep_pdb
443 read (ithep_pdb,*,err=111,end=111)
444 & a0thet(i),(athet(j,i,1,1),j=1,2),
445 & (bthet(j,i,1,1),j=1,2)
446 read (ithep_pdb,*,err=111,end=111) (polthet(j,i),j=0,3)
447 read (ithep_pdb,*,err=111,end=111) (gthet(j,i),j=1,3)
448 read (ithep_pdb,*,err=111,end=111) theta0(i),sig0(i),sigc0(i)
452 athet(1,i,1,-1)=athet(1,i,1,1)
453 athet(2,i,1,-1)=athet(2,i,1,1)
454 bthet(1,i,1,-1)=-bthet(1,i,1,1)
455 bthet(2,i,1,-1)=-bthet(2,i,1,1)
456 athet(1,i,-1,1)=-athet(1,i,1,1)
457 athet(2,i,-1,1)=-athet(2,i,1,1)
458 bthet(1,i,-1,1)=bthet(1,i,1,1)
459 bthet(2,i,-1,1)=bthet(2,i,1,1)
463 athet(1,i,-1,-1)=athet(1,-i,1,1)
464 athet(2,i,-1,-1)=-athet(2,-i,1,1)
465 bthet(1,i,-1,-1)=bthet(1,-i,1,1)
466 bthet(2,i,-1,-1)=-bthet(2,-i,1,1)
467 athet(1,i,-1,1)=athet(1,-i,1,1)
468 athet(2,i,-1,1)=-athet(2,-i,1,1)
469 bthet(1,i,-1,1)=-bthet(1,-i,1,1)
470 bthet(2,i,-1,1)=bthet(2,-i,1,1)
471 athet(1,i,1,-1)=-athet(1,-i,1,1)
472 athet(2,i,1,-1)=athet(2,-i,1,1)
473 bthet(1,i,1,-1)=bthet(1,-i,1,1)
474 bthet(2,i,1,-1)=-bthet(2,-i,1,1)
479 polthet(j,i)=polthet(j,-i)
482 gthet(j,i)=gthet(j,-i)
485 c write (2,*) "End reading THETA_PDB"
491 C Read the parameters of the probability distribution/energy expression
492 C of the side chains.
495 read (irotam,'(3x,i3,f8.3)',end=112,err=112) nlob(i),dsc(i)
499 dsc_inv(i)=1.0D0/dsc(i)
510 read(irotam,*,end=112,err=112)(censc(k,1,i),k=1,3),
511 & ((blower(k,l,1),l=1,k),k=1,3)
512 censc(1,1,-i)=censc(1,1,i)
513 censc(2,1,-i)=censc(2,1,i)
514 censc(3,1,-i)=-censc(3,1,i)
516 read (irotam,*,end=112,err=112) bsc(j,i)
517 read (irotam,*,end=112,err=112) (censc(k,j,i),k=1,3),
518 & ((blower(k,l,j),l=1,k),k=1,3)
519 censc(1,j,-i)=censc(1,j,i)
520 censc(2,j,-i)=censc(2,j,i)
521 censc(3,j,-i)=-censc(3,j,i)
522 C BSC is amplitude of Gaussian
529 akl=akl+blower(k,m,j)*blower(l,m,j)
533 if (((k.eq.3).and.(l.ne.3))
534 & .or.((l.eq.3).and.(k.ne.3))) then
535 gaussc(k,l,j,-i)=-akl
536 gaussc(l,k,j,-i)=-akl
548 write (iout,'(/a)') 'Parameters of side-chain local geometry'
553 write (iout,'(/3a,i2,a,f8.3)') 'Residue type: ',restyp(i),
554 & ' # of gaussian lobes:',nlobi,' dsc:',dsc(i)
555 write (iout,'(1h&,a,3(2h&&,f8.3,2h&&))')
556 & 'log h',(bsc(j,i),j=1,nlobi)
557 write (iout,'(1h&,a,3(1h&,f8.3,1h&,f8.3,1h&,f8.3,1h&))')
558 & 'x',((censc(k,j,i),k=1,3),j=1,nlobi)
560 write (iout,'(2h& ,5(2x,1h&,3(f7.3,1h&)))')
561 & ((gaussc(k,l,j,i),l=1,3),j=1,nlobi)
564 write (iout,'(/a,8x,i1,4(25x,i1))') 'Lobe:',(j,j=1,nlobi)
565 write (iout,'(a,f10.4,4(16x,f10.4))')
566 & 'Center ',(bsc(j,i),j=1,nlobi)
567 write (iout,'(5(2x,3f8.4))') ((censc(k,j,i),k=1,3),
576 C Read scrot parameters for potentials determined from all-atom AM1 calculations
577 C added by Urszula Kozlowska 07/11/2007
580 read (irotam,*,end=112,err=112)
582 read (irotam,*,end=112,err=112)
585 read(irotam,*,end=112,err=112) sc_parmin(j,i)
590 C Read the parameters of the probability distribution/energy expression
591 C of the side chains.
593 write (2,*) "Start reading ROTAM_PDB"
595 read (irotam_pdb,'(3x,i3,f8.3)',end=112,err=112) nlob(i),dsc(i)
599 dsc_inv(i)=1.0D0/dsc(i)
610 read(irotam_pdb,*,end=112,err=112)(censc(k,1,i),k=1,3),
611 & ((blower(k,l,1),l=1,k),k=1,3)
613 read (irotam_pdb,*,end=112,err=112) bsc(j,i)
614 read (irotam_pdb,*,end=112,err=112) (censc(k,j,i),k=1,3),
615 & ((blower(k,l,j),l=1,k),k=1,3)
622 akl=akl+blower(k,m,j)*blower(l,m,j)
632 write (2,*) "End reading ROTAM_PDB"
636 C 9/18/99 (AL) Read coefficients of the Fourier expansion of the local
637 C interaction energy of the Gly, Ala, and Pro prototypes.
639 read (ifourier,*) nloctyp
640 SPLIT_FOURIERTOR = nloctyp.lt.0
641 nloctyp = iabs(nloctyp)
643 read (ifourier,*,end=115,err=115) (itype2loc(i),i=1,ntyp)
644 read (ifourier,*,end=115,err=115) (iloctyp(i),i=0,nloctyp-1)
645 itype2loc(ntyp1)=nloctyp
646 iloctyp(nloctyp)=ntyp1
648 itype2loc(-i)=-itype2loc(i)
657 iloctyp(-i)=-iloctyp(i)
659 c write (iout,*) "itype2loc",(itype2loc(i),i=1,ntyp1)
660 c write (iout,*) "nloctyp",nloctyp,
661 c & " iloctyp",(iloctyp(i),i=0,nloctyp)
664 c write (iout,*) "NEWCORR",i
665 read (ifourier,*,end=115,err=115)
668 read (ifourier,*,end=115,err=115) bnew1(ii,j,i)
671 c write (iout,*) "NEWCORR BNEW1"
672 c write (iout,*) ((bnew1(ii,j,i),ii=1,3),j=1,2)
675 read (ifourier,*,end=115,err=115) bnew2(ii,j,i)
678 c write (iout,*) "NEWCORR BNEW2"
679 c write (iout,*) ((bnew2(ii,j,i),ii=1,3),j=1,2)
681 read (ifourier,*,end=115,err=115) ccnew(kk,1,i)
682 read (ifourier,*,end=115,err=115) ccnew(kk,2,i)
684 c write (iout,*) "NEWCORR CCNEW"
685 c write (iout,*) ((ccnew(ii,j,i),ii=1,3),j=1,2)
687 read (ifourier,*,end=115,err=115) ddnew(kk,1,i)
688 read (ifourier,*,end=115,err=115) ddnew(kk,2,i)
690 c write (iout,*) "NEWCORR DDNEW"
691 c write (iout,*) ((ddnew(ii,j,i),ii=1,3),j=1,2)
695 read (ifourier,*,end=115,err=115) eenew(ii,jj,kk,i)
699 c write (iout,*) "NEWCORR EENEW1"
700 c write(iout,*)(((eenew(ii,jj,kk,i),kk=1,2),jj=1,2),ii=1,2)
702 read (ifourier,*,end=115,err=115) e0new(ii,i)
704 c write (iout,*) (e0new(ii,i),ii=1,3)
706 c write (iout,*) "NEWCORR EENEW"
709 ccnew(ii,1,i)=ccnew(ii,1,i)/2
710 ccnew(ii,2,i)=ccnew(ii,2,i)/2
711 ddnew(ii,1,i)=ddnew(ii,1,i)/2
712 ddnew(ii,2,i)=ddnew(ii,2,i)/2
717 bnew1(ii,1,-i)= bnew1(ii,1,i)
718 bnew1(ii,2,-i)=-bnew1(ii,2,i)
719 bnew2(ii,1,-i)= bnew2(ii,1,i)
720 bnew2(ii,2,-i)=-bnew2(ii,2,i)
723 c ccnew(ii,1,i)=ccnew(ii,1,i)/2
724 c ccnew(ii,2,i)=ccnew(ii,2,i)/2
725 c ddnew(ii,1,i)=ddnew(ii,1,i)/2
726 c ddnew(ii,2,i)=ddnew(ii,2,i)/2
727 ccnew(ii,1,-i)=ccnew(ii,1,i)
728 ccnew(ii,2,-i)=-ccnew(ii,2,i)
729 ddnew(ii,1,-i)=ddnew(ii,1,i)
730 ddnew(ii,2,-i)=-ddnew(ii,2,i)
732 e0new(1,-i)= e0new(1,i)
733 e0new(2,-i)=-e0new(2,i)
734 e0new(3,-i)=-e0new(3,i)
736 eenew(kk,1,1,-i)= eenew(kk,1,1,i)
737 eenew(kk,1,2,-i)=-eenew(kk,1,2,i)
738 eenew(kk,2,1,-i)=-eenew(kk,2,1,i)
739 eenew(kk,2,2,-i)= eenew(kk,2,2,i)
743 write (iout,'(a)') "Coefficients of the multibody terms"
744 do i=-nloctyp+1,nloctyp-1
745 write (iout,*) "Type: ",onelet(iloctyp(i))
746 write (iout,*) "Coefficients of the expansion of B1"
748 write (iout,'(3hB1(,i1,1h),3f10.5)') j,(bnew1(k,j,i),k=1,3)
750 write (iout,*) "Coefficients of the expansion of B2"
752 write (iout,'(3hB2(,i1,1h),3f10.5)') j,(bnew2(k,j,i),k=1,3)
754 write (iout,*) "Coefficients of the expansion of C"
755 write (iout,'(3hC11,3f10.5)') (ccnew(j,1,i),j=1,3)
756 write (iout,'(3hC12,3f10.5)') (ccnew(j,2,i),j=1,3)
757 write (iout,*) "Coefficients of the expansion of D"
758 write (iout,'(3hD11,3f10.5)') (ddnew(j,1,i),j=1,3)
759 write (iout,'(3hD12,3f10.5)') (ddnew(j,2,i),j=1,3)
760 write (iout,*) "Coefficients of the expansion of E"
761 write (iout,'(2hE0,3f10.5)') (e0new(j,i),j=1,3)
764 write (iout,'(1hE,2i1,2f10.5)') j,k,(eenew(l,j,k,i),l=1,2)
769 IF (SPLIT_FOURIERTOR) THEN
771 c write (iout,*) "NEWCORR TOR",i
772 read (ifourier,*,end=115,err=115)
775 read (ifourier,*,end=115,err=115) bnew1tor(ii,j,i)
778 c write (iout,*) "NEWCORR BNEW1 TOR"
779 c write (iout,*) ((bnew1tor(ii,j,i),ii=1,3),j=1,2)
782 read (ifourier,*,end=115,err=115) bnew2tor(ii,j,i)
785 c write (iout,*) "NEWCORR BNEW2 TOR"
786 c write (iout,*) ((bnew2tor(ii,j,i),ii=1,3),j=1,2)
788 read (ifourier,*,end=115,err=115) ccnewtor(kk,1,i)
789 read (ifourier,*,end=115,err=115) ccnewtor(kk,2,i)
791 c write (iout,*) "NEWCORR CCNEW TOR"
792 c write (iout,*) ((ccnew(ii,j,i),ii=1,3),j=1,2)
794 read (ifourier,*,end=115,err=115) ddnewtor(kk,1,i)
795 read (ifourier,*,end=115,err=115) ddnewtor(kk,2,i)
797 c write (iout,*) "NEWCORR DDNEW TOR"
798 c write (iout,*) ((ddnewtor(ii,j,i),ii=1,3),j=1,2)
802 read (ifourier,*,end=115,err=115) eenewtor(ii,jj,kk,i)
806 c write (iout,*) "NEWCORR EENEW1 TOR"
807 c write(iout,*)(((eenewtor(ii,jj,kk,i),kk=1,2),jj=1,2),ii=1,2)
809 read (ifourier,*,end=115,err=115) e0newtor(ii,i)
811 c write (iout,*) (e0newtor(ii,i),ii=1,3)
813 c write (iout,*) "NEWCORR EENEW TOR"
816 ccnewtor(ii,1,i)=ccnewtor(ii,1,i)/2
817 ccnewtor(ii,2,i)=ccnewtor(ii,2,i)/2
818 ddnewtor(ii,1,i)=ddnewtor(ii,1,i)/2
819 ddnewtor(ii,2,i)=ddnewtor(ii,2,i)/2
824 bnew1tor(ii,1,-i)= bnew1tor(ii,1,i)
825 bnew1tor(ii,2,-i)=-bnew1tor(ii,2,i)
826 bnew2tor(ii,1,-i)= bnew2tor(ii,1,i)
827 bnew2tor(ii,2,-i)=-bnew2tor(ii,2,i)
830 ccnewtor(ii,1,-i)=ccnewtor(ii,1,i)
831 ccnewtor(ii,2,-i)=-ccnewtor(ii,2,i)
832 ddnewtor(ii,1,-i)=ddnewtor(ii,1,i)
833 ddnewtor(ii,2,-i)=-ddnewtor(ii,2,i)
835 e0newtor(1,-i)= e0newtor(1,i)
836 e0newtor(2,-i)=-e0newtor(2,i)
837 e0newtor(3,-i)=-e0newtor(3,i)
839 eenewtor(kk,1,1,-i)= eenewtor(kk,1,1,i)
840 eenewtor(kk,1,2,-i)=-eenewtor(kk,1,2,i)
841 eenewtor(kk,2,1,-i)=-eenewtor(kk,2,1,i)
842 eenewtor(kk,2,2,-i)= eenewtor(kk,2,2,i)
847 & "Single-body coefficients of the torsional potentials"
848 do i=-nloctyp+1,nloctyp-1
849 write (iout,*) "Type: ",onelet(iloctyp(i))
850 write (iout,*) "Coefficients of the expansion of B1tor"
852 write (iout,'(3hB1(,i1,1h),3f10.5)')
853 & j,(bnew1tor(k,j,i),k=1,3)
855 write (iout,*) "Coefficients of the expansion of B2tor"
857 write (iout,'(3hB2(,i1,1h),3f10.5)')
858 & j,(bnew2tor(k,j,i),k=1,3)
860 write (iout,*) "Coefficients of the expansion of Ctor"
861 write (iout,'(3hC11,3f10.5)') (ccnewtor(j,1,i),j=1,3)
862 write (iout,'(3hC12,3f10.5)') (ccnewtor(j,2,i),j=1,3)
863 write (iout,*) "Coefficients of the expansion of Dtor"
864 write (iout,'(3hD11,3f10.5)') (ddnewtor(j,1,i),j=1,3)
865 write (iout,'(3hD12,3f10.5)') (ddnewtor(j,2,i),j=1,3)
866 write (iout,*) "Coefficients of the expansion of Etor"
867 write (iout,'(2hE0,3f10.5)') (e0newtor(j,i),j=1,3)
870 write (iout,'(1hE,2i1,2f10.5)')
871 & j,k,(eenewtor(l,j,k,i),l=1,2)
877 do i=-nloctyp+1,nloctyp-1
880 bnew1tor(ii,j,i)=bnew1(ii,j,i)
885 bnew2tor(ii,j,i)=bnew2(ii,j,i)
889 ccnewtor(ii,1,i)=ccnew(ii,1,i)
890 ccnewtor(ii,2,i)=ccnew(ii,2,i)
891 ddnewtor(ii,1,i)=ddnew(ii,1,i)
892 ddnewtor(ii,2,i)=ddnew(ii,2,i)
895 ENDIF !SPLIT_FOURIER_TOR
898 & write (iout,*) "Coefficients of the expansion of Eloc(l1,l2)"
900 read (ifourier,*,end=115,err=115)
901 read (ifourier,*,end=115,err=115) (b(ii,i),ii=1,13)
903 write (iout,*) 'Type ',onelet(iloctyp(i))
904 write (iout,'(a,i2,a,f10.5)') ('b(',ii,')=',b(ii,i),ii=1,13)
918 c B1tilde(1,i) = b(3)
919 c B1tilde(2,i) =-b(5)
920 c B1tilde(1,-i) =-b(3)
921 c B1tilde(2,-i) =b(5)
928 cc B1tilde(1,i) = b(3,i)
929 cc B1tilde(2,i) =-b(5,i)
930 C B1tilde(1,-i) =-b(3,i)
931 C B1tilde(2,-i) =b(5,i)
932 cc b1tilde(1,i)=0.0d0
933 cc b1tilde(2,i)=0.0d0
945 CCold(1,1,-i)= b(7,i)
946 CCold(2,2,-i)=-b(7,i)
947 CCold(2,1,-i)=-b(9,i)
948 CCold(1,2,-i)=-b(9,i)
953 c Ctilde(1,1,i)= CCold(1,1,i)
954 c Ctilde(1,2,i)= CCold(1,2,i)
955 c Ctilde(2,1,i)=-CCold(2,1,i)
956 c Ctilde(2,2,i)=-CCold(2,2,i)
958 c Ctilde(1,1,i)=0.0d0
959 c Ctilde(1,2,i)=0.0d0
960 c Ctilde(2,1,i)=0.0d0
961 c Ctilde(2,2,i)=0.0d0
966 DDold(1,1,-i)= b(6,i)
967 DDold(2,2,-i)=-b(6,i)
968 DDold(2,1,-i)=-b(8,i)
969 DDold(1,2,-i)=-b(8,i)
974 c Dtilde(1,1,i)= DD(1,1,i)
975 c Dtilde(1,2,i)= DD(1,2,i)
976 c Dtilde(2,1,i)=-DD(2,1,i)
977 c Dtilde(2,2,i)=-DD(2,2,i)
979 c Dtilde(1,1,i)=0.0d0
980 c Dtilde(1,2,i)=0.0d0
981 c Dtilde(2,1,i)=0.0d0
982 c Dtilde(2,2,i)=0.0d0
983 EEold(1,1,i)= b(10,i)+b(11,i)
984 EEold(2,2,i)=-b(10,i)+b(11,i)
985 EEold(2,1,i)= b(12,i)-b(13,i)
986 EEold(1,2,i)= b(12,i)+b(13,i)
987 EEold(1,1,-i)= b(10,i)+b(11,i)
988 EEold(2,2,-i)=-b(10,i)+b(11,i)
989 EEold(2,1,-i)=-b(12,i)+b(13,i)
990 EEold(1,2,-i)=-b(12,i)-b(13,i)
991 write(iout,*) "TU DOCHODZE"
997 c ee(2,1,i)=ee(1,2,i)
1002 &"Coefficients of the cumulants (independent of valence angles)"
1003 do i=-nloctyp+1,nloctyp-1
1004 write (iout,*) 'Type ',onelet(iloctyp(i))
1006 write(iout,'(2f10.5)') B(3,i),B(5,i)
1008 write(iout,'(2f10.5)') B(2,i),B(4,i)
1011 write (iout,'(2f10.5)') CCold(j,1,i),CCold(j,2,i)
1015 write (iout,'(2f10.5)') DDold(j,1,i),DDold(j,2,i)
1019 write (iout,'(2f10.5)') EEold(j,1,i),EEold(j,2,i)
1027 C Read torsional parameters in old format
1029 read (itorp,*,end=113,err=113) ntortyp,nterm_old
1030 if (lprint)write (iout,*) 'ntortyp,nterm',ntortyp,nterm_old
1031 read (itorp,*,end=113,err=113) (itortyp(i),i=1,ntyp)
1036 read (itorp,*,end=113,err=113) kk,v1(k,j,i),v2(k,j,i)
1042 write (iout,'(/a/)') 'Torsional constants:'
1045 write (iout,'(2i3,6f10.5)') i,j,(v1(k,i,j),k=1,nterm_old)
1046 write (iout,'(6x,6f10.5)') (v2(k,i,j),k=1,nterm_old)
1052 C Read torsional parameters
1054 IF (TOR_MODE.eq.0) THEN
1056 read (itorp,*,end=113,err=113) ntortyp
1057 read (itorp,*,end=113,err=113) (itortyp(i),i=1,ntyp)
1059 itype2loc(i)=itortyp(i)
1062 itype2loc(-i)=-itype2loc(i)
1064 itortyp(ntyp1)=ntortyp
1067 itortyp(i)=-itortyp(-i)
1069 write (iout,*) 'ntortyp',ntortyp
1071 do j=-ntortyp+1,ntortyp-1
1072 read (itorp,*,end=113,err=113) nterm(i,j,iblock),
1074 nterm(-i,-j,iblock)=nterm(i,j,iblock)
1075 nlor(-i,-j,iblock)=nlor(i,j,iblock)
1078 do k=1,nterm(i,j,iblock)
1079 read (itorp,*,end=113,err=113) kk,v1(k,i,j,iblock),
1081 v1(k,-i,-j,iblock)=v1(k,i,j,iblock)
1082 v2(k,-i,-j,iblock)=-v2(k,i,j,iblock)
1083 v0ij=v0ij+si*v1(k,i,j,iblock)
1085 c write(iout,*) i,j,k,iblock,nterm(i,j,iblock)
1086 c write(iout,*) v1(k,-i,-j,iblock),v1(k,i,j,iblock),
1087 c &v2(k,-i,-j,iblock),v2(k,i,j,iblock)
1089 do k=1,nlor(i,j,iblock)
1090 read (itorp,*,end=113,err=113) kk,vlor1(k,i,j),
1091 & vlor2(k,i,j),vlor3(k,i,j)
1092 v0ij=v0ij+vlor1(k,i,j)/(1+vlor3(k,i,j)**2)
1095 v0(-i,-j,iblock)=v0ij
1101 write (iout,'(/a/)') 'Parameters of the SCCOR potentials:'
1104 do j=-ntortyp+1,ntortyp-1
1105 write (iout,*) 'ityp',i,' jtyp',j
1106 write (iout,*) 'Fourier constants'
1107 do k=1,nterm(i,j,iblock)
1108 write (iout,'(2(1pe15.5))') v1(k,i,j,iblock),
1111 write (iout,*) 'Lorenz constants'
1112 do k=1,nlor(i,j,iblock)
1113 write (iout,'(3(1pe15.5))')
1114 & vlor1(k,i,j),vlor2(k,i,j),vlor3(k,i,j)
1122 C 6/23/01 Read parameters for double torsionals
1126 do j=-ntortyp+1,ntortyp-1
1127 do k=-ntortyp+1,ntortyp-1
1128 read (itordp,'(3a1)',end=114,err=114) t1,t2,t3
1129 c write (iout,*) "OK onelett",
1132 if (t1.ne.toronelet(i) .or. t2.ne.toronelet(j)
1133 & .or. t3.ne.toronelet(k)) then
1134 write (iout,*) "Error in double torsional parameter file",
1137 call MPI_Finalize(Ierror)
1139 stop "Error in double torsional parameter file"
1141 read (itordp,*,end=114,err=114) ntermd_1(i,j,k,iblock),
1142 & ntermd_2(i,j,k,iblock)
1143 ntermd_1(-i,-j,-k,iblock)=ntermd_1(i,j,k,iblock)
1144 ntermd_2(-i,-j,-k,iblock)=ntermd_2(i,j,k,iblock)
1145 read (itordp,*,end=114,err=114) (v1c(1,l,i,j,k,iblock),l=1,
1146 & ntermd_1(i,j,k,iblock))
1147 read (itordp,*,end=114,err=114) (v1s(1,l,i,j,k,iblock),l=1,
1148 & ntermd_1(i,j,k,iblock))
1149 read (itordp,*,end=114,err=114) (v1c(2,l,i,j,k,iblock),l=1,
1150 & ntermd_1(i,j,k,iblock))
1151 read (itordp,*,end=114,err=114) (v1s(2,l,i,j,k,iblock),l=1,
1152 & ntermd_1(i,j,k,iblock))
1153 C Martix of D parameters for one dimesional foureir series
1154 do l=1,ntermd_1(i,j,k,iblock)
1155 v1c(1,l,-i,-j,-k,iblock)=v1c(1,l,i,j,k,iblock)
1156 v1s(1,l,-i,-j,-k,iblock)=-v1s(1,l,i,j,k,iblock)
1157 v1c(2,l,-i,-j,-k,iblock)=v1c(2,l,i,j,k,iblock)
1158 v1s(2,l,-i,-j,-k,iblock)=-v1s(2,l,i,j,k,iblock)
1159 c write(iout,*) "whcodze" ,
1160 c & v1s(2,l,-i,-j,-k,iblock),v1s(2,l,i,j,k,iblock)
1162 read (itordp,*,end=114,err=114) ((v2c(l,m,i,j,k,iblock),
1163 & v2c(m,l,i,j,k,iblock),v2s(l,m,i,j,k,iblock),
1164 & v2s(m,l,i,j,k,iblock),
1165 & m=1,l-1),l=1,ntermd_2(i,j,k,iblock))
1166 C Martix of D parameters for two dimesional fourier series
1167 do l=1,ntermd_2(i,j,k,iblock)
1169 v2c(l,m,-i,-j,-k,iblock)=v2c(l,m,i,j,k,iblock)
1170 v2c(m,l,-i,-j,-k,iblock)=v2c(m,l,i,j,k,iblock)
1171 v2s(l,m,-i,-j,-k,iblock)=-v2s(l,m,i,j,k,iblock)
1172 v2s(m,l,-i,-j,-k,iblock)=-v2s(m,l,i,j,k,iblock)
1181 write (iout,*) 'Constants for double torsionals'
1184 do j=-ntortyp+1,ntortyp-1
1185 do k=-ntortyp+1,ntortyp-1
1186 write (iout,*) 'ityp',i,' jtyp',j,' ktyp',k,
1187 & ' nsingle',ntermd_1(i,j,k,iblock),
1188 & ' ndouble',ntermd_2(i,j,k,iblock)
1190 write (iout,*) 'Single angles:'
1191 do l=1,ntermd_1(i,j,k,iblock)
1192 write (iout,'(i5,2f10.5,5x,2f10.5,5x,2f10.5)') l,
1193 & v1c(1,l,i,j,k,iblock),v1s(1,l,i,j,k,iblock),
1194 & v1c(2,l,i,j,k,iblock),v1s(2,l,i,j,k,iblock),
1195 & v1s(1,l,-i,-j,-k,iblock),v1s(2,l,-i,-j,-k,iblock)
1198 write (iout,*) 'Pairs of angles:'
1199 write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k,iblock))
1200 do l=1,ntermd_2(i,j,k,iblock)
1201 write (iout,'(i5,20f10.5)')
1202 & l,(v2c(l,m,i,j,k,iblock),m=1,ntermd_2(i,j,k,iblock))
1205 write (iout,'(3x,20i10)') (l,l=1,ntermd_2(i,j,k,iblock))
1206 do l=1,ntermd_2(i,j,k,iblock)
1207 write (iout,'(i5,20f10.5)')
1208 & l,(v2s(l,m,i,j,k,iblock),m=1,ntermd_2(i,j,k,iblock)),
1209 & (v2s(l,m,-i,-j,-k,iblock),m=1,ntermd_2(i,j,k,iblock))
1218 ELSE IF (TOR_MODE.eq.1) THEN
1220 C read valence-torsional parameters
1221 read (itorp,*,end=121,err=121) ntortyp
1223 write (iout,*) "Valence-torsional parameters read in ntortyp",
1225 read (itorp,*,end=121,err=121) (itortyp(i),i=1,ntyp)
1226 write (iout,*) "itortyp_kcc",(itortyp(i),i=1,ntyp)
1229 itype2loc(i)=itortyp(i)
1233 itortyp(i)=-itortyp(-i)
1235 do i=-ntortyp+1,ntortyp-1
1236 do j=-ntortyp+1,ntortyp-1
1237 C first we read the cos and sin gamma parameters
1238 read (itorp,'(13x,a)',end=121,err=121) string
1239 write (iout,*) i,j,string
1240 read (itorp,*,end=121,err=121)
1241 & nterm_kcc(j,i),nterm_kcc_Tb(j,i)
1242 C read (itorkcc,*,end=121,err=121) nterm_kcc_Tb(j,i)
1243 do k=1,nterm_kcc(j,i)
1244 do l=1,nterm_kcc_Tb(j,i)
1245 do ll=1,nterm_kcc_Tb(j,i)
1246 read (itorp,*,end=121,err=121) ii,jj,kk,
1247 & v1_kcc(ll,l,k,j,i),v2_kcc(ll,l,k,j,i)
1255 c AL 4/8/16: Calculate coefficients from one-body parameters
1258 itortyp(i)=itype2loc(i)
1261 &"Val-tor parameters calculated from cumulant coefficients ntortyp"
1263 do i=-ntortyp+1,ntortyp-1
1264 do j=-ntortyp+1,ntortyp-1
1267 do k=1,nterm_kcc_Tb(j,i)
1268 do l=1,nterm_kcc_Tb(j,i)
1269 v1_kcc(k,l,1,i,j)=bnew1tor(k,1,i)*bnew2tor(l,1,j)
1270 & +bnew1tor(k,2,i)*bnew2tor(l,2,j)
1271 v2_kcc(k,l,1,i,j)=bnew1tor(k,1,i)*bnew2tor(l,2,j)
1272 & +bnew1tor(k,2,i)*bnew2tor(l,1,j)
1275 do k=1,nterm_kcc_Tb(j,i)
1276 do l=1,nterm_kcc_Tb(j,i)
1278 v1_kcc(k,l,2,i,j)=-(ccnewtor(k,1,i)*ddnewtor(l,1,j)
1279 & -ccnewtor(k,2,i)*ddnewtor(l,2,j))
1280 v2_kcc(k,l,2,i,j)=-(ccnewtor(k,2,i)*ddnewtor(l,1,j)
1281 & +ccnewtor(k,1,i)*ddnewtor(l,2,j))
1283 v1_kcc(k,l,2,i,j)=-0.25*(ccnewtor(k,1,i)*ddnewtor(l,1,j)
1284 & -ccnewtor(k,2,i)*ddnewtor(l,2,j))
1285 v2_kcc(k,l,2,i,j)=-0.25*(ccnewtor(k,2,i)*ddnewtor(l,1,j)
1286 & +ccnewtor(k,1,i)*ddnewtor(l,2,j))
1290 c f(theta,gamma)=-(b21(theta)*b11(theta)+b12(theta)*b22(theta))*cos(gamma)-(b22(theta)*b11(theta)+b21(theta)*b12(theta))*sin(gamma)+(c11(theta)*d11(theta)-c12(theta)*d12(theta))*cos(2*gamma)+(c12(theta)*d11(theta)+c11(theta)*d12(theta))*sin(2*gamma)
1294 write (iout,*) "TOR_MODE>1 only with NEWCORR"
1299 if (tor_mode.gt.0 .and. lprint) then
1300 c Print valence-torsional parameters
1302 & "Parameters of the valence-torsional potentials"
1303 do i=-ntortyp+1,ntortyp-1
1304 do j=-ntortyp+1,ntortyp-1
1305 write (iout,'(3a)') "Type ",toronelet(i),toronelet(j)
1306 write (iout,'(3a5,2a15)') "itor","ival","jval","v_kcc","v2_kcc"
1307 do k=1,nterm_kcc(j,i)
1308 do l=1,nterm_kcc_Tb(j,i)
1309 do ll=1,nterm_kcc_Tb(j,i)
1310 write (iout,'(3i5,2f15.4)')
1311 & k,l-1,ll-1,v1_kcc(ll,l,k,j,i),v2_kcc(ll,l,k,j,i)
1320 C Read of Side-chain backbone correlation parameters
1321 C Modified 11 May 2012 by Adasko
1324 read (isccor,*,end=119,err=119) nsccortyp
1326 read (isccor,*,end=119,err=119) (isccortyp(i),i=1,ntyp)
1328 isccortyp(i)=-isccortyp(-i)
1330 iscprol=isccortyp(20)
1331 c write (iout,*) 'ntortyp',ntortyp
1333 cc maxinter is maximum interaction sites
1337 read (isccor,*,end=119,err=119)
1338 &nterm_sccor(i,j),nlor_sccor(i,j)
1344 nterm_sccor(-i,j)=nterm_sccor(i,j)
1345 nterm_sccor(-i,-j)=nterm_sccor(i,j)
1346 nterm_sccor(i,-j)=nterm_sccor(i,j)
1347 do k=1,nterm_sccor(i,j)
1348 read (isccor,*,end=119,err=119) kk,v1sccor(k,l,i,j)
1350 if (j.eq.iscprol) then
1351 if (i.eq.isccortyp(10)) then
1352 v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)
1353 v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
1355 v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)*0.5d0
1356 & +v2sccor(k,l,i,j)*dsqrt(0.75d0)
1357 v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)*0.5d0
1358 & +v1sccor(k,l,i,j)*dsqrt(0.75d0)
1359 v1sccor(k,l,-i,-j)=v1sccor(k,l,i,j)
1360 v2sccor(k,l,-i,-j)=-v2sccor(k,l,i,j)
1361 v1sccor(k,l,-i,j)=v1sccor(k,l,i,-j)
1362 v2sccor(k,l,-i,j)=-v2sccor(k,l,i,-j)
1365 if (i.eq.isccortyp(10)) then
1366 v1sccor(k,l,i,-j)=v1sccor(k,l,i,j)
1367 v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
1369 if (j.eq.isccortyp(10)) then
1370 v1sccor(k,l,-i,j)=v1sccor(k,l,i,j)
1371 v2sccor(k,l,-i,j)=-v2sccor(k,l,i,j)
1373 v1sccor(k,l,i,-j)=-v1sccor(k,l,i,j)
1374 v2sccor(k,l,i,-j)=-v2sccor(k,l,i,j)
1375 v1sccor(k,l,-i,-j)=v1sccor(k,l,i,j)
1376 v2sccor(k,l,-i,-j)=-v2sccor(k,l,i,j)
1377 v1sccor(k,l,-i,j)=v1sccor(k,l,i,-j)
1378 v2sccor(k,l,-i,j)=-v2sccor(k,l,i,-j)
1382 v0ijsccor=v0ijsccor+si*v1sccor(k,l,i,j)
1383 v0ijsccor1=v0ijsccor+si*v1sccor(k,l,-i,j)
1384 v0ijsccor2=v0ijsccor+si*v1sccor(k,l,i,-j)
1385 v0ijsccor3=v0ijsccor+si*v1sccor(k,l,-i,-j)
1388 do k=1,nlor_sccor(i,j)
1389 read (isccor,*,end=119,err=119) kk,vlor1sccor(k,i,j),
1390 & vlor2sccor(k,i,j),vlor3sccor(k,i,j)
1391 v0ijsccor=v0ijsccor+vlor1sccor(k,i,j)/
1392 &(1+vlor3sccor(k,i,j)**2)
1394 v0sccor(l,i,j)=v0ijsccor
1395 v0sccor(l,-i,j)=v0ijsccor1
1396 v0sccor(l,i,-j)=v0ijsccor2
1397 v0sccor(l,-i,-j)=v0ijsccor3
1403 read (isccor,*,end=119,err=119) (isccortyp(i),i=1,ntyp)
1404 c write (iout,*) 'ntortyp',ntortyp
1406 cc maxinter is maximum interaction sites
1410 read (isccor,*,end=119,err=119)
1411 & nterm_sccor(i,j),nlor_sccor(i,j)
1415 do k=1,nterm_sccor(i,j)
1416 read (isccor,*,end=119,err=119) kk,v1sccor(k,l,i,j)
1418 v0ijsccor=v0ijsccor+si*v1sccor(k,l,i,j)
1421 do k=1,nlor_sccor(i,j)
1422 read (isccor,*,end=119,err=119) kk,vlor1sccor(k,i,j),
1423 & vlor2sccor(k,i,j),vlor3sccor(k,i,j)
1424 v0ijsccor=v0ijsccor+vlor1sccor(k,i,j)/
1425 &(1+vlor3sccor(k,i,j)**2)
1427 v0sccor(l,i,j)=v0ijsccor
1435 write (iout,'(/a/)') 'Torsional constants:'
1439 write (iout,*) 'ityp',i,' jtyp',j
1440 write (iout,*) 'Fourier constants'
1441 do k=1,nterm_sccor(i,j)
1442 write (iout,'(2(1pe15.5))') v1sccor(k,l,i,j),v2sccor(k,l,i,j)
1444 write (iout,*) 'Lorenz constants'
1445 do k=1,nlor_sccor(i,j)
1446 write (iout,'(3(1pe15.5))')
1447 & vlor1sccor(k,i,j),vlor2sccor(k,i,j),vlor3sccor(k,i,j)
1455 C Read electrostatic-interaction parameters
1459 write (iout,'(/a)') 'Electrostatic interaction constants:'
1460 write (iout,'(1x,a,1x,a,10x,a,11x,a,11x,a,11x,a)')
1461 & 'IT','JT','APP','BPP','AEL6','AEL3'
1463 read (ielep,*,end=116,err=116) ((epp(i,j),j=1,2),i=1,2)
1464 read (ielep,*,end=116,err=116) ((rpp(i,j),j=1,2),i=1,2)
1465 read (ielep,*,end=116,err=116) ((elpp6(i,j),j=1,2),i=1,2)
1466 read (ielep,*,end=116,err=116) ((elpp3(i,j),j=1,2),i=1,2)
1471 app (i,j)=epp(i,j)*rri*rri
1472 bpp (i,j)=-2.0D0*epp(i,j)*rri
1473 ael6(i,j)=elpp6(i,j)*4.2D0**6
1474 ael3(i,j)=elpp3(i,j)*4.2D0**3
1476 if (lprint) write(iout,'(2i3,4(1pe15.4))')i,j,app(i,j),bpp(i,j),
1477 & ael6(i,j),ael3(i,j)
1482 C Read side-chain interaction parameters.
1484 read (isidep,*,end=117,err=117) ipot,expon
1485 if (ipot.lt.1 .or. ipot.gt.5) then
1486 write (iout,'(2a)') 'Error while reading SC interaction',
1487 & 'potential file - unknown potential type.'
1489 call MPI_Finalize(Ierror)
1495 & write(iout,'(/3a,2i3)') 'Potential is ',potname(ipot),
1496 & ', exponents are ',expon,2*expon
1497 goto (10,20,30,30,40) ipot
1498 C----------------------- LJ potential ---------------------------------
1499 10 read (isidep,*,end=117,err=117)((eps(i,j),j=i,ntyp),i=1,ntyp),
1500 & (sigma0(i),i=1,ntyp)
1502 write (iout,'(/a/)') 'Parameters of the LJ potential:'
1503 write (iout,'(a/)') 'The epsilon array:'
1504 call printmat(ntyp,ntyp,ntyp,iout,restyp,eps)
1505 write (iout,'(/a)') 'One-body parameters:'
1506 write (iout,'(a,4x,a)') 'residue','sigma'
1507 write (iout,'(a3,6x,f10.5)') (restyp(i),sigma0(i),i=1,ntyp)
1510 C----------------------- LJK potential --------------------------------
1511 20 read (isidep,*,end=117,err=117)((eps(i,j),j=i,ntyp),i=1,ntyp),
1512 & (sigma0(i),i=1,ntyp),(rr0(i),i=1,ntyp)
1514 write (iout,'(/a/)') 'Parameters of the LJK potential:'
1515 write (iout,'(a/)') 'The epsilon array:'
1516 call printmat(ntyp,ntyp,ntyp,iout,restyp,eps)
1517 write (iout,'(/a)') 'One-body parameters:'
1518 write (iout,'(a,4x,2a)') 'residue',' sigma ',' r0 '
1519 write (iout,'(a3,6x,2f10.5)') (restyp(i),sigma0(i),rr0(i),
1523 C---------------------- GB or BP potential -----------------------------
1525 read (isidep,*,end=117,err=117)(eps(i,j),j=i,ntyp)
1527 read (isidep,*,end=117,err=117)(sigma0(i),i=1,ntyp)
1528 read (isidep,*,end=117,err=117)(sigii(i),i=1,ntyp)
1529 read (isidep,*,end=117,err=117)(chip(i),i=1,ntyp)
1530 read (isidep,*,end=117,err=117)(alp(i),i=1,ntyp)
1531 C now we start reading lipid
1533 read (isidep,*,end=1161,err=1161)(epslip(i,j),j=i,ntyp)
1534 if (lprint) write(iout,*) "epslip", i, (epslip(i,j),j=i,ntyp)
1536 C print *,"WARNING!!"
1538 C epslip(i,j)=epslip(i,j)+0.05d0
1541 if (lprint) write(iout,*) epslip(1,1),"OK?"
1542 C For the GB potential convert sigma'**2 into chi'
1545 chip(i)=(chip(i)-1.0D0)/(chip(i)+1.0D0)
1549 write (iout,'(/a/)') 'Parameters of the BP potential:'
1550 write (iout,'(a/)') 'The epsilon array:'
1551 call printmat(ntyp,ntyp,ntyp,iout,restyp,eps)
1552 write (iout,'(/a)') 'One-body parameters:'
1553 write (iout,'(a,4x,4a)') 'residue',' sigma ','s||/s_|_^2',
1555 write (iout,'(a3,6x,4f10.5)') (restyp(i),sigma0(i),sigii(i),
1556 & chip(i),alp(i),i=1,ntyp)
1559 C--------------------- GBV potential -----------------------------------
1560 40 read (isidep,*,end=117,err=117)((eps(i,j),j=i,ntyp),i=1,ntyp),
1561 & (sigma0(i),i=1,ntyp),(rr0(i),i=1,ntyp),(sigii(i),i=1,ntyp),
1562 & (chip(i),i=1,ntyp),(alp(i),i=1,ntyp)
1564 write (iout,'(/a/)') 'Parameters of the GBV potential:'
1565 write (iout,'(a/)') 'The epsilon array:'
1566 call printmat(ntyp,ntyp,ntyp,iout,restyp,eps)
1567 write (iout,'(/a)') 'One-body parameters:'
1568 write (iout,'(a,4x,5a)') 'residue',' sigma ',' r0 ',
1569 & 's||/s_|_^2',' chip ',' alph '
1570 write (iout,'(a3,6x,5f10.5)') (restyp(i),sigma0(i),rr0(i),
1571 & sigii(i),chip(i),alp(i),i=1,ntyp)
1575 C-----------------------------------------------------------------------
1576 C Calculate the "working" parameters of SC interactions.
1580 epslip(i,j)=epslip(j,i)
1585 sigma(i,j)=dsqrt(sigma0(i)**2+sigma0(j)**2)
1586 sigma(j,i)=sigma(i,j)
1587 rs0(i,j)=dwa16*sigma(i,j)
1591 if (lprint) write (iout,'(/a/10x,7a/72(1h-))')
1592 & 'Working parameters of the SC interactions:',
1593 & ' a ',' b ',' augm ',' sigma ',' r0 ',
1598 if (ipot.eq.1 .or. ipot.eq.3 .or. ipot.eq.4) then
1607 sigeps=dsign(1.0D0,epsij)
1609 aa_aq(i,j)=epsij*rrij*rrij
1610 bb_aq(i,j)=-sigeps*epsij*rrij
1611 aa_aq(j,i)=aa_aq(i,j)
1612 bb_aq(j,i)=bb_aq(i,j)
1613 epsijlip=epslip(i,j)
1614 sigeps=dsign(1.0D0,epsijlip)
1615 epsijlip=dabs(epsijlip)
1616 aa_lip(i,j)=epsijlip*rrij*rrij
1617 bb_lip(i,j)=-sigeps*epsijlip*rrij
1618 aa_lip(j,i)=aa_lip(i,j)
1619 bb_lip(j,i)=bb_lip(i,j)
1621 sigt1sq=sigma0(i)**2
1622 sigt2sq=sigma0(j)**2
1625 ratsig1=sigt2sq/sigt1sq
1626 ratsig2=1.0D0/ratsig1
1627 chi(i,j)=(sigii1-1.0D0)/(sigii1+ratsig1)
1628 if (j.gt.i) chi(j,i)=(sigii2-1.0D0)/(sigii2+ratsig2)
1629 rsum_max=dsqrt(sigii1*sigt1sq+sigii2*sigt2sq)
1633 c if (ipot.eq.1 .or. ipot.eq.3 .or. ipot.eq.4) then
1634 sigmaii(i,j)=rsum_max
1635 sigmaii(j,i)=rsum_max
1637 c sigmaii(i,j)=r0(i,j)
1638 c sigmaii(j,i)=r0(i,j)
1640 cd write (iout,*) i,j,r0(i,j),sigma(i,j),rsum_max
1641 if ((ipot.eq.2 .or. ipot.eq.5) .and. r0(i,j).gt.rsum_max) then
1642 r_augm=sigma(i,j)*(rrij-sigma(i,j))/rrij
1643 augm(i,j)=epsij*r_augm**(2*expon)
1644 c augm(i,j)=0.5D0**(2*expon)*aa(i,j)
1651 write (iout,'(2(a3,2x),3(1pe10.3),5(0pf8.3))')
1652 & restyp(i),restyp(j),aa_aq(i,j),bb_aq(i,j),augm(i,j),
1653 & sigma(i,j),r0(i,j),chi(i,j),chi(j,i)
1658 write(iout,*) "tube param"
1659 read(itube,*) epspeptube,sigmapeptube
1660 sigmapeptube=sigmapeptube**6
1661 sigeps=dsign(1.0D0,epspeptube)
1662 epspeptube=dabs(epspeptube)
1663 pep_aa_tube=4.0d0*epspeptube*sigmapeptube**2
1664 pep_bb_tube=-sigeps*4.0d0*epspeptube*sigmapeptube
1665 write(iout,*) pep_aa_tube,pep_bb_tube,tubetranenepep
1667 read(itube,*) epssctube,sigmasctube
1668 sigmasctube=sigmasctube**6
1669 sigeps=dsign(1.0D0,epssctube)
1670 epssctube=dabs(epssctube)
1671 sc_aa_tube_par(i)=4.0d0*epssctube*sigmasctube**2
1672 sc_bb_tube_par(i)=-sigeps*4.0d0*epssctube*sigmasctube
1673 write(iout,*) sc_aa_tube_par(i), sc_bb_tube_par(i),tubetranene(i)
1679 C Define the SC-p interaction constants (hard-coded; old style)
1682 C "Soft" SC-p repulsion (causes helices to be too flat, but facilitates
1684 c aad(i,1)=0.3D0*4.0D0**12
1685 C Following line for constants currently implemented
1686 C "Hard" SC-p repulsion (gives correct turn spacing in helices)
1687 aad(i,1)=1.5D0*4.0D0**12
1688 c aad(i,1)=0.17D0*5.6D0**12
1690 C "Soft" SC-p repulsion
1692 C Following line for constants currently implemented
1693 c aad(i,1)=0.3D0*4.0D0**6
1694 C "Hard" SC-p repulsion
1695 bad(i,1)=3.0D0*4.0D0**6
1696 c bad(i,1)=-2.0D0*0.17D0*5.6D0**6
1705 C 8/9/01 Read the SC-p interaction constants from file
1708 read (iscpp,*,end=118,err=118) (eps_scp(i,j),rscp(i,j),j=1,2)
1711 aad(i,1)=dabs(eps_scp(i,1))*rscp(i,1)**12
1712 aad(i,2)=dabs(eps_scp(i,2))*rscp(i,2)**12
1713 bad(i,1)=-2*eps_scp(i,1)*rscp(i,1)**6
1714 bad(i,2)=-2*eps_scp(i,2)*rscp(i,2)**6
1718 write (iout,*) "Parameters of SC-p interactions:"
1720 write (iout,'(4f8.3,4e12.4)') eps_scp(i,1),rscp(i,1),
1721 & eps_scp(i,2),rscp(i,2),aad(i,1),bad(i,1),aad(i,2),bad(i,2)
1727 C Define the constants of the disulfide bridge
1731 c Old arbitrary potential - commented out.
1736 c Constants of the disulfide-bond potential determined based on the RHF/6-31G**
1737 c energy surface of diethyl disulfide.
1738 c A. Liwo and U. Kozlowska, 11/24/03
1754 C if(me.eq.king) then
1755 C write (iout,'(/a)') "Disulfide bridge parameters:"
1756 C write (iout,'(a,f10.2)') 'S-S bridge energy: ',ebr
1757 C write (iout,'(2(a,f10.2))') 'd0cm:',d0cm,' akcm:',akcm
1758 C write (iout,'(2(a,f10.2))') 'akth:',akth,' akct:',akct
1759 C write (iout,'(3(a,f10.2))') 'v1ss:',v1ss,' v2ss:',v2ss,
1762 if (shield_mode.gt.0) then
1763 C VSolvSphere the volume of solving sphere
1764 C rpp(1,1) is the energy r0 for peptide group contact and will be used for it
1765 C there will be no distinction between proline peptide group and normal peptide
1766 C group in case of shielding parameters
1767 c write (iout,*) "rpp(1,1)",rpp(1,1)," pi",pi
1768 VSolvSphere=4.0/3.0*pi*rpp(1,1)**3
1769 VSolvSphere_div=VSolvSphere-4.0/3.0*pi*(rpp(1,1)/2.0)**3
1770 write (iout,*) "VSolvSphere",VSolvSphere,"VSolvSphere_div",
1772 C long axis of side chain
1774 long_r_sidechain(i)=vbldsc0(1,i)
1775 short_r_sidechain(i)=sigma0(i)
1780 111 write (iout,*) "Error reading bending energy parameters."
1782 112 write (iout,*) "Error reading rotamer energy parameters."
1784 113 write (iout,*) "Error reading torsional energy parameters."
1786 114 write (iout,*) "Error reading double torsional energy parameters."
1789 & "Error reading cumulant (multibody energy) parameters."
1791 116 write (iout,*) "Error reading electrostatic energy parameters."
1793 1161 write (iout,*) "Error reading electrostatic energy parameters.Lip"
1795 117 write (iout,*) "Error reading side chain interaction parameters."
1797 118 write (iout,*) "Error reading SCp interaction parameters."
1799 119 write (iout,*) "Error reading SCCOR parameters"
1801 121 write (iout,*) "Error in Czybyshev parameters"
1804 call MPI_Finalize(Ierror)
1811 subroutine getenv_loc(var, val)
1812 character(*) var, val
1815 character(2000) line
1818 open (196,file='env',status='old',readonly,shared)
1820 c write(*,*)'looking for ',var
1821 10 read(196,*,err=11,end=11)line
1822 iread=index(line,var)
1823 c write(*,*)iread,' ',var,' ',line
1824 if (iread.eq.0) go to 10
1825 c write(*,*)'---> ',line
1831 iread=iread+ilen(var)+1
1832 read (line(iread:),*,err=12,end=12) val
1833 c write(*,*)'OK: ',var,' = ',val
1839 #elif (defined CRAY)
1840 integer lennam,lenval,ierror
1842 c getenv using a POSIX call, useful on the T3D
1843 c Sept 1996, comment out error check on advice of H. Pritchard
1846 if(lennam.le.0) stop '--error calling getenv--'
1847 call pxfgetenv(var,lennam,val,lenval,ierror)
1848 c-HP- if(ierror.ne.0) stop '--error returned by pxfgetenv--'
1850 call getenv(var,val)
1852 C set the variables used for shielding effect
1853 C if (shield_mode.gt.0) then
1854 C VSolvSphere the volume of solving sphere
1856 C rpp(1,1) is the energy r0 for peptide group contact and will be used for it
1857 C there will be no distinction between proline peptide group and normal peptide
1858 C group in case of shielding parameters
1859 C VSolvSphere=4.0/3.0*pi*rpp(1,1)**3
1860 C VSolvSphere_div=VSolvSphere-4.0/3.0*pi*(rpp(1,1)/2.0)**3
1861 C long axis of side chain
1863 C long_r_sidechain(i)=vbldsc0(1,i)
1864 C short_r_sidechain(i)=sigma0(i)
1866 C lets set the buffor value
1871 c---------------------------------------------------------------------------
1872 subroutine weightread
1874 C Read the parameters of the probability distributions of the virtual-bond
1875 C valence angles and the side chains and energy parameters.
1877 C Important! Energy-term weights ARE NOT read here; they are read from the
1878 C main input file instead, because NO defaults have yet been set for these
1881 implicit real*8 (a-h,o-z)
1882 include 'DIMENSIONS'
1887 include 'COMMON.IOUNITS'
1888 include 'COMMON.CHAIN'
1889 include 'COMMON.INTERACT'
1890 include 'COMMON.GEO'
1891 include 'COMMON.LOCAL'
1892 include 'COMMON.TORSION'
1893 include 'COMMON.SCCOR'
1894 include 'COMMON.SCROT'
1895 include 'COMMON.FFIELD'
1896 include 'COMMON.NAMES'
1897 include 'COMMON.SBRIDGE'
1899 include 'COMMON.SETUP'
1900 include 'COMMON.CONTROL'
1901 include 'COMMON.SHIELD'
1902 character*1000 weightcard
1904 c READ energy-term weights
1906 call card_concat(weightcard)
1907 call reada(weightcard,'WLONG',wlong,1.0D0)
1908 call reada(weightcard,'WSC',wsc,wlong)
1909 call reada(weightcard,'WSCP',wscp,wlong)
1910 call reada(weightcard,'WELEC',welec,1.0D0)
1911 call reada(weightcard,'WVDWPP',wvdwpp,welec)
1912 call reada(weightcard,'WEL_LOC',wel_loc,1.0D0)
1913 call reada(weightcard,'WCORR4',wcorr4,0.0D0)
1914 call reada(weightcard,'WCORR5',wcorr5,0.0D0)
1915 call reada(weightcard,'WCORR6',wcorr6,0.0D0)
1916 call reada(weightcard,'WTURN3',wturn3,1.0D0)
1917 call reada(weightcard,'WTURN4',wturn4,1.0D0)
1918 call reada(weightcard,'WTURN6',wturn6,1.0D0)
1919 call reada(weightcard,'WSCCOR',wsccor,1.0D0)
1920 call reada(weightcard,'WSTRAIN',wstrain,1.0D0)
1921 call reada(weightcard,'WBOND',wbond,1.0D0)
1922 call reada(weightcard,'WTOR',wtor,1.0D0)
1923 call reada(weightcard,'WTORD',wtor_d,1.0D0)
1924 call reada(weightcard,'WANG',wang,1.0D0)
1925 call reada(weightcard,'WSCLOC',wscloc,1.0D0)
1926 call reada(weightcard,'WDFAD',wdfa_dist,0.0d0)
1927 call reada(weightcard,'WDFAT',wdfa_tor,0.0d0)
1928 call reada(weightcard,'WDFAN',wdfa_nei,0.0d0)
1929 call reada(weightcard,'WDFAB',wdfa_beta,0.0d0)
1930 call reada(weightcard,'SCAL14',scal14,0.4D0)
1931 call reada(weightcard,'SCALSCP',scalscp,1.0d0)
1932 call reada(weightcard,'CUTOFF',cutoff_corr,7.0d0)
1933 call reada(weightcard,'DELT_CORR',delt_corr,0.5d0)
1934 call reada(weightcard,'TEMP0',temp0,300.0d0)
1935 call reada(weightcard,'WSHIELD',wshield,1.0d0)
1936 call reada(weightcard,'WLT',wliptran,0.0D0)
1937 call reada(weightcard,'WTUBE',wtube,1.0D0)
1938 call reada(weightcard,'WSAXS',wsaxs,1.0D0)
1939 if (index(weightcard,'SOFT').gt.0) ipot=6
1940 C 12/1/95 Added weight for the multi-body term WCORR
1941 call reada(weightcard,'WCORRH',wcorr,1.0D0)
1942 if (wcorr4.gt.0.0d0) wcorr=wcorr4
1963 weights(28)=wdfa_dist
1964 weights(29)=wdfa_tor
1965 weights(30)=wdfa_nei
1966 weights(31)=wdfa_beta
1968 aad(i,1)=scalscp*aad(i,1)
1969 aad(i,2)=scalscp*aad(i,2)
1970 bad(i,1)=scalscp*bad(i,1)
1971 bad(i,2)=scalscp*bad(i,2)
1973 if(me.eq.king.or..not.out1file)
1974 & write (iout,100) wsc,wscp,welec,wvdwpp,wbond,wang,wscloc,wtor,
1975 & wtor_d,wstrain,wel_loc,wcorr,wcorr5,wcorr6,wsccor,wturn3,
1977 & wdfa_dist,wdfa_tor,wdfa_nei,wdfa_beta
1978 100 format (/'Energy-term weights (unscaled):'//
1979 & 'WSCC= ',f10.6,' (SC-SC)'/
1980 & 'WSCP= ',f10.6,' (SC-p)'/
1981 & 'WELEC= ',f10.6,' (p-p electr)'/
1982 & 'WVDWPP= ',f10.6,' (p-p VDW)'/
1983 & 'WBOND= ',f10.6,' (stretching)'/
1984 & 'WANG= ',f10.6,' (bending)'/
1985 & 'WSCLOC= ',f10.6,' (SC local)'/
1986 & 'WTOR= ',f10.6,' (torsional)'/
1987 & 'WTORD= ',f10.6,' (double torsional)'/
1988 & 'WSTRAIN=',f10.6,' (SS bridges & dist. cnstr.)'/
1989 & 'WEL_LOC=',f10.6,' (multi-body 3-rd order)'/
1990 & 'WCORR4= ',f10.6,' (multi-body 4th order)'/
1991 & 'WCORR5= ',f10.6,' (multi-body 5th order)'/
1992 & 'WCORR6= ',f10.6,' (multi-body 6th order)'/
1993 & 'WSCCOR= ',f10.6,' (back-scloc correlation)'/
1994 & 'WTURN3= ',f10.6,' (turns, 3rd order)'/
1995 & 'WTURN4= ',f10.6,' (turns, 4th order)'/
1996 & 'WTURN6= ',f10.6,' (turns, 6th order)'/
1997 & 'WDFA_D= ',f10.6,' (DFA, distance)' /
1998 & 'WDFA_T= ',f10.6,' (DFA, torsional)' /
1999 & 'WDFA_N= ',f10.6,' (DFA, number of neighbor)' /
2000 & 'WDFA_B= ',f10.6,' (DFA, beta formation)')
2001 if(me.eq.king.or..not.out1file)then
2002 if (wcorr4.gt.0.0d0) then
2003 write (iout,'(/2a/)') 'Local-electrostatic type correlation ',
2004 & 'between contact pairs of peptide groups'
2005 write (iout,'(2(a,f5.3/))')
2006 & 'Cutoff on 4-6th order correlation terms: ',cutoff_corr,
2007 & 'Range of quenching the correlation terms:',2*delt_corr
2008 else if (wcorr.gt.0.0d0) then
2009 write (iout,'(/2a/)') 'Hydrogen-bonding correlation ',
2010 & 'between contact pairs of peptide groups'
2012 write (iout,'(a,f8.3)')
2013 & 'Scaling factor of 1,4 SC-p interactions:',scal14
2014 write (iout,'(a,f8.3)')
2015 & 'General scaling factor of SC-p interactions:',scalscp
2017 r0_corr=cutoff_corr-delt_corr
2019 call rescale_weights(t_bath)
2020 if(me.eq.king.or..not.out1file)
2021 & write (iout,22) wsc,wscp,welec,wvdwpp,wbond,wang,wscloc,wtor,
2022 & wtor_d,wstrain,wel_loc,wcorr,wcorr5,wcorr6,wsccor,wturn3,
2024 22 format (/'Energy-term weights (scaled):'//
2025 & 'WSCC= ',f10.6,' (SC-SC)'/
2026 & 'WSCP= ',f10.6,' (SC-p)'/
2027 & 'WELEC= ',f10.6,' (p-p electr)'/
2028 & 'WVDWPP= ',f10.6,' (p-p VDW)'/
2029 & 'WBOND= ',f10.6,' (stretching)'/
2030 & 'WANG= ',f10.6,' (bending)'/
2031 & 'WSCLOC= ',f10.6,' (SC local)'/
2032 & 'WTOR= ',f10.6,' (torsional)'/
2033 & 'WTORD= ',f10.6,' (double torsional)'/
2034 & 'WSTRAIN=',f10.6,' (SS bridges & dist. cnstr.)'/
2035 & 'WEL_LOC=',f10.6,' (multi-body 3-rd order)'/
2036 & 'WCORR4= ',f10.6,' (multi-body 4th order)'/
2037 & 'WCORR5= ',f10.6,' (multi-body 5th order)'/
2038 & 'WCORR6= ',f10.6,' (multi-body 6th order)'/
2039 & 'WSCCOR= ',f10.6,' (back-scloc correlatkion)'/
2040 & 'WTURN3= ',f10.6,' (turns, 3rd order)'/
2041 & 'WTURN4= ',f10.6,' (turns, 4th order)'/
2042 & 'WTURN6= ',f10.6,' (turns, 6th order)')
2043 if(me.eq.king.or..not.out1file)
2044 & write (iout,*) "Reference temperature for weights calculation:",
2046 call reada(weightcard,"D0CM",d0cm,3.78d0)
2047 call reada(weightcard,"AKCM",akcm,15.1d0)
2048 call reada(weightcard,"AKTH",akth,11.0d0)
2049 call reada(weightcard,"AKCT",akct,12.0d0)
2050 call reada(weightcard,"V1SS",v1ss,-1.08d0)
2051 call reada(weightcard,"V2SS",v2ss,7.61d0)
2052 call reada(weightcard,"V3SS",v3ss,13.7d0)
2053 call reada(weightcard,"EBR",ebr,-5.50D0)
2054 call reada(weightcard,"ATRISS",atriss,0.301D0)
2055 call reada(weightcard,"BTRISS",btriss,0.021D0)
2056 call reada(weightcard,"CTRISS",ctriss,1.001D0)
2057 call reada(weightcard,"DTRISS",dtriss,1.001D0)
2058 write (iout,*) "ATRISS=", atriss
2059 write (iout,*) "BTRISS=", btriss
2060 write (iout,*) "CTRISS=", ctriss
2061 write (iout,*) "DTRISS=", dtriss
2062 dyn_ss=(index(weightcard,'DYN_SS').gt.0)
2064 dyn_ss_mask(i)=.false.
2068 dyn_ssbond_ij(i,j)=1.0d300
2071 call reada(weightcard,"HT",Ht,0.0D0)
2073 ss_depth=ebr/wsc-0.25*eps(1,1)
2074 Ht=Ht/wsc-0.25*eps(1,1)
2075 akcm=akcm*wstrain/wsc
2076 akth=akth*wstrain/wsc
2077 akct=akct*wstrain/wsc
2078 v1ss=v1ss*wstrain/wsc
2079 v2ss=v2ss*wstrain/wsc
2080 v3ss=v3ss*wstrain/wsc
2082 if (wstrain.ne.0.0) then
2083 ss_depth=ebr/wstrain-0.25*eps(1,1)*wsc/wstrain
2088 write (iout,*) "wshield,", wshield
2089 if(me.eq.king.or..not.out1file) then
2090 write (iout,*) "Parameters of the SS-bond potential:"
2091 write (iout,*) "D0CM",d0cm," AKCM",akcm," AKTH",akth,
2093 write (iout,*) "V1SS",v1ss," V2SS",v2ss," V3SS",v3ss
2094 write (iout,*) "EBR",ebr," SS_DEPTH",ss_depth
2095 write (iout,*)" HT",Ht
2096 print *,'indpdb=',indpdb,' pdbref=',pdbref