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 call pdbout(indstart(me1)+iii,
205 & 1.0d0/(1.987D-3*beta_h(ib,ipar)),
206 &energia(0),eini,0.0d0,0.0d0)
207 call enerprint(energia(0),fT)
208 errmsg_count=errmsg_count+1
209 if (errmsg_count.gt.maxerrmsg_count)
210 & write (iout,*) "Too many warning messages"
211 if (einicheck.gt.1) then
212 write (iout,*) "Calculation stopped."
215 call MPI_Abort(WHAM_COMM,IERROR,ERRCODE)
222 potE(iii+1,iparm)=energia(0)
224 enetb(k,iii+1,iparm)=energia(k)
227 write (iout,'(2i5,f10.1,3e15.5)') i,iii,
228 & 1.0d0/(beta_h(ib,ipar)*1.987D-3),energia(0),eini,efree
229 c call enerprint(energia(0),fT)
232 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
233 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
234 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
235 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
236 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
237 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
238 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
239 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
240 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
241 write (iout,'(8f10.5)') (q(k,iii+1),k=1,nQ)
242 write (iout,'(f10.5,i10)') rmsdev,iscor
243 call enerprint(energia(0),fT)
244 call pdbout(ii+1,beta_h(ib,ipar),efree,energia(0),0.0d0,rmsdev)
251 if (q(1,iii).le.0.0d0 .and. indpdb.gt.0) q(1,iii)=qwolynes(0,0)
252 write (ientout,rec=iii)
253 & ((csingle(l,k),l=1,3),k=1,nres),
254 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
255 & nss,(ihpb(k),jhpb(k),k=1,nss),
256 & potE(iii,ipar),efree,rmsdev,(q(k,iii),k=1,nQ),iR,ib,ipar
257 c write (iout,'(2i5,2e15.5)') ii,iii,potE(iii,ipar),efree
259 if (separate_parset) then
260 snk_p(iR,ib,1)=snk_p(iR,ib,1)+1
262 snk_p(iR,ib,ipar)=snk_p(iR,ib,ipar)+1
264 c write (iout,*) "iii",iii," iR",iR," ib",ib," ipar",ipar,
265 c & " snk",snk_p(iR,ib,ipar)
267 snk(iR,ib,ipar,islice)=snk(iR,ib,ipar,islice)+1
273 write (iout,*) "Me",me," scount",scount(me)
275 c Master gathers updated numbers of conformations written by all procs.
276 call MPI_AllGather( scount(me), 1, MPI_INTEGER, scount(0), 1,
277 & MPI_INTEGER, WHAM_COMM, IERROR)
281 indstart(i)=indend(i-1)+1
282 indend(i)=indstart(i)+scount(i)-1
285 write (iout,*) "Revised conformation counts"
287 write (iout,'(a,i5,a,i7,a,i7,a,i7)')
288 & "Processor",i," indstart",indstart(i),
289 & " indend",indend(i)," count",scount(i)
292 call MPI_AllReduce(snk_p(1,1,1),snk(1,1,1,islice),
293 & MaxR*MaxT_h*nParmSet,
294 & MPI_INTEGER,MPI_SUM,WHAM_COMM,IERROR)
300 stot(islice)=stot(islice)+snk(i,ib,iparm,islice)
304 write (iout,*) "Revised SNK"
307 write (iout,'("Param",i3," Temp",f6.1,3x,32i8)')
308 & iparm,1.0d0/(1.987D-3*beta_h(ib,iparm)),
309 & (snk(i,ib,iparm,islice),i=1,nR(ib,iparm))
310 write (iout,*) "snk_p",(snk_p(i,ib,iparm),i=1,nR(ib,iparm))
313 write (iout,'("Total",i10)') stot(islice)
316 101 write (iout,*) "Error in scratchfile."
320 c------------------------------------------------------------------------------
321 subroutine write_dbase(islice,*)
324 include "DIMENSIONS.ZSCOPT"
325 include "DIMENSIONS.FREE"
326 include "DIMENSIONS.COMPAR"
329 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
332 include "COMMON.CONTROL"
333 include "COMMON.CHAIN"
334 include "COMMON.IOUNITS"
335 include "COMMON.PROTFILES"
336 include "COMMON.NAMES"
338 include "COMMON.SBRIDGE"
340 include "COMMON.FFIELD"
341 include "COMMON.ENEPS"
342 include "COMMON.LOCAL"
343 include "COMMON.WEIGHTS"
344 include "COMMON.INTERACT"
345 include "COMMON.FREE"
346 include "COMMON.ENERGIES"
347 include "COMMON.COMPAR"
348 include "COMMON.PROT"
350 character*80 bxname,cxname
351 character*64 bprotfile_temp
352 character*3 liczba,licz
354 integer i,itj,ii,iii,j,k,l
357 double precision rmsdev,efree,eini
358 real*4 csingle(3,maxres2)
359 double precision energ
363 write (licz2,'(bz,i2.2)') islice
364 call opentmp(islice,ientout,bprotfile_temp)
365 write (iout,*) "bprotfile_temp ",bprotfile_temp
367 if (.not.bxfile .and. .not. cxfile .and. indpdb.eq.0
368 & .and. ensembles.eq.0) then
369 close(ientout,status="delete")
373 write (liczba,'(bz,i3.3)') me
374 if (bxfile .or. cxfile .or. ensembles.gt.0) then
375 if (.not.separate_parset) then
376 bxname = prefix(:ilen(prefix))//liczba//".bx"
378 write (licz,'(bz,i3.3)') myparm
379 bxname = prefix(:ilen(prefix))//liczba//"_par"//licz//".bx"
381 open (ientin,file=bxname,status="unknown",
382 & form="unformatted",access="direct",recl=lenrec1)
385 if (bxfile .or. cxfile .or. ensembles.gt.0) then
386 if (nslice.eq.1) then
387 bxname = prefix(:ilen(prefix))//".bx"
389 bxname = prefix(:ilen(prefix))//
390 & "_slice_"//licz2//".bx"
392 open (ientin,file=bxname,status="unknown",
393 & form="unformatted",access="direct",recl=lenrec1)
394 write (iout,*) "Calculating energies; writing geometry",
395 & " and energy components to ",bxname(:ilen(bxname))
397 #if (defined(AIX) && !defined(JUBL))
398 call xdrfopen_(ixdrf,cxname, "w", iret)
400 call xdrfopen(ixdrf,cxname, "w", iret)
403 write (iout,*) "Error opening cxfile ",cxname(:ilen(cxname))
408 if (indpdb.gt.0) then
409 if (nslice.eq.1) then
411 if (.not.separate_parset) then
412 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))
415 write (licz,'(bz,i3.3)') myparm
416 statname=prefix(:ilen(prefix))//'_par'//licz//'_'//
417 & pot(:ilen(pot))//liczba//'.stat'
421 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//'.stat'
425 if (.not.separate_parset) then
426 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//
427 & "_slice_"//licz2//liczba//'.stat'
429 write (licz,'(bz,i3.3)') myparm
430 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//
431 & '_par'//licz//"_slice_"//licz2//liczba//'.stat'
434 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))
435 & //"_slice_"//licz2//'.stat'
438 open(istat,file=statname,status="unknown")
446 read(ientout,rec=i,err=101)
447 & ((csingle(l,k),l=1,3),k=1,nres),
448 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
449 & nss,(ihpb(k),jhpb(k),k=1,nss),
450 & eini,efree,rmsdev,(q(k,i),k=1,nQ),iR,ib,iparm
451 c write (iout,*) iR,ib,iparm,eini,efree
457 call int_from_cart1(.false.)
459 c write (iout,*) "Calling conf_compar",i
461 if (indpdb.gt.0) then
462 call conf_compar(i,.false.,.true.)
464 c write (iout,*) "Exit conf_compar",i
466 if (bxfile .or.cxfile .or. ensembles.gt.0) write (ientin,rec=i)
467 & ((csingle(l,k),l=1,3),k=1,nres),
468 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
469 & nss,(ihpb(k),jhpb(k),k=1,nss),
470 c & potE(i,iparm),-entfac(i),rms_nat,iscore
471 & potE(i,nparmset),-entfac(i),rms_nat,iscore
472 c write (iout,'(2i5,3e15.5)') i,me,potE(i,iparm),-entfac(i)
474 if (cxfile) call cxwrite(ixdrf,csingle,potE(i,nparmset),
475 & -entfac(i),rms_nat,iscore)
478 close(ientout,status="delete")
480 if (bxfile .or. cxfile .or. ensembles.gt.0) close(ientin)
482 call MPI_Barrier(WHAM_COMM,IERROR)
483 if (me.ne.Master .or. .not.bxfile .and. .not. cxfile
484 & .and. ensembles.eq.0) return
486 if (bxfile .or. ensembles.gt.0) then
487 if (nslice.eq.1) then
488 if (.not.separate_parset) then
489 bxname = prefix(:ilen(prefix))//".bx"
491 write (licz,'(bz,i3.3)') myparm
492 bxname = prefix(:ilen(prefix))//"_par"//licz//".bx"
495 if (.not.separate_parset) then
496 bxname = prefix(:ilen(prefix))//"_slice_"//licz2//".bx"
498 write (licz,'(bz,i3.3)') myparm
499 bxname = prefix(:ilen(prefix))//"par_"//licz//
500 & "_slice_"//licz2//".bx"
503 open (ientout,file=bxname,status="unknown",
504 & form="unformatted",access="direct",recl=lenrec1)
505 write (iout,*) "Master is creating binary database ",
506 & bxname(:ilen(bxname))
509 if (nslice.eq.1) then
510 if (.not.separate_parset) then
511 cxname = prefix(:ilen(prefix))//".cx"
513 cxname = prefix(:ilen(prefix))//"_par"//licz//".cx"
516 if (.not.separate_parset) then
517 cxname = prefix(:ilen(prefix))//
518 & "_slice_"//licz2//".cx"
520 cxname = prefix(:ilen(prefix))//"_par"//licz//
521 & "_slice_"//licz2//".cx"
524 #if (defined(AIX) && !defined(JUBL))
525 call xdrfopen_(ixdrf,cxname, "w", iret)
527 call xdrfopen(ixdrf,cxname, "w", iret)
530 write (iout,*) "Error opening cxfile ",cxname(:ilen(cxname))
535 write (liczba,'(bz,i3.3)') j
536 if (separate_parset) then
537 write (licz,'(bz,i3.3)') myparm
538 bxname = prefix(:ilen(prefix))//liczba//"_par"//licz//".bx"
540 bxname = prefix(:ilen(prefix))//liczba//".bx"
542 open (ientin,file=bxname,status="unknown",
543 & form="unformatted",access="direct",recl=lenrec1)
544 write (iout,*) "Master is reading conformations from ",
545 & bxname(:ilen(bxname))
547 c write (iout,*) "j",j," indstart",indstart(j)," indend",indend(j)
549 do i=indstart(j),indend(j)
551 read(ientin,rec=iii,err=101)
552 & ((csingle(l,k),l=1,3),k=1,nres),
553 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
554 & nss,(ihpb(k),jhpb(k),k=1,nss),
555 & eini,efree,rmsdev,iscor
556 if (bxfile .or. ensembles.gt.0) then
557 write (ientout,rec=i)
558 & ((csingle(l,k),l=1,3),k=1,nres),
559 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
560 & nss,(ihpb(k),jhpb(k),k=1,nss),
561 & eini,efree,rmsdev,iscor
563 if(cxfile)call cxwrite(ixdrf,csingle,eini,efree,rmsdev,iscor)
570 call int_from_cart1(.false.)
571 write (iout,'(2i5,3e15.5)') i,iii,eini,efree
572 write (iout,*) "The Cartesian geometry is:"
573 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
574 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
575 write (iout,*) "The internal geometry is:"
576 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
577 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
578 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
579 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
580 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
581 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
582 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
583 write (iout,'(f10.5,i5)') rmsdev,iscor
586 write (iout,*) iii," conformations (from",indstart(j)," to",
587 & indend(j),") read from ",
588 & bxname(:ilen(bxname))
589 close (ientin,status="delete")
591 if (bxfile .or. cxfile .or. ensembles.gt.0) close (ientout)
592 #if (defined(AIX) && !defined(JUBL))
593 if (cxfile) call xdrfclose_(ixdrf,cxname,iret)
595 if (cxfile) call xdrfclose(ixdrf,cxname,iret)
599 101 write (iout,*) "Error in scratchfile."
603 c-------------------------------------------------------------------------------
604 subroutine cxwrite(ixdrf,csingle,eini,efree,rmsdev,iscor)
607 include "DIMENSIONS.ZSCOPT"
608 include "DIMENSIONS.FREE"
609 include "DIMENSIONS.COMPAR"
612 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
615 include "COMMON.CONTROL"
616 include "COMMON.CHAIN"
617 include "COMMON.IOUNITS"
618 include "COMMON.PROTFILES"
619 include "COMMON.NAMES"
621 include "COMMON.SBRIDGE"
623 include "COMMON.FFIELD"
624 include "COMMON.ENEPS"
625 include "COMMON.LOCAL"
626 include "COMMON.WEIGHTS"
627 include "COMMON.INTERACT"
628 include "COMMON.FREE"
629 include "COMMON.ENERGIES"
630 include "COMMON.COMPAR"
631 include "COMMON.PROT"
632 integer i,j,itmp,iscor,iret,ixdrf
633 double precision rmsdev,efree,eini
634 real*4 csingle(3,maxres2),xoord(3,maxres2+2)
637 c write (iout,*) "cxwrite"
642 xoord(j,i)=csingle(j,i)
647 xoord(j,nres+i-nnt+1)=csingle(j,i+nres)
653 c write (iout,*) "itmp",itmp
655 #if (defined(AIX) && !defined(JUBL))
656 call xdrf3dfcoord_(ixdrf, xoord, itmp, prec, iret)
658 c write (iout,*) "xdrf3dfcoord"
660 call xdrfint_(ixdrf, nss, iret)
662 call xdrfint_(ixdrf, ihpb(j), iret)
663 call xdrfint_(ixdrf, jhpb(j), iret)
665 call xdrffloat_(ixdrf,real(eini),iret)
666 call xdrffloat_(ixdrf,real(efree),iret)
667 call xdrffloat_(ixdrf,real(rmsdev),iret)
668 call xdrfint_(ixdrf,iscor,iret)
670 call xdrf3dfcoord(ixdrf, xoord, itmp, prec, iret)
672 call xdrfint(ixdrf, nss, iret)
674 call xdrfint(ixdrf, ihpb(j), iret)
675 call xdrfint(ixdrf, jhpb(j), iret)
677 call xdrffloat(ixdrf,real(eini),iret)
678 call xdrffloat(ixdrf,real(efree),iret)
679 call xdrffloat(ixdrf,real(rmsdev),iret)
680 call xdrfint(ixdrf,iscor,iret)
685 c------------------------------------------------------------------------------
686 logical function conf_check(ii,iprint)
689 include "DIMENSIONS.ZSCOPT"
690 include "DIMENSIONS.FREE"
693 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
696 include "COMMON.CHAIN"
697 include "COMMON.IOUNITS"
698 include "COMMON.PROTFILES"
699 include "COMMON.NAMES"
701 include "COMMON.SBRIDGE"
703 include "COMMON.FFIELD"
704 include "COMMON.ENEPS"
705 include "COMMON.LOCAL"
706 include "COMMON.WEIGHTS"
707 include "COMMON.INTERACT"
708 include "COMMON.FREE"
709 include "COMMON.ENERGIES"
710 include "COMMON.CONTROL"
711 include "COMMON.TORCNSTR"
712 integer j,k,l,ii,itj,iprint
713 if (.not.check_conf) then
717 call int_from_cart1(.false.)
719 if (itype(j-1).ne.21 .and. itype(j).ne.21 .and.
720 & (vbld(j).lt.2.0d0 .or. vbld(j).gt.5.0d0)) then
722 & write (iout,*) "Bad CA-CA bond length",j," ",vbld(j),
723 & " for conformation",ii
724 if (iprint.gt.1) then
725 write (iout,*) "The Cartesian geometry is:"
726 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
727 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
728 write (iout,*) "The internal geometry is:"
729 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
730 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
731 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
732 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
733 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
734 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
736 if (iprint.gt.0) write (iout,*)
737 & "This conformation WILL NOT be added to the database."
744 if (itype(j).ne.10 .and.itype(j).ne.21 .and.
745 & (vbld(nres+j)-dsc(itj)).gt.2.0d0) then
747 & write (iout,*) "Bad CA-SC bond length",j," ",vbld(nres+j),
748 & " for conformation",ii
749 if (iprint.gt.1) then
750 write (iout,*) "The Cartesian geometry is:"
751 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
752 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
753 write (iout,*) "The internal geometry is:"
754 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
755 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
756 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
757 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
758 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
759 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
761 if (iprint.gt.0) write (iout,*)
762 & "This conformation WILL NOT be added to the database."
768 if (theta(j).le.0.0d0) then
770 & write (iout,*) "Zero theta angle(s) in conformation",ii
771 if (iprint.gt.1) then
772 write (iout,*) "The Cartesian geometry is:"
773 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
774 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
775 write (iout,*) "The internal geometry is:"
776 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
777 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
778 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
779 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
780 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
781 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
783 if (iprint.gt.0) write (iout,*)
784 & "This conformation WILL NOT be added to the database."
788 if (theta(j).gt.179.97*deg2rad) theta(j)=179.97*deg2rad
791 c write (iout,*) "conf_check passed",ii