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 if (errmsg_count.gt.maxerrmsg_count)
199 & write (iout,*) "Too many warning messages"
200 if (einicheck.gt.1) then
201 write (iout,*) "Calculation stopped."
204 call MPI_Abort(WHAM_COMM,IERROR,ERRCODE)
211 potE(iii+1,iparm)=energia(0)
213 enetb(k,iii+1,iparm)=energia(k)
216 write (iout,'(2i5,f10.1,3e15.5)') i,iii,
217 & 1.0d0/(beta_h(ib,ipar)*1.987D-3),energia(0),eini,efree
218 call enerprint(energia(0),fT)
219 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
220 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
221 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
222 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
223 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
224 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
225 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
226 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
227 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
228 write (iout,'(8f10.5)') (q(k,iii+1),k=1,nQ)
229 write (iout,'(f10.5,i10)') rmsdev,iscor
230 call enerprint(energia(0),fT)
231 write(liczba,'(bz,i3.3)') me
232 nazwa="test"//liczba//".pdb"
233 write (iout,*) "pdb file",nazwa
234 open (ipdb,file=nazwa,position="append")
235 call pdbout(ii+1,beta_h(ib,ipar),efree,energia(0),0.0d0,rmsdev)
243 if (q(1,iii).le.0.0d0 .and. indpdb.gt.0) q(1,iii)=qwolynes(0,0)
244 write (ientout,rec=iii)
245 & ((csingle(l,k),l=1,3),k=1,nres),
246 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
247 & nss,(ihpb(k),jhpb(k),k=1,nss),
248 & potE(iii,ipar),efree,rmsdev,(q(k,iii),k=1,nQ),iR,ib,ipar
249 c write (iout,'(2i5,2e15.5)') ii,iii,potE(iii,ipar),efree
251 if (separate_parset) then
252 snk_p(iR,ib,1)=snk_p(iR,ib,1)+1
254 snk_p(iR,ib,ipar)=snk_p(iR,ib,ipar)+1
256 c write (iout,*) "iii",iii," iR",iR," ib",ib," ipar",ipar,
257 c & " snk",snk_p(iR,ib,ipar)
259 snk(iR,ib,ipar,islice)=snk(iR,ib,ipar,islice)+1
265 write (iout,*) "Me",me," scount",scount(me)
267 c Master gathers updated numbers of conformations written by all procs.
268 call MPI_AllGather( scount(me), 1, MPI_INTEGER, scount(0), 1,
269 & MPI_INTEGER, WHAM_COMM, IERROR)
273 indstart(i)=indend(i-1)+1
274 indend(i)=indstart(i)+scount(i)-1
277 write (iout,*) "Revised conformation counts"
279 write (iout,'(a,i5,a,i7,a,i7,a,i7)')
280 & "Processor",i," indstart",indstart(i),
281 & " indend",indend(i)," count",scount(i)
284 call MPI_AllReduce(snk_p(1,1,1),snk(1,1,1,islice),
285 & MaxR*MaxT_h*nParmSet,
286 & MPI_INTEGER,MPI_SUM,WHAM_COMM,IERROR)
292 stot(islice)=stot(islice)+snk(i,ib,iparm,islice)
296 write (iout,*) "Revised SNK"
299 write (iout,'("Param",i3," Temp",f6.1,3x,32i8)')
300 & iparm,1.0d0/(1.987D-3*beta_h(ib,iparm)),
301 & (snk(i,ib,iparm,islice),i=1,nR(ib,iparm))
302 write (iout,*) "snk_p",(snk_p(i,ib,iparm),i=1,nR(ib,iparm))
305 write (iout,'("Total",i10)') stot(islice)
308 101 write (iout,*) "Error in scratchfile."
312 c------------------------------------------------------------------------------
313 subroutine write_dbase(islice,*)
316 include "DIMENSIONS.ZSCOPT"
317 include "DIMENSIONS.FREE"
318 include "DIMENSIONS.COMPAR"
321 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
324 include "COMMON.CONTROL"
325 include "COMMON.CHAIN"
326 include "COMMON.IOUNITS"
327 include "COMMON.PROTFILES"
328 include "COMMON.NAMES"
330 include "COMMON.SBRIDGE"
332 include "COMMON.FFIELD"
333 include "COMMON.ENEPS"
334 include "COMMON.LOCAL"
335 include "COMMON.WEIGHTS"
336 include "COMMON.INTERACT"
337 include "COMMON.FREE"
338 include "COMMON.ENERGIES"
339 include "COMMON.COMPAR"
340 include "COMMON.PROT"
342 character*80 bxname,cxname
343 character*64 bprotfile_temp
344 character*3 liczba,licz
346 integer i,itj,ii,iii,j,k,l
349 double precision rmsdev,efree,eini
350 real*4 csingle(3,maxres2)
351 double precision energ
355 write (licz2,'(bz,i2.2)') islice
356 call opentmp(islice,ientout,bprotfile_temp)
357 write (iout,*) "bprotfile_temp ",bprotfile_temp
359 if (.not.bxfile .and. .not. cxfile .and. indpdb.eq.0
360 & .and. ensembles.eq.0) then
361 close(ientout,status="delete")
365 write (liczba,'(bz,i3.3)') me
366 if (bxfile .or. cxfile .or. ensembles.gt.0) then
367 if (.not.separate_parset) then
368 bxname = prefix(:ilen(prefix))//liczba//".bx"
370 write (licz,'(bz,i3.3)') myparm
371 bxname = prefix(:ilen(prefix))//liczba//"_par"//licz//".bx"
373 open (ientin,file=bxname,status="unknown",
374 & form="unformatted",access="direct",recl=lenrec1)
377 if (bxfile .or. cxfile .or. ensembles.gt.0) then
378 if (nslice.eq.1) then
379 bxname = prefix(:ilen(prefix))//".bx"
381 bxname = prefix(:ilen(prefix))//
382 & "_slice_"//licz2//".bx"
384 open (ientin,file=bxname,status="unknown",
385 & form="unformatted",access="direct",recl=lenrec1)
386 write (iout,*) "Calculating energies; writing geometry",
387 & " and energy components to ",bxname(:ilen(bxname))
389 #if (defined(AIX) && !defined(JUBL))
390 call xdrfopen_(ixdrf,cxname, "w", iret)
392 call xdrfopen(ixdrf,cxname, "w", iret)
395 write (iout,*) "Error opening cxfile ",cxname(:ilen(cxname))
400 if (indpdb.gt.0) then
401 if (nslice.eq.1) then
403 if (.not.separate_parset) then
404 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))
407 write (licz,'(bz,i3.3)') myparm
408 statname=prefix(:ilen(prefix))//'_par'//licz//'_'//
409 & pot(:ilen(pot))//liczba//'.stat'
413 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//'.stat'
417 if (.not.separate_parset) then
418 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//
419 & "_slice_"//licz2//liczba//'.stat'
421 write (licz,'(bz,i3.3)') myparm
422 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))//
423 & '_par'//licz//"_slice_"//licz2//liczba//'.stat'
426 statname=prefix(:ilen(prefix))//'_'//pot(:ilen(pot))
427 & //"_slice_"//licz2//'.stat'
430 open(istat,file=statname,status="unknown")
438 read(ientout,rec=i,err=101)
439 & ((csingle(l,k),l=1,3),k=1,nres),
440 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
441 & nss,(ihpb(k),jhpb(k),k=1,nss),
442 & eini,efree,rmsdev,(q(k,i),k=1,nQ),iR,ib,iparm
443 c write (iout,*) iR,ib,iparm,eini,efree
449 call int_from_cart1(.false.)
451 if (indpdb.gt.0) then
452 call conf_compar(i,.false.,.true.)
454 if (bxfile .or.cxfile .or. ensembles.gt.0) write (ientin,rec=i)
455 & ((csingle(l,k),l=1,3),k=1,nres),
456 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
457 & nss,(ihpb(k),jhpb(k),k=1,nss),
458 c & potE(i,iparm),-entfac(i),rms_nat,iscore
459 & potE(i,nparmset),-entfac(i),rms_nat,iscore
460 c write (iout,'(2i5,3e15.5)') i,me,potE(i,iparm),-entfac(i)
462 if (cxfile) call cxwrite(ixdrf,csingle,potE(i,nparmset),
463 & -entfac(i),rms_nat,iscore)
466 close(ientout,status="delete")
468 if (bxfile .or. cxfile .or. ensembles.gt.0) close(ientin)
470 call MPI_Barrier(WHAM_COMM,IERROR)
471 if (me.ne.Master .or. .not.bxfile .and. .not. cxfile
472 & .and. ensembles.eq.0) return
474 if (bxfile .or. ensembles.gt.0) then
475 if (nslice.eq.1) then
476 if (.not.separate_parset) then
477 bxname = prefix(:ilen(prefix))//".bx"
479 write (licz,'(bz,i3.3)') myparm
480 bxname = prefix(:ilen(prefix))//"_par"//licz//".bx"
483 if (.not.separate_parset) then
484 bxname = prefix(:ilen(prefix))//"_slice_"//licz2//".bx"
486 write (licz,'(bz,i3.3)') myparm
487 bxname = prefix(:ilen(prefix))//"par_"//licz//
488 & "_slice_"//licz2//".bx"
491 open (ientout,file=bxname,status="unknown",
492 & form="unformatted",access="direct",recl=lenrec1)
493 write (iout,*) "Master is creating binary database ",
494 & bxname(:ilen(bxname))
497 if (nslice.eq.1) then
498 if (.not.separate_parset) then
499 cxname = prefix(:ilen(prefix))//".cx"
501 cxname = prefix(:ilen(prefix))//"_par"//licz//".cx"
504 if (.not.separate_parset) then
505 cxname = prefix(:ilen(prefix))//
506 & "_slice_"//licz2//".cx"
508 cxname = prefix(:ilen(prefix))//"_par"//licz//
509 & "_slice_"//licz2//".cx"
512 #if (defined(AIX) && !defined(JUBL))
513 call xdrfopen_(ixdrf,cxname, "w", iret)
515 call xdrfopen(ixdrf,cxname, "w", iret)
518 write (iout,*) "Error opening cxfile ",cxname(:ilen(cxname))
523 write (liczba,'(bz,i3.3)') j
524 if (separate_parset) then
525 write (licz,'(bz,i3.3)') myparm
526 bxname = prefix(:ilen(prefix))//liczba//"_par"//licz//".bx"
528 bxname = prefix(:ilen(prefix))//liczba//".bx"
530 open (ientin,file=bxname,status="unknown",
531 & form="unformatted",access="direct",recl=lenrec1)
532 write (iout,*) "Master is reading conformations from ",
533 & bxname(:ilen(bxname))
535 c write (iout,*) "j",j," indstart",indstart(j)," indend",indend(j)
537 do i=indstart(j),indend(j)
539 read(ientin,rec=iii,err=101)
540 & ((csingle(l,k),l=1,3),k=1,nres),
541 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
542 & nss,(ihpb(k),jhpb(k),k=1,nss),
543 & eini,efree,rmsdev,iscor
544 if (bxfile .or. ensembles.gt.0) then
545 write (ientout,rec=i)
546 & ((csingle(l,k),l=1,3),k=1,nres),
547 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
548 & nss,(ihpb(k),jhpb(k),k=1,nss),
549 & eini,efree,rmsdev,iscor
551 if(cxfile)call cxwrite(ixdrf,csingle,eini,efree,rmsdev,iscor)
558 call int_from_cart1(.false.)
559 write (iout,'(2i5,3e15.5)') i,iii,eini,efree
560 write (iout,*) "The Cartesian geometry is:"
561 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
562 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
563 write (iout,*) "The internal geometry is:"
564 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
565 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
566 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
567 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
568 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
569 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
570 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
571 write (iout,'(f10.5,i5)') rmsdev,iscor
574 write (iout,*) iii," conformations (from",indstart(j)," to",
575 & indend(j),") read from ",
576 & bxname(:ilen(bxname))
577 close (ientin,status="delete")
579 if (bxfile .or. cxfile .or. ensembles.gt.0) close (ientout)
580 #if (defined(AIX) && !defined(JUBL))
581 if (cxfile) call xdrfclose_(ixdrf,cxname,iret)
583 if (cxfile) call xdrfclose(ixdrf,cxname,iret)
587 101 write (iout,*) "Error in scratchfile."
591 c-------------------------------------------------------------------------------
592 subroutine cxwrite(ixdrf,csingle,eini,efree,rmsdev,iscor)
595 include "DIMENSIONS.ZSCOPT"
596 include "DIMENSIONS.FREE"
597 include "DIMENSIONS.COMPAR"
600 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
603 include "COMMON.CONTROL"
604 include "COMMON.CHAIN"
605 include "COMMON.IOUNITS"
606 include "COMMON.PROTFILES"
607 include "COMMON.NAMES"
609 include "COMMON.SBRIDGE"
611 include "COMMON.FFIELD"
612 include "COMMON.ENEPS"
613 include "COMMON.LOCAL"
614 include "COMMON.WEIGHTS"
615 include "COMMON.INTERACT"
616 include "COMMON.FREE"
617 include "COMMON.ENERGIES"
618 include "COMMON.COMPAR"
619 include "COMMON.PROT"
620 integer i,j,itmp,iscor,iret,ixdrf
621 double precision rmsdev,efree,eini
622 real*4 csingle(3,maxres2),xoord(3,maxres2+2)
625 c write (iout,*) "cxwrite"
630 xoord(j,i)=csingle(j,i)
635 xoord(j,nres+i-nnt+1)=csingle(j,i+nres)
641 c write (iout,*) "itmp",itmp
643 #if (defined(AIX) && !defined(JUBL))
644 call xdrf3dfcoord_(ixdrf, xoord, itmp, prec, iret)
646 c write (iout,*) "xdrf3dfcoord"
648 call xdrfint_(ixdrf, nss, iret)
650 call xdrfint_(ixdrf, ihpb(j), iret)
651 call xdrfint_(ixdrf, jhpb(j), iret)
653 call xdrffloat_(ixdrf,real(eini),iret)
654 call xdrffloat_(ixdrf,real(efree),iret)
655 call xdrffloat_(ixdrf,real(rmsdev),iret)
656 call xdrfint_(ixdrf,iscor,iret)
658 call xdrf3dfcoord(ixdrf, xoord, itmp, prec, iret)
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)
673 c------------------------------------------------------------------------------
674 logical function conf_check(ii,iprint)
677 include "DIMENSIONS.ZSCOPT"
678 include "DIMENSIONS.FREE"
681 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
684 include "COMMON.CHAIN"
685 include "COMMON.IOUNITS"
686 include "COMMON.PROTFILES"
687 include "COMMON.NAMES"
689 include "COMMON.SBRIDGE"
691 include "COMMON.FFIELD"
692 include "COMMON.ENEPS"
693 include "COMMON.LOCAL"
694 include "COMMON.WEIGHTS"
695 include "COMMON.INTERACT"
696 include "COMMON.FREE"
697 include "COMMON.ENERGIES"
698 include "COMMON.CONTROL"
699 include "COMMON.TORCNSTR"
700 integer j,k,l,ii,itj,iprint
701 if (.not.check_conf) then
705 call int_from_cart1(.false.)
707 if (vbld(j).lt.2.0d0 .or. vbld(j).gt.5.0d0) then
709 & write (iout,*) "Bad CA-CA bond length",j," ",vbld(j),
710 & " for conformation",ii
711 if (iprint.gt.1) then
712 write (iout,*) "The Cartesian geometry is:"
713 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
714 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
715 write (iout,*) "The internal geometry is:"
716 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
717 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
718 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
719 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
720 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
721 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
723 if (iprint.gt.0) write (iout,*)
724 & "This conformation WILL NOT be added to the database."
731 if (itype(j).ne.10 .and. (vbld(nres+j)-dsc(itj)).gt.2.0d0) then
733 & write (iout,*) "Bad CA-SC bond length",j," ",vbld(nres+j),
734 & " for conformation",ii
735 if (iprint.gt.1) then
736 write (iout,*) "The Cartesian geometry is:"
737 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
738 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
739 write (iout,*) "The internal geometry is:"
740 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
741 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
742 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
743 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
744 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
745 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
747 if (iprint.gt.0) write (iout,*)
748 & "This conformation WILL NOT be added to the database."
754 if (theta(j).le.0.0d0) then
756 & write (iout,*) "Zero theta angle(s) in conformation",ii
757 if (iprint.gt.1) then
758 write (iout,*) "The Cartesian geometry is:"
759 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
760 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
761 write (iout,*) "The internal geometry is:"
762 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
763 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
764 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
765 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
766 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
767 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
769 if (iprint.gt.0) write (iout,*)
770 & "This conformation WILL NOT be added to the database."
774 if (theta(j).gt.179.97*deg2rad) theta(j)=179.97*deg2rad
777 c write (iout,*) "conf_check passed",ii