c#subroutine wthead     srs     v1.0     jan 1981
	subroutine wthead(iun,ifmt)
c
c	This routine writes a header record or
c	title card for a protein coordinate file.
c	the format type is indicated by IFMT, the
c	logical unit by IUN. The formats available
c	are listed in FTCHUZ.
c
c****************************************************
c&
	character*80 title
	dimension cell(6),igrid(3)
	data cell,igrid/3*1.0000,3*90.00000,3*1/
c
	go to (10,20,30,40,40,40),ifmt
c
c
c  ***	PDB format ... no header record
10	return
c  ***  KRAUT format .. insert CELL and GRID cards
20	write(iun,1)cell
	write(iun,2)igrid
	return
c  ***  DIAMOND  .... insert title card 
30	print *,' '
	print *,'Enter title for Diamond formatted Coordinate file:'
	read (5,5000)title
5000	format (a80)
	write(iun,3)title
	return
c  ***  HENDRICKSON  ... ditto
40	return
c
1	format('CELL',9x,3f7.3,3f9.5)
2	format('GRID',9x,3i4)
3	format('0',/,a80,/,'1')
c
	end
