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))
204 errmsg_count=errmsg_count+1
205 if (errmsg_count.gt.maxerrmsg_count)
206 & write (iout,*) "Too many warning messages"
207 if (einicheck.gt.1) then
208 write (iout,*) "Calculation stopped."
211 call MPI_Abort(WHAM_COMM,IERROR,ERRCODE)
218 potE(iii+1,iparm)=energia(0)
220 enetb(k,iii+1,iparm)=energia(k)
223 write (iout,'(2i5,f10.1,3e15.5)') i,iii,
224 & 1.0d0/(beta_h(ib,ipar)*1.987D-3),energia(0),eini,efree
225 c call enerprint(energia(0),fT)
228 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
229 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
230 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
231 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
232 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
233 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
234 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
235 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
236 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
237 write (iout,'(8f10.5)') (q(k,iii+1),k=1,nQ)
238 write (iout,'(f10.5,i10)') rmsdev,iscor
239 call enerprint(energia(0),fT)
240 call pdbout(ii+1,beta_h(ib,ipar),efree,energia(0),0.0d0,rmsdev)
247 if (q(1,iii).le.0.0d0 .and. indpdb.gt.0) q(1,iii)=qwolynes(0,0)
248 write (ientout,rec=iii)
249 & ((csingle(l,k),l=1,3),k=1,nres),
250 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
251 & nss,(ihpb(k),jhpb(k),k=1,nss),
252 & potE(iii,ipar),efree,rmsdev,(q(k,iii),k=1,nQ),iR,ib,ipar
253 c write (iout,'(2i5,2e15.5)') ii,iii,potE(iii,ipar),efree
255 if (separate_parset) then
256 snk_p(iR,ib,1)=snk_p(iR,ib,1)+1
258 snk_p(iR,ib,ipar)=snk_p(iR,ib,ipar)+1
260 c write (iout,*) "iii",iii," iR",iR," ib",ib," ipar",ipar,
261 c & " snk",snk_p(iR,ib,ipar)
263 snk(iR,ib,ipar,islice)=snk(iR,ib,ipar,islice)+1
269 write (iout,*) "Me",me," scount",scount(me)
271 c Master gathers updated numbers of conformations written by all procs.
272 call MPI_AllGather( scount(me), 1, MPI_INTEGER, scount(0), 1,
273 & MPI_INTEGER, WHAM_COMM, IERROR)
277 indstart(i)=indend(i-1)+1
278 indend(i)=indstart(i)+scount(i)-1
281 write (iout,*) "Revised conformation counts"
283 write (iout,'(a,i5,a,i7,a,i7,a,i7)')
284 & "Processor",i," indstart",indstart(i),
285 & " indend",indend(i)," count",scount(i)
288 call MPI_AllReduce(snk_p(1,1,1),snk(1,1,1,islice),
289 & MaxR*MaxT_h*nParmSet,
290 & MPI_INTEGER,MPI_SUM,WHAM_COMM,IERROR)
296 stot(islice)=stot(islice)+snk(i,ib,iparm,islice)
300 write (iout,*) "Revised SNK"
303 write (iout,'("Param",i3," Temp",f6.1,3x,32i8)')
304 & iparm,1.0d0/(1.987D-3*beta_h(ib,iparm)),
305 & (snk(i,ib,iparm,islice),i=1,nR(ib,iparm))
306 write (iout,*) "snk_p",(snk_p(i,ib,iparm),i=1,nR(ib,iparm))
309 write (iout,'("Total",i10)') stot(islice)
312 101 write (iout,*) "Error in scratchfile."
316 c------------------------------------------------------------------------------
317 subroutine write_dbase(islice,*)
320 include "DIMENSIONS.ZSCOPT"
321 include "DIMENSIONS.FREE"
322 include "DIMENSIONS.COMPAR"
325 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
328 include "COMMON.CONTROL"
329 include "COMMON.CHAIN"
330 include "COMMON.IOUNITS"
331 include "COMMON.PROTFILES"
332 include "COMMON.NAMES"
334 include "COMMON.SBRIDGE"
336 include "COMMON.FFIELD"
337 include "COMMON.ENEPS"
338 include "COMMON.LOCAL"
339 include "COMMON.WEIGHTS"
340 include "COMMON.INTERACT"
341 include "COMMON.FREE"
342 include "COMMON.ENERGIES"
343 include "COMMON.COMPAR"
344 include "COMMON.PROT"
346 character*80 bxname,cxname
347 character*64 bprotfile_temp
348 character*3 liczba,licz
350 integer i,itj,ii,iii,j,k,l
353 double precision rmsdev,efree,eini
354 real*4 csingle(3,maxres2)
355 double precision energ
359 write (licz2,'(bz,i2.2)') islice
360 call opentmp(islice,ientout,bprotfile_temp)
361 write (iout,*) "bprotfile_temp ",bprotfile_temp
363 if (.not.bxfile .and. .not. cxfile .and. indpdb.eq.0
364 & .and. ensembles.eq.0) then
365 close(ientout,status="delete")
369 write (liczba,'(bz,i3.3)') me
370 if (bxfile .or. cxfile .or. ensembles.gt.0) then
371 if (.not.separate_parset) then
372 bxname = prefix(:ilen(prefix))//liczba//".bx"
374 write (licz,'(bz,i3.3)') myparm
375 bxname = prefix(:ilen(prefix))//liczba//"_par"//licz//".bx"
377 open (ientin,file=bxname,status="unknown",
378 & form="unformatted",access="direct",recl=lenrec1)
381 if (bxfile .or. cxfile .or. ensembles.gt.0) then
382 if (nslice.eq.1) then
383 bxname = prefix(:ilen(prefix))//".bx"
385 bxname = prefix(:ilen(prefix))//
386 & "_slice_"//licz2//".bx"
388 open (ientin,file=bxname,status="unknown",
389 & form="unformatted",access="direct",recl=lenrec1)
390 write (iout,*) "Calculating energies; writing geometry",
391 & " and energy components to ",bxname(:ilen(bxname))
393 #if (defined(AIX) && !defined(JUBL))
394 call xdrfopen_(ixdrf,cxname, "w", iret)
396 call xdrfopen(ixdrf,cxname, "w", iret)
399 write (iout,*) "Error opening cxfile ",cxname(:ilen(cxname))
404 if (indpdb.gt.0) then
405 if (nslice.eq.1) then
407 if (.not.separate_parset) then
408 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))
411 write (licz,'(bz,i3.3)') myparm
412 statname=prefix(:ilen(prefix))//'_par'//licz//'_'//
413 & pot(:ilen(pot))//liczba//'.stat'
417 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//'.stat'
421 if (.not.separate_parset) then
422 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//
423 & "_slice_"//licz2//liczba//'.stat'
425 write (licz,'(bz,i3.3)') myparm
426 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//
427 & '_par'//licz//"_slice_"//licz2//liczba//'.stat'
430 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))
431 & //"_slice_"//licz2//'.stat'
434 open(istat,file=statname,status="unknown")
442 read(ientout,rec=i,err=101)
443 & ((csingle(l,k),l=1,3),k=1,nres),
444 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
445 & nss,(ihpb(k),jhpb(k),k=1,nss),
446 & eini,efree,rmsdev,(q(k,i),k=1,nQ),iR,ib,iparm
447 c write (iout,*) iR,ib,iparm,eini,efree
453 call int_from_cart1(.false.)
455 c write (iout,*) "Calling conf_compar",i
457 if (indpdb.gt.0) then
458 call conf_compar(i,.false.,.true.)
460 c write (iout,*) "Exit conf_compar",i
462 if (bxfile .or.cxfile .or. ensembles.gt.0) write (ientin,rec=i)
463 & ((csingle(l,k),l=1,3),k=1,nres),
464 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
465 & nss,(ihpb(k),jhpb(k),k=1,nss),
466 c & potE(i,iparm),-entfac(i),rms_nat,iscore
467 & potE(i,nparmset),-entfac(i),rms_nat,iscore
468 c write (iout,'(2i5,3e15.5)') i,me,potE(i,iparm),-entfac(i)
470 if (cxfile) call cxwrite(ixdrf,csingle,potE(i,nparmset),
471 & -entfac(i),rms_nat,iscore)
474 close(ientout,status="delete")
476 if (bxfile .or. cxfile .or. ensembles.gt.0) close(ientin)
478 call MPI_Barrier(WHAM_COMM,IERROR)
479 if (me.ne.Master .or. .not.bxfile .and. .not. cxfile
480 & .and. ensembles.eq.0) return
482 if (bxfile .or. ensembles.gt.0) then
483 if (nslice.eq.1) then
484 if (.not.separate_parset) then
485 bxname = prefix(:ilen(prefix))//".bx"
487 write (licz,'(bz,i3.3)') myparm
488 bxname = prefix(:ilen(prefix))//"_par"//licz//".bx"
491 if (.not.separate_parset) then
492 bxname = prefix(:ilen(prefix))//"_slice_"//licz2//".bx"
494 write (licz,'(bz,i3.3)') myparm
495 bxname = prefix(:ilen(prefix))//"par_"//licz//
496 & "_slice_"//licz2//".bx"
499 open (ientout,file=bxname,status="unknown",
500 & form="unformatted",access="direct",recl=lenrec1)
501 write (iout,*) "Master is creating binary database ",
502 & bxname(:ilen(bxname))
505 if (nslice.eq.1) then
506 if (.not.separate_parset) then
507 cxname = prefix(:ilen(prefix))//".cx"
509 cxname = prefix(:ilen(prefix))//"_par"//licz//".cx"
512 if (.not.separate_parset) then
513 cxname = prefix(:ilen(prefix))//
514 & "_slice_"//licz2//".cx"
516 cxname = prefix(:ilen(prefix))//"_par"//licz//
517 & "_slice_"//licz2//".cx"
520 #if (defined(AIX) && !defined(JUBL))
521 call xdrfopen_(ixdrf,cxname, "w", iret)
523 call xdrfopen(ixdrf,cxname, "w", iret)
526 write (iout,*) "Error opening cxfile ",cxname(:ilen(cxname))
531 write (liczba,'(bz,i3.3)') j
532 if (separate_parset) then
533 write (licz,'(bz,i3.3)') myparm
534 bxname = prefix(:ilen(prefix))//liczba//"_par"//licz//".bx"
536 bxname = prefix(:ilen(prefix))//liczba//".bx"
538 open (ientin,file=bxname,status="unknown",
539 & form="unformatted",access="direct",recl=lenrec1)
540 write (iout,*) "Master is reading conformations from ",
541 & bxname(:ilen(bxname))
543 c write (iout,*) "j",j," indstart",indstart(j)," indend",indend(j)
545 do i=indstart(j),indend(j)
547 read(ientin,rec=iii,err=101)
548 & ((csingle(l,k),l=1,3),k=1,nres),
549 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
550 & nss,(ihpb(k),jhpb(k),k=1,nss),
551 & eini,efree,rmsdev,iscor
552 if (bxfile .or. ensembles.gt.0) then
553 write (ientout,rec=i)
554 & ((csingle(l,k),l=1,3),k=1,nres),
555 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
556 & nss,(ihpb(k),jhpb(k),k=1,nss),
557 & eini,efree,rmsdev,iscor
559 if(cxfile)call cxwrite(ixdrf,csingle,eini,efree,rmsdev,iscor)
566 call int_from_cart1(.false.)
567 write (iout,'(2i5,3e15.5)') i,iii,eini,efree
568 write (iout,*) "The Cartesian geometry is:"
569 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
570 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
571 write (iout,*) "The internal geometry is:"
572 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
573 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
574 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
575 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
576 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
577 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
578 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
579 write (iout,'(f10.5,i5)') rmsdev,iscor
582 write (iout,*) iii," conformations (from",indstart(j)," to",
583 & indend(j),") read from ",
584 & bxname(:ilen(bxname))
585 close (ientin,status="delete")
587 if (bxfile .or. cxfile .or. ensembles.gt.0) close (ientout)
588 #if (defined(AIX) && !defined(JUBL))
589 if (cxfile) call xdrfclose_(ixdrf,cxname,iret)
591 if (cxfile) call xdrfclose(ixdrf,cxname,iret)
595 101 write (iout,*) "Error in scratchfile."
599 c-------------------------------------------------------------------------------
600 subroutine cxwrite(ixdrf,csingle,eini,efree,rmsdev,iscor)
603 include "DIMENSIONS.ZSCOPT"
604 include "DIMENSIONS.FREE"
605 include "DIMENSIONS.COMPAR"
608 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
611 include "COMMON.CONTROL"
612 include "COMMON.CHAIN"
613 include "COMMON.IOUNITS"
614 include "COMMON.PROTFILES"
615 include "COMMON.NAMES"
617 include "COMMON.SBRIDGE"
619 include "COMMON.FFIELD"
620 include "COMMON.ENEPS"
621 include "COMMON.LOCAL"
622 include "COMMON.WEIGHTS"
623 include "COMMON.INTERACT"
624 include "COMMON.FREE"
625 include "COMMON.ENERGIES"
626 include "COMMON.COMPAR"
627 include "COMMON.PROT"
628 integer i,j,itmp,iscor,iret,ixdrf
629 double precision rmsdev,efree,eini
630 real*4 csingle(3,maxres2),xoord(3,maxres2+2)
633 c write (iout,*) "cxwrite"
638 xoord(j,i)=csingle(j,i)
643 xoord(j,nres+i-nnt+1)=csingle(j,i+nres)
649 c write (iout,*) "itmp",itmp
651 #if (defined(AIX) && !defined(JUBL))
652 call xdrf3dfcoord_(ixdrf, xoord, itmp, prec, iret)
654 c write (iout,*) "xdrf3dfcoord"
656 call xdrfint_(ixdrf, nss, iret)
658 call xdrfint_(ixdrf, ihpb(j), iret)
659 call xdrfint_(ixdrf, jhpb(j), iret)
661 call xdrffloat_(ixdrf,real(eini),iret)
662 call xdrffloat_(ixdrf,real(efree),iret)
663 call xdrffloat_(ixdrf,real(rmsdev),iret)
664 call xdrfint_(ixdrf,iscor,iret)
666 call xdrf3dfcoord(ixdrf, xoord, itmp, prec, iret)
668 call xdrfint(ixdrf, nss, iret)
670 call xdrfint(ixdrf, ihpb(j), iret)
671 call xdrfint(ixdrf, jhpb(j), iret)
673 call xdrffloat(ixdrf,real(eini),iret)
674 call xdrffloat(ixdrf,real(efree),iret)
675 call xdrffloat(ixdrf,real(rmsdev),iret)
676 call xdrfint(ixdrf,iscor,iret)
681 c------------------------------------------------------------------------------
682 logical function conf_check(ii,iprint)
685 include "DIMENSIONS.ZSCOPT"
686 include "DIMENSIONS.FREE"
689 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
692 include "COMMON.CHAIN"
693 include "COMMON.IOUNITS"
694 include "COMMON.PROTFILES"
695 include "COMMON.NAMES"
697 include "COMMON.SBRIDGE"
699 include "COMMON.FFIELD"
700 include "COMMON.ENEPS"
701 include "COMMON.LOCAL"
702 include "COMMON.WEIGHTS"
703 include "COMMON.INTERACT"
704 include "COMMON.FREE"
705 include "COMMON.ENERGIES"
706 include "COMMON.CONTROL"
707 include "COMMON.TORCNSTR"
708 integer j,k,l,ii,itj,iprint
709 if (.not.check_conf) then
713 call int_from_cart1(.false.)
715 if (itype(j-1).ne.21 .and. itype(j).ne.21 .and.
716 & (vbld(j).lt.2.0d0 .or. vbld(j).gt.5.0d0)) then
718 & write (iout,*) "Bad CA-CA bond length",j," ",vbld(j),
719 & " for conformation",ii
720 if (iprint.gt.1) then
721 write (iout,*) "The Cartesian geometry is:"
722 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
723 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
724 write (iout,*) "The internal geometry is:"
725 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
726 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
727 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
728 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
729 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
730 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
732 if (iprint.gt.0) write (iout,*)
733 & "This conformation WILL NOT be added to the database."
740 if (itype(j).ne.10 .and.itype(j).ne.21 .and.
741 & (vbld(nres+j)-dsc(itj)).gt.2.0d0) then
743 & write (iout,*) "Bad CA-SC bond length",j," ",vbld(nres+j),
744 & " for conformation",ii
745 if (iprint.gt.1) then
746 write (iout,*) "The Cartesian geometry is:"
747 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
748 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
749 write (iout,*) "The internal geometry is:"
750 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
751 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
752 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
753 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
754 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
755 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
757 if (iprint.gt.0) write (iout,*)
758 & "This conformation WILL NOT be added to the database."
764 if (theta(j).le.0.0d0) then
766 & write (iout,*) "Zero theta angle(s) in conformation",ii
767 if (iprint.gt.1) then
768 write (iout,*) "The Cartesian geometry is:"
769 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
770 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
771 write (iout,*) "The internal geometry is:"
772 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
773 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
774 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
775 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
776 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
777 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
779 if (iprint.gt.0) write (iout,*)
780 & "This conformation WILL NOT be added to the database."
784 if (theta(j).gt.179.97*deg2rad) theta(j)=179.97*deg2rad
787 c write (iout,*) "conf_check passed",ii