c#encode.f     srs     v1.0     nov 81
c
	subroutine encode(name,char)
c
c	encode three letter amino acid code
c	into one letter code
c
c	arguments:
c
c	CHAR: one letter code ; character*1
c
c	NAME: three letter code ; character*4
c
c&*******************************************
c
	character*4 name,big1(25),big2(25)
	character*1 char,small(26)
	data big1/'ALA','VAL','GLY','LEU','ILE',
     *		 'CYS','MET','PHE','TRP','TYR',
     *		 'PRO','HIS','ASN','GLN','ASP',
     *		 'GLU','LYS','ARG','THR','SER',
     *		 'PLP','SRP','WAT','GLC','SOL'/
	data big2/'ala','val','gly','leu','ile',
     *		 'cys','met','phe','trp','tyr',
     *		 'pro','his','asn','gln','asp',
     *		 'glu','lys','arg','thr','ser',
     *		 'plp','srp','wat','glc','sol'/
	data small/'A','V','G','L','I','C','M','F','W','Y',
     *		   'P','H','N','Q','D','E','K','R','T','S',
     *		   'Z','X','O','U','B','?'/
	do 10 i=1,25
	if (name .eq. big1(i) .or. name .eq. big2(i)) go to 20
10	continue
	char = small(25)
	return
20	char = small(i)
	return
	end
