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
43 double precision energia(0:max_ene),rmsdev,efree,eini
44 double precision fT(6),quot,quotl,kfacl,kfac /2.4d0/,T0 /3.0d2/
46 integer snk_p(MaxR,MaxT_h,Max_parm)
48 character*64 bprotfile_temp
49 call opentmp(islice,ientout,bprotfile_temp)
53 write (iout,*) "enecalc: nparmset ",nparmset
62 do i=indstart(me1),indend(me1)
73 read(ientout,rec=i,err=101)
74 & ((csingle(l,k),l=1,3),k=1,nres),
75 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
76 & nss,(ihpb(k),jhpb(k),k=1,nss),
77 & eini,efree,rmsdev,(q(j,iii+1),j=1,nQ),iR,ib,ipar
86 c(l,k+nres)=csingle(l,k+nres)
89 q(nQ+1,iii+1)=rmsnat(iii+1)
91 q(nQ+2,iii+1)=gyrate(iii+1)
92 c fT=T0*beta_h(ib,ipar)*1.987D-3
93 c ft=2.0d0/(1.0d0+1.0d0/(T0*beta_h(ib,ipar)*1.987D-3))
94 if (rescale_mode.eq.1) then
95 quot=1.0d0/(T0*beta_h(ib,ipar)*1.987D-3)
97 tt = 1.0d0/(beta_h(ib,ipar)*1.987D-3)
98 ft(6)=(320.0+80.0*dtanh((tt-320.0)/80.0))/320.0
109 fT(l)=kfacl/(kfacl-1.0d0+quotl)
111 else if (rescale_mode.eq.2) then
112 quot=1.0d0/(T0*beta_h(ib,ipar)*1.987D-3)
114 tt = 1.0d0/(beta_h(ib,ipar)*1.987D-3)
115 ft(6)=(320.0+80.0*dtanh((tt-320.0)/80.0))/320.0
124 fT(l)=1.12692801104297249644d0/
125 & dlog(dexp(quotl)+dexp(-quotl))
127 else if (rescale_mode.eq.0) then
132 write (iout,*) "Error in ECECALC: wrong RESCALE_MODE",
138 c write (iout,*) "T",1.0d0/(beta_h(ib,ipar)*1.987D-3)," T0",T0,
139 c & " kfac",kfac,"quot",quot," fT",fT
145 call int_from_cart1(.false.)
149 call restore_parm(iparm)
151 write (iout,*) wsc,wscp,welec,wvdwpp,wang,wtor,wscloc,
152 & wcorr,wcorr5,wcorr6,wturn4,wturn3,wturn6,wel_loc,
153 & wtor_d,wsccor,wbond
155 call etotal(energia(0),fT)
157 write (iout,*) "Conformation",i
158 call enerprint(energia(0),fT)
159 c write (iout,'(2i5,21f8.2)') i,iparm,(energia(k),k=1,21)
160 c write (iout,*) "ftors",ftors
163 if (energia(0).ge.1.0d20) then
164 write (iout,*) "NaNs detected in some of the energy",
165 & " components for conformation",ii+1
166 write (iout,*) "The Cartesian geometry is:"
167 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
168 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
169 write (iout,*) "The internal geometry is:"
171 c call pdbout(ii+1,beta_h(ib,ipar),efree,energia(0),0.0d0,rmsdev)
172 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
173 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
174 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
175 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
176 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
177 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
178 write (iout,*) "The components of the energy are:"
179 call enerprint(energia(0),fT)
181 & "This conformation WILL NOT be added to the database."
186 if (ipar.eq.iparm) write (iout,*) i,iparm,
187 & 1.0d0/(beta_h(ib,ipar)*1.987D-3),eini,energia(0)
189 if (ipar.eq.iparm .and. einicheck.gt.0 .and.
190 & dabs(eini-energia(0)).gt.tole) then
191 if (errmsg_count.le.maxerrmsg_count) then
192 write (iout,'(2a,2e15.5,a,2i8,a,f8.1)')
193 & "Warning: energy differs remarkably from ",
194 & " the value read in: ",energia(0),eini," point",
195 & iii+1,indstart(me1)+iii," T",
196 & 1.0d0/(1.987D-3*beta_h(ib,ipar))
197 errmsg_count=errmsg_count+1
199 call pdbout(indstart(me1)+iii,
200 & 1.0d0/(1.987D-3*beta_h(ib,ipar)),
201 &energia(0),eini,0.0d0,0.0d0)
202 call enerprint(energia(0),fT)
203 if (errmsg_count.gt.maxerrmsg_count)
204 & write (iout,*) "Too many warning messages"
205 if (einicheck.gt.1) then
206 write (iout,*) "Calculation stopped."
209 call MPI_Abort(WHAM_COMM,IERROR,ERRCODE)
216 potE(iii+1,iparm)=energia(0)
218 enetb(k,iii+1,iparm)=energia(k)
221 write (iout,'(2i5,f10.1,3e15.5)') i,iii,
222 & 1.0d0/(beta_h(ib,ipar)*1.987D-3),energia(0),eini,efree
223 c call enerprint(energia(0),fT)
226 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
227 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
228 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
229 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
230 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
231 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
232 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
233 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
234 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
235 write (iout,'(8f10.5)') (q(k,iii+1),k=1,nQ)
236 write (iout,'(f10.5,i10)') rmsdev,iscor
237 call enerprint(energia(0),fT)
238 call pdbout(ii+1,beta_h(ib,ipar),efree,energia(0),0.0d0,rmsdev)
245 if (q(1,iii).le.0.0d0 .and. indpdb.gt.0) q(1,iii)=qwolynes(0,0)
246 write (ientout,rec=iii)
247 & ((csingle(l,k),l=1,3),k=1,nres),
248 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
249 & nss,(ihpb(k),jhpb(k),k=1,nss),
250 & potE(iii,ipar),efree,rmsdev,(q(k,iii),k=1,nQ),iR,ib,ipar
251 c write (iout,'(2i5,2e15.5)') ii,iii,potE(iii,ipar),efree
253 if (separate_parset) then
254 snk_p(iR,ib,1)=snk_p(iR,ib,1)+1
256 snk_p(iR,ib,ipar)=snk_p(iR,ib,ipar)+1
258 c write (iout,*) "iii",iii," iR",iR," ib",ib," ipar",ipar,
259 c & " snk",snk_p(iR,ib,ipar)
261 snk(iR,ib,ipar,islice)=snk(iR,ib,ipar,islice)+1
267 write (iout,*) "Me",me," scount",scount(me)
269 c Master gathers updated numbers of conformations written by all procs.
270 call MPI_AllGather( scount(me), 1, MPI_INTEGER, scount(0), 1,
271 & MPI_INTEGER, WHAM_COMM, IERROR)
275 indstart(i)=indend(i-1)+1
276 indend(i)=indstart(i)+scount(i)-1
279 write (iout,*) "Revised conformation counts"
281 write (iout,'(a,i5,a,i7,a,i7,a,i7)')
282 & "Processor",i," indstart",indstart(i),
283 & " indend",indend(i)," count",scount(i)
286 call MPI_AllReduce(snk_p(1,1,1),snk(1,1,1,islice),
287 & MaxR*MaxT_h*nParmSet,
288 & MPI_INTEGER,MPI_SUM,WHAM_COMM,IERROR)
294 stot(islice)=stot(islice)+snk(i,ib,iparm,islice)
298 write (iout,*) "Revised SNK"
301 write (iout,'("Param",i3," Temp",f6.1,3x,32i8)')
302 & iparm,1.0d0/(1.987D-3*beta_h(ib,iparm)),
303 & (snk(i,ib,iparm,islice),i=1,nR(ib,iparm))
304 write (iout,*) "snk_p",(snk_p(i,ib,iparm),i=1,nR(ib,iparm))
307 write (iout,'("Total",i10)') stot(islice)
310 101 write (iout,*) "Error in scratchfile."
314 c------------------------------------------------------------------------------
315 subroutine write_dbase(islice,*)
318 include "DIMENSIONS.ZSCOPT"
319 include "DIMENSIONS.FREE"
320 include "DIMENSIONS.COMPAR"
323 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
326 include "COMMON.CONTROL"
327 include "COMMON.CHAIN"
328 include "COMMON.IOUNITS"
329 include "COMMON.PROTFILES"
330 include "COMMON.NAMES"
332 include "COMMON.SBRIDGE"
334 include "COMMON.FFIELD"
335 include "COMMON.ENEPS"
336 include "COMMON.LOCAL"
337 include "COMMON.WEIGHTS"
338 include "COMMON.INTERACT"
339 include "COMMON.FREE"
340 include "COMMON.ENERGIES"
341 include "COMMON.COMPAR"
342 include "COMMON.PROT"
344 character*80 bxname,cxname
345 character*64 bprotfile_temp
346 character*3 liczba,licz
348 integer i,itj,ii,iii,j,k,l
351 double precision rmsdev,efree,eini
352 real*4 csingle(3,maxres2)
353 double precision energ
357 write (licz2,'(bz,i2.2)') islice
358 call opentmp(islice,ientout,bprotfile_temp)
359 write (iout,*) "bprotfile_temp ",bprotfile_temp
361 if (.not.bxfile .and. .not. cxfile .and. indpdb.eq.0
362 & .and. ensembles.eq.0) then
363 close(ientout,status="delete")
367 write (liczba,'(bz,i3.3)') me
368 if (bxfile .or. cxfile .or. ensembles.gt.0) then
369 if (.not.separate_parset) then
370 bxname = prefix(:ilen(prefix))//liczba//".bx"
372 write (licz,'(bz,i3.3)') myparm
373 bxname = prefix(:ilen(prefix))//liczba//"_par"//licz//".bx"
375 open (ientin,file=bxname,status="unknown",
376 & form="unformatted",access="direct",recl=lenrec1)
379 if (bxfile .or. cxfile .or. ensembles.gt.0) then
380 if (nslice.eq.1) then
381 bxname = prefix(:ilen(prefix))//".bx"
383 bxname = prefix(:ilen(prefix))//
384 & "_slice_"//licz2//".bx"
386 open (ientin,file=bxname,status="unknown",
387 & form="unformatted",access="direct",recl=lenrec1)
388 write (iout,*) "Calculating energies; writing geometry",
389 & " and energy components to ",bxname(:ilen(bxname))
391 #if (defined(AIX) && !defined(JUBL))
392 call xdrfopen_(ixdrf,cxname, "w", iret)
394 call xdrfopen(ixdrf,cxname, "w", iret)
397 write (iout,*) "Error opening cxfile ",cxname(:ilen(cxname))
402 if (indpdb.gt.0) then
403 if (nslice.eq.1) then
405 if (.not.separate_parset) then
406 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))
409 write (licz,'(bz,i3.3)') myparm
410 statname=prefix(:ilen(prefix))//'_par'//licz//'_'//
411 & pot(:ilen(pot))//liczba//'.stat'
415 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//'.stat'
419 if (.not.separate_parset) then
420 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//
421 & "_slice_"//licz2//liczba//'.stat'
423 write (licz,'(bz,i3.3)') myparm
424 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//
425 & '_par'//licz//"_slice_"//licz2//liczba//'.stat'
428 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))
429 & //"_slice_"//licz2//'.stat'
432 open(istat,file=statname,status="unknown")
440 read(ientout,rec=i,err=101)
441 & ((csingle(l,k),l=1,3),k=1,nres),
442 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
443 & nss,(ihpb(k),jhpb(k),k=1,nss),
444 & eini,efree,rmsdev,(q(k,i),k=1,nQ),iR,ib,iparm
445 c write (iout,*) iR,ib,iparm,eini,efree
451 call int_from_cart1(.false.)
453 if (indpdb.gt.0) then
454 call conf_compar(i,.false.,.true.)
456 if (bxfile .or.cxfile .or. ensembles.gt.0) write (ientin,rec=i)
457 & ((csingle(l,k),l=1,3),k=1,nres),
458 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
459 & nss,(ihpb(k),jhpb(k),k=1,nss),
460 c & potE(i,iparm),-entfac(i),rms_nat,iscore
461 & potE(i,nparmset),-entfac(i),rms_nat,iscore
462 c write (iout,'(2i5,3e15.5)') i,me,potE(i,iparm),-entfac(i)
464 if (cxfile) call cxwrite(ixdrf,csingle,potE(i,nparmset),
465 & -entfac(i),rms_nat,iscore)
468 close(ientout,status="delete")
470 if (bxfile .or. cxfile .or. ensembles.gt.0) close(ientin)
472 call MPI_Barrier(WHAM_COMM,IERROR)
473 if (me.ne.Master .or. .not.bxfile .and. .not. cxfile
474 & .and. ensembles.eq.0) return
476 if (bxfile .or. ensembles.gt.0) then
477 if (nslice.eq.1) then
478 if (.not.separate_parset) then
479 bxname = prefix(:ilen(prefix))//".bx"
481 write (licz,'(bz,i3.3)') myparm
482 bxname = prefix(:ilen(prefix))//"_par"//licz//".bx"
485 if (.not.separate_parset) then
486 bxname = prefix(:ilen(prefix))//"_slice_"//licz2//".bx"
488 write (licz,'(bz,i3.3)') myparm
489 bxname = prefix(:ilen(prefix))//"par_"//licz//
490 & "_slice_"//licz2//".bx"
493 open (ientout,file=bxname,status="unknown",
494 & form="unformatted",access="direct",recl=lenrec1)
495 write (iout,*) "Master is creating binary database ",
496 & bxname(:ilen(bxname))
499 if (nslice.eq.1) then
500 if (.not.separate_parset) then
501 cxname = prefix(:ilen(prefix))//".cx"
503 cxname = prefix(:ilen(prefix))//"_par"//licz//".cx"
506 if (.not.separate_parset) then
507 cxname = prefix(:ilen(prefix))//
508 & "_slice_"//licz2//".cx"
510 cxname = prefix(:ilen(prefix))//"_par"//licz//
511 & "_slice_"//licz2//".cx"
514 #if (defined(AIX) && !defined(JUBL))
515 call xdrfopen_(ixdrf,cxname, "w", iret)
517 call xdrfopen(ixdrf,cxname, "w", iret)
520 write (iout,*) "Error opening cxfile ",cxname(:ilen(cxname))
525 write (liczba,'(bz,i3.3)') j
526 if (separate_parset) then
527 write (licz,'(bz,i3.3)') myparm
528 bxname = prefix(:ilen(prefix))//liczba//"_par"//licz//".bx"
530 bxname = prefix(:ilen(prefix))//liczba//".bx"
532 open (ientin,file=bxname,status="unknown",
533 & form="unformatted",access="direct",recl=lenrec1)
534 write (iout,*) "Master is reading conformations from ",
535 & bxname(:ilen(bxname))
537 c write (iout,*) "j",j," indstart",indstart(j)," indend",indend(j)
539 do i=indstart(j),indend(j)
541 read(ientin,rec=iii,err=101)
542 & ((csingle(l,k),l=1,3),k=1,nres),
543 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
544 & nss,(ihpb(k),jhpb(k),k=1,nss),
545 & eini,efree,rmsdev,iscor
546 if (bxfile .or. ensembles.gt.0) then
547 write (ientout,rec=i)
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
553 if(cxfile)call cxwrite(ixdrf,csingle,eini,efree,rmsdev,iscor)
560 call int_from_cart1(.false.)
561 write (iout,'(2i5,3e15.5)') i,iii,eini,efree
562 write (iout,*) "The Cartesian geometry is:"
563 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
564 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
565 write (iout,*) "The internal geometry is:"
566 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
567 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
568 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
569 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
570 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
571 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
572 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
573 write (iout,'(f10.5,i5)') rmsdev,iscor
576 write (iout,*) iii," conformations (from",indstart(j)," to",
577 & indend(j),") read from ",
578 & bxname(:ilen(bxname))
579 close (ientin,status="delete")
581 if (bxfile .or. cxfile .or. ensembles.gt.0) close (ientout)
582 #if (defined(AIX) && !defined(JUBL))
583 if (cxfile) call xdrfclose_(ixdrf,cxname,iret)
585 if (cxfile) call xdrfclose(ixdrf,cxname,iret)
589 101 write (iout,*) "Error in scratchfile."
593 c-------------------------------------------------------------------------------
594 subroutine cxwrite(ixdrf,csingle,eini,efree,rmsdev,iscor)
597 include "DIMENSIONS.ZSCOPT"
598 include "DIMENSIONS.FREE"
599 include "DIMENSIONS.COMPAR"
602 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
605 include "COMMON.CONTROL"
606 include "COMMON.CHAIN"
607 include "COMMON.IOUNITS"
608 include "COMMON.PROTFILES"
609 include "COMMON.NAMES"
611 include "COMMON.SBRIDGE"
613 include "COMMON.FFIELD"
614 include "COMMON.ENEPS"
615 include "COMMON.LOCAL"
616 include "COMMON.WEIGHTS"
617 include "COMMON.INTERACT"
618 include "COMMON.FREE"
619 include "COMMON.ENERGIES"
620 include "COMMON.COMPAR"
621 include "COMMON.PROT"
622 integer i,j,itmp,iscor,iret,ixdrf
623 double precision rmsdev,efree,eini
624 real*4 csingle(3,maxres2),xoord(3,maxres2+2)
627 c write (iout,*) "cxwrite"
632 xoord(j,i)=csingle(j,i)
637 xoord(j,nres+i-nnt+1)=csingle(j,i+nres)
643 c write (iout,*) "itmp",itmp
645 #if (defined(AIX) && !defined(JUBL))
646 call xdrf3dfcoord_(ixdrf, xoord, itmp, prec, iret)
648 c write (iout,*) "xdrf3dfcoord"
650 call xdrfint_(ixdrf, nss, iret)
652 call xdrfint_(ixdrf, ihpb(j), iret)
653 call xdrfint_(ixdrf, jhpb(j), iret)
655 call xdrffloat_(ixdrf,real(eini),iret)
656 call xdrffloat_(ixdrf,real(efree),iret)
657 call xdrffloat_(ixdrf,real(rmsdev),iret)
658 call xdrfint_(ixdrf,iscor,iret)
660 call xdrf3dfcoord(ixdrf, xoord, itmp, prec, iret)
662 call xdrfint(ixdrf, nss, iret)
664 call xdrfint(ixdrf, ihpb(j), iret)
665 call xdrfint(ixdrf, jhpb(j), iret)
667 call xdrffloat(ixdrf,real(eini),iret)
668 call xdrffloat(ixdrf,real(efree),iret)
669 call xdrffloat(ixdrf,real(rmsdev),iret)
670 call xdrfint(ixdrf,iscor,iret)
675 c------------------------------------------------------------------------------
676 logical function conf_check(ii,iprint)
679 include "DIMENSIONS.ZSCOPT"
680 include "DIMENSIONS.FREE"
683 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
686 include "COMMON.CHAIN"
687 include "COMMON.IOUNITS"
688 include "COMMON.PROTFILES"
689 include "COMMON.NAMES"
691 include "COMMON.SBRIDGE"
693 include "COMMON.FFIELD"
694 include "COMMON.ENEPS"
695 include "COMMON.LOCAL"
696 include "COMMON.WEIGHTS"
697 include "COMMON.INTERACT"
698 include "COMMON.FREE"
699 include "COMMON.ENERGIES"
700 include "COMMON.CONTROL"
701 include "COMMON.TORCNSTR"
702 integer j,k,l,ii,itj,iprint
703 if (.not.check_conf) then
707 call int_from_cart1(.false.)
709 if (vbld(j).lt.2.0d0 .or. vbld(j).gt.5.0d0) then
711 & write (iout,*) "Bad CA-CA bond length",j," ",vbld(j),
712 & " for conformation",ii
713 if (iprint.gt.1) then
714 write (iout,*) "The Cartesian geometry is:"
715 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
716 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
717 write (iout,*) "The internal geometry is:"
718 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
719 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
720 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
721 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
722 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
723 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
725 if (iprint.gt.0) write (iout,*)
726 & "This conformation WILL NOT be added to the database."
733 if (itype(j).ne.10 .and.(vbld(nres+j)-dsc(iabs(itj))).gt.2.0d0)
736 & write (iout,*) "Bad CA-SC bond length",j," ",vbld(nres+j),
737 & " for conformation",ii
738 if (iprint.gt.1) then
739 write (iout,*) "The Cartesian geometry is:"
740 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
741 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
742 write (iout,*) "The internal geometry is:"
743 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
744 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
745 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
746 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
747 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
748 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
750 if (iprint.gt.0) write (iout,*)
751 & "This conformation WILL NOT be added to the database."
757 if (theta(j).le.0.0d0) then
759 & write (iout,*) "Zero theta angle(s) in conformation",ii
760 if (iprint.gt.1) then
761 write (iout,*) "The Cartesian geometry is:"
762 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
763 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
764 write (iout,*) "The internal geometry is:"
765 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
766 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
767 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
768 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
769 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
770 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
772 if (iprint.gt.0) write (iout,*)
773 & "This conformation WILL NOT be added to the database."
777 if (theta(j).gt.179.97*deg2rad) theta(j)=179.97*deg2rad
780 c write (iout,*) "conf_check passed",ii