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
198 call enerprint(energia(0),fT)
199 if (errmsg_count.gt.maxerrmsg_count)
200 & write (iout,*) "Too many warning messages"
201 if (einicheck.gt.1) then
202 write (iout,*) "Calculation stopped."
205 call MPI_Abort(WHAM_COMM,IERROR,ERRCODE)
212 potE(iii+1,iparm)=energia(0)
214 enetb(k,iii+1,iparm)=energia(k)
217 write (iout,'(2i5,f10.1,3e15.5)') i,iii,
218 & 1.0d0/(beta_h(ib,ipar)*1.987D-3),energia(0),eini,efree
219 c call enerprint(energia(0),fT)
222 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
223 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
224 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
225 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
226 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
227 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
228 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
229 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
230 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
231 write (iout,'(8f10.5)') (q(k,iii+1),k=1,nQ)
232 write (iout,'(f10.5,i10)') rmsdev,iscor
233 call enerprint(energia(0),fT)
234 call pdbout(ii+1,beta_h(ib,ipar),efree,energia(0),0.0d0,rmsdev)
241 if (q(1,iii).le.0.0d0 .and. indpdb.gt.0) q(1,iii)=qwolynes(0,0)
242 write (ientout,rec=iii)
243 & ((csingle(l,k),l=1,3),k=1,nres),
244 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
245 & nss,(ihpb(k),jhpb(k),k=1,nss),
246 & potE(iii,ipar),efree,rmsdev,(q(k,iii),k=1,nQ),iR,ib,ipar
247 c write (iout,'(2i5,2e15.5)') ii,iii,potE(iii,ipar),efree
249 if (separate_parset) then
250 snk_p(iR,ib,1)=snk_p(iR,ib,1)+1
252 snk_p(iR,ib,ipar)=snk_p(iR,ib,ipar)+1
254 c write (iout,*) "iii",iii," iR",iR," ib",ib," ipar",ipar,
255 c & " snk",snk_p(iR,ib,ipar)
257 snk(iR,ib,ipar,islice)=snk(iR,ib,ipar,islice)+1
263 write (iout,*) "Me",me," scount",scount(me)
265 c Master gathers updated numbers of conformations written by all procs.
266 call MPI_AllGather( scount(me), 1, MPI_INTEGER, scount(0), 1,
267 & MPI_INTEGER, WHAM_COMM, IERROR)
271 indstart(i)=indend(i-1)+1
272 indend(i)=indstart(i)+scount(i)-1
275 write (iout,*) "Revised conformation counts"
277 write (iout,'(a,i5,a,i7,a,i7,a,i7)')
278 & "Processor",i," indstart",indstart(i),
279 & " indend",indend(i)," count",scount(i)
282 call MPI_AllReduce(snk_p(1,1,1),snk(1,1,1,islice),
283 & MaxR*MaxT_h*nParmSet,
284 & MPI_INTEGER,MPI_SUM,WHAM_COMM,IERROR)
290 stot(islice)=stot(islice)+snk(i,ib,iparm,islice)
294 write (iout,*) "Revised SNK"
297 write (iout,'("Param",i3," Temp",f6.1,3x,32i8)')
298 & iparm,1.0d0/(1.987D-3*beta_h(ib,iparm)),
299 & (snk(i,ib,iparm,islice),i=1,nR(ib,iparm))
300 write (iout,*) "snk_p",(snk_p(i,ib,iparm),i=1,nR(ib,iparm))
303 write (iout,'("Total",i10)') stot(islice)
306 101 write (iout,*) "Error in scratchfile."
310 c------------------------------------------------------------------------------
311 subroutine write_dbase(islice,*)
314 include "DIMENSIONS.ZSCOPT"
315 include "DIMENSIONS.FREE"
316 include "DIMENSIONS.COMPAR"
319 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
322 include "COMMON.CONTROL"
323 include "COMMON.CHAIN"
324 include "COMMON.IOUNITS"
325 include "COMMON.PROTFILES"
326 include "COMMON.NAMES"
328 include "COMMON.SBRIDGE"
330 include "COMMON.FFIELD"
331 include "COMMON.ENEPS"
332 include "COMMON.LOCAL"
333 include "COMMON.WEIGHTS"
334 include "COMMON.INTERACT"
335 include "COMMON.FREE"
336 include "COMMON.ENERGIES"
337 include "COMMON.COMPAR"
338 include "COMMON.PROT"
340 character*80 bxname,cxname
341 character*64 bprotfile_temp
342 character*3 liczba,licz
344 integer i,itj,ii,iii,j,k,l
347 double precision rmsdev,efree,eini
348 real*4 csingle(3,maxres2)
349 double precision energ
353 write (licz2,'(bz,i2.2)') islice
354 call opentmp(islice,ientout,bprotfile_temp)
355 write (iout,*) "bprotfile_temp ",bprotfile_temp
357 if (.not.bxfile .and. .not. cxfile .and. indpdb.eq.0
358 & .and. ensembles.eq.0) then
359 close(ientout,status="delete")
363 write (liczba,'(bz,i3.3)') me
364 if (bxfile .or. cxfile .or. ensembles.gt.0) then
365 if (.not.separate_parset) then
366 bxname = prefix(:ilen(prefix))//liczba//".bx"
368 write (licz,'(bz,i3.3)') myparm
369 bxname = prefix(:ilen(prefix))//liczba//"_par"//licz//".bx"
371 open (ientin,file=bxname,status="unknown",
372 & form="unformatted",access="direct",recl=lenrec1)
375 if (bxfile .or. cxfile .or. ensembles.gt.0) then
376 if (nslice.eq.1) then
377 bxname = prefix(:ilen(prefix))//".bx"
379 bxname = prefix(:ilen(prefix))//
380 & "_slice_"//licz2//".bx"
382 open (ientin,file=bxname,status="unknown",
383 & form="unformatted",access="direct",recl=lenrec1)
384 write (iout,*) "Calculating energies; writing geometry",
385 & " and energy components to ",bxname(:ilen(bxname))
387 #if (defined(AIX) && !defined(JUBL))
388 call xdrfopen_(ixdrf,cxname, "w", iret)
390 call xdrfopen(ixdrf,cxname, "w", iret)
393 write (iout,*) "Error opening cxfile ",cxname(:ilen(cxname))
398 if (indpdb.gt.0) then
399 if (nslice.eq.1) then
401 if (.not.separate_parset) then
402 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))
405 write (licz,'(bz,i3.3)') myparm
406 statname=prefix(:ilen(prefix))//'_par'//licz//'_'//
407 & pot(:ilen(pot))//liczba//'.stat'
411 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//'.stat'
415 if (.not.separate_parset) then
416 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//
417 & "_slice_"//licz2//liczba//'.stat'
419 write (licz,'(bz,i3.3)') myparm
420 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//
421 & '_par'//licz//"_slice_"//licz2//liczba//'.stat'
424 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))
425 & //"_slice_"//licz2//'.stat'
428 open(istat,file=statname,status="unknown")
436 read(ientout,rec=i,err=101)
437 & ((csingle(l,k),l=1,3),k=1,nres),
438 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
439 & nss,(ihpb(k),jhpb(k),k=1,nss),
440 & eini,efree,rmsdev,(q(k,i),k=1,nQ),iR,ib,iparm
441 c write (iout,*) iR,ib,iparm,eini,efree
447 call int_from_cart1(.false.)
449 if (indpdb.gt.0) then
450 call conf_compar(i,.false.,.true.)
452 if (bxfile .or.cxfile .or. ensembles.gt.0) write (ientin,rec=i)
453 & ((csingle(l,k),l=1,3),k=1,nres),
454 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
455 & nss,(ihpb(k),jhpb(k),k=1,nss),
456 c & potE(i,iparm),-entfac(i),rms_nat,iscore
457 & potE(i,nparmset),-entfac(i),rms_nat,iscore
458 c write (iout,'(2i5,3e15.5)') i,me,potE(i,iparm),-entfac(i)
460 if (cxfile) call cxwrite(ixdrf,csingle,potE(i,nparmset),
461 & -entfac(i),rms_nat,iscore)
464 close(ientout,status="delete")
466 if (bxfile .or. cxfile .or. ensembles.gt.0) close(ientin)
468 call MPI_Barrier(WHAM_COMM,IERROR)
469 if (me.ne.Master .or. .not.bxfile .and. .not. cxfile
470 & .and. ensembles.eq.0) return
472 if (bxfile .or. ensembles.gt.0) then
473 if (nslice.eq.1) then
474 if (.not.separate_parset) then
475 bxname = prefix(:ilen(prefix))//".bx"
477 write (licz,'(bz,i3.3)') myparm
478 bxname = prefix(:ilen(prefix))//"_par"//licz//".bx"
481 if (.not.separate_parset) then
482 bxname = prefix(:ilen(prefix))//"_slice_"//licz2//".bx"
484 write (licz,'(bz,i3.3)') myparm
485 bxname = prefix(:ilen(prefix))//"par_"//licz//
486 & "_slice_"//licz2//".bx"
489 open (ientout,file=bxname,status="unknown",
490 & form="unformatted",access="direct",recl=lenrec1)
491 write (iout,*) "Master is creating binary database ",
492 & bxname(:ilen(bxname))
495 if (nslice.eq.1) then
496 if (.not.separate_parset) then
497 cxname = prefix(:ilen(prefix))//".cx"
499 cxname = prefix(:ilen(prefix))//"_par"//licz//".cx"
502 if (.not.separate_parset) then
503 cxname = prefix(:ilen(prefix))//
504 & "_slice_"//licz2//".cx"
506 cxname = prefix(:ilen(prefix))//"_par"//licz//
507 & "_slice_"//licz2//".cx"
510 #if (defined(AIX) && !defined(JUBL))
511 call xdrfopen_(ixdrf,cxname, "w", iret)
513 call xdrfopen(ixdrf,cxname, "w", iret)
516 write (iout,*) "Error opening cxfile ",cxname(:ilen(cxname))
521 write (liczba,'(bz,i3.3)') j
522 if (separate_parset) then
523 write (licz,'(bz,i3.3)') myparm
524 bxname = prefix(:ilen(prefix))//liczba//"_par"//licz//".bx"
526 bxname = prefix(:ilen(prefix))//liczba//".bx"
528 open (ientin,file=bxname,status="unknown",
529 & form="unformatted",access="direct",recl=lenrec1)
530 write (iout,*) "Master is reading conformations from ",
531 & bxname(:ilen(bxname))
533 c write (iout,*) "j",j," indstart",indstart(j)," indend",indend(j)
535 do i=indstart(j),indend(j)
537 read(ientin,rec=iii,err=101)
538 & ((csingle(l,k),l=1,3),k=1,nres),
539 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
540 & nss,(ihpb(k),jhpb(k),k=1,nss),
541 & eini,efree,rmsdev,iscor
542 if (bxfile .or. ensembles.gt.0) then
543 write (ientout,rec=i)
544 & ((csingle(l,k),l=1,3),k=1,nres),
545 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
546 & nss,(ihpb(k),jhpb(k),k=1,nss),
547 & eini,efree,rmsdev,iscor
549 if(cxfile)call cxwrite(ixdrf,csingle,eini,efree,rmsdev,iscor)
556 call int_from_cart1(.false.)
557 write (iout,'(2i5,3e15.5)') i,iii,eini,efree
558 write (iout,*) "The Cartesian geometry is:"
559 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
560 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
561 write (iout,*) "The internal geometry is:"
562 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
563 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
564 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
565 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
566 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
567 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
568 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
569 write (iout,'(f10.5,i5)') rmsdev,iscor
572 write (iout,*) iii," conformations (from",indstart(j)," to",
573 & indend(j),") read from ",
574 & bxname(:ilen(bxname))
575 close (ientin,status="delete")
577 if (bxfile .or. cxfile .or. ensembles.gt.0) close (ientout)
578 #if (defined(AIX) && !defined(JUBL))
579 if (cxfile) call xdrfclose_(ixdrf,cxname,iret)
581 if (cxfile) call xdrfclose(ixdrf,cxname,iret)
585 101 write (iout,*) "Error in scratchfile."
589 c-------------------------------------------------------------------------------
590 subroutine cxwrite(ixdrf,csingle,eini,efree,rmsdev,iscor)
593 include "DIMENSIONS.ZSCOPT"
594 include "DIMENSIONS.FREE"
595 include "DIMENSIONS.COMPAR"
598 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
601 include "COMMON.CONTROL"
602 include "COMMON.CHAIN"
603 include "COMMON.IOUNITS"
604 include "COMMON.PROTFILES"
605 include "COMMON.NAMES"
607 include "COMMON.SBRIDGE"
609 include "COMMON.FFIELD"
610 include "COMMON.ENEPS"
611 include "COMMON.LOCAL"
612 include "COMMON.WEIGHTS"
613 include "COMMON.INTERACT"
614 include "COMMON.FREE"
615 include "COMMON.ENERGIES"
616 include "COMMON.COMPAR"
617 include "COMMON.PROT"
618 integer i,j,itmp,iscor,iret,ixdrf
619 double precision rmsdev,efree,eini
620 real*4 csingle(3,maxres2),xoord(3,maxres2+2)
623 c write (iout,*) "cxwrite"
628 xoord(j,i)=csingle(j,i)
633 xoord(j,nres+i-nnt+1)=csingle(j,i+nres)
639 c write (iout,*) "itmp",itmp
641 #if (defined(AIX) && !defined(JUBL))
642 call xdrf3dfcoord_(ixdrf, xoord, itmp, prec, iret)
644 c write (iout,*) "xdrf3dfcoord"
646 call xdrfint_(ixdrf, nss, iret)
648 call xdrfint_(ixdrf, ihpb(j), iret)
649 call xdrfint_(ixdrf, jhpb(j), iret)
651 call xdrffloat_(ixdrf,real(eini),iret)
652 call xdrffloat_(ixdrf,real(efree),iret)
653 call xdrffloat_(ixdrf,real(rmsdev),iret)
654 call xdrfint_(ixdrf,iscor,iret)
656 call xdrf3dfcoord(ixdrf, xoord, itmp, prec, iret)
658 call xdrfint(ixdrf, nss, iret)
660 call xdrfint(ixdrf, ihpb(j), iret)
661 call xdrfint(ixdrf, jhpb(j), iret)
663 call xdrffloat(ixdrf,real(eini),iret)
664 call xdrffloat(ixdrf,real(efree),iret)
665 call xdrffloat(ixdrf,real(rmsdev),iret)
666 call xdrfint(ixdrf,iscor,iret)
671 c------------------------------------------------------------------------------
672 logical function conf_check(ii,iprint)
675 include "DIMENSIONS.ZSCOPT"
676 include "DIMENSIONS.FREE"
679 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
682 include "COMMON.CHAIN"
683 include "COMMON.IOUNITS"
684 include "COMMON.PROTFILES"
685 include "COMMON.NAMES"
687 include "COMMON.SBRIDGE"
689 include "COMMON.FFIELD"
690 include "COMMON.ENEPS"
691 include "COMMON.LOCAL"
692 include "COMMON.WEIGHTS"
693 include "COMMON.INTERACT"
694 include "COMMON.FREE"
695 include "COMMON.ENERGIES"
696 include "COMMON.CONTROL"
697 include "COMMON.TORCNSTR"
698 integer j,k,l,ii,itj,iprint
699 if (.not.check_conf) then
703 call int_from_cart1(.false.)
705 if (vbld(j).lt.2.0d0 .or. vbld(j).gt.5.0d0) then
707 & write (iout,*) "Bad CA-CA bond length",j," ",vbld(j),
708 & " for conformation",ii
709 if (iprint.gt.1) then
710 write (iout,*) "The Cartesian geometry is:"
711 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
712 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
713 write (iout,*) "The internal geometry is:"
714 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
715 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
716 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
717 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
718 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
719 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
721 if (iprint.gt.0) write (iout,*)
722 & "This conformation WILL NOT be added to the database."
729 if (itype(j).ne.10 .and. (vbld(nres+j)-dsc(itj)).gt.2.0d0) then
731 & write (iout,*) "Bad CA-SC bond length",j," ",vbld(nres+j),
732 & " for conformation",ii
733 if (iprint.gt.1) then
734 write (iout,*) "The Cartesian geometry is:"
735 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
736 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
737 write (iout,*) "The internal geometry is:"
738 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
739 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
740 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
741 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
742 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
743 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
745 if (iprint.gt.0) write (iout,*)
746 & "This conformation WILL NOT be added to the database."
752 if (theta(j).le.0.0d0) then
754 & write (iout,*) "Zero theta angle(s) in conformation",ii
755 if (iprint.gt.1) then
756 write (iout,*) "The Cartesian geometry is:"
757 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
758 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
759 write (iout,*) "The internal geometry is:"
760 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
761 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
762 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
763 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
764 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
765 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
767 if (iprint.gt.0) write (iout,*)
768 & "This conformation WILL NOT be added to the database."
772 if (theta(j).gt.179.97*deg2rad) theta(j)=179.97*deg2rad
775 c write (iout,*) "conf_check passed",ii