1 subroutine enecalc(islice,*)
4 include "DIMENSIONS.ZSCOPT"
5 include "DIMENSIONS.FREE"
8 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
11 include "COMMON.CHAIN"
12 include "COMMON.IOUNITS"
13 include "COMMON.PROTFILES"
14 include "COMMON.NAMES"
16 include "COMMON.SBRIDGE"
18 include "COMMON.FFIELD"
19 include "COMMON.ENEPS"
20 include "COMMON.LOCAL"
21 include "COMMON.WEIGHTS"
22 include "COMMON.INTERACT"
24 include "COMMON.ENERGIES"
25 include "COMMON.CONTROL"
26 include "COMMON.TORCNSTR"
30 double precision qwolynes
32 integer errmsg_count,maxerrmsg_count /100/
33 double precision rmsnat,gyrate
34 external rmsnat,gyrate
35 double precision tole /1.0d-1/
36 integer i,itj,ii,iii,j,k,l,licz
37 integer ir,ib,ipar,iparm
39 real*4 csingle(3,maxres2)
40 double precision energ
44 double precision energia(0:max_ene),rmsdev,efree,eini
45 double precision fT(6),quot,quotl,kfacl,kfac /2.4d0/,T0 /3.0d2/
47 integer snk_p(MaxR,MaxT_h,Max_parm)
49 character*64 bprotfile_temp
50 call opentmp(islice,ientout,bprotfile_temp)
54 write (iout,*) "enecalc: nparmset ",nparmset
63 do i=indstart(me1),indend(me1)
74 read(ientout,rec=i,err=101)
75 & ((csingle(l,k),l=1,3),k=1,nres),
76 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
77 & nss,(ihpb(k),jhpb(k),k=1,nss),
78 & eini,efree,rmsdev,(q(j,iii+1),j=1,nQ),iR,ib,ipar
87 c(l,k+nres)=csingle(l,k+nres)
90 anatemp= 1.0d0/(beta_h(ib,ipar)*1.987D-3)
91 q(nQ+1,iii+1)=rmsnat(iii+1)
93 q(nQ+2,iii+1)=gyrate(iii+1)
94 c fT=T0*beta_h(ib,ipar)*1.987D-3
95 c ft=2.0d0/(1.0d0+1.0d0/(T0*beta_h(ib,ipar)*1.987D-3))
96 if (rescale_mode.eq.1) then
97 quot=1.0d0/(T0*beta_h(ib,ipar)*1.987D-3)
99 tt = 1.0d0/(beta_h(ib,ipar)*1.987D-3)
100 ft(6)=(320.0+80.0*dtanh((tt-320.0)/80.0))/320.0
111 fT(l)=kfacl/(kfacl-1.0d0+quotl)
113 else if (rescale_mode.eq.2) then
114 quot=1.0d0/(T0*beta_h(ib,ipar)*1.987D-3)
116 tt = 1.0d0/(beta_h(ib,ipar)*1.987D-3)
117 ft(6)=(320.0+80.0*dtanh((tt-320.0)/80.0))/320.0
126 fT(l)=1.12692801104297249644d0/
127 & dlog(dexp(quotl)+dexp(-quotl))
129 else if (rescale_mode.eq.0) then
134 write (iout,*) "Error in ECECALC: wrong RESCALE_MODE",
140 c write (iout,*) "T",1.0d0/(beta_h(ib,ipar)*1.987D-3)," T0",T0,
141 c & " kfac",kfac,"quot",quot," fT",fT
147 call int_from_cart1(.false.)
151 call restore_parm(iparm)
153 write (iout,*) wsc,wscp,welec,wvdwpp,wang,wtor,wscloc,
154 & wcorr,wcorr5,wcorr6,wturn4,wturn3,wturn6,wel_loc,
155 & wtor_d,wsccor,wbond
157 call etotal(energia(0),fT)
159 write (iout,*) "Conformation",i
160 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
161 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
162 call enerprint(energia(0),fT)
163 write (iout,'(2i5,21f8.2)') i,iparm,(energia(k),k=1,21)
164 write (iout,*) "ftors",ftors
165 call briefout(i,energia(0))
166 temp=1.0d0/(beta_h(ib,ipar)*1.987D-3)
167 write (iout,*) "temp", temp
168 call pdbout(i,temp,energia(0),energia(0),0.0d0,0.0d0)
170 if (energia(0).ge.1.0d20) then
171 write (iout,*) "NaNs detected in some of the energy",
172 & " components for conformation",ii+1
173 write (iout,*) "The Cartesian geometry is:"
174 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
175 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
176 write (iout,*) "The internal geometry is:"
178 c call pdbout(ii+1,beta_h(ib,ipar),efree,energia(0),0.0d0,rmsdev)
179 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
180 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
181 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
182 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
183 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
184 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
185 write (iout,*) "The components of the energy are:"
186 call enerprint(energia(0),fT)
188 & "This conformation WILL NOT be added to the database."
193 if (ipar.eq.iparm) write (iout,*) i,iparm,
194 & 1.0d0/(beta_h(ib,ipar)*1.987D-3),eini,energia(0)
196 if (ipar.eq.iparm .and. einicheck.gt.0 .and.
197 & dabs(eini-energia(0)).gt.tole) then
198 if (errmsg_count.le.maxerrmsg_count) then
199 write (iout,'(2a,2e15.5,a,2i8,a,f8.1)')
200 & "Warning: energy differs remarkably from ",
201 & " the value read in: ",energia(0),eini," point",
202 & iii+1,indstart(me1)+iii," T",
203 & 1.0d0/(1.987D-3*beta_h(ib,ipar))
205 call pdbout(indstart(me1)+iii,
206 & 1.0d0/(1.987D-3*beta_h(ib,ipar)),
207 &energia(0),eini,0.0d0,0.0d0)
208 call enerprint(energia(0),fT)
209 errmsg_count=errmsg_count+1
210 if (errmsg_count.gt.maxerrmsg_count)
211 & write (iout,*) "Too many warning messages"
212 if (einicheck.gt.1) then
213 write (iout,*) "Calculation stopped."
216 call MPI_Abort(WHAM_COMM,IERROR,ERRCODE)
223 potE(iii+1,iparm)=energia(0)
225 enetb(k,iii+1,iparm)=energia(k)
228 write (iout,'(2i5,f10.1,3e15.5)') i,iii,
229 & 1.0d0/(beta_h(ib,ipar)*1.987D-3),energia(0),eini,efree
230 c call enerprint(energia(0),fT)
233 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
234 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
235 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
236 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
237 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
238 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
239 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
240 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
241 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
242 write (iout,'(8f10.5)') (q(k,iii+1),k=1,nQ)
243 write (iout,'(f10.5,i10)') rmsdev,iscor
244 call enerprint(energia(0),fT)
245 call pdbout(ii+1,beta_h(ib,ipar),efree,energia(0),0.0d0,rmsdev)
252 if (q(1,iii).le.0.0d0 .and. indpdb.gt.0) q(1,iii)=qwolynes(0,0)
253 write (ientout,rec=iii)
254 & ((csingle(l,k),l=1,3),k=1,nres),
255 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
256 & nss,(ihpb(k),jhpb(k),k=1,nss),
257 & potE(iii,ipar),efree,rmsdev,(q(k,iii),k=1,nQ),iR,ib,ipar
258 c write (iout,'(2i5,2e15.5)') ii,iii,potE(iii,ipar),efree
260 if (separate_parset) then
261 snk_p(iR,ib,1)=snk_p(iR,ib,1)+1
263 snk_p(iR,ib,ipar)=snk_p(iR,ib,ipar)+1
265 c write (iout,*) "iii",iii," iR",iR," ib",ib," ipar",ipar,
266 c & " snk",snk_p(iR,ib,ipar)
268 snk(iR,ib,ipar,islice)=snk(iR,ib,ipar,islice)+1
274 write (iout,*) "Me",me," scount",scount(me)
276 c Master gathers updated numbers of conformations written by all procs.
277 call MPI_AllGather( scount(me), 1, MPI_INTEGER, scount(0), 1,
278 & MPI_INTEGER, WHAM_COMM, IERROR)
282 indstart(i)=indend(i-1)+1
283 indend(i)=indstart(i)+scount(i)-1
286 write (iout,*) "Revised conformation counts"
288 write (iout,'(a,i5,a,i7,a,i7,a,i7)')
289 & "Processor",i," indstart",indstart(i),
290 & " indend",indend(i)," count",scount(i)
293 call MPI_AllReduce(snk_p(1,1,1),snk(1,1,1,islice),
294 & MaxR*MaxT_h*nParmSet,
295 & MPI_INTEGER,MPI_SUM,WHAM_COMM,IERROR)
301 stot(islice)=stot(islice)+snk(i,ib,iparm,islice)
305 write (iout,*) "Revised SNK"
308 write (iout,'("Param",i3," Temp",f6.1,3x,32i8)')
309 & iparm,1.0d0/(1.987D-3*beta_h(ib,iparm)),
310 & (snk(i,ib,iparm,islice),i=1,nR(ib,iparm))
311 write (iout,*) "snk_p",(snk_p(i,ib,iparm),i=1,nR(ib,iparm))
314 write (iout,'("Total",i10)') stot(islice)
317 101 write (iout,*) "Error in scratchfile."
321 c------------------------------------------------------------------------------
322 subroutine write_dbase(islice,*)
325 include "DIMENSIONS.ZSCOPT"
326 include "DIMENSIONS.FREE"
327 include "DIMENSIONS.COMPAR"
330 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
333 include "COMMON.CONTROL"
334 include "COMMON.CHAIN"
335 include "COMMON.IOUNITS"
336 include "COMMON.PROTFILES"
337 include "COMMON.NAMES"
339 include "COMMON.SBRIDGE"
341 include "COMMON.FFIELD"
342 include "COMMON.ENEPS"
343 include "COMMON.LOCAL"
344 include "COMMON.WEIGHTS"
345 include "COMMON.INTERACT"
346 include "COMMON.FREE"
347 include "COMMON.ENERGIES"
348 include "COMMON.COMPAR"
349 include "COMMON.PROT"
350 include "COMMON.CONTACTS1"
352 character*80 bxname,cxname
353 character*64 bprotfile_temp
354 character*3 liczba,licz
356 integer i,itj,ii,iii,j,k,l
359 double precision rmsdev,efree,eini
360 real*4 csingle(3,maxres2)
361 double precision energ
365 integer isecstr(maxres)
366 write (licz2,'(bz,i2.2)') islice
367 call opentmp(islice,ientout,bprotfile_temp)
368 write (iout,*) "bprotfile_temp ",bprotfile_temp
370 if (.not.bxfile .and. .not. cxfile .and. indpdb.eq.0
371 & .and. ensembles.eq.0) then
372 close(ientout,status="delete")
376 write (liczba,'(bz,i3.3)') me
377 if (bxfile .or. cxfile .or. ensembles.gt.0) then
378 if (.not.separate_parset) then
379 bxname = prefix(:ilen(prefix))//liczba//".bx"
381 write (licz,'(bz,i3.3)') myparm
382 bxname = prefix(:ilen(prefix))//liczba//"_par"//licz//".bx"
384 open (ientin,file=bxname,status="unknown",
385 & form="unformatted",access="direct",recl=lenrec1)
388 if (bxfile .or. cxfile .or. ensembles.gt.0) then
389 if (nslice.eq.1) then
390 bxname = prefix(:ilen(prefix))//".bx"
392 bxname = prefix(:ilen(prefix))//
393 & "_slice_"//licz2//".bx"
395 open (ientin,file=bxname,status="unknown",
396 & form="unformatted",access="direct",recl=lenrec1)
397 write (iout,*) "Calculating energies; writing geometry",
398 & " and energy components to ",bxname(:ilen(bxname))
400 #if (defined(AIX) && !defined(JUBL))
401 call xdrfopen_(ixdrf,cxname, "w", iret)
403 call xdrfopen(ixdrf,cxname, "w", iret)
406 write (iout,*) "Error opening cxfile ",cxname(:ilen(cxname))
411 if (indpdb.gt.0) then
412 if (nslice.eq.1) then
414 if (.not.separate_parset) then
415 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))
418 write (licz,'(bz,i3.3)') myparm
419 statname=prefix(:ilen(prefix))//'_par'//licz//'_'//
420 & pot(:ilen(pot))//liczba//'.stat'
424 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//'.stat'
428 if (.not.separate_parset) then
429 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//
430 & "_slice_"//licz2//liczba//'.stat'
432 write (licz,'(bz,i3.3)') myparm
433 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//
434 & '_par'//licz//"_slice_"//licz2//liczba//'.stat'
437 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))
438 & //"_slice_"//licz2//'.stat'
441 open(istat,file=statname,status="unknown")
449 read(ientout,rec=i,err=101)
450 & ((csingle(l,k),l=1,3),k=1,nres),
451 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
452 & nss,(ihpb(k),jhpb(k),k=1,nss),
453 & eini,efree,rmsdev,(q(k,i),k=1,nQ),iR,ib,iparm
454 c write (iout,*) iR,ib,iparm,eini,efree
460 call int_from_cart1(.false.)
462 c write (iout,*) "Calling conf_compar",i
464 anatemp= 1.0d0/(beta_h(ib,iparm)*1.987D-3)
465 if (indpdb.gt.0) then
466 call conf_compar(i,.false.,.true.)
468 c call elecont(.false.,ncont,icont,nnt,nct)
469 c call secondary2(.false.,.false.,ncont,icont,isecstr)
471 c write (iout,*) "Exit conf_compar",i
473 if (bxfile .or.cxfile .or. ensembles.gt.0) write (ientin,rec=i)
474 & ((csingle(l,k),l=1,3),k=1,nres),
475 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
476 & nss,(ihpb(k),jhpb(k),k=1,nss),
477 c & potE(i,iparm),-entfac(i),rms_nat,iscore
478 & potE(i,nparmset),-entfac(i),rms_nat,iscore
479 c write (iout,'(2i5,3e15.5)') i,me,potE(i,iparm),-entfac(i)
481 if (cxfile) call cxwrite(ixdrf,csingle,potE(i,nparmset),
482 & -entfac(i),rms_nat,iscore)
485 close(ientout,status="delete")
487 if (bxfile .or. cxfile .or. ensembles.gt.0) close(ientin)
489 call MPI_Barrier(WHAM_COMM,IERROR)
490 if (me.ne.Master .or. .not.bxfile .and. .not. cxfile
491 & .and. ensembles.eq.0) return
493 if (bxfile .or. ensembles.gt.0) then
494 if (nslice.eq.1) then
495 if (.not.separate_parset) then
496 bxname = prefix(:ilen(prefix))//".bx"
498 write (licz,'(bz,i3.3)') myparm
499 bxname = prefix(:ilen(prefix))//"_par"//licz//".bx"
502 if (.not.separate_parset) then
503 bxname = prefix(:ilen(prefix))//"_slice_"//licz2//".bx"
505 write (licz,'(bz,i3.3)') myparm
506 bxname = prefix(:ilen(prefix))//"par_"//licz//
507 & "_slice_"//licz2//".bx"
510 open (ientout,file=bxname,status="unknown",
511 & form="unformatted",access="direct",recl=lenrec1)
512 write (iout,*) "Master is creating binary database ",
513 & bxname(:ilen(bxname))
516 if (nslice.eq.1) then
517 if (.not.separate_parset) then
518 cxname = prefix(:ilen(prefix))//".cx"
520 cxname = prefix(:ilen(prefix))//"_par"//licz//".cx"
523 if (.not.separate_parset) then
524 cxname = prefix(:ilen(prefix))//
525 & "_slice_"//licz2//".cx"
527 cxname = prefix(:ilen(prefix))//"_par"//licz//
528 & "_slice_"//licz2//".cx"
531 #if (defined(AIX) && !defined(JUBL))
532 call xdrfopen_(ixdrf,cxname, "w", iret)
534 call xdrfopen(ixdrf,cxname, "w", iret)
537 write (iout,*) "Error opening cxfile ",cxname(:ilen(cxname))
542 write (liczba,'(bz,i3.3)') j
543 if (separate_parset) then
544 write (licz,'(bz,i3.3)') myparm
545 bxname = prefix(:ilen(prefix))//liczba//"_par"//licz//".bx"
547 bxname = prefix(:ilen(prefix))//liczba//".bx"
549 open (ientin,file=bxname,status="unknown",
550 & form="unformatted",access="direct",recl=lenrec1)
551 write (iout,*) "Master is reading conformations from ",
552 & bxname(:ilen(bxname))
554 c write (iout,*) "j",j," indstart",indstart(j)," indend",indend(j)
556 do i=indstart(j),indend(j)
558 read(ientin,rec=iii,err=101)
559 & ((csingle(l,k),l=1,3),k=1,nres),
560 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
561 & nss,(ihpb(k),jhpb(k),k=1,nss),
562 & eini,efree,rmsdev,iscor
563 if (bxfile .or. ensembles.gt.0) then
564 write (ientout,rec=i)
565 & ((csingle(l,k),l=1,3),k=1,nres),
566 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
567 & nss,(ihpb(k),jhpb(k),k=1,nss),
568 & eini,efree,rmsdev,iscor
570 if(cxfile)call cxwrite(ixdrf,csingle,eini,efree,rmsdev,iscor)
577 call int_from_cart1(.false.)
578 write (iout,'(2i5,3e15.5)') i,iii,eini,efree
579 write (iout,*) "The Cartesian geometry is:"
580 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
581 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
582 write (iout,*) "The internal geometry is:"
583 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
584 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
585 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
586 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
587 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
588 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
589 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
590 write (iout,'(f10.5,i5)') rmsdev,iscor
593 write (iout,*) iii," conformations (from",indstart(j)," to",
594 & indend(j),") read from ",
595 & bxname(:ilen(bxname))
596 close (ientin,status="delete")
598 if (bxfile .or. cxfile .or. ensembles.gt.0) close (ientout)
599 #if (defined(AIX) && !defined(JUBL))
600 if (cxfile) call xdrfclose_(ixdrf,cxname,iret)
602 if (cxfile) call xdrfclose(ixdrf,cxname,iret)
606 101 write (iout,*) "Error in scratchfile."
610 c-------------------------------------------------------------------------------
611 subroutine cxwrite(ixdrf,csingle,eini,efree,rmsdev,iscor)
614 include "DIMENSIONS.ZSCOPT"
615 include "DIMENSIONS.FREE"
616 include "DIMENSIONS.COMPAR"
619 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
622 include "COMMON.CONTROL"
623 include "COMMON.CHAIN"
624 include "COMMON.IOUNITS"
625 include "COMMON.PROTFILES"
626 include "COMMON.NAMES"
628 include "COMMON.SBRIDGE"
630 include "COMMON.FFIELD"
631 include "COMMON.ENEPS"
632 include "COMMON.LOCAL"
633 include "COMMON.WEIGHTS"
634 include "COMMON.INTERACT"
635 include "COMMON.FREE"
636 include "COMMON.ENERGIES"
637 include "COMMON.COMPAR"
638 include "COMMON.PROT"
639 integer i,j,itmp,iscor,iret,ixdrf
640 double precision rmsdev,efree,eini
641 real*4 csingle(3,maxres2),xoord(3,maxres2+2)
644 c write (iout,*) "cxwrite"
649 xoord(j,i)=csingle(j,i)
654 xoord(j,nres+i-nnt+1)=csingle(j,i+nres)
660 c write (iout,*) "itmp",itmp
662 #if (defined(AIX) && !defined(JUBL))
663 call xdrf3dfcoord_(ixdrf, xoord, itmp, prec, iret)
665 c write (iout,*) "xdrf3dfcoord"
667 call xdrfint_(ixdrf, nss, iret)
669 call xdrfint_(ixdrf, ihpb(j), iret)
670 call xdrfint_(ixdrf, jhpb(j), iret)
672 call xdrffloat_(ixdrf,real(eini),iret)
673 call xdrffloat_(ixdrf,real(efree),iret)
674 call xdrffloat_(ixdrf,real(rmsdev),iret)
675 call xdrfint_(ixdrf,iscor,iret)
677 call xdrf3dfcoord(ixdrf, xoord, itmp, prec, iret)
679 call xdrfint(ixdrf, nss, iret)
681 call xdrfint(ixdrf, ihpb(j), iret)
682 call xdrfint(ixdrf, jhpb(j), iret)
684 call xdrffloat(ixdrf,real(eini),iret)
685 call xdrffloat(ixdrf,real(efree),iret)
686 call xdrffloat(ixdrf,real(rmsdev),iret)
687 call xdrfint(ixdrf,iscor,iret)
692 c------------------------------------------------------------------------------
693 logical function conf_check(ii,iprint)
696 include "DIMENSIONS.ZSCOPT"
697 include "DIMENSIONS.FREE"
700 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
703 include "COMMON.CHAIN"
704 include "COMMON.IOUNITS"
705 include "COMMON.PROTFILES"
706 include "COMMON.NAMES"
708 include "COMMON.SBRIDGE"
710 include "COMMON.FFIELD"
711 include "COMMON.ENEPS"
712 include "COMMON.LOCAL"
713 include "COMMON.WEIGHTS"
714 include "COMMON.INTERACT"
715 include "COMMON.FREE"
716 include "COMMON.ENERGIES"
717 include "COMMON.CONTROL"
718 include "COMMON.TORCNSTR"
719 integer j,k,l,ii,itj,iprint
720 if (.not.check_conf) then
724 call int_from_cart1(.false.)
726 if (itype(j-1).ne.ntyp1 .and. itype(j).ne.ntyp1 .and.
727 & (vbld(j).lt.2.0d0 .or. vbld(j).gt.5.0d0)) then
729 & write (iout,*) "Bad CA-CA bond length",j," ",vbld(j),
730 & " for conformation",ii
731 if (iprint.gt.1) then
732 write (iout,*) "The Cartesian geometry is:"
733 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
734 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
735 write (iout,*) "The internal geometry is:"
736 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
737 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
738 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
739 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
740 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
741 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
743 if (iprint.gt.0) write (iout,*)
744 & "This conformation WILL NOT be added to the database."
751 if (itype(j).ne.10 .and.itype(j).ne.ntyp1 .and.
752 & (vbld(nres+j)-dsc(iabs(itj))).gt.2.0d0) then
754 & write (iout,*) "Bad CA-SC bond length",j," ",vbld(nres+j),
755 & " for conformation",ii
756 if (iprint.gt.1) then
757 write (iout,*) "The Cartesian geometry is:"
758 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
759 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
760 write (iout,*) "The internal geometry is:"
761 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
762 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
763 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
764 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
765 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
766 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
768 if (iprint.gt.0) write (iout,*)
769 & "This conformation WILL NOT be added to the database."
775 if (theta(j).le.0.0d0) then
777 & write (iout,*) "Zero theta angle(s) in conformation",ii
778 if (iprint.gt.1) then
779 write (iout,*) "The Cartesian geometry is:"
780 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
781 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
782 write (iout,*) "The internal geometry is:"
783 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
784 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
785 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
786 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
787 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
788 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
790 if (iprint.gt.0) write (iout,*)
791 & "This conformation WILL NOT be added to the database."
795 if (theta(j).gt.179.97*deg2rad) theta(j)=179.97*deg2rad
798 c write (iout,*) "conf_check passed",ii