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 c write (iout,*) "Calling ETOTAL"
156 call etotal(energia(0),fT,beta_h(ib,iparm))
158 write (iout,*) "Conformation",i
159 call enerprint(energia(0),fT)
160 c write (iout,'(2i5,21f8.2)') i,iparm,(energia(k),k=1,21)
161 c write (iout,*) "ftors",ftors
164 if (energia(0).ge.1.0d20) then
165 write (iout,*) "NaNs detected in some of the energy",
166 & " components for conformation",ii+1
167 write (iout,*) "The Cartesian geometry is:"
168 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
169 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
170 write (iout,*) "The internal geometry is:"
172 c call pdbout(ii+1,beta_h(ib,ipar),efree,energia(0),0.0d0,rmsdev)
173 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
174 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
175 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
176 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
177 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
178 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
179 write (iout,*) "The components of the energy are:"
180 call enerprint(energia(0),fT)
182 & "This conformation WILL NOT be added to the database."
187 if (ipar.eq.iparm) write (iout,*) i,iparm,
188 & 1.0d0/(beta_h(ib,ipar)*1.987D-3),eini,energia(0)
190 if (ipar.eq.iparm .and. einicheck.gt.0 .and.
191 & dabs(eini-energia(0)).gt.tole) then
192 if (errmsg_count.le.maxerrmsg_count) then
193 write (iout,'(2a,2e15.5,a,2i8,a,f8.1)')
194 & "Warning: energy differs remarkably from ",
195 & " the value read in: ",energia(0),eini," point",
196 & iii+1,indstart(me1)+iii," T",
197 & 1.0d0/(1.987D-3*beta_h(ib,ipar))
198 errmsg_count=errmsg_count+1
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 call enerprint(energia(0),fT)
220 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
221 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
222 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
223 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
224 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
225 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
226 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
227 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
228 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
229 write (iout,'(8f10.5)') (q(k,iii+1),k=1,nQ)
230 write (iout,'(f10.5,i10)') rmsdev,iscor
231 call enerprint(energia(0),fT)
232 write(liczba,'(bz,i3.3)') me
233 nazwa="test"//liczba//".pdb"
234 write (iout,*) "pdb file",nazwa
235 open (ipdb,file=nazwa,position="append")
236 call pdbout(ii+1,beta_h(ib,ipar),efree,energia(0),0.0d0,rmsdev)
244 if (q(1,iii).le.0.0d0 .and. indpdb.gt.0) q(1,iii)=qwolynes(0,0)
245 write (ientout,rec=iii)
246 & ((csingle(l,k),l=1,3),k=1,nres),
247 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
248 & nss,(ihpb(k),jhpb(k),k=1,nss),
249 & potE(iii,ipar),efree,rmsdev,(q(k,iii),k=1,nQ),iR,ib,ipar
250 c write (iout,'(2i5,2e15.5)') ii,iii,potE(iii,ipar),efree
252 if (separate_parset) then
253 snk_p(iR,ib,1)=snk_p(iR,ib,1)+1
255 snk_p(iR,ib,ipar)=snk_p(iR,ib,ipar)+1
257 c write (iout,*) "iii",iii," iR",iR," ib",ib," ipar",ipar,
258 c & " snk",snk_p(iR,ib,ipar)
260 snk(iR,ib,ipar,islice)=snk(iR,ib,ipar,islice)+1
266 write (iout,*) "Me",me," scount",scount(me)
268 c Master gathers updated numbers of conformations written by all procs.
269 call MPI_AllGather( scount(me), 1, MPI_INTEGER, scount(0), 1,
270 & MPI_INTEGER, WHAM_COMM, IERROR)
274 indstart(i)=indend(i-1)+1
275 indend(i)=indstart(i)+scount(i)-1
278 write (iout,*) "Revised conformation counts"
280 write (iout,'(a,i5,a,i7,a,i7,a,i7)')
281 & "Processor",i," indstart",indstart(i),
282 & " indend",indend(i)," count",scount(i)
285 call MPI_AllReduce(snk_p(1,1,1),snk(1,1,1,islice),
286 & MaxR*MaxT_h*nParmSet,
287 & MPI_INTEGER,MPI_SUM,WHAM_COMM,IERROR)
293 stot(islice)=stot(islice)+snk(i,ib,iparm,islice)
297 write (iout,*) "Revised SNK"
300 write (iout,'("Param",i3," Temp",f6.1,3x,32i8)')
301 & iparm,1.0d0/(1.987D-3*beta_h(ib,iparm)),
302 & (snk(i,ib,iparm,islice),i=1,nR(ib,iparm))
303 write (iout,*) "snk_p",(snk_p(i,ib,iparm),i=1,nR(ib,iparm))
306 write (iout,'("Total",i10)') stot(islice)
309 101 write (iout,*) "Error in scratchfile."
313 c------------------------------------------------------------------------------
314 subroutine write_dbase(islice,*)
317 include "DIMENSIONS.ZSCOPT"
318 include "DIMENSIONS.FREE"
319 include "DIMENSIONS.COMPAR"
322 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
325 include "COMMON.CONTROL"
326 include "COMMON.CHAIN"
327 include "COMMON.IOUNITS"
328 include "COMMON.PROTFILES"
329 include "COMMON.NAMES"
331 include "COMMON.SBRIDGE"
333 include "COMMON.FFIELD"
334 include "COMMON.ENEPS"
335 include "COMMON.LOCAL"
336 include "COMMON.WEIGHTS"
337 include "COMMON.INTERACT"
338 include "COMMON.FREE"
339 include "COMMON.ENERGIES"
340 include "COMMON.COMPAR"
341 include "COMMON.PROT"
343 character*80 bxname,cxname
344 character*64 bprotfile_temp
345 character*3 liczba,licz
347 integer i,itj,ii,iii,j,k,l
350 double precision rmsdev,efree,eini
351 real*4 csingle(3,maxres2)
352 double precision energ
356 write (licz2,'(bz,i2.2)') islice
357 call opentmp(islice,ientout,bprotfile_temp)
358 write (iout,*) "bprotfile_temp ",bprotfile_temp
360 if (.not.bxfile .and. .not. cxfile .and. indpdb.eq.0
361 & .and. ensembles.eq.0) then
362 close(ientout,status="delete")
366 write (liczba,'(bz,i3.3)') me
367 if (bxfile .or. cxfile .or. ensembles.gt.0) then
368 if (.not.separate_parset) then
369 bxname = prefix(:ilen(prefix))//liczba//".bx"
371 write (licz,'(bz,i3.3)') myparm
372 bxname = prefix(:ilen(prefix))//liczba//"_par"//licz//".bx"
374 open (ientin,file=bxname,status="unknown",
375 & form="unformatted",access="direct",recl=lenrec1)
378 if (bxfile .or. cxfile .or. ensembles.gt.0) then
379 if (nslice.eq.1) then
380 bxname = prefix(:ilen(prefix))//".bx"
382 bxname = prefix(:ilen(prefix))//
383 & "_slice_"//licz2//".bx"
385 open (ientin,file=bxname,status="unknown",
386 & form="unformatted",access="direct",recl=lenrec1)
387 write (iout,*) "Calculating energies; writing geometry",
388 & " and energy components to ",bxname(:ilen(bxname))
390 #if (defined(AIX) && !defined(JUBL))
391 call xdrfopen_(ixdrf,cxname, "w", iret)
393 call xdrfopen(ixdrf,cxname, "w", iret)
396 write (iout,*) "Error opening cxfile ",cxname(:ilen(cxname))
401 if (indpdb.gt.0) then
402 if (nslice.eq.1) then
404 if (.not.separate_parset) then
405 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))
408 write (licz,'(bz,i3.3)') myparm
409 statname=prefix(:ilen(prefix))//'_par'//licz//'_'//
410 & pot(:ilen(pot))//liczba//'.stat'
414 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//'.stat'
418 if (.not.separate_parset) then
419 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//
420 & "_slice_"//licz2//liczba//'.stat'
422 write (licz,'(bz,i3.3)') myparm
423 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//
424 & '_par'//licz//"_slice_"//licz2//liczba//'.stat'
427 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))
428 & //"_slice_"//licz2//'.stat'
431 open(istat,file=statname,status="unknown")
439 read(ientout,rec=i,err=101)
440 & ((csingle(l,k),l=1,3),k=1,nres),
441 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
442 & nss,(ihpb(k),jhpb(k),k=1,nss),
443 & eini,efree,rmsdev,(q(k,i),k=1,nQ),iR,ib,iparm
444 c write (iout,*) iR,ib,iparm,eini,efree
450 call int_from_cart1(.false.)
452 if (indpdb.gt.0) then
453 call conf_compar(i,.false.,.true.)
455 if (bxfile .or.cxfile .or. ensembles.gt.0) write (ientin,rec=i)
456 & ((csingle(l,k),l=1,3),k=1,nres),
457 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
458 & nss,(ihpb(k),jhpb(k),k=1,nss),
459 c & potE(i,iparm),-entfac(i),rms_nat,iscore
460 & potE(i,nparmset),-entfac(i),rms_nat,iscore
461 c write (iout,'(2i5,3e15.5)') i,me,potE(i,iparm),-entfac(i)
463 if (cxfile) call cxwrite(ixdrf,csingle,potE(i,nparmset),
464 & -entfac(i),rms_nat,iscore)
467 close(ientout,status="delete")
469 if (bxfile .or. cxfile .or. ensembles.gt.0) close(ientin)
471 call MPI_Barrier(WHAM_COMM,IERROR)
472 if (me.ne.Master .or. .not.bxfile .and. .not. cxfile
473 & .and. ensembles.eq.0) return
475 if (bxfile .or. ensembles.gt.0) then
476 if (nslice.eq.1) then
477 if (.not.separate_parset) then
478 bxname = prefix(:ilen(prefix))//".bx"
480 write (licz,'(bz,i3.3)') myparm
481 bxname = prefix(:ilen(prefix))//"_par"//licz//".bx"
484 if (.not.separate_parset) then
485 bxname = prefix(:ilen(prefix))//"_slice_"//licz2//".bx"
487 write (licz,'(bz,i3.3)') myparm
488 bxname = prefix(:ilen(prefix))//"par_"//licz//
489 & "_slice_"//licz2//".bx"
492 open (ientout,file=bxname,status="unknown",
493 & form="unformatted",access="direct",recl=lenrec1)
494 write (iout,*) "Master is creating binary database ",
495 & bxname(:ilen(bxname))
498 if (nslice.eq.1) then
499 if (.not.separate_parset) then
500 cxname = prefix(:ilen(prefix))//".cx"
502 cxname = prefix(:ilen(prefix))//"_par"//licz//".cx"
505 if (.not.separate_parset) then
506 cxname = prefix(:ilen(prefix))//
507 & "_slice_"//licz2//".cx"
509 cxname = prefix(:ilen(prefix))//"_par"//licz//
510 & "_slice_"//licz2//".cx"
513 #if (defined(AIX) && !defined(JUBL))
514 call xdrfopen_(ixdrf,cxname, "w", iret)
516 call xdrfopen(ixdrf,cxname, "w", iret)
519 write (iout,*) "Error opening cxfile ",cxname(:ilen(cxname))
524 write (liczba,'(bz,i3.3)') j
525 if (separate_parset) then
526 write (licz,'(bz,i3.3)') myparm
527 bxname = prefix(:ilen(prefix))//liczba//"_par"//licz//".bx"
529 bxname = prefix(:ilen(prefix))//liczba//".bx"
531 open (ientin,file=bxname,status="unknown",
532 & form="unformatted",access="direct",recl=lenrec1)
533 write (iout,*) "Master is reading conformations from ",
534 & bxname(:ilen(bxname))
536 c write (iout,*) "j",j," indstart",indstart(j)," indend",indend(j)
538 do i=indstart(j),indend(j)
540 read(ientin,rec=iii,err=101)
541 & ((csingle(l,k),l=1,3),k=1,nres),
542 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
543 & nss,(ihpb(k),jhpb(k),k=1,nss),
544 & eini,efree,rmsdev,iscor
545 if (bxfile .or. ensembles.gt.0) then
546 write (ientout,rec=i)
547 & ((csingle(l,k),l=1,3),k=1,nres),
548 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
549 & nss,(ihpb(k),jhpb(k),k=1,nss),
550 & eini,efree,rmsdev,iscor
552 if(cxfile)call cxwrite(ixdrf,csingle,eini,efree,rmsdev,iscor)
559 call int_from_cart1(.false.)
560 write (iout,'(2i5,3e15.5)') i,iii,eini,efree
561 write (iout,*) "The Cartesian geometry is:"
562 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
563 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
564 write (iout,*) "The internal geometry is:"
565 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
566 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
567 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
568 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
569 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
570 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
571 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
572 write (iout,'(f10.5,i5)') rmsdev,iscor
575 write (iout,*) iii," conformations (from",indstart(j)," to",
576 & indend(j),") read from ",
577 & bxname(:ilen(bxname))
578 close (ientin,status="delete")
580 if (bxfile .or. cxfile .or. ensembles.gt.0) close (ientout)
581 #if (defined(AIX) && !defined(JUBL))
582 if (cxfile) call xdrfclose_(ixdrf,cxname,iret)
584 if (cxfile) call xdrfclose(ixdrf,cxname,iret)
588 101 write (iout,*) "Error in scratchfile."
592 c-------------------------------------------------------------------------------
593 subroutine cxwrite(ixdrf,csingle,eini,efree,rmsdev,iscor)
596 include "DIMENSIONS.ZSCOPT"
597 include "DIMENSIONS.FREE"
598 include "DIMENSIONS.COMPAR"
601 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
604 include "COMMON.CONTROL"
605 include "COMMON.CHAIN"
606 include "COMMON.IOUNITS"
607 include "COMMON.PROTFILES"
608 include "COMMON.NAMES"
610 include "COMMON.SBRIDGE"
612 include "COMMON.FFIELD"
613 include "COMMON.ENEPS"
614 include "COMMON.LOCAL"
615 include "COMMON.WEIGHTS"
616 include "COMMON.INTERACT"
617 include "COMMON.FREE"
618 include "COMMON.ENERGIES"
619 include "COMMON.COMPAR"
620 include "COMMON.PROT"
621 integer i,j,itmp,iscor,iret,ixdrf
622 double precision rmsdev,efree,eini
623 real*4 csingle(3,maxres2),xoord(3,maxres2+2)
626 c write (iout,*) "cxwrite"
631 xoord(j,i)=csingle(j,i)
636 xoord(j,nres+i-nnt+1)=csingle(j,i+nres)
642 c write (iout,*) "itmp",itmp
644 #if (defined(AIX) && !defined(JUBL))
645 call xdrf3dfcoord_(ixdrf, xoord, itmp, prec, iret)
647 c write (iout,*) "xdrf3dfcoord"
649 call xdrfint_(ixdrf, nss, iret)
651 call xdrfint_(ixdrf, ihpb(j), iret)
652 call xdrfint_(ixdrf, jhpb(j), iret)
654 call xdrffloat_(ixdrf,real(eini),iret)
655 call xdrffloat_(ixdrf,real(efree),iret)
656 call xdrffloat_(ixdrf,real(rmsdev),iret)
657 call xdrfint_(ixdrf,iscor,iret)
659 call xdrf3dfcoord(ixdrf, xoord, itmp, prec, iret)
661 call xdrfint(ixdrf, nss, iret)
663 call xdrfint(ixdrf, ihpb(j), iret)
664 call xdrfint(ixdrf, jhpb(j), iret)
666 call xdrffloat(ixdrf,real(eini),iret)
667 call xdrffloat(ixdrf,real(efree),iret)
668 call xdrffloat(ixdrf,real(rmsdev),iret)
669 call xdrfint(ixdrf,iscor,iret)
674 c------------------------------------------------------------------------------
675 logical function conf_check(ii,iprint)
678 include "DIMENSIONS.ZSCOPT"
679 include "DIMENSIONS.FREE"
682 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
685 include "COMMON.CHAIN"
686 include "COMMON.IOUNITS"
687 include "COMMON.PROTFILES"
688 include "COMMON.NAMES"
690 include "COMMON.SBRIDGE"
692 include "COMMON.FFIELD"
693 include "COMMON.ENEPS"
694 include "COMMON.LOCAL"
695 include "COMMON.WEIGHTS"
696 include "COMMON.INTERACT"
697 include "COMMON.FREE"
698 include "COMMON.ENERGIES"
699 include "COMMON.CONTROL"
700 include "COMMON.TORCNSTR"
701 integer j,k,l,ii,itj,iprint
702 if (.not.check_conf) then
706 call int_from_cart1(.false.)
708 if (vbld(j).lt.2.0d0 .or. vbld(j).gt.5.0d0) then
710 & write (iout,*) "Bad CA-CA bond length",j," ",vbld(j),
711 & " for conformation",ii
712 if (iprint.gt.1) then
713 write (iout,*) "The Cartesian geometry is:"
714 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
715 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
716 write (iout,*) "The internal geometry is:"
717 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
718 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
719 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
720 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
721 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
722 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
724 if (iprint.gt.0) write (iout,*)
725 & "This conformation WILL NOT be added to the database."
732 if (itype(j).ne.10 .and. (vbld(nres+j)-dsc(itj)).gt.2.0d0) then
734 & write (iout,*) "Bad CA-SC bond length",j," ",vbld(nres+j),
735 & " for conformation",ii
736 if (iprint.gt.1) then
737 write (iout,*) "The Cartesian geometry is:"
738 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
739 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
740 write (iout,*) "The internal geometry is:"
741 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
742 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
743 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
744 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
745 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
746 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
748 if (iprint.gt.0) write (iout,*)
749 & "This conformation WILL NOT be added to the database."
755 if (theta(j).le.0.0d0) then
757 & write (iout,*) "Zero theta angle(s) in conformation",ii
758 if (iprint.gt.1) then
759 write (iout,*) "The Cartesian geometry is:"
760 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
761 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
762 write (iout,*) "The internal geometry is:"
763 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
764 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
765 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
766 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
767 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
768 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
770 if (iprint.gt.0) write (iout,*)
771 & "This conformation WILL NOT be added to the database."
775 if (theta(j).gt.179.97*deg2rad) theta(j)=179.97*deg2rad
778 c write (iout,*) "conf_check passed",ii