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"
351 character*80 bxname,cxname
352 character*64 bprotfile_temp
353 character*3 liczba,licz
355 integer i,itj,ii,iii,j,k,l
358 double precision rmsdev,efree,eini
359 real*4 csingle(3,maxres2)
360 double precision energ
364 write (licz2,'(bz,i2.2)') islice
365 call opentmp(islice,ientout,bprotfile_temp)
366 write (iout,*) "bprotfile_temp ",bprotfile_temp
368 if (.not.bxfile .and. .not. cxfile .and. indpdb.eq.0
369 & .and. ensembles.eq.0) then
370 close(ientout,status="delete")
374 write (liczba,'(bz,i3.3)') me
375 if (bxfile .or. cxfile .or. ensembles.gt.0) then
376 if (.not.separate_parset) then
377 bxname = prefix(:ilen(prefix))//liczba//".bx"
379 write (licz,'(bz,i3.3)') myparm
380 bxname = prefix(:ilen(prefix))//liczba//"_par"//licz//".bx"
382 open (ientin,file=bxname,status="unknown",
383 & form="unformatted",access="direct",recl=lenrec1)
386 if (bxfile .or. cxfile .or. ensembles.gt.0) then
387 if (nslice.eq.1) then
388 bxname = prefix(:ilen(prefix))//".bx"
390 bxname = prefix(:ilen(prefix))//
391 & "_slice_"//licz2//".bx"
393 open (ientin,file=bxname,status="unknown",
394 & form="unformatted",access="direct",recl=lenrec1)
395 write (iout,*) "Calculating energies; writing geometry",
396 & " and energy components to ",bxname(:ilen(bxname))
398 #if (defined(AIX) && !defined(JUBL))
399 call xdrfopen_(ixdrf,cxname, "w", iret)
401 call xdrfopen(ixdrf,cxname, "w", iret)
404 write (iout,*) "Error opening cxfile ",cxname(:ilen(cxname))
409 if (indpdb.gt.0) then
410 if (nslice.eq.1) then
412 if (.not.separate_parset) then
413 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))
416 write (licz,'(bz,i3.3)') myparm
417 statname=prefix(:ilen(prefix))//'_par'//licz//'_'//
418 & pot(:ilen(pot))//liczba//'.stat'
422 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//'.stat'
426 if (.not.separate_parset) then
427 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//
428 & "_slice_"//licz2//liczba//'.stat'
430 write (licz,'(bz,i3.3)') myparm
431 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//
432 & '_par'//licz//"_slice_"//licz2//liczba//'.stat'
435 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))
436 & //"_slice_"//licz2//'.stat'
439 open(istat,file=statname,status="unknown")
447 read(ientout,rec=i,err=101)
448 & ((csingle(l,k),l=1,3),k=1,nres),
449 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
450 & nss,(ihpb(k),jhpb(k),k=1,nss),
451 & eini,efree,rmsdev,(q(k,i),k=1,nQ),iR,ib,iparm
452 c write (iout,*) iR,ib,iparm,eini,efree
458 call int_from_cart1(.false.)
460 c write (iout,*) "Calling conf_compar",i
462 if (indpdb.gt.0) then
463 call conf_compar(i,.false.,.true.)
465 c write (iout,*) "Exit conf_compar",i
467 if (bxfile .or.cxfile .or. ensembles.gt.0) write (ientin,rec=i)
468 & ((csingle(l,k),l=1,3),k=1,nres),
469 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
470 & nss,(ihpb(k),jhpb(k),k=1,nss),
471 c & potE(i,iparm),-entfac(i),rms_nat,iscore
472 & potE(i,nparmset),-entfac(i),rms_nat,iscore
473 c write (iout,'(2i5,3e15.5)') i,me,potE(i,iparm),-entfac(i)
475 if (cxfile) call cxwrite(ixdrf,csingle,potE(i,nparmset),
476 & -entfac(i),rms_nat,iscore)
479 close(ientout,status="delete")
481 if (bxfile .or. cxfile .or. ensembles.gt.0) close(ientin)
483 call MPI_Barrier(WHAM_COMM,IERROR)
484 if (me.ne.Master .or. .not.bxfile .and. .not. cxfile
485 & .and. ensembles.eq.0) return
487 if (bxfile .or. ensembles.gt.0) then
488 if (nslice.eq.1) then
489 if (.not.separate_parset) then
490 bxname = prefix(:ilen(prefix))//".bx"
492 write (licz,'(bz,i3.3)') myparm
493 bxname = prefix(:ilen(prefix))//"_par"//licz//".bx"
496 if (.not.separate_parset) then
497 bxname = prefix(:ilen(prefix))//"_slice_"//licz2//".bx"
499 write (licz,'(bz,i3.3)') myparm
500 bxname = prefix(:ilen(prefix))//"par_"//licz//
501 & "_slice_"//licz2//".bx"
504 open (ientout,file=bxname,status="unknown",
505 & form="unformatted",access="direct",recl=lenrec1)
506 write (iout,*) "Master is creating binary database ",
507 & bxname(:ilen(bxname))
510 if (nslice.eq.1) then
511 if (.not.separate_parset) then
512 cxname = prefix(:ilen(prefix))//".cx"
514 cxname = prefix(:ilen(prefix))//"_par"//licz//".cx"
517 if (.not.separate_parset) then
518 cxname = prefix(:ilen(prefix))//
519 & "_slice_"//licz2//".cx"
521 cxname = prefix(:ilen(prefix))//"_par"//licz//
522 & "_slice_"//licz2//".cx"
525 #if (defined(AIX) && !defined(JUBL))
526 call xdrfopen_(ixdrf,cxname, "w", iret)
528 call xdrfopen(ixdrf,cxname, "w", iret)
531 write (iout,*) "Error opening cxfile ",cxname(:ilen(cxname))
536 write (liczba,'(bz,i3.3)') j
537 if (separate_parset) then
538 write (licz,'(bz,i3.3)') myparm
539 bxname = prefix(:ilen(prefix))//liczba//"_par"//licz//".bx"
541 bxname = prefix(:ilen(prefix))//liczba//".bx"
543 open (ientin,file=bxname,status="unknown",
544 & form="unformatted",access="direct",recl=lenrec1)
545 write (iout,*) "Master is reading conformations from ",
546 & bxname(:ilen(bxname))
548 c write (iout,*) "j",j," indstart",indstart(j)," indend",indend(j)
550 do i=indstart(j),indend(j)
552 read(ientin,rec=iii,err=101)
553 & ((csingle(l,k),l=1,3),k=1,nres),
554 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
555 & nss,(ihpb(k),jhpb(k),k=1,nss),
556 & eini,efree,rmsdev,iscor
557 if (bxfile .or. ensembles.gt.0) then
558 write (ientout,rec=i)
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
564 if(cxfile)call cxwrite(ixdrf,csingle,eini,efree,rmsdev,iscor)
571 call int_from_cart1(.false.)
572 write (iout,'(2i5,3e15.5)') i,iii,eini,efree
573 write (iout,*) "The Cartesian geometry is:"
574 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
575 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
576 write (iout,*) "The internal geometry is:"
577 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
578 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
579 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
580 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
581 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
582 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
583 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
584 write (iout,'(f10.5,i5)') rmsdev,iscor
587 write (iout,*) iii," conformations (from",indstart(j)," to",
588 & indend(j),") read from ",
589 & bxname(:ilen(bxname))
590 close (ientin,status="delete")
592 if (bxfile .or. cxfile .or. ensembles.gt.0) close (ientout)
593 #if (defined(AIX) && !defined(JUBL))
594 if (cxfile) call xdrfclose_(ixdrf,cxname,iret)
596 if (cxfile) call xdrfclose(ixdrf,cxname,iret)
600 101 write (iout,*) "Error in scratchfile."
604 c-------------------------------------------------------------------------------
605 subroutine cxwrite(ixdrf,csingle,eini,efree,rmsdev,iscor)
608 include "DIMENSIONS.ZSCOPT"
609 include "DIMENSIONS.FREE"
610 include "DIMENSIONS.COMPAR"
613 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
616 include "COMMON.CONTROL"
617 include "COMMON.CHAIN"
618 include "COMMON.IOUNITS"
619 include "COMMON.PROTFILES"
620 include "COMMON.NAMES"
622 include "COMMON.SBRIDGE"
624 include "COMMON.FFIELD"
625 include "COMMON.ENEPS"
626 include "COMMON.LOCAL"
627 include "COMMON.WEIGHTS"
628 include "COMMON.INTERACT"
629 include "COMMON.FREE"
630 include "COMMON.ENERGIES"
631 include "COMMON.COMPAR"
632 include "COMMON.PROT"
633 integer i,j,itmp,iscor,iret,ixdrf
634 double precision rmsdev,efree,eini
635 real*4 csingle(3,maxres2),xoord(3,maxres2+2)
638 c write (iout,*) "cxwrite"
643 xoord(j,i)=csingle(j,i)
648 xoord(j,nres+i-nnt+1)=csingle(j,i+nres)
654 c write (iout,*) "itmp",itmp
656 #if (defined(AIX) && !defined(JUBL))
657 call xdrf3dfcoord_(ixdrf, xoord, itmp, prec, iret)
659 c write (iout,*) "xdrf3dfcoord"
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)
671 call xdrf3dfcoord(ixdrf, xoord, itmp, prec, iret)
673 call xdrfint(ixdrf, nss, iret)
675 call xdrfint(ixdrf, ihpb(j), iret)
676 call xdrfint(ixdrf, jhpb(j), iret)
678 call xdrffloat(ixdrf,real(eini),iret)
679 call xdrffloat(ixdrf,real(efree),iret)
680 call xdrffloat(ixdrf,real(rmsdev),iret)
681 call xdrfint(ixdrf,iscor,iret)
686 c------------------------------------------------------------------------------
687 logical function conf_check(ii,iprint)
690 include "DIMENSIONS.ZSCOPT"
691 include "DIMENSIONS.FREE"
694 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
697 include "COMMON.CHAIN"
698 include "COMMON.IOUNITS"
699 include "COMMON.PROTFILES"
700 include "COMMON.NAMES"
702 include "COMMON.SBRIDGE"
704 include "COMMON.FFIELD"
705 include "COMMON.ENEPS"
706 include "COMMON.LOCAL"
707 include "COMMON.WEIGHTS"
708 include "COMMON.INTERACT"
709 include "COMMON.FREE"
710 include "COMMON.ENERGIES"
711 include "COMMON.CONTROL"
712 include "COMMON.TORCNSTR"
713 integer j,k,l,ii,itj,iprint
714 if (.not.check_conf) then
718 call int_from_cart1(.false.)
720 if (itype(j-1).ne.21 .and. itype(j).ne.21 .and.
721 & (vbld(j).lt.2.0d0 .or. vbld(j).gt.5.0d0)) then
723 & write (iout,*) "Bad CA-CA bond length",j," ",vbld(j),
724 & " for conformation",ii
725 if (iprint.gt.1) then
726 write (iout,*) "The Cartesian geometry is:"
727 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
728 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
729 write (iout,*) "The internal geometry is:"
730 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
731 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
732 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
733 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
734 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
735 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
737 if (iprint.gt.0) write (iout,*)
738 & "This conformation WILL NOT be added to the database."
745 if (itype(j).ne.10 .and.itype(j).ne.21 .and.
746 & (vbld(nres+j)-dsc(iabs(itj))).gt.2.0d0) then
748 & write (iout,*) "Bad CA-SC bond length",j," ",vbld(nres+j),
749 & " for conformation",ii
750 if (iprint.gt.1) then
751 write (iout,*) "The Cartesian geometry is:"
752 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
753 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
754 write (iout,*) "The internal geometry is:"
755 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
756 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
757 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
758 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
759 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
760 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
762 if (iprint.gt.0) write (iout,*)
763 & "This conformation WILL NOT be added to the database."
769 if (theta(j).le.0.0d0) then
771 & write (iout,*) "Zero theta angle(s) in conformation",ii
772 if (iprint.gt.1) then
773 write (iout,*) "The Cartesian geometry is:"
774 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
775 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
776 write (iout,*) "The internal geometry is:"
777 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
778 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
779 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
780 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
781 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
782 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
784 if (iprint.gt.0) write (iout,*)
785 & "This conformation WILL NOT be added to the database."
789 if (theta(j).gt.179.97*deg2rad) theta(j)=179.97*deg2rad
792 c write (iout,*) "conf_check passed",ii