1 subroutine read_coords(ncon,*)
7 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
10 include "COMMON.CONTROL"
11 include "COMMON.CHAIN"
12 include "COMMON.INTERACT"
13 include "COMMON.IOUNITS"
15 include "COMMON.SBRIDGE"
17 include "COMMON.CLUSTER"
20 integer i,j,jj,jjj,jj_old,icount,k,kk,l,ii,if,ib,
22 integer ixdrf,iret,itmp
23 real*4 prec,reini,refree,rmsdev
24 integer nrec,nlines,iscor,lenrec,lenrec_in
25 double precision energ,t_acq,tcpu
28 double precision rjunk
29 integer ntot_all(0:maxprocs-1)
31 double precision energia(0:max_ene),etot
32 real*4 csingle(3,maxres2+2)
34 character*256 bprotfiles
35 c print *,"Processor",me," calls read_protein_data"
37 if (me.eq.master) then
38 Previous=MPI_PROC_NULL
42 if (me.eq.nprocs-1) then
47 c Set the scratchfile names
48 write (liczba,'(bz,i3.3)') me
50 c 1/27/05 AL Change stored coordinates to single precision and don't store
51 c energy components in the binary databases.
52 lenrec=12*(nres+nct-nnt+1)+4*(2*nss+2)+16
53 lenrec_in=12*(nres+nct-nnt+1)+4*(2*nss+2)+24
55 write (iout,*) "nres",nres," nnt",nnt," nct",nct," nss", nss
56 write (iout,*) "lenrec_in",lenrec_in
58 bprotfiles=scratchdir(:ilen(scratchdir))//
59 & "/"//prefix(:ilen(prefix))//liczba//".xbin"
64 if (from_cart .and. .not. from_bx .and. .not. from_cx) then
66 read (intin,*,end=13,err=11) energy(icon),totfree(icon),
68 & nss_all(icon),(ihpb_all(ii,icon),jhpb_all(i,icon),
69 & i=1,nss_all(icon)),iscore(icon)
71 read (intin,*,end=13,err=11) energy(icon),rmstb(icon),
72 & nss_all(icon),(ihpb_all(ii,icon),jhpb_all(i,icon),
73 & i=1,nss_all(icon)),iscore(icon)
75 read (intin,'(8f10.5)',end=13,err=10)
76 & ((allcart(j,i,icon),j=1,3),i=1,nres),
77 & ((allcart(j,i+nres,icon),j=1,3),i=nnt,nct)
78 print *,icon,energy(icon),nss_all(icon),rmstb(icon)
80 read(intin,'(a80)',end=13,err=12) lineh
81 read(lineh(:5),*,err=8) ic
83 read(lineh(6:),*,err=8) energy(icon)
85 read(lineh(6:),*,err=8) energy(icon)
89 print *,'error, assuming e=1d10',lineh
93 cold read(lineh(18:),*,end=13,err=11) nss_all(icon)
94 ii = index(lineh(15:)," ")+15
95 read(lineh(ii:),*,end=13,err=11) nss_all(icon)
96 IF (NSS_all(icon).LT.9) THEN
97 read (lineh(20:),*,end=102)
98 & (IHPB_all(I,icon),JHPB_all(I,icon),I=1,NSS_all(icon)),
101 read (lineh(20:),*,end=102)
102 & (IHPB_all(I,icon),JHPB_all(I,icon),I=1,8)
103 read (intin,*) (IHPB_all(I,icon),JHPB_all(I,icon),
104 & I=9,NSS_all(icon)),iscore(icon)
109 PRINT *,'IC:',IC,' ENERGY:',ENERGY(ICON)
110 call read_angles(intin,*13)
112 phiall(i,icon)=phi(i)
113 thetall(i,icon)=theta(i)
114 alphall(i,icon)=alph(i)
115 omall(i,icon)=omeg(i)
121 C CALCULATE DISTANCES
123 10 print *,'something wrong with angles'
125 11 print *,'something wrong with NSS',nss
127 12 print *,'something wrong with header'
134 open (icbase,file=bprotfiles,status="unknown",
135 & form="unformatted",access="direct",recl=lenrec)
136 c Read conformations from binary DA files (one per batch) and write them to
137 c a binary DA scratchfile.
141 write (liczba,'(bz,i3.3)') me
142 IF (ME.EQ.MASTER) THEN
143 c Only the master reads the database; it'll send it to the other procs
151 open (intin,file=intinname,status="old",form="unformatted",
152 & access="direct",recl=lenrec_in)
154 else if (from_cx) then
155 #if (defined(AIX) && !defined(JUBL))
156 call xdrfopen_(ixdrf,intinname, "r", iret)
158 call xdrfopen(ixdrf,intinname, "r", iret)
161 write (iout,*) "xdrfopen: iret",iret
163 write (iout,*) "Error: coordinate file ",
164 & intinname(:ilen(intinname))," does not exist."
171 call MPI_ABORT(MPI_COMM_WORLD,IERROR,ERRCODE)
176 write (iout,*) "Error: coordinate format not specified"
183 call MPI_ABORT(MPI_COMM_WORLD,IERROR,ERRCODE)
190 write (iout,*) "Opening file ",intinname(:ilen(intinname))
191 write (iout,*) "lenrec",lenrec_in
198 c write (iout,*) "maxconf",maxconf
202 if (i.gt.maxconf) then
203 write (iout,*) "Error: too many conformations ",
204 & "(",maxconf,") maximum."
206 call MPI_Abort(MPI_COMM_WORLD,errcode,ierror)
210 c write (iout,*) "i",i
213 read(intin,err=101,end=101)
214 & ((csingle(l,k),l=1,3),k=1,nres),
215 & ((csingle(l,k+nres),l=1,3),k=nnt,nct),
216 & nss,(ihpb(k),jhpb(k),k=1,nss),
218 & entfac(jj+1),rmstb(jj+1),iscor
226 #if (defined(AIX) && !defined(JUBL))
227 call xdrf3dfcoord_(ixdrf, csingle, itmp, prec, iret)
228 if (iret.eq.0) goto 101
229 call xdrfint_(ixdrf, nss, iret)
230 if (iret.eq.0) goto 101
233 cc call xdrfint_(ixdrf, idssb(j), iret)
234 cc if (iret.eq.0) goto 101
235 cc call xdrfint_(ixdrf, jdssb(j), iret)
236 cc if (iret.eq.0) goto 101
237 cc idssb(j)=idssb(j)-nres
238 cc jdssb(j)=jdssb(j)-nres
240 call xdrfint_(ixdrf, ihpb(j), iret)
241 if (iret.eq.0) goto 101
242 call xdrfint_(ixdrf, jhpb(j), iret)
243 if (iret.eq.0) goto 101
246 call xdrffloat_(ixdrf,reini,iret)
247 if (iret.eq.0) goto 101
248 call xdrffloat_(ixdrf,refree,iret)
249 if (iret.eq.0) goto 101
250 call xdrffloat_(ixdrf,rmsdev,iret)
251 if (iret.eq.0) goto 101
252 call xdrfint_(ixdrf,iscor,iret)
253 if (iret.eq.0) goto 101
255 c write (iout,*) "calling xdrf3dfcoord"
256 call xdrf3dfcoord(ixdrf, csingle, itmp, prec, iret)
257 c write (iout,*) "iret",iret
259 if (iret.eq.0) goto 101
260 call xdrfint(ixdrf, nss, iret)
261 c write (iout,*) "iret",iret
262 c write (iout,*) "nss",nss
264 if (iret.eq.0) goto 101
267 cc call xdrfint(ixdrf, idssb(k), iret)
268 cc if (iret.eq.0) goto 101
269 cc call xdrfint(ixdrf, jdssb(k), iret)
270 cc if (iret.eq.0) goto 101
271 cc idssb(k)=idssb(k)-nres
272 cc jdssb(k)=jdssb(k)-nres
273 cc write(iout,*) "TUTU", idssb(k),jdssb(k)
275 call xdrfint(ixdrf, ihpb(k), iret)
276 if (iret.eq.0) goto 101
277 call xdrfint(ixdrf, jhpb(k), iret)
278 if (iret.eq.0) goto 101
281 call xdrffloat(ixdrf,reini,iret)
282 if (iret.eq.0) goto 101
283 call xdrffloat(ixdrf,refree,iret)
284 if (iret.eq.0) goto 101
285 call xdrffloat(ixdrf,rmsdev,iret)
286 if (iret.eq.0) goto 101
287 call xdrfint(ixdrf,iscor,iret)
288 if (iret.eq.0) goto 101
291 cc write(iout,*) 'reini=', reini, jj+1
292 entfac(jj+1)=dble(refree)
293 cc write(iout,*) 'refree=', refree,jj+1
302 c(l,nres+k)=csingle(l,nres+k-nnt+1)
307 write (iout,'(5hREAD ,i5,3f15.4,i10)')
308 & jj+1,energy(jj+1),entfac(jj+1),
310 write (iout,*) "Conformation",jjj+1,jj+1
311 write (iout,'(8f10.5)') ((c(j,i),j=1,3),i=1,nres)
312 write (iout,'(8f10.5)') ((c(j,i+nres),j=1,3),i=nnt,nct)
319 call add_new_cconf(jjj,jj,jj_old,icount,Next)
322 write (iout,*) i-1," conformations read from DA file ",
323 & intinname(:ilen(intinname))
324 write (iout,*) jj," conformations read so far"
328 #if (defined(AIX) && !defined(JUBL))
329 call xdrfclose_(ixdrf, iret)
331 call xdrfclose(ixdrf, iret)
336 write (iout,*) "jj_old",jj_old," jj",jj
338 call write_and_send_cconf(icount,jj_old,jj,Next)
339 call MPI_Send(0,1,MPI_INTEGER,Next,570,
340 & MPI_COMM_WORLD,IERROR)
343 call write_and_send_cconf(icount,jj_old,jj,Next)
345 t_acq = tcpu() - t_acq
347 write (iout,*) "Processor",me,
348 & " time for conformation read/send",t_acq
350 c A worker gets the confs from the master and sends them to its neighbor
352 call receive_and_pass_cconf(icount,jj_old,jj,
354 t_acq = tcpu() - t_acq
361 write(iout,*)"A total of",ncon," conformations read."
364 c Check if everyone has the same number of conformations
365 call MPI_Allgather(ncon,1,MPI_INTEGER,
366 & ntot_all(0),1,MPI_INTEGER,MPI_Comm_World,IERROR)
370 if (ncon.ne.ntot_all(i)) then
371 write (iout,*) "Number of conformations at processor",i,
372 & " differs from that at processor",me,
380 write (iout,*) "Number of conformations read by processors"
383 write (iout,'(8i10)') i,ntot_all(i)
385 write (iout,*) "Calculation terminated."
395 1111 write(iout,*) "Error opening coordinate file ",
396 & intinname(:ilen(intinname))
404 c------------------------------------------------------------------------------
405 subroutine add_new_cconf(jjj,jj,jj_old,icount,Next)
408 include "sizesclu.dat"
409 include "COMMON.CLUSTER"
410 include "COMMON.CHAIN"
411 include "COMMON.INTERACT"
412 include "COMMON.LOCAL"
413 include "COMMON.IOUNITS"
414 include "COMMON.NAMES"
416 include "COMMON.SBRIDGE"
418 integer i,j,jj,jjj,jj_old,icount,k,kk,l,ii,ib
419 & nn,nn1,inan,Next,itj
420 double precision etot,energia(0:max_ene)
422 call int_from_cart1(.false.)
424 if (vbld(j).lt.2.0d0 .or. vbld(j).gt.5.0d0) then
425 write (iout,*) "Conformation",jjj,jj+1
426 write (iout,*) "Bad CA-CA bond length",j," ",vbld(j)
427 write (iout,*) "The Cartesian geometry is:"
428 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
429 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
430 write (iout,*) "The internal geometry is:"
431 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
432 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
433 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
434 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
435 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
436 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
438 & "This conformation WILL NOT be added to the database."
444 if (itype(j).ne.10 .and. (vbld(nres+j)-dsc(itj)).gt.2.0d0) then
445 write (iout,*) "Conformation",jjj,jj+1
446 write (iout,*) "Bad CA-SC bond length",j," ",vbld(nres+j)
447 write (iout,*) "The Cartesian geometry is:"
448 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
449 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
450 write (iout,*) "The internal geometry is:"
451 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
452 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
453 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
454 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
455 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
456 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
458 & "This conformation WILL NOT be added to the database."
463 if (theta(j).le.0.0d0) then
465 & "Zero theta angle(s) in conformation",jjj,jj+1
466 write (iout,*) "The Cartesian geometry is:"
467 write (iout,'(8f10.5)') ((c(l,k),l=1,3),k=1,nres)
468 write (iout,'(8f10.5)') ((c(l,k+nres),l=1,3),k=nnt,nct)
469 write (iout,*) "The internal geometry is:"
470 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
471 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
472 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
473 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
474 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
475 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
477 & "This conformation WILL NOT be added to the database."
480 if (theta(j).gt.179.97*deg2rad) theta(j)=179.97*deg2rad
484 write (iout,*) "Conformation",jjj,jj
485 write (iout,'(8f10.5)') ((c(j,i),j=1,3),i=1,nres)
486 write (iout,'(8f10.5)') ((c(j,i+nres),j=1,3),i=nnt,nct)
487 write (iout,'(8f10.4)') (vbld(k),k=nnt+1,nct)
488 write (iout,'(8f10.4)') (vbld(k),k=nres+nnt,nres+nct)
489 write (iout,'(8f10.4)') (rad2deg*theta(k),k=3,nres)
490 write (iout,'(8f10.4)') (rad2deg*phi(k),k=4,nres)
491 write (iout,'(8f10.4)') (vbld(k+nres),k=nnt,nct)
492 write (iout,'(8f10.4)') (rad2deg*alph(k),k=2,nres-1)
493 write (iout,'(8f10.4)') (rad2deg*omeg(k),k=2,nres-1)
494 write (iout,'(16i5)') nss,(ihpb(k),jhpb(k),k=1,nss)
495 write (iout,'(e15.5,16i5)') entfac(icount+1),
499 call store_cconf_from_file(jj,icount)
500 if (icount.eq.maxstr_proc) then
502 write (iout,* ) "jj_old",jj_old," jj",jj
504 call write_and_send_cconf(icount,jj_old,jj,Next)
510 c------------------------------------------------------------------------------
511 subroutine store_cconf_from_file(jj,icount)
514 include "sizesclu.dat"
515 include "COMMON.CLUSTER"
516 include "COMMON.CHAIN"
517 include "COMMON.SBRIDGE"
518 include "COMMON.INTERACT"
519 include "COMMON.IOUNITS"
521 integer i,j,jj,icount
522 c Store the conformation that has been read in
525 allcart(j,i,icount)=c(j,i)
530 ihpb_all(i,icount)=ihpb(i)
531 jhpb_all(i,icount)=jhpb(i)
535 c------------------------------------------------------------------------------
536 subroutine write_and_send_cconf(icount,jj_old,jj,Next)
539 include "sizesclu.dat"
545 include "COMMON.CHAIN"
546 include "COMMON.SBRIDGE"
547 include "COMMON.INTERACT"
548 include "COMMON.IOUNITS"
549 include "COMMON.CLUSTER"
551 integer icount,jj_old,jj,Next
552 c Write the structures to a scratch file
554 c Master sends the portion of conformations that have been read in to the neighbor
556 write (iout,*) "Processor",me," entered WRITE_AND_SEND_CONF"
563 call MPI_Send(icount,1,MPI_INTEGER,Next,570,MPI_COMM_WORLD,IERROR)
564 call MPI_Send(nss_all(1),icount,MPI_INTEGER,
565 & Next,571,MPI_COMM_WORLD,IERROR)
566 call MPI_Send(ihpb_all(1,1),icount,MPI_INTEGER,
567 & Next,572,MPI_COMM_WORLD,IERROR)
568 call MPI_Send(jhpb_all(1,1),icount,MPI_INTEGER,
569 & Next,573,MPI_COMM_WORLD,IERROR)
570 call MPI_Send(rmstb(jj_old),icount,MPI_DOUBLE_PRECISION,
571 & Next,577,MPI_COMM_WORLD,IERROR)
572 call MPI_Send(entfac(jj_old),icount,MPI_DOUBLE_PRECISION,
573 & Next,579,MPI_COMM_WORLD,IERROR)
574 call MPI_Send(allcart(1,1,1),3*icount*maxres2,
575 & MPI_REAL,Next,580,MPI_COMM_WORLD,IERROR)
577 call dawrite_ccoords(jj_old,jj,icbase)
580 c------------------------------------------------------------------------------
582 subroutine receive_and_pass_cconf(icount,jj_old,jj,Previous,
586 include "sizesclu.dat"
588 integer IERROR,STATUS(MPI_STATUS_SIZE)
590 include "COMMON.CHAIN"
591 include "COMMON.SBRIDGE"
592 include "COMMON.INTERACT"
593 include "COMMON.IOUNITS"
596 include "COMMON.CLUSTER"
597 integer i,j,k,icount,jj_old,jj,Previous,Next
600 write (iout,*) "Processor",me," entered RECEIVE_AND_PASS_CONF"
607 do while (icount.gt.0)
608 call MPI_Recv(icount,1,MPI_INTEGER,Previous,570,MPI_COMM_WORLD,
610 call MPI_Send(icount,1,MPI_INTEGER,Next,570,MPI_COMM_WORLD,
613 write (iout,*) "Processor",me," icount",icount
615 if (icount.eq.0) return
616 call MPI_Recv(nss_all(1),icount,MPI_INTEGER,
617 & Previous,571,MPI_COMM_WORLD,STATUS,IERROR)
618 call MPI_Send(nss_all(1),icount,MPI_INTEGER,
619 & Next,571,MPI_COMM_WORLD,IERROR)
620 call MPI_Recv(ihpb_all(1,1),icount,MPI_INTEGER,
621 & Previous,572,MPI_COMM_WORLD,STATUS,IERROR)
622 call MPI_Send(ihpb_all(1,1),icount,MPI_INTEGER,
623 & Next,572,MPI_COMM_WORLD,IERROR)
624 call MPI_Recv(jhpb_all(1,1),icount,MPI_INTEGER,
625 & Previous,573,MPI_COMM_WORLD,STATUS,IERROR)
626 call MPI_Send(jhpb_all(1,1),icount,MPI_INTEGER,
627 & Next,573,MPI_COMM_WORLD,IERROR)
628 call MPI_Recv(rmstb(jj_old),icount,MPI_DOUBLE_PRECISION,
629 & Previous,577,MPI_COMM_WORLD,STATUS,IERROR)
630 call MPI_Send(rmstb(jj_old),icount,MPI_DOUBLE_PRECISION,
631 & Next,577,MPI_COMM_WORLD,IERROR)
632 call MPI_Recv(entfac(jj_old),icount,MPI_DOUBLE_PRECISION,
633 & Previous,579,MPI_COMM_WORLD,STATUS,IERROR)
634 call MPI_Send(entfac(jj_old),icount,MPI_DOUBLE_PRECISION,
635 & Next,579,MPI_COMM_WORLD,IERROR)
636 call MPI_Recv(allcart(1,1,1),3*icount*maxres2,
637 & MPI_REAL,Previous,580,MPI_COMM_WORLD,STATUS,IERROR)
638 call MPI_Send(allcart(1,1,1),3*icount*maxres2,
639 & MPI_REAL,Next,580,MPI_COMM_WORLD,IERROR)
641 call dawrite_ccoords(jj_old,jj,icbase)
644 write (iout,*) "Processor",me," received",icount," conformations"
646 write (iout,'(8f10.4)') (allcart(l,k,i),l=1,3,k=1,nres)
647 write (iout,'(8f10.4)')((allcart(l,k,i+nres),l=1,3,k=nnt,nct)
648 write (iout,'(e15.5,16i5)') entfac(i)
655 c------------------------------------------------------------------------------
656 subroutine daread_ccoords(istart_conf,iend_conf)
659 include "sizesclu.dat"
664 include "COMMON.CHAIN"
665 include "COMMON.CLUSTER"
666 include "COMMON.IOUNITS"
667 include "COMMON.INTERACT"
669 include "COMMON.SBRIDGE"
671 integer istart_conf,iend_conf
672 integer i,j,ij,ii,iii
674 character*16 form,acc
677 c Read conformations off a DA scratchfile.
680 write (iout,*) "DAREAD_COORDS"
681 write (iout,*) "istart_conf",istart_conf," iend_conf",iend_conf
682 inquire(unit=icbase,name=nam,recl=len,form=form,access=acc)
683 write (iout,*) "len=",len," form=",form," acc=",acc
684 write (iout,*) "nam=",nam
691 do ii=istart_conf,iend_conf
692 ij = ii - istart_conf + 1
695 write (iout,*) "Reading binary file, record",iii," ii",ii
703 read(icbase,rec=iii) ((allcart(j,i,ij),j=1,3),i=1,nres),
704 & ((allcart(j,i,ij),j=1,3),i=nnt+nres,nct+nres),
705 c & nss_all(ij),(ihpb_all(i,ij),jhpb_all(i,ij),i=1,nss),
706 & entfac(ii),rmstb(ii)
708 read(icbase,rec=iii) ((allcart(j,i,ij),j=1,3),i=1,nres),
709 & ((allcart(j,i,ij),j=1,3),i=nnt+nres,nct+nres),
710 & nss_all(ij),(ihpb_all(i,ij),jhpb_all(i,ij),i=1,nss),
711 & entfac(ii),rmstb(ii)
714 write (iout,*) ii,iii,ij,entfac(ii)
715 write (iout,'(8f10.5)') ((allcart(j,i,ij),j=1,3),i=1,nres)
716 write (iout,'(8f10.4)') ((allcart(j,i,ij),j=1,3),
717 & i=nnt+nres,nct+nres)
718 write (iout,'(2e15.5)') entfac(ij)
719 write (iout,'(16i5)') nss_all(ij),(ihpb_all(i,ij),
720 & jhpb_all(i,ij),i=1,nss)
730 c------------------------------------------------------------------------------
731 subroutine dawrite_ccoords(istart_conf,iend_conf,unit_out)
734 include "sizesclu.dat"
739 include "COMMON.CHAIN"
740 include "COMMON.INTERACT"
741 include "COMMON.IOUNITS"
743 include "COMMON.SBRIDGE"
745 include "COMMON.CLUSTER"
746 integer istart_conf,iend_conf
747 integer i,j,ii,ij,iii,unit_out
749 character*16 form,acc
752 c Write conformations to a DA scratchfile.
755 write (iout,*) "DAWRITE_COORDS"
756 write (iout,*) "istart_conf",istart_conf," iend_conf",iend_conf
757 write (iout,*) "lenrec",lenrec
758 inquire(unit=unit_out,name=nam,recl=len,form=form,access=acc)
759 write (iout,*) "len=",len," form=",form," acc=",acc
760 write (iout,*) "nam=",nam
767 do ii=istart_conf,iend_conf
769 ij = ii - istart_conf + 1
771 write (iout,*) "Writing binary file, record",iii," ii",ii
779 write(unit_out,rec=iii) ((allcart(j,i,ij),j=1,3),i=1,nres),
780 & ((allcart(j,i,ij),j=1,3),i=nnt+nres,nct+nres),
781 c & nss_all(ij),(ihpb_all(i,ij),jhpb_all(i,ij),i=1,nss_all(ij))
782 & entfac(ii),rmstb(ii)
784 write(unit_out,rec=iii) ((allcart(j,i,ij),j=1,3),i=1,nres),
785 & ((allcart(j,i,ij),j=1,3),i=nnt+nres,nct+nres),
786 & nss_all(ij),(ihpb_all(i,ij),jhpb_all(i,ij),i=1,nss_all(ij)),
787 & entfac(ii),rmstb(ii)
790 write (iout,'(8f10.5)') ((allcart(j,i,ij),j=1,3),i=1,nres)
791 write (iout,'(8f10.4)') ((allcart(j,i,ij),j=1,3),i=nnt+nres,
793 write (iout,'(2e15.5)') entfac(ij)
794 write (iout,'(16i5)') nss_all(ij),(ihpb(i,ij),jhpb(i,ij),i=1,