%%
%% This is file `texshade.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% texshade.dtx  (with options: `texshade')
%% 
%% LaTeX package for typesetting nucleotide and peptide alignments
%% 
%% Copyright (C) 1999-2011 Eric Beitz
%% See the file texshade.txt
%% 

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{texshade}[2011/05/13 LaTeX TeXshade (v1.24)]
\message{Package `texshade', Version 1.24 of 2011/12/01.}

\PassOptionsToPackage{dvips}{color}
\PassOptionsToPackage{dvips}{graphicx}
\DeclareOption*{%
   \PassOptionsToPackage{\CurrentOption}{color}%
   \PassOptionsToPackage{\CurrentOption}{graphicx}%
}
\ProcessOptions
\RequirePackage{color,graphics}

\expandafter\ifx\csname TeXshade\endcsname\relax \else \endinput \fi

\expandafter\ifx\csname TeXtopo\endcsname\relax \else
 \PackageError{TeXtopo}
  {TeXtopo loaded before TeXshade}
  {\MessageBreak
   For the proper function of the TeXtopo/TeXshade combo the \MessageBreak
   TeXshade package must be loaded before the TeXtopo package.\MessageBreak
   Please change the order of the \noexpand\usepackage commands in your
   \MessageBreak
   document header section or use the `biotex.sty'.\MessageBreak\MessageBreak
   Quit here by typing \space X <return>. \MessageBreak
}
\fi

\catcode`\@11

\def\rotopo#1{%
  \Grot@setangle{#1}%
  \setbox\z@\hbox\bgroup\ignorespaces}
\def\endrotopo{%
  \unskip\egroup
  \Grot@x\z@
  \Grot@y\z@
  \wd0\z@\dp0\z@\ht0\z@
  \Grot@box
}

\newread\structurefile  \newwrite\featurefile
\newread\alignfile      \newread\sublogofile
\newwrite\exp@rtfile

\expandafter\ifx\csname blacktriangleright\endcsname\relax
 \openin\structurefile = amssymb.sty
 \ifeof\structurefile
  \message{<AMS symbol style `amssymb.sty' not installed - using round heads>}
  \def\blacktriangleright{%
    \rule[\width@tmp]{0.65ex}{\temp@@length}\kern-0.55ex\ensuremath{\bullet}%
  }
  \def\blacktriangleleft{%
    \ensuremath{\bullet}\kern-0.55ex\rule[\width@tmp]{0.65ex}{\temp@@length}%
  }
 \else \RequirePackage[]{amssymb} \fi
 \closein\structurefile
\fi

\DeclareSymbolFont{alphahelix}{OML}{cmm}{m}{it}
\DeclareMathSymbol{\helixhook}{\mathrel}{alphahelix}{"5E}

\newcount\loopcount     \newcount\innerloopcount   \newcount\outerloopcount
\newcount\seq@count     \newcount\killseq@count
\newcount\seq@percent   \newcount\res@count
\newcount\seq@pointer   \newcount\pos@count
\newcount\res@perline   \newcount\end@count
\newcount\cons@count    \newcount\total@count
\newcount\temp@count    \newcount\triple@count
\newcount\temp@@count   \newcount\pos@sum

\newlength\box@width    \newlength\name@width
\newlength\box@depth    \newlength\width@tmp
\newlength\box@height   \newlength\number@width
\newlength\line@stretch
\newlength\center@fill  \newlength\arrow@width
\newlength\arrow@height \newlength\rule@thick
\newlength\arrow@thick  \newlength\logo@height
\newlength\equal@width  \newlength\equal@tmp
\newlength\equal@height \newlength\temp@@length
\newlength\vspace@legend
\newlength\hspace@legend

\newif\ifletter       \newif\ifnumber
\newif\ifnewres       \newif\ifall@shade
\newif\ifnames@right
\newif\ifnumbers@left \newif\ifnumbers@right
\newif\ifhide@cons    \newif\ifshow@cons
\newif\iffuncmode     \newif\iflegend@
\newif\ifT@coffee
\newif\ifnumbers@     \newif\ifnames@
\newif\ifgerm@n       \newif\ifsp@nish
\newif\ifrpl@fix
\newif\ifnosh@de      \newif\ifregionalshade
\newif\ifstart@       \newif\ifstop@
\newif\iftopfeature   \newif\ifbottomfeature
\newif\ifttopfeature  \newif\ifbbottomfeature
\newif\iftttopfeature \newif\ifbbbottomfeature
\newif\ifttttopfeature\newif\ifbbbbottomfeature
\newif\ifall@fshade   \newif\ifregionalemph
\newif\ifregionallower
\newif\ifframe@       \newif\ifregionaltint
\newif\ifshading@
\newif\ifshow@logo    \newif\ifshow@sublogo
\newif\ifhidechar     \newif\ifsh@wg@ps
\newif\ifsimmode
\newif\ifregionaltintnow
\newif\ifregionalemphnow
\newif\ifregionallowernow
\newif\ifregionalshadenow
\newif\iftopfeaturenow
\newif\ifttopfeaturenow
\newif\iftttopfeaturenow
\newif\ifttttopfeaturenow
\newif\ifbottomfeaturenow
\newif\ifbbottomfeaturenow
\newif\ifbbbottomfeaturenow
\newif\ifbbbbottomfeaturenow
\newif\ifframenow
\newif\ifshadingnow
\newif\iffix@

\expandafter\ifx\csname mdqon\endcsname\relax
     \germ@nfalse \sp@nishfalse \def\cons@name{consensus}
\else \germ@ntrue \sp@nishfalse \def\cons@name{Konsensus} \fi

\def\n@me{Name:} \def\@msf{MSF:} \def\he@derend{//} \def\ampers@nd{&}
\def\comm@{,} \def\@loc{LOC} \def\@asg{ASG} \def\@t{@} \def\@HP{>HP:}
\def\gre@ter{>} \def\sm@ller{<} \def\N@{N} \def\equ@l{=} \def\H@{H}
\def\gap@char{.} \def\dom@char{{\dom@rule}} \def\yes{yes} \def\y@{y} \def\n@{n}
\def\o@{o} \def\d@t{.} \def\questi@n{?} \def\st@p@char{*} \def\semic@n{;}
\def\br@cket{[} \def\p@r@gr@ph{�}
\def\@TOM{ATOM} \def\C@lpha{CA} \def\@point@{point} \def\@line@{line} \def\@plane@{plane}
\def\gap@rule{\rule[0.3\box@height]{\box@width}{\gap@rulethick}}
\def\dom@rule{\vrule depth\box@depth height\box@height width\domgap@rulethick}
\def\fgroup@num{0} \def\max@seqnumber{0}  \def\@lign@count{0}
\def\resn@m@tch{upper} \def\ressimm@tch{upper}
\def\resm@tch{upper}   \def\res@llm@tch{upper}
\def\tr@ns{translate}  \def\gr@ydef@ult{GrayDefault}
\xdef\par@{\expandafter\string\par}
\expandafter\def\csname fg@textcolor/\endcsname{White}
\expandafter\def\csname fg@color/\endcsname{White}
\expandafter\def\csname func@style/\endcsname{\csname textup\endcsname}
\expandafter\def\csname func@style*\endcsname{\csname textup\endcsname}
\expandafter\def\csname funcm@tch/\endcsname{upper}
\expandafter\def\csname funcm@tch*\endcsname{upper}

\setlength\hspace@legend{0pt} \setlength\vspace@legend{0pt}

\expandafter\xdef\csname log2@1\endcsname{0}
\expandafter\xdef\csname log2@2\endcsname{1000}
\expandafter\xdef\csname log2@3\endcsname{1585}
\expandafter\xdef\csname log2@4\endcsname{2000}
\expandafter\xdef\csname log2@5\endcsname{2322}
\expandafter\xdef\csname log2@6\endcsname{2585}
\expandafter\xdef\csname log2@7\endcsname{2807}
\expandafter\xdef\csname log2@8\endcsname{3000}
\expandafter\xdef\csname log2@9\endcsname{3170}
\expandafter\xdef\csname log2@10\endcsname{3322}
\expandafter\xdef\csname log2@11\endcsname{3459}
\expandafter\xdef\csname log2@12\endcsname{3585}
\expandafter\xdef\csname log2@13\endcsname{3700}
\expandafter\xdef\csname log2@14\endcsname{3807}
\expandafter\xdef\csname log2@15\endcsname{3907}
\expandafter\xdef\csname log2@16\endcsname{4000}
\expandafter\xdef\csname log2@17\endcsname{4087}
\expandafter\xdef\csname log2@18\endcsname{4170}
\expandafter\xdef\csname log2@19\endcsname{4248}
\expandafter\xdef\csname log2@20\endcsname{4322}
\expandafter\xdef\csname log2@21\endcsname{4392}
\expandafter\xdef\csname log2@22\endcsname{4459}
\expandafter\xdef\csname log2@23\endcsname{4524}
\expandafter\xdef\csname log2@24\endcsname{4585}
\expandafter\xdef\csname log2@25\endcsname{4644}
\expandafter\xdef\csname log2@26\endcsname{4700}
\expandafter\xdef\csname log2@27\endcsname{4755}
\expandafter\xdef\csname log2@28\endcsname{4807}
\expandafter\xdef\csname log2@29\endcsname{4858}
\expandafter\xdef\csname log2@30\endcsname{4907}
\expandafter\xdef\csname log2@31\endcsname{4954}
\expandafter\xdef\csname log2@32\endcsname{5000}
\expandafter\xdef\csname log2@33\endcsname{5044}
\expandafter\xdef\csname log2@34\endcsname{5087}
\expandafter\xdef\csname log2@35\endcsname{5129}
\expandafter\xdef\csname log2@36\endcsname{5170}
\expandafter\xdef\csname log2@37\endcsname{5209}
\expandafter\xdef\csname log2@38\endcsname{5248}
\expandafter\xdef\csname log2@39\endcsname{5285}
\expandafter\xdef\csname log2@40\endcsname{5322}
\expandafter\xdef\csname log2@41\endcsname{5358}
\expandafter\xdef\csname log2@42\endcsname{5392}
\expandafter\xdef\csname log2@43\endcsname{5426}
\expandafter\xdef\csname log2@44\endcsname{5459}
\expandafter\xdef\csname log2@45\endcsname{5492}
\expandafter\xdef\csname log2@46\endcsname{5524}
\expandafter\xdef\csname log2@47\endcsname{5555}
\expandafter\xdef\csname log2@48\endcsname{5585}
\expandafter\xdef\csname log2@49\endcsname{5615}
\expandafter\xdef\csname log2@50\endcsname{5644}
\expandafter\xdef\csname log2@51\endcsname{5672}
\expandafter\xdef\csname log2@52\endcsname{5700}
\expandafter\xdef\csname log2@53\endcsname{5728}
\expandafter\xdef\csname log2@54\endcsname{5755}
\expandafter\xdef\csname log2@55\endcsname{5781}
\expandafter\xdef\csname log2@56\endcsname{5807}
\expandafter\xdef\csname log2@57\endcsname{5833}
\expandafter\xdef\csname log2@58\endcsname{5858}
\expandafter\xdef\csname log2@59\endcsname{5883}
\expandafter\xdef\csname log2@60\endcsname{5907}
\expandafter\xdef\csname log2@61\endcsname{5931}
\expandafter\xdef\csname log2@62\endcsname{5954}
\expandafter\xdef\csname log2@63\endcsname{5977}
\expandafter\xdef\csname log2@64\endcsname{6000}
\expandafter\xdef\csname log2@65\endcsname{6022}
\expandafter\xdef\csname log2@66\endcsname{6044}
\expandafter\xdef\csname log2@67\endcsname{6066}
\expandafter\xdef\csname log2@68\endcsname{6087}
\expandafter\xdef\csname log2@69\endcsname{6109}
\expandafter\xdef\csname log2@70\endcsname{6129}
\expandafter\xdef\csname log2@71\endcsname{6149}
\expandafter\xdef\csname log2@72\endcsname{6170}
\expandafter\xdef\csname log2@73\endcsname{6190}
\expandafter\xdef\csname log2@74\endcsname{6209}
\expandafter\xdef\csname log2@75\endcsname{6229}
\expandafter\xdef\csname log2@76\endcsname{6248}
\expandafter\xdef\csname log2@77\endcsname{6267}
\expandafter\xdef\csname log2@78\endcsname{6285}
\expandafter\xdef\csname log2@79\endcsname{6304}
\expandafter\xdef\csname log2@80\endcsname{6322}
\expandafter\xdef\csname log2@81\endcsname{6340}
\expandafter\xdef\csname log2@82\endcsname{6358}
\expandafter\xdef\csname log2@83\endcsname{6375}
\expandafter\xdef\csname log2@84\endcsname{6392}
\expandafter\xdef\csname log2@85\endcsname{6409}
\expandafter\xdef\csname log2@86\endcsname{6426}
\expandafter\xdef\csname log2@87\endcsname{6443}
\expandafter\xdef\csname log2@88\endcsname{6459}
\expandafter\xdef\csname log2@89\endcsname{6476}
\expandafter\xdef\csname log2@90\endcsname{6492}
\expandafter\xdef\csname log2@91\endcsname{6508}
\expandafter\xdef\csname log2@92\endcsname{6524}
\expandafter\xdef\csname log2@93\endcsname{6539}
\expandafter\xdef\csname log2@94\endcsname{6555}
\expandafter\xdef\csname log2@95\endcsname{6570}
\expandafter\xdef\csname log2@96\endcsname{6585}
\expandafter\xdef\csname log2@97\endcsname{6600}
\expandafter\xdef\csname log2@98\endcsname{6615}
\expandafter\xdef\csname log2@99\endcsname{6629}
\expandafter\xdef\csname log2@100\endcsname{6644}
\expandafter\xdef\csname log2@101\endcsname{6658}
\expandafter\xdef\csname log2@102\endcsname{6672}
\expandafter\xdef\csname log2@103\endcsname{6687}
\expandafter\xdef\csname log2@104\endcsname{6700}
\expandafter\xdef\csname log2@105\endcsname{6714}
\expandafter\xdef\csname log2@106\endcsname{6728}
\expandafter\xdef\csname log2@107\endcsname{6741}
\expandafter\xdef\csname log2@108\endcsname{6755}
\expandafter\xdef\csname log2@109\endcsname{6768}
\expandafter\xdef\csname log2@110\endcsname{6781}
\expandafter\xdef\csname log2@111\endcsname{6794}
\expandafter\xdef\csname log2@112\endcsname{6807}
\expandafter\xdef\csname log2@113\endcsname{6820}
\expandafter\xdef\csname log2@114\endcsname{6833}
\expandafter\xdef\csname log2@115\endcsname{6845}
\expandafter\xdef\csname log2@116\endcsname{6858}
\expandafter\xdef\csname log2@117\endcsname{6870}
\expandafter\xdef\csname log2@118\endcsname{6883}
\expandafter\xdef\csname log2@119\endcsname{6895}
\expandafter\xdef\csname log2@120\endcsname{6907}
\expandafter\xdef\csname log2@121\endcsname{6919}
\expandafter\xdef\csname log2@122\endcsname{6931}
\expandafter\xdef\csname log2@123\endcsname{6943}
\expandafter\xdef\csname log2@124\endcsname{6954}
\expandafter\xdef\csname log2@125\endcsname{6966}
\expandafter\xdef\csname log2@126\endcsname{6977}
\expandafter\xdef\csname log2@127\endcsname{6989}
\expandafter\xdef\csname log2@128\endcsname{7000}
\expandafter\xdef\csname log2@129\endcsname{7011}
\expandafter\xdef\csname log2@130\endcsname{7022}
\expandafter\xdef\csname log2@131\endcsname{7033}
\expandafter\xdef\csname log2@132\endcsname{7044}
\expandafter\xdef\csname log2@133\endcsname{7055}
\expandafter\xdef\csname log2@134\endcsname{7066}
\expandafter\xdef\csname log2@135\endcsname{7077}
\expandafter\xdef\csname log2@136\endcsname{7088}
\expandafter\xdef\csname log2@137\endcsname{7098}
\expandafter\xdef\csname log2@138\endcsname{7108}
\expandafter\xdef\csname log2@139\endcsname{7119}
\expandafter\xdef\csname log2@140\endcsname{7129}
\expandafter\xdef\csname log2@141\endcsname{7140}
\expandafter\xdef\csname log2@142\endcsname{7150}
\expandafter\xdef\csname log2@143\endcsname{7160}
\expandafter\xdef\csname log2@144\endcsname{7170}
\expandafter\xdef\csname log2@145\endcsname{7180}
\expandafter\xdef\csname log2@146\endcsname{7190}
\expandafter\xdef\csname log2@147\endcsname{7200}
\expandafter\xdef\csname log2@148\endcsname{7209}
\expandafter\xdef\csname log2@149\endcsname{7219}
\expandafter\xdef\csname log2@150\endcsname{7229}
\expandafter\xdef\csname log2@151\endcsname{7238}
\expandafter\xdef\csname log2@152\endcsname{7248}
\expandafter\xdef\csname log2@153\endcsname{7257}
\expandafter\xdef\csname log2@154\endcsname{7267}
\expandafter\xdef\csname log2@155\endcsname{7276}
\expandafter\xdef\csname log2@156\endcsname{7285}
\expandafter\xdef\csname log2@157\endcsname{7295}
\expandafter\xdef\csname log2@158\endcsname{7304}
\expandafter\xdef\csname log2@159\endcsname{7313}
\expandafter\xdef\csname log2@160\endcsname{7323}
\expandafter\xdef\csname log2@161\endcsname{7331}
\expandafter\xdef\csname log2@162\endcsname{7340}
\expandafter\xdef\csname log2@163\endcsname{7349}
\expandafter\xdef\csname log2@164\endcsname{7358}
\expandafter\xdef\csname log2@165\endcsname{7366}
\expandafter\xdef\csname log2@166\endcsname{7375}
\expandafter\xdef\csname log2@167\endcsname{7374}
\expandafter\xdef\csname log2@168\endcsname{7392}
\expandafter\xdef\csname log2@169\endcsname{7401}
\expandafter\xdef\csname log2@170\endcsname{7409}
\expandafter\xdef\csname log2@171\endcsname{7418}
\expandafter\xdef\csname log2@172\endcsname{7463}
\expandafter\xdef\csname log2@173\endcsname{7435}
\expandafter\xdef\csname log2@174\endcsname{7443}
\expandafter\xdef\csname log2@175\endcsname{7451}
\expandafter\xdef\csname log2@176\endcsname{7460}
\expandafter\xdef\csname log2@177\endcsname{7468}
\expandafter\xdef\csname log2@178\endcsname{7476}
\expandafter\xdef\csname log2@179\endcsname{7484}
\expandafter\xdef\csname log2@180\endcsname{7492}
\expandafter\xdef\csname log2@181\endcsname{7500}
\expandafter\xdef\csname log2@182\endcsname{7508}
\expandafter\xdef\csname log2@183\endcsname{7516}
\expandafter\xdef\csname log2@184\endcsname{7524}
\expandafter\xdef\csname log2@185\endcsname{7531}
\expandafter\xdef\csname log2@186\endcsname{7539}
\expandafter\xdef\csname log2@187\endcsname{7547}
\expandafter\xdef\csname log2@188\endcsname{7555}
\expandafter\xdef\csname log2@189\endcsname{7562}
\expandafter\xdef\csname log2@190\endcsname{7570}
\expandafter\xdef\csname log2@191\endcsname{7577}
\expandafter\xdef\csname log2@192\endcsname{7585}
\expandafter\xdef\csname log2@193\endcsname{7592}
\expandafter\xdef\csname log2@194\endcsname{7600}
\expandafter\xdef\csname log2@195\endcsname{7607}
\expandafter\xdef\csname log2@196\endcsname{7615}
\expandafter\xdef\csname log2@197\endcsname{7622}
\expandafter\xdef\csname log2@198\endcsname{7629}
\expandafter\xdef\csname log2@199\endcsname{7637}
\expandafter\xdef\csname log2@200\endcsname{7644}
\expandafter\xdef\csname log2@201\endcsname{7651}
\expandafter\xdef\csname log2@202\endcsname{7658}
\expandafter\xdef\csname log2@203\endcsname{7665}
\expandafter\xdef\csname log2@204\endcsname{7672}
\expandafter\xdef\csname log2@205\endcsname{7679}
\expandafter\xdef\csname log2@206\endcsname{7687}
\expandafter\xdef\csname log2@207\endcsname{7693}
\expandafter\xdef\csname log2@208\endcsname{7700}
\expandafter\xdef\csname log2@209\endcsname{7707}
\expandafter\xdef\csname log2@210\endcsname{7714}
\expandafter\xdef\csname log2@211\endcsname{7721}
\expandafter\xdef\csname log2@212\endcsname{7728}
\expandafter\xdef\csname log2@213\endcsname{7735}
\expandafter\xdef\csname log2@214\endcsname{7741}
\expandafter\xdef\csname log2@215\endcsname{7748}
\expandafter\xdef\csname log2@216\endcsname{7755}
\expandafter\xdef\csname log2@217\endcsname{7761}
\expandafter\xdef\csname log2@218\endcsname{7768}
\expandafter\xdef\csname log2@219\endcsname{7775}
\expandafter\xdef\csname log2@220\endcsname{7781}

\expandafter\xdef\csname ch@r@65\endcsname{A}
\expandafter\xdef\csname ch@r@66\endcsname{B}
\expandafter\xdef\csname ch@r@67\endcsname{C}
\expandafter\xdef\csname ch@r@68\endcsname{D}
\expandafter\xdef\csname ch@r@69\endcsname{E}
\expandafter\xdef\csname ch@r@70\endcsname{F}
\expandafter\xdef\csname ch@r@71\endcsname{G}
\expandafter\xdef\csname ch@r@72\endcsname{H}
\expandafter\xdef\csname ch@r@73\endcsname{I}
\expandafter\xdef\csname ch@r@74\endcsname{J}
\expandafter\xdef\csname ch@r@75\endcsname{K}
\expandafter\xdef\csname ch@r@76\endcsname{L}
\expandafter\xdef\csname ch@r@77\endcsname{M}
\expandafter\xdef\csname ch@r@78\endcsname{N}
\expandafter\xdef\csname ch@r@79\endcsname{O}
\expandafter\xdef\csname ch@r@80\endcsname{P}
\expandafter\xdef\csname ch@r@81\endcsname{Q}
\expandafter\xdef\csname ch@r@82\endcsname{R}
\expandafter\xdef\csname ch@r@83\endcsname{S}
\expandafter\xdef\csname ch@r@84\endcsname{T}
\expandafter\xdef\csname ch@r@85\endcsname{U}
\expandafter\xdef\csname ch@r@86\endcsname{V}
\expandafter\xdef\csname ch@r@87\endcsname{W}
\expandafter\xdef\csname ch@r@88\endcsname{X}
\expandafter\xdef\csname ch@r@89\endcsname{Y}
\expandafter\xdef\csname ch@r@90\endcsname{Z}

\def\clear@sims{%
    \expandafter\xdef\csname \prfx simA\endcsname{(1)A}
    \expandafter\xdef\csname \prfx simB\endcsname{(1)B}
    \expandafter\xdef\csname \prfx simC\endcsname{(1)C}
    \expandafter\xdef\csname \prfx simD\endcsname{(1)D}
    \expandafter\xdef\csname \prfx simE\endcsname{(1)E}
    \expandafter\xdef\csname \prfx simF\endcsname{(1)F}
    \expandafter\xdef\csname \prfx simG\endcsname{(1)G}
    \expandafter\xdef\csname \prfx simH\endcsname{(1)H}
    \expandafter\xdef\csname \prfx simI\endcsname{(1)I}
    \expandafter\xdef\csname \prfx simJ\endcsname{(1)J}
    \expandafter\xdef\csname \prfx simK\endcsname{(1)K}
    \expandafter\xdef\csname \prfx simL\endcsname{(1)L}
    \expandafter\xdef\csname \prfx simM\endcsname{(1)M}
    \expandafter\xdef\csname \prfx simN\endcsname{(1)N}
    \expandafter\xdef\csname \prfx simO\endcsname{(1)O}
    \expandafter\xdef\csname \prfx simP\endcsname{(1)P}
    \expandafter\xdef\csname \prfx simQ\endcsname{(1)Q}
    \expandafter\xdef\csname \prfx simR\endcsname{(1)R}
    \expandafter\xdef\csname \prfx simS\endcsname{(1)S}
    \expandafter\xdef\csname \prfx simT\endcsname{(1)T}
    \expandafter\xdef\csname \prfx simU\endcsname{(1)U}
    \expandafter\xdef\csname \prfx simV\endcsname{(1)V}
    \expandafter\xdef\csname \prfx simW\endcsname{(1)W}
    \expandafter\xdef\csname \prfx simX\endcsname{(1)X}
    \expandafter\xdef\csname \prfx simY\endcsname{(1)Y}
    \expandafter\xdef\csname \prfx simZ\endcsname{(1)Z}
}

\def\clear@simpairs{%
\xdef\simpairCC{1} \xdef\simpairCS{0} \xdef\simpairCT{0} \xdef\simpairCP{0} \xdef\simpairCA{0}
\xdef\simpairCG{0} \xdef\simpairCN{0} \xdef\simpairCD{0} \xdef\simpairCE{0} \xdef\simpairCQ{0}
\xdef\simpairCH{0} \xdef\simpairCR{0} \xdef\simpairCK{0} \xdef\simpairCM{0} \xdef\simpairCI{0}
\xdef\simpairCL{0} \xdef\simpairCV{0} \xdef\simpairCF{0} \xdef\simpairCY{0} \xdef\simpairCW{0}
\xdef\simpairCB{0}  \xdef\simpairCJ{0}  \xdef\simpairCO{0}  \xdef\simpairCU{0}  \xdef\simpairCX{0}  \xdef\simpairCZ{0}

\xdef\simpairSC{0} \xdef\simpairSS{1} \xdef\simpairST{0} \xdef\simpairSP{0} \xdef\simpairSA{0}
\xdef\simpairSG{0} \xdef\simpairSN{0} \xdef\simpairSD{0} \xdef\simpairSE{0} \xdef\simpairSQ{0}
\xdef\simpairSH{0} \xdef\simpairSR{0} \xdef\simpairSK{0} \xdef\simpairSM{0} \xdef\simpairSI{0}
\xdef\simpairSL{0} \xdef\simpairSV{0} \xdef\simpairSF{0} \xdef\simpairSY{0} \xdef\simpairSW{0}
\xdef\simpairSB{0}  \xdef\simpairSJ{0}  \xdef\simpairSO{0}  \xdef\simpairSU{0}  \xdef\simpairSX{0}  \xdef\simpairSZ{0}

\xdef\simpairTC{0} \xdef\simpairTS{0} \xdef\simpairTT{1} \xdef\simpairTP{0} \xdef\simpairTA{0}
\xdef\simpairTG{0} \xdef\simpairTN{0} \xdef\simpairTD{0} \xdef\simpairTE{0} \xdef\simpairTQ{0}
\xdef\simpairTH{0} \xdef\simpairTR{0} \xdef\simpairTK{0} \xdef\simpairTM{0} \xdef\simpairTI{0}
\xdef\simpairTL{0} \xdef\simpairTV{0} \xdef\simpairTF{0} \xdef\simpairTY{0} \xdef\simpairTW{0}
\xdef\simpairTB{0}  \xdef\simpairTJ{0}  \xdef\simpairTO{0}  \xdef\simpairTU{0}  \xdef\simpairTX{0}  \xdef\simpairTZ{0}

\xdef\simpairPC{0} \xdef\simpairPS{0} \xdef\simpairPT{0} \xdef\simpairPP{1} \xdef\simpairPA{0}
\xdef\simpairPG{0} \xdef\simpairPN{0} \xdef\simpairPD{0} \xdef\simpairPE{0} \xdef\simpairPQ{0}
\xdef\simpairPH{0} \xdef\simpairPR{0} \xdef\simpairPK{0} \xdef\simpairPM{0} \xdef\simpairPI{0}
\xdef\simpairPL{0} \xdef\simpairPV{0} \xdef\simpairPF{0} \xdef\simpairPY{0} \xdef\simpairPW{0}
\xdef\simpairPB{0}  \xdef\simpairPJ{0}  \xdef\simpairPO{0}  \xdef\simpairPU{0}  \xdef\simpairPX{0}  \xdef\simpairPZ{0}

\xdef\simpairAC{0} \xdef\simpairAS{0} \xdef\simpairAT{0} \xdef\simpairAP{0} \xdef\simpairAA{1}
\xdef\simpairAG{0} \xdef\simpairAN{0} \xdef\simpairAD{0} \xdef\simpairAE{0} \xdef\simpairAQ{0}
\xdef\simpairAH{0} \xdef\simpairAR{0} \xdef\simpairAK{0} \xdef\simpairAM{0} \xdef\simpairAI{0}
\xdef\simpairAL{0} \xdef\simpairAV{0} \xdef\simpairAF{0} \xdef\simpairAY{0} \xdef\simpairAW{0}
\xdef\simpairAB{0}  \xdef\simpairAJ{0}  \xdef\simpairAO{0}  \xdef\simpairAU{0}  \xdef\simpairAX{0}  \xdef\simpairAZ{0}

\xdef\simpairGC{0} \xdef\simpairGS{0} \xdef\simpairGT{0} \xdef\simpairGP{0} \xdef\simpairGA{0}
\xdef\simpairGG{1} \xdef\simpairGN{0} \xdef\simpairGD{0} \xdef\simpairGE{0} \xdef\simpairGQ{0}
\xdef\simpairGH{0} \xdef\simpairGR{0} \xdef\simpairGK{0} \xdef\simpairGM{0} \xdef\simpairGI{0}
\xdef\simpairGL{0} \xdef\simpairGV{0} \xdef\simpairGF{0} \xdef\simpairGY{0} \xdef\simpairGW{0}
\xdef\simpairGB{0}  \xdef\simpairGJ{0}  \xdef\simpairGO{0}  \xdef\simpairGU{0}  \xdef\simpairGX{0}  \xdef\simpairGZ{0}

\xdef\simpairNC{0} \xdef\simpairNS{0} \xdef\simpairNT{0} \xdef\simpairNP{0} \xdef\simpairNA{0}
\xdef\simpairNG{0} \xdef\simpairNN{1} \xdef\simpairND{0} \xdef\simpairNE{0} \xdef\simpairNQ{0}
\xdef\simpairNH{0} \xdef\simpairNR{0} \xdef\simpairNK{0} \xdef\simpairNM{0} \xdef\simpairNI{0}
\xdef\simpairNL{0} \xdef\simpairNV{0} \xdef\simpairNF{0} \xdef\simpairNY{0} \xdef\simpairNW{0}
\xdef\simpairNB{0}  \xdef\simpairNJ{0}  \xdef\simpairNO{0}  \xdef\simpairNU{0}  \xdef\simpairNX{0}  \xdef\simpairNZ{0}

\xdef\simpairDC{0} \xdef\simpairDS{0} \xdef\simpairDT{0} \xdef\simpairDP{0} \xdef\simpairDA{0}
\xdef\simpairDG{0} \xdef\simpairDN{0} \xdef\simpairDD{1} \xdef\simpairDE{0} \xdef\simpairDQ{0}
\xdef\simpairDH{0} \xdef\simpairDR{0} \xdef\simpairDK{0} \xdef\simpairDM{0} \xdef\simpairDI{0}
\xdef\simpairDL{0} \xdef\simpairDV{0} \xdef\simpairDF{0} \xdef\simpairDY{0} \xdef\simpairDW{0}
\xdef\simpairDB{0}  \xdef\simpairDJ{0}  \xdef\simpairDO{0}  \xdef\simpairDU{0}  \xdef\simpairDX{0}  \xdef\simpairDZ{0}

\xdef\simpairEC{0} \xdef\simpairES{0} \xdef\simpairET{0} \xdef\simpairEP{0} \xdef\simpairEA{0}
\xdef\simpairEG{0} \xdef\simpairEN{0} \xdef\simpairED{0} \xdef\simpairEE{1} \xdef\simpairEQ{0}
\xdef\simpairEH{0} \xdef\simpairER{0} \xdef\simpairEK{0} \xdef\simpairEM{0} \xdef\simpairEI{0}
\xdef\simpairEL{0} \xdef\simpairEV{0} \xdef\simpairEF{0} \xdef\simpairEY{0} \xdef\simpairEW{0}
\xdef\simpairEB{0}  \xdef\simpairEJ{0}  \xdef\simpairEO{0}  \xdef\simpairEU{0}  \xdef\simpairEX{0}  \xdef\simpairEZ{0}

\xdef\simpairQC{0} \xdef\simpairQS{0} \xdef\simpairQT{0} \xdef\simpairQP{0} \xdef\simpairQA{0}
\xdef\simpairQG{0} \xdef\simpairQN{0} \xdef\simpairQD{0} \xdef\simpairQE{0} \xdef\simpairQQ{1}
\xdef\simpairQH{0} \xdef\simpairQR{0} \xdef\simpairQK{0} \xdef\simpairQM{0} \xdef\simpairQI{0}
\xdef\simpairQL{0} \xdef\simpairQV{0} \xdef\simpairQF{0} \xdef\simpairQY{0} \xdef\simpairQW{0}
\xdef\simpairQB{0}  \xdef\simpairQJ{0}  \xdef\simpairQO{0}  \xdef\simpairQU{0}  \xdef\simpairQX{0}  \xdef\simpairQZ{0}

\xdef\simpairHC{0} \xdef\simpairHS{0} \xdef\simpairHT{0} \xdef\simpairHP{0} \xdef\simpairHA{0}
\xdef\simpairHG{0} \xdef\simpairHN{0} \xdef\simpairHD{0} \xdef\simpairHE{0} \xdef\simpairHQ{0}
\xdef\simpairHH{1} \xdef\simpairHR{0} \xdef\simpairHK{0} \xdef\simpairHM{0} \xdef\simpairHI{0}
\xdef\simpairHL{0} \xdef\simpairHV{0} \xdef\simpairHF{0} \xdef\simpairHY{0} \xdef\simpairHW{0}
\xdef\simpairHB{0}  \xdef\simpairHJ{0}  \xdef\simpairHO{0}  \xdef\simpairHU{0}  \xdef\simpairHX{0}  \xdef\simpairHZ{0}

\xdef\simpairRC{0} \xdef\simpairRS{0} \xdef\simpairRT{0} \xdef\simpairRP{0} \xdef\simpairRA{0}
\xdef\simpairRG{0} \xdef\simpairRN{0} \xdef\simpairRD{0} \xdef\simpairRE{0} \xdef\simpairRQ{0}
\xdef\simpairRH{0} \xdef\simpairRR{1} \xdef\simpairRK{0} \xdef\simpairRM{0} \xdef\simpairRI{0}
\xdef\simpairRL{0} \xdef\simpairRV{0} \xdef\simpairRF{0} \xdef\simpairRY{0} \xdef\simpairRW{0}
\xdef\simpairRB{0}  \xdef\simpairRJ{0}  \xdef\simpairRO{0}  \xdef\simpairRU{0}  \xdef\simpairRX{0}  \xdef\simpairRZ{0}

\xdef\simpairKC{0} \xdef\simpairKS{0} \xdef\simpairKT{0} \xdef\simpairKP{0} \xdef\simpairKA{0}
\xdef\simpairKG{0} \xdef\simpairKN{0} \xdef\simpairKD{0} \xdef\simpairKE{0} \xdef\simpairKQ{0}
\xdef\simpairKH{0} \xdef\simpairKR{0} \xdef\simpairKK{1} \xdef\simpairKM{0} \xdef\simpairKI{0}
\xdef\simpairKL{0} \xdef\simpairKV{0} \xdef\simpairKF{0} \xdef\simpairKY{0} \xdef\simpairKW{0}
\xdef\simpairKB{0}  \xdef\simpairKJ{0}  \xdef\simpairKO{0}  \xdef\simpairKU{0}  \xdef\simpairKX{0}  \xdef\simpairKZ{0}

\xdef\simpairMC{0} \xdef\simpairMS{0} \xdef\simpairMT{0} \xdef\simpairMP{0} \xdef\simpairMA{0}
\xdef\simpairMG{0} \xdef\simpairMN{0} \xdef\simpairMD{0} \xdef\simpairME{0} \xdef\simpairMQ{0}
\xdef\simpairMH{0} \xdef\simpairMR{0} \xdef\simpairMK{0} \xdef\simpairMM{1} \xdef\simpairMI{0}
\xdef\simpairML{0} \xdef\simpairMV{0} \xdef\simpairMF{0} \xdef\simpairMY{0} \xdef\simpairMW{0}
\xdef\simpairMB{0}  \xdef\simpairMJ{0}  \xdef\simpairMO{0}  \xdef\simpairMU{0}  \xdef\simpairMX{0}  \xdef\simpairMZ{0}

\xdef\simpairIC{0} \xdef\simpairIS{0} \xdef\simpairIT{0} \xdef\simpairIP{0} \xdef\simpairIA{0}
\xdef\simpairIG{0} \xdef\simpairIN{0} \xdef\simpairID{0} \xdef\simpairIE{0} \xdef\simpairIQ{0}
\xdef\simpairIH{0} \xdef\simpairIR{0} \xdef\simpairIK{0} \xdef\simpairIM{0} \xdef\simpairII{1}
\xdef\simpairIL{0} \xdef\simpairIV{0} \xdef\simpairIF{0} \xdef\simpairIY{0} \xdef\simpairIW{0}
\xdef\simpairIB{0}  \xdef\simpairIJ{0}  \xdef\simpairIO{0}  \xdef\simpairIU{0}  \xdef\simpairIX{0}  \xdef\simpairIZ{0}

\xdef\simpairLC{0} \xdef\simpairLS{0} \xdef\simpairLT{0} \xdef\simpairLP{0} \xdef\simpairLA{0}
\xdef\simpairLG{0} \xdef\simpairLN{0} \xdef\simpairLD{0} \xdef\simpairLE{0} \xdef\simpairLQ{0}
\xdef\simpairLH{0} \xdef\simpairLR{0} \xdef\simpairLK{0} \xdef\simpairLM{0} \xdef\simpairLI{0}
\xdef\simpairLL{1} \xdef\simpairLV{0} \xdef\simpairLF{0} \xdef\simpairLY{0} \xdef\simpairLW{0}
\xdef\simpairLB{0}  \xdef\simpairLJ{0}  \xdef\simpairLO{0}  \xdef\simpairLU{0}  \xdef\simpairLX{0}  \xdef\simpairLZ{0}

\xdef\simpairVC{0} \xdef\simpairVS{0} \xdef\simpairVT{0} \xdef\simpairVP{0} \xdef\simpairVA{0}
\xdef\simpairVG{0} \xdef\simpairVN{0} \xdef\simpairVD{0} \xdef\simpairVE{0} \xdef\simpairVQ{0}
\xdef\simpairVH{0} \xdef\simpairVR{0} \xdef\simpairVK{0} \xdef\simpairVM{0} \xdef\simpairVI{0}
\xdef\simpairVL{0} \xdef\simpairVV{1} \xdef\simpairVF{0} \xdef\simpairVY{0} \xdef\simpairVW{0}
\xdef\simpairVB{0}  \xdef\simpairVJ{0}  \xdef\simpairVO{0}  \xdef\simpairVU{0}  \xdef\simpairVX{0}  \xdef\simpairVZ{0}

\xdef\simpairFC{0} \xdef\simpairFS{0} \xdef\simpairFT{0} \xdef\simpairFP{0} \xdef\simpairFA{0}
\xdef\simpairFG{0} \xdef\simpairFN{0} \xdef\simpairFD{0} \xdef\simpairFE{0} \xdef\simpairFQ{0}
\xdef\simpairFH{0} \xdef\simpairFR{0} \xdef\simpairFK{0} \xdef\simpairFM{0} \xdef\simpairFI{0}
\xdef\simpairFL{0} \xdef\simpairFV{0} \xdef\simpairFF{1} \xdef\simpairFY{0} \xdef\simpairFW{0}
\xdef\simpairFB{0}  \xdef\simpairFJ{0}  \xdef\simpairFO{0}  \xdef\simpairFU{0}  \xdef\simpairFX{0}  \xdef\simpairFZ{0}

\xdef\simpairYC{0} \xdef\simpairYS{0} \xdef\simpairYT{0} \xdef\simpairYP{0} \xdef\simpairYA{0}
\xdef\simpairYG{0} \xdef\simpairYN{0} \xdef\simpairYD{0} \xdef\simpairYE{0} \xdef\simpairYQ{0}
\xdef\simpairYH{0} \xdef\simpairYR{0} \xdef\simpairYK{0} \xdef\simpairYM{0} \xdef\simpairYI{0}
\xdef\simpairYL{0} \xdef\simpairYV{0} \xdef\simpairYF{0} \xdef\simpairYY{1} \xdef\simpairYW{0}
\xdef\simpairYB{0}  \xdef\simpairYJ{0}  \xdef\simpairYO{0}  \xdef\simpairYU{0}  \xdef\simpairYX{0}  \xdef\simpairYZ{0}

\xdef\simpairWC{0} \xdef\simpairWS{0} \xdef\simpairWT{0} \xdef\simpairWP{0} \xdef\simpairWA{0}
\xdef\simpairWG{0} \xdef\simpairWN{0} \xdef\simpairWD{0} \xdef\simpairWE{0} \xdef\simpairWQ{0}
\xdef\simpairWH{0} \xdef\simpairWR{0} \xdef\simpairWK{0} \xdef\simpairWM{0} \xdef\simpairWI{0}
\xdef\simpairWL{0} \xdef\simpairWV{0} \xdef\simpairWF{0} \xdef\simpairWY{0} \xdef\simpairWW{1}
\xdef\simpairWB{0}  \xdef\simpairWJ{0}  \xdef\simpairWO{0}  \xdef\simpairWU{0}  \xdef\simpairWX{0}  \xdef\simpairWZ{0}

\xdef\simpairBC{0} \xdef\simpairBS{0} \xdef\simpairBT{0} \xdef\simpairBP{0} \xdef\simpairBA{0}
\xdef\simpairBG{0} \xdef\simpairBN{0} \xdef\simpairBD{0} \xdef\simpairBE{0} \xdef\simpairBQ{0}
\xdef\simpairBH{0} \xdef\simpairBR{0} \xdef\simpairBK{0} \xdef\simpairBM{0} \xdef\simpairBI{0}
\xdef\simpairBL{0} \xdef\simpairBV{0} \xdef\simpairBF{0} \xdef\simpairBY{0} \xdef\simpairBW{0}
\xdef\simpairBB{1} \xdef\simpairBJ{0} \xdef\simpairBO{0} \xdef\simpairBU{0}  \xdef\simpairBX{0}  \xdef\simpairBZ{0}

\xdef\simpairJC{0} \xdef\simpairJS{0} \xdef\simpairJT{0} \xdef\simpairJP{0} \xdef\simpairJA{0}
\xdef\simpairJG{0} \xdef\simpairJN{0} \xdef\simpairJD{0} \xdef\simpairJE{0} \xdef\simpairJQ{0}
\xdef\simpairJH{0} \xdef\simpairJR{0} \xdef\simpairJK{0} \xdef\simpairJM{0} \xdef\simpairJI{0}
\xdef\simpairJL{0} \xdef\simpairJV{0} \xdef\simpairJF{0} \xdef\simpairJY{0} \xdef\simpairJW{0}
\xdef\simpairJB{0} \xdef\simpairJJ{1} \xdef\simpairJO{0} \xdef\simpairJU{0}  \xdef\simpairJX{0}  \xdef\simpairJZ{0}

\xdef\simpairOC{0} \xdef\simpairOS{0} \xdef\simpairOT{0} \xdef\simpairOP{0} \xdef\simpairOA{0}
\xdef\simpairOG{0} \xdef\simpairON{0} \xdef\simpairOD{0} \xdef\simpairOE{0} \xdef\simpairOQ{0}
\xdef\simpairOH{0} \xdef\simpairOR{0} \xdef\simpairOK{0} \xdef\simpairOM{0} \xdef\simpairOI{0}
\xdef\simpairOL{0} \xdef\simpairOV{0} \xdef\simpairOF{0} \xdef\simpairOY{0} \xdef\simpairOW{0}
\xdef\simpairOB{0} \xdef\simpairOJ{0} \xdef\simpairOO{1} \xdef\simpairOU{0}  \xdef\simpairOX{0}  \xdef\simpairOZ{0}

\xdef\simpairUC{0} \xdef\simpairUS{0} \xdef\simpairUT{0} \xdef\simpairUP{0} \xdef\simpairUA{0}
\xdef\simpairUG{0} \xdef\simpairUN{0} \xdef\simpairUD{0} \xdef\simpairUE{0} \xdef\simpairUQ{0}
\xdef\simpairUH{0} \xdef\simpairUR{0} \xdef\simpairUK{0} \xdef\simpairUM{0} \xdef\simpairUI{0}
\xdef\simpairUL{0} \xdef\simpairUV{0} \xdef\simpairUF{0} \xdef\simpairUY{0} \xdef\simpairUW{0}
\xdef\simpairUB{0} \xdef\simpairUJ{0} \xdef\simpairUO{0} \xdef\simpairUU{1}  \xdef\simpairUX{0}  \xdef\simpairUZ{0}

\xdef\simpairXC{0} \xdef\simpairXS{0} \xdef\simpairXT{0} \xdef\simpairXP{0} \xdef\simpairXA{0}
\xdef\simpairXG{0} \xdef\simpairXN{0} \xdef\simpairXD{0} \xdef\simpairXE{0} \xdef\simpairXQ{0}
\xdef\simpairXH{0} \xdef\simpairXR{0} \xdef\simpairXK{0} \xdef\simpairXM{0} \xdef\simpairXI{0}
\xdef\simpairXL{0} \xdef\simpairXV{0} \xdef\simpairXF{0} \xdef\simpairXY{0} \xdef\simpairXW{0}
\xdef\simpairXB{0} \xdef\simpairXJ{0} \xdef\simpairXO{0} \xdef\simpairXU{0}  \xdef\simpairXX{1}  \xdef\simpairXZ{0}

\xdef\simpairZC{0} \xdef\simpairZS{0} \xdef\simpairZT{0} \xdef\simpairZP{0} \xdef\simpairZA{0}
\xdef\simpairZG{0} \xdef\simpairZN{0} \xdef\simpairZD{0} \xdef\simpairZE{0} \xdef\simpairZQ{0}
\xdef\simpairZH{0} \xdef\simpairZR{0} \xdef\simpairZK{0} \xdef\simpairZM{0} \xdef\simpairZI{0}
\xdef\simpairZL{0} \xdef\simpairZV{0} \xdef\simpairZF{0} \xdef\simpairZY{0} \xdef\simpairZW{0}
\xdef\simpairZB{0} \xdef\simpairZJ{0} \xdef\simpairZO{0} \xdef\simpairZU{0}  \xdef\simpairZX{0}  \xdef\simpairZZ{1}

}

\def\clear@sim@count{
   \def\clear@sim@nums{%
      \advance\innerloopcount by 1
      \ifnum\innerloopcount>\seq@count
      \else
         \expandafter\xdef\csname poscount\the\outerloopcount @\the\innerloopcount\endcsname{0}
         \expandafter\xdef\csname identcount\the\outerloopcount @\the\innerloopcount\endcsname{0}
         \expandafter\xdef\csname simcount\the\outerloopcount @\the\innerloopcount\endcsname{0}
         \clear@sim@nums
      \fi
   }

   \outerloopcount=1
   \loop
      \innerloopcount=\outerloopcount
      \clear@sim@nums
      \advance\outerloopcount by 1
   \ifnum\outerloopcount<\seq@count \repeat
}

\xdef\pepmwA{711}  \xdef\pepmwB{1146} \xdef\pepmwC{1032}
\xdef\pepmwD{1151} \xdef\pepmwE{1291} \xdef\pepmwF{1472}
\xdef\pepmwG{571}  \xdef\pepmwH{1372} \xdef\pepmwI{1132}
\xdef\pepmwJ{0}    \xdef\pepmwK{1282} \xdef\pepmwL{1132}
\xdef\pepmwM{1312} \xdef\pepmwN{1141} \xdef\pepmwO{0}
\xdef\pepmwP{971}  \xdef\pepmwQ{1281} \xdef\pepmwR{1562}
\xdef\pepmwS{871}  \xdef\pepmwT{1011} \xdef\pepmwU{0}
\xdef\pepmwV{991}  \xdef\pepmwW{1862} \xdef\pepmwX{1282}
\xdef\pepmwY{1632} \xdef\pepmwZ{1286}

\xdef\DNAmwA{3462}  \xdef\DNAmwB{0}     \xdef\DNAmwC{3222}
\xdef\DNAmwD{0}     \xdef\DNAmwE{0}     \xdef\DNAmwF{0}
\xdef\DNAmwG{3622}  \xdef\DNAmwH{0}     \xdef\DNAmwI{0}
\xdef\DNAmwJ{0}     \xdef\DNAmwK{0}     \xdef\DNAmwL{0}
\xdef\DNAmwM{0}     \xdef\DNAmwN{0}     \xdef\DNAmwO{0}
\xdef\DNAmwP{0}     \xdef\DNAmwQ{0}     \xdef\DNAmwR{0}
\xdef\DNAmwS{0}     \xdef\DNAmwT{3372}  \xdef\DNAmwU{3232}
\xdef\DNAmwV{0}     \xdef\DNAmwW{0}     \xdef\DNAmwX{0}
\xdef\DNAmwY{0}     \xdef\DNAmwZ{0}

\xdef\pepchargeA{0}     \xdef\pepchargeB{0}     \xdef\pepchargeC{-30}
\xdef\pepchargeD{-1000} \xdef\pepchargeE{-1000} \xdef\pepchargeF{0}
\xdef\pepchargeG{0}     \xdef\pepchargeH{165}   \xdef\pepchargeI{0}
\xdef\pepchargeJ{0}     \xdef\pepchargeK{1000}  \xdef\pepchargeL{0}
\xdef\pepchargeM{0}     \xdef\pepchargeN{0}     \xdef\pepchargeO{0}
\xdef\pepchargeP{0}     \xdef\pepchargeQ{0}     \xdef\pepchargeR{1000}
\xdef\pepchargeS{0}     \xdef\pepchargeT{0}     \xdef\pepchargeU{0}
\xdef\pepchargeV{0}     \xdef\pepchargeW{0}     \xdef\pepchargeX{0}
\xdef\pepchargeY{0}     \xdef\pepchargeZ{0}
\xdef\chargeNterm{910}  \xdef\chargeCterm{-1000}

\xdef\chargeA{0}     \xdef\chargeB{0}     \xdef\chargeC{0}
\xdef\chargeD{-50}   \xdef\chargeE{-50}   \xdef\chargeF{0}
\xdef\chargeG{0}     \xdef\chargeH{30}    \xdef\chargeI{0}
\xdef\chargeJ{0}     \xdef\chargeK{50}    \xdef\chargeL{0}
\xdef\chargeM{0}     \xdef\chargeN{0}     \xdef\chargeO{0}
\xdef\chargeP{0}     \xdef\chargeQ{0}     \xdef\chargeR{50}
\xdef\chargeS{0}     \xdef\chargeT{0}     \xdef\chargeU{0}
\xdef\chargeV{0}     \xdef\chargeW{0}     \xdef\chargeX{0}
\xdef\chargeY{0}     \xdef\chargeZ{0}

\xdef\molwA{11}   \xdef\molwB{45}   \xdef\molwC{36}
\xdef\molwD{45}   \xdef\molwE{66}   \xdef\molwF{70}
\xdef\molwG{1}    \xdef\molwH{62}   \xdef\molwI{44}
\xdef\molwJ{N}    \xdef\molwK{55}   \xdef\molwL{44}
\xdef\molwM{58}   \xdef\molwN{44}   \xdef\molwO{N}
\xdef\molwP{31}   \xdef\molwQ{55}   \xdef\molwR{77}
\xdef\molwS{19}   \xdef\molwT{34}   \xdef\molwU{N}
\xdef\molwV{33}   \xdef\molwW{100}  \xdef\molwX{55}
\xdef\molwY{82}   \xdef\molwZ{66}

\xdef\HydroA{21}  \xdef\HydroB{N}   \xdef\HydroC{10}
\xdef\HydroD{-31} \xdef\HydroE{-25} \xdef\HydroF{41}
\xdef\HydroG{16}  \xdef\HydroH{-14} \xdef\HydroI{47}
\xdef\HydroJ{N}   \xdef\HydroK{-52} \xdef\HydroL{36}
\xdef\HydroM{22}  \xdef\HydroN{-27} \xdef\HydroO{N}
\xdef\HydroP{4}   \xdef\HydroQ{-29} \xdef\HydroR{-53}
\xdef\HydroS{-6}  \xdef\HydroT{-2}  \xdef\HydroU{N}
\xdef\HydroV{37}  \xdef\HydroW{28}  \xdef\HydroX{N}
\xdef\HydroY{9}   \xdef\HydroZ{N}

\xdef\consCB{0}  \xdef\consCJ{0}  \xdef\consCO{0}  \xdef\consCU{0}  \xdef\consCX{0}  \xdef\consCZ{0}
\expandafter\xdef\csname consC?\endcsname{0}

\xdef\consSB{0}  \xdef\consSJ{0}  \xdef\consSO{0}  \xdef\consSU{0}  \xdef\consSX{0}  \xdef\consSZ{0}
\expandafter\xdef\csname consS?\endcsname{0}

\xdef\consTB{0}  \xdef\consTJ{0}  \xdef\consTO{0}  \xdef\consTU{0}  \xdef\consTX{0}  \xdef\consTZ{0}
\expandafter\xdef\csname consT?\endcsname{0}

\xdef\consPB{0}  \xdef\consPJ{0}  \xdef\consPO{0}  \xdef\consPU{0}  \xdef\consPX{0}  \xdef\consPZ{0}
\expandafter\xdef\csname consP?\endcsname{0}

\xdef\consAB{0}  \xdef\consAJ{0}  \xdef\consAO{0}  \xdef\consAU{0}  \xdef\consAX{0}  \xdef\consAZ{0}
\expandafter\xdef\csname consA?\endcsname{0}

\xdef\consGB{0}  \xdef\consGJ{0}  \xdef\consGO{0}  \xdef\consGU{0}  \xdef\consGX{0}  \xdef\consGZ{0}
\expandafter\xdef\csname consG?\endcsname{0}

\xdef\consNB{0}  \xdef\consNJ{0}  \xdef\consNO{0}  \xdef\consNU{0}  \xdef\consNX{0}  \xdef\consNZ{0}
\expandafter\xdef\csname consN?\endcsname{0}

\xdef\consDB{0}  \xdef\consDJ{0}  \xdef\consDO{0}  \xdef\consDU{0}  \xdef\consDX{0}  \xdef\consDZ{0}
\expandafter\xdef\csname consD?\endcsname{0}

\xdef\consEB{0}  \xdef\consEJ{0}  \xdef\consEO{0}  \xdef\consEU{0}  \xdef\consEX{0}  \xdef\consEZ{0}
\expandafter\xdef\csname consE?\endcsname{0}

\xdef\consQB{0}  \xdef\consQJ{0}  \xdef\consQO{0}  \xdef\consQU{0}  \xdef\consQX{0}  \xdef\consQZ{0}
\expandafter\xdef\csname consQ?\endcsname{0}

\xdef\consHB{0}  \xdef\consHJ{0}  \xdef\consHO{0}  \xdef\consHU{0}  \xdef\consHX{0}  \xdef\consHZ{0}
\expandafter\xdef\csname consH?\endcsname{0}

\xdef\consRB{0}  \xdef\consRJ{0}  \xdef\consRO{0}  \xdef\consRU{0}  \xdef\consRX{0}  \xdef\consRZ{0}
\expandafter\xdef\csname consR?\endcsname{0}

\xdef\consKB{0}  \xdef\consKJ{0}  \xdef\consKO{0}  \xdef\consKU{0}  \xdef\consKX{0}  \xdef\consKZ{0}
\expandafter\xdef\csname consK?\endcsname{0}

\xdef\consMB{0}  \xdef\consMJ{0}  \xdef\consMO{0}  \xdef\consMU{0}  \xdef\consMX{0}  \xdef\consMZ{0}
\expandafter\xdef\csname consM?\endcsname{0}

\xdef\consIB{0}  \xdef\consIJ{0}  \xdef\consIO{0}  \xdef\consIU{0}  \xdef\consIX{0}  \xdef\consIZ{0}
\expandafter\xdef\csname consI?\endcsname{0}

\xdef\consLB{0}  \xdef\consLJ{0}  \xdef\consLO{0}  \xdef\consLU{0}  \xdef\consLX{0}  \xdef\consLZ{0}
\expandafter\xdef\csname consL?\endcsname{0}

\xdef\consVB{0}  \xdef\consVJ{0}  \xdef\consVO{0}  \xdef\consVU{0}  \xdef\consVX{0}  \xdef\consVZ{0}
\expandafter\xdef\csname consV?\endcsname{0}

\xdef\consFB{0}  \xdef\consFJ{0}  \xdef\consFO{0}  \xdef\consFU{0}  \xdef\consFX{0}  \xdef\consFZ{0}
\expandafter\xdef\csname consF?\endcsname{0}

\xdef\consYB{0}  \xdef\consYJ{0}  \xdef\consYO{0}  \xdef\consYU{0}  \xdef\consYX{0}  \xdef\consYZ{0}
\expandafter\xdef\csname consY?\endcsname{0}

\xdef\consWB{0}  \xdef\consWJ{0}  \xdef\consWO{0}  \xdef\consWU{0}  \xdef\consWX{0}  \xdef\consWZ{0}
\expandafter\xdef\csname consW?\endcsname{0}

\xdef\consBC{0} \xdef\consBS{0} \xdef\consBT{0} \xdef\consBP{0} \xdef\consBA{0}
\xdef\consBG{0} \xdef\consBN{0} \xdef\consBD{0} \xdef\consBE{0} \xdef\consBQ{0}
\xdef\consBH{0} \xdef\consBR{0} \xdef\consBK{0} \xdef\consBM{0} \xdef\consBI{0}
\xdef\consBL{0} \xdef\consBV{0} \xdef\consBF{0} \xdef\consBY{0} \xdef\consBW{0}
\xdef\consBB{10} \xdef\consBJ{0} \xdef\consBO{0} \xdef\consBU{0}  \xdef\consBX{0}  \xdef\consBZ{0}
\expandafter\xdef\csname consB.\endcsname{0}
\expandafter\xdef\csname consB?\endcsname{0}

\xdef\consJC{0} \xdef\consJS{0} \xdef\consJT{0} \xdef\consJP{0} \xdef\consJA{0}
\xdef\consJG{0} \xdef\consJN{0} \xdef\consJD{0} \xdef\consJE{0} \xdef\consJQ{0}
\xdef\consJH{0} \xdef\consJR{0} \xdef\consJK{0} \xdef\consJM{0} \xdef\consJI{0}
\xdef\consJL{0} \xdef\consJV{0} \xdef\consJF{0} \xdef\consJY{0} \xdef\consJW{0}
\xdef\consJB{0} \xdef\consJJ{10} \xdef\consJO{0} \xdef\consJU{0}  \xdef\consJX{0}  \xdef\consJZ{0}
\expandafter\xdef\csname consJ.\endcsname{0}
\expandafter\xdef\csname consJ?\endcsname{0}

\xdef\consOC{0} \xdef\consOS{0} \xdef\consOT{0} \xdef\consOP{0} \xdef\consOA{0}
\xdef\consOG{0} \xdef\consON{0} \xdef\consOD{0} \xdef\consOE{0} \xdef\consOQ{0}
\xdef\consOH{0} \xdef\consOR{0} \xdef\consOK{0} \xdef\consOM{0} \xdef\consOI{0}
\xdef\consOL{0} \xdef\consOV{0} \xdef\consOF{0} \xdef\consOY{0} \xdef\consOW{0}
\xdef\consOB{0} \xdef\consOJ{0} \xdef\consOO{10} \xdef\consOU{0}  \xdef\consOX{0}  \xdef\consOZ{0}
\expandafter\xdef\csname consO.\endcsname{0}
\expandafter\xdef\csname consO?\endcsname{0}

\xdef\consUC{0} \xdef\consUS{0} \xdef\consUT{0} \xdef\consUP{0} \xdef\consUA{0}
\xdef\consUG{0} \xdef\consUN{0} \xdef\consUD{0} \xdef\consUE{0} \xdef\consUQ{0}
\xdef\consUH{0} \xdef\consUR{0} \xdef\consUK{0} \xdef\consUM{0} \xdef\consUI{0}
\xdef\consUL{0} \xdef\consUV{0} \xdef\consUF{0} \xdef\consUY{0} \xdef\consUW{0}
\xdef\consUB{0} \xdef\consUJ{0} \xdef\consUO{0} \xdef\consUU{10}  \xdef\consUX{0}  \xdef\consUZ{0}
\expandafter\xdef\csname consU.\endcsname{0}
\expandafter\xdef\csname consU?\endcsname{0}

\xdef\consXC{0} \xdef\consXS{0} \xdef\consXT{0} \xdef\consXP{0} \xdef\consXA{0}
\xdef\consXG{0} \xdef\consXN{0} \xdef\consXD{0} \xdef\consXE{0} \xdef\consXQ{0}
\xdef\consXH{0} \xdef\consXR{0} \xdef\consXK{0} \xdef\consXM{0} \xdef\consXI{0}
\xdef\consXL{0} \xdef\consXV{0} \xdef\consXF{0} \xdef\consXY{0} \xdef\consXW{0}
\xdef\consXB{0} \xdef\consXJ{0} \xdef\consXO{0} \xdef\consXU{0}  \xdef\consXX{10}  \xdef\consXZ{0}
\expandafter\xdef\csname consX.\endcsname{0}
\expandafter\xdef\csname consX?\endcsname{0}

\xdef\consZC{0} \xdef\consZS{0} \xdef\consZT{0} \xdef\consZP{0} \xdef\consZA{0}
\xdef\consZG{0} \xdef\consZN{0} \xdef\consZD{0} \xdef\consZE{0} \xdef\consZQ{0}
\xdef\consZH{0} \xdef\consZR{0} \xdef\consZK{0} \xdef\consZM{0} \xdef\consZI{0}
\xdef\consZL{0} \xdef\consZV{0} \xdef\consZF{0} \xdef\consZY{0} \xdef\consZW{0}
\xdef\consZB{0} \xdef\consZJ{0} \xdef\consZO{0} \xdef\consZU{0}  \xdef\consZX{0}  \xdef\consZZ{10}
\expandafter\xdef\csname consZ.\endcsname{0}
\expandafter\xdef\csname consZ?\endcsname{0}

\expandafter\xdef\csname cons..\endcsname{0}
\expandafter\xdef\csname cons.?\endcsname{0}

\expandafter\xdef\csname cons?C\endcsname{0}
\expandafter\xdef\csname cons?S\endcsname{0}
\expandafter\xdef\csname cons?T\endcsname{0}
\expandafter\xdef\csname cons?P\endcsname{0}
\expandafter\xdef\csname cons?A\endcsname{0}
\expandafter\xdef\csname cons?G\endcsname{0}
\expandafter\xdef\csname cons?N\endcsname{0}
\expandafter\xdef\csname cons?D\endcsname{0}
\expandafter\xdef\csname cons?E\endcsname{0}
\expandafter\xdef\csname cons?Q\endcsname{0}
\expandafter\xdef\csname cons?H\endcsname{0}
\expandafter\xdef\csname cons?R\endcsname{0}
\expandafter\xdef\csname cons?K\endcsname{0}
\expandafter\xdef\csname cons?M\endcsname{0}
\expandafter\xdef\csname cons?I\endcsname{0}
\expandafter\xdef\csname cons?L\endcsname{0}
\expandafter\xdef\csname cons?V\endcsname{0}
\expandafter\xdef\csname cons?F\endcsname{0}
\expandafter\xdef\csname cons?Y\endcsname{0}
\expandafter\xdef\csname cons?W\endcsname{0}
\expandafter\xdef\csname cons?B\endcsname{0}
\expandafter\xdef\csname cons?J\endcsname{0}
\expandafter\xdef\csname cons?O\endcsname{0}
\expandafter\xdef\csname cons?U\endcsname{0}
\expandafter\xdef\csname cons?X\endcsname{0}
\expandafter\xdef\csname cons?Z\endcsname{0}
\expandafter\xdef\csname cons?.\endcsname{0}
\expandafter\xdef\csname cons??\endcsname{0}

\expandafter\xdef\csname cons==\endcsname{0}

\def\gappenalty#1{%
\expandafter\xdef\csname cons.C\endcsname{#1} \expandafter\xdef\csname consC.\endcsname{#1}
\expandafter\xdef\csname cons.S\endcsname{#1} \expandafter\xdef\csname consS.\endcsname{#1}
\expandafter\xdef\csname cons.T\endcsname{#1} \expandafter\xdef\csname consT.\endcsname{#1}
\expandafter\xdef\csname cons.P\endcsname{#1} \expandafter\xdef\csname consP.\endcsname{#1}
\expandafter\xdef\csname cons.A\endcsname{#1} \expandafter\xdef\csname consA.\endcsname{#1}
\expandafter\xdef\csname cons.G\endcsname{#1} \expandafter\xdef\csname consG.\endcsname{#1}
\expandafter\xdef\csname cons.N\endcsname{#1} \expandafter\xdef\csname consN.\endcsname{#1}
\expandafter\xdef\csname cons.D\endcsname{#1} \expandafter\xdef\csname consD.\endcsname{#1}
\expandafter\xdef\csname cons.E\endcsname{#1} \expandafter\xdef\csname consE.\endcsname{#1}
\expandafter\xdef\csname cons.Q\endcsname{#1} \expandafter\xdef\csname consQ.\endcsname{#1}
\expandafter\xdef\csname cons.H\endcsname{#1} \expandafter\xdef\csname consH.\endcsname{#1}
\expandafter\xdef\csname cons.R\endcsname{#1} \expandafter\xdef\csname consR.\endcsname{#1}
\expandafter\xdef\csname cons.K\endcsname{#1} \expandafter\xdef\csname consK.\endcsname{#1}
\expandafter\xdef\csname cons.M\endcsname{#1} \expandafter\xdef\csname consM.\endcsname{#1}
\expandafter\xdef\csname cons.I\endcsname{#1} \expandafter\xdef\csname consI.\endcsname{#1}
\expandafter\xdef\csname cons.L\endcsname{#1} \expandafter\xdef\csname consL.\endcsname{#1}
\expandafter\xdef\csname cons.V\endcsname{#1} \expandafter\xdef\csname consV.\endcsname{#1}
\expandafter\xdef\csname cons.F\endcsname{#1} \expandafter\xdef\csname consF.\endcsname{#1}
\expandafter\xdef\csname cons.Y\endcsname{#1} \expandafter\xdef\csname consY.\endcsname{#1}
\expandafter\xdef\csname cons.W\endcsname{#1} \expandafter\xdef\csname consW.\endcsname{#1}
\expandafter\xdef\csname cons.B\endcsname{#1} \expandafter\xdef\csname consB.\endcsname{#1}
\expandafter\xdef\csname cons.J\endcsname{#1} \expandafter\xdef\csname consJ.\endcsname{#1}
\expandafter\xdef\csname cons.O\endcsname{#1} \expandafter\xdef\csname consO.\endcsname{#1}
\expandafter\xdef\csname cons.U\endcsname{#1} \expandafter\xdef\csname consU.\endcsname{#1}
\expandafter\xdef\csname cons.X\endcsname{#1} \expandafter\xdef\csname consX.\endcsname{#1}
\expandafter\xdef\csname cons.Z\endcsname{#1} \expandafter\xdef\csname consZ.\endcsname{#1}
}

\def\weighttable#1{%
\xdef\first@{#1}

\xdef\temp@{identity}
\ifx\first@\temp@

%%%% identity matrix

\xdef\consCC{10} \xdef\consCS{0} \xdef\consCT{0} \xdef\consCP{0} \xdef\consCA{0}
\xdef\consCG{0} \xdef\consCN{0} \xdef\consCD{0} \xdef\consCE{0} \xdef\consCQ{0}
\xdef\consCH{0} \xdef\consCR{0} \xdef\consCK{0} \xdef\consCM{0} \xdef\consCI{0}
\xdef\consCL{0} \xdef\consCV{0} \xdef\consCF{0} \xdef\consCY{0} \xdef\consCW{0}

\xdef\consSC{0} \xdef\consSS{10} \xdef\consST{0} \xdef\consSP{0} \xdef\consSA{0}
\xdef\consSG{0} \xdef\consSN{0} \xdef\consSD{0} \xdef\consSE{0} \xdef\consSQ{0}
\xdef\consSH{0} \xdef\consSR{0} \xdef\consSK{0} \xdef\consSM{0} \xdef\consSI{0}
\xdef\consSL{0} \xdef\consSV{0} \xdef\consSF{0} \xdef\consSY{0} \xdef\consSW{0}

\xdef\consTC{0} \xdef\consTS{0} \xdef\consTT{10} \xdef\consTP{0} \xdef\consTA{0}
\xdef\consTG{0} \xdef\consTN{0} \xdef\consTD{0} \xdef\consTE{0} \xdef\consTQ{0}
\xdef\consTH{0} \xdef\consTR{0} \xdef\consTK{0} \xdef\consTM{0} \xdef\consTI{0}
\xdef\consTL{0} \xdef\consTV{0} \xdef\consTF{0} \xdef\consTY{0} \xdef\consTW{0}

\xdef\consPC{0} \xdef\consPS{0} \xdef\consPT{0} \xdef\consPP{10} \xdef\consPA{0}
\xdef\consPG{0} \xdef\consPN{0} \xdef\consPD{0} \xdef\consPE{0} \xdef\consPQ{0}
\xdef\consPH{0} \xdef\consPR{0} \xdef\consPK{0} \xdef\consPM{0} \xdef\consPI{0}
\xdef\consPL{0} \xdef\consPV{0} \xdef\consPF{0} \xdef\consPY{0} \xdef\consPW{0}

\xdef\consAC{0} \xdef\consAS{0} \xdef\consAT{0} \xdef\consAP{0} \xdef\consAA{10}
\xdef\consAG{0} \xdef\consAN{0} \xdef\consAD{0} \xdef\consAE{0} \xdef\consAQ{0}
\xdef\consAH{0} \xdef\consAR{0} \xdef\consAK{0} \xdef\consAM{0} \xdef\consAI{0}
\xdef\consAL{0} \xdef\consAV{0} \xdef\consAF{0} \xdef\consAY{0} \xdef\consAW{0}

\xdef\consGC{0} \xdef\consGS{0} \xdef\consGT{0} \xdef\consGP{0} \xdef\consGA{0}
\xdef\consGG{10} \xdef\consGN{0} \xdef\consGD{0} \xdef\consGE{0} \xdef\consGQ{0}
\xdef\consGH{0} \xdef\consGR{0} \xdef\consGK{0} \xdef\consGM{0} \xdef\consGI{0}
\xdef\consGL{0} \xdef\consGV{0} \xdef\consGF{0} \xdef\consGY{0} \xdef\consGW{0}

\xdef\consNC{0} \xdef\consNS{0} \xdef\consNT{0} \xdef\consNP{0} \xdef\consNA{0}
\xdef\consNG{0} \xdef\consNN{10} \xdef\consND{0} \xdef\consNE{0} \xdef\consNQ{0}
\xdef\consNH{0} \xdef\consNR{0} \xdef\consNK{0} \xdef\consNM{0} \xdef\consNI{0}
\xdef\consNL{0} \xdef\consNV{0} \xdef\consNF{0} \xdef\consNY{0} \xdef\consNW{0}

\xdef\consDC{0} \xdef\consDS{0} \xdef\consDT{0} \xdef\consDP{0} \xdef\consDA{0}
\xdef\consDG{0} \xdef\consDN{0} \xdef\consDD{10} \xdef\consDE{0} \xdef\consDQ{0}
\xdef\consDH{0} \xdef\consDR{0} \xdef\consDK{0} \xdef\consDM{0} \xdef\consDI{0}
\xdef\consDL{0} \xdef\consDV{0} \xdef\consDF{0} \xdef\consDY{0} \xdef\consDW{0}

\xdef\consEC{0} \xdef\consES{0} \xdef\consET{0} \xdef\consEP{0} \xdef\consEA{0}
\xdef\consEG{0} \xdef\consEN{0} \xdef\consED{0} \xdef\consEE{10} \xdef\consEQ{0}
\xdef\consEH{0} \xdef\consER{0} \xdef\consEK{0} \xdef\consEM{0} \xdef\consEI{0}
\xdef\consEL{0} \xdef\consEV{0} \xdef\consEF{0} \xdef\consEY{0} \xdef\consEW{0}

\xdef\consQC{0} \xdef\consQS{0} \xdef\consQT{0} \xdef\consQP{0} \xdef\consQA{0}
\xdef\consQG{0} \xdef\consQN{0} \xdef\consQD{0} \xdef\consQE{0} \xdef\consQQ{10}
\xdef\consQH{0} \xdef\consQR{0} \xdef\consQK{0} \xdef\consQM{0} \xdef\consQI{0}
\xdef\consQL{0} \xdef\consQV{0} \xdef\consQF{0} \xdef\consQY{0} \xdef\consQW{0}

\xdef\consHC{0} \xdef\consHS{0} \xdef\consHT{0} \xdef\consHP{0} \xdef\consHA{0}
\xdef\consHG{0} \xdef\consHN{0} \xdef\consHD{0} \xdef\consHE{0} \xdef\consHQ{0}
\xdef\consHH{10} \xdef\consHR{0} \xdef\consHK{0} \xdef\consHM{0} \xdef\consHI{0}
\xdef\consHL{0} \xdef\consHV{0} \xdef\consHF{0} \xdef\consHY{0} \xdef\consHW{0}

\xdef\consRC{0} \xdef\consRS{0} \xdef\consRT{0} \xdef\consRP{0} \xdef\consRA{0}
\xdef\consRG{0} \xdef\consRN{0} \xdef\consRD{0} \xdef\consRE{0} \xdef\consRQ{0}
\xdef\consRH{0} \xdef\consRR{10} \xdef\consRK{0} \xdef\consRM{0} \xdef\consRI{0}
\xdef\consRL{0} \xdef\consRV{0} \xdef\consRF{0} \xdef\consRY{0} \xdef\consRW{0}

\xdef\consKC{0} \xdef\consKS{0} \xdef\consKT{0} \xdef\consKP{0} \xdef\consKA{0}
\xdef\consKG{0} \xdef\consKN{0} \xdef\consKD{0} \xdef\consKE{0} \xdef\consKQ{0}
\xdef\consKH{0} \xdef\consKR{0} \xdef\consKK{10} \xdef\consKM{0} \xdef\consKI{0}
\xdef\consKL{0} \xdef\consKV{0} \xdef\consKF{0} \xdef\consKY{0} \xdef\consKW{0}

\xdef\consMC{0} \xdef\consMS{0} \xdef\consMT{0} \xdef\consMP{0} \xdef\consMA{0}
\xdef\consMG{0} \xdef\consMN{0} \xdef\consMD{0} \xdef\consME{0} \xdef\consMQ{0}
\xdef\consMH{0} \xdef\consMR{0} \xdef\consMK{0} \xdef\consMM{10} \xdef\consMI{0}
\xdef\consML{0} \xdef\consMV{0} \xdef\consMF{0} \xdef\consMY{0} \xdef\consMW{0}

\xdef\consIC{0} \xdef\consIS{0} \xdef\consIT{0} \xdef\consIP{0} \xdef\consIA{0}
\xdef\consIG{0} \xdef\consIN{0} \xdef\consID{0} \xdef\consIE{0} \xdef\consIQ{0}
\xdef\consIH{0} \xdef\consIR{0} \xdef\consIK{0} \xdef\consIM{0} \xdef\consII{10}
\xdef\consIL{0} \xdef\consIV{0} \xdef\consIF{0} \xdef\consIY{0} \xdef\consIW{0}

\xdef\consLC{0} \xdef\consLS{0} \xdef\consLT{0} \xdef\consLP{0} \xdef\consLA{0}
\xdef\consLG{0} \xdef\consLN{0} \xdef\consLD{0} \xdef\consLE{0} \xdef\consLQ{0}
\xdef\consLH{0} \xdef\consLR{0} \xdef\consLK{0} \xdef\consLM{0} \xdef\consLI{0}
\xdef\consLL{10} \xdef\consLV{0} \xdef\consLF{0} \xdef\consLY{0} \xdef\consLW{0}

\xdef\consVC{0} \xdef\consVS{0} \xdef\consVT{0} \xdef\consVP{0} \xdef\consVA{0}
\xdef\consVG{0} \xdef\consVN{0} \xdef\consVD{0} \xdef\consVE{0} \xdef\consVQ{0}
\xdef\consVH{0} \xdef\consVR{0} \xdef\consVK{0} \xdef\consVM{0} \xdef\consVI{0}
\xdef\consVL{0} \xdef\consVV{10} \xdef\consVF{0} \xdef\consVY{0} \xdef\consVW{0}

\xdef\consFC{0} \xdef\consFS{0} \xdef\consFT{0} \xdef\consFP{0} \xdef\consFA{0}
\xdef\consFG{0} \xdef\consFN{0} \xdef\consFD{0} \xdef\consFE{0} \xdef\consFQ{0}
\xdef\consFH{0} \xdef\consFR{0} \xdef\consFK{0} \xdef\consFM{0} \xdef\consFI{0}
\xdef\consFL{0} \xdef\consFV{0} \xdef\consFF{10} \xdef\consFY{0} \xdef\consFW{0}

\xdef\consYC{0} \xdef\consYS{0} \xdef\consYT{0} \xdef\consYP{0} \xdef\consYA{0}
\xdef\consYG{0} \xdef\consYN{0} \xdef\consYD{0} \xdef\consYE{0} \xdef\consYQ{0}
\xdef\consYH{0} \xdef\consYR{0} \xdef\consYK{0} \xdef\consYM{0} \xdef\consYI{0}
\xdef\consYL{0} \xdef\consYV{0} \xdef\consYF{0} \xdef\consYY{10} \xdef\consYW{0}

\xdef\consWC{0} \xdef\consWS{0} \xdef\consWT{0} \xdef\consWP{0} \xdef\consWA{0}
\xdef\consWG{0} \xdef\consWN{0} \xdef\consWD{0} \xdef\consWE{0} \xdef\consWQ{0}
\xdef\consWH{0} \xdef\consWR{0} \xdef\consWK{0} \xdef\consWM{0} \xdef\consWI{0}
\xdef\consWL{0} \xdef\consWV{0} \xdef\consWF{0} \xdef\consWY{0} \xdef\consWW{10}

\gappenalty{0} \xdef\m@trixf@ctor{10}

\else

\xdef\temp@{structural}
\ifx\first@\temp@

%%%% structural

\xdef\consCC{10} \xdef\consCS{6} \xdef\consCT{3} \xdef\consCP{3} \xdef\consCA{3}
\xdef\consCG{5} \xdef\consCN{3} \xdef\consCD{1} \xdef\consCE{0} \xdef\consCQ{1}
\xdef\consCH{3} \xdef\consCR{3} \xdef\consCK{0} \xdef\consCM{3} \xdef\consCI{3}
\xdef\consCL{3} \xdef\consCV{3} \xdef\consCF{5} \xdef\consCY{5} \xdef\consCW{5}

\xdef\consSC{6} \xdef\consSS{10} \xdef\consST{8} \xdef\consSP{6} \xdef\consSA{8}
\xdef\consSG{8} \xdef\consSN{8} \xdef\consSD{6} \xdef\consSE{5} \xdef\consSQ{5}
\xdef\consSH{5} \xdef\consSR{5} \xdef\consSK{5} \xdef\consSM{3} \xdef\consSI{3}
\xdef\consSL{3} \xdef\consSV{6} \xdef\consSF{5} \xdef\consSY{5} \xdef\consSW{3}

\xdef\consTC{3} \xdef\consTS{8} \xdef\consTT{10} \xdef\consTP{6} \xdef\consTA{8}
\xdef\consTG{6} \xdef\consTN{6} \xdef\consTD{5} \xdef\consTE{5} \xdef\consTQ{5}
\xdef\consTH{3} \xdef\consTR{5} \xdef\consTK{6} \xdef\consTM{5} \xdef\consTI{5}
\xdef\consTL{3} \xdef\consTV{6} \xdef\consTF{3} \xdef\consTY{3} \xdef\consTW{1}

\xdef\consPC{3} \xdef\consPS{6} \xdef\consPT{6} \xdef\consPP{10} \xdef\consPA{8}
\xdef\consPG{6} \xdef\consPN{3} \xdef\consPD{5} \xdef\consPE{5} \xdef\consPQ{5}
\xdef\consPH{5} \xdef\consPR{5} \xdef\consPK{3} \xdef\consPM{3} \xdef\consPI{3}
\xdef\consPL{5} \xdef\consPV{6} \xdef\consPF{5} \xdef\consPY{3} \xdef\consPW{3}

\xdef\consAC{3} \xdef\consAS{8} \xdef\consAT{8} \xdef\consAP{8} \xdef\consAA{10}
\xdef\consAG{8} \xdef\consAN{5} \xdef\consAD{6} \xdef\consAE{6} \xdef\consAQ{5}
\xdef\consAH{3} \xdef\consAR{3} \xdef\consAK{5} \xdef\consAM{5} \xdef\consAI{3}
\xdef\consAL{3} \xdef\consAV{8} \xdef\consAF{5} \xdef\consAY{3} \xdef\consAW{3}

\xdef\consGC{5} \xdef\consGS{8} \xdef\consGT{6} \xdef\consGP{6} \xdef\consGA{8}
\xdef\consGG{10} \xdef\consGN{5} \xdef\consGD{6} \xdef\consGE{6} \xdef\consGQ{3}
\xdef\consGH{1} \xdef\consGR{5} \xdef\consGK{3} \xdef\consGM{1} \xdef\consGI{3}
\xdef\consGL{3} \xdef\consGV{6} \xdef\consGF{3} \xdef\consGY{3} \xdef\consGW{5}

\xdef\consNC{3} \xdef\consNS{8} \xdef\consNT{6} \xdef\consNP{3} \xdef\consNA{5}
\xdef\consNG{5} \xdef\consNN{10} \xdef\consND{8} \xdef\consNE{6} \xdef\consNQ{5}
\xdef\consNH{6} \xdef\consNR{5} \xdef\consNK{6} \xdef\consNM{1} \xdef\consNI{3}
\xdef\consNL{1} \xdef\consNV{3} \xdef\consNF{3} \xdef\consNY{5} \xdef\consNW{0}

\xdef\consDC{1} \xdef\consDS{6} \xdef\consDT{5} \xdef\consDP{5} \xdef\consDA{6}
\xdef\consDG{6} \xdef\consDN{8} \xdef\consDD{10} \xdef\consDE{8} \xdef\consDQ{6}
\xdef\consDH{5} \xdef\consDR{3} \xdef\consDK{5} \xdef\consDM{3} \xdef\consDI{1}
\xdef\consDL{1} \xdef\consDV{5} \xdef\consDF{1} \xdef\consDY{3} \xdef\consDW{0}

\xdef\consEC{0} \xdef\consES{5} \xdef\consET{5} \xdef\consEP{5} \xdef\consEA{6}
\xdef\consEG{6} \xdef\consEN{6} \xdef\consED{8} \xdef\consEE{10} \xdef\consEQ{6}
\xdef\consEH{3} \xdef\consER{5} \xdef\consEK{6} \xdef\consEM{3} \xdef\consEI{1}
\xdef\consEL{1} \xdef\consEV{6} \xdef\consEF{3} \xdef\consEY{1} \xdef\consEW{1}

\xdef\consQC{1} \xdef\consQS{5} \xdef\consQT{5} \xdef\consQP{5} \xdef\consQA{5}
\xdef\consQG{3} \xdef\consQN{5} \xdef\consQD{6} \xdef\consQE{6} \xdef\consQQ{10}
\xdef\consQH{6} \xdef\consQR{5} \xdef\consQK{6} \xdef\consQM{3} \xdef\consQI{1}
\xdef\consQL{3} \xdef\consQV{3} \xdef\consQF{1} \xdef\consQY{3} \xdef\consQW{1}

\xdef\consHC{3} \xdef\consHS{5} \xdef\consHT{3} \xdef\consHP{5} \xdef\consHA{3}
\xdef\consHG{1} \xdef\consHN{6} \xdef\consHD{5} \xdef\consHE{3} \xdef\consHQ{6}
\xdef\consHH{10} \xdef\consHR{6} \xdef\consHK{5} \xdef\consHM{3} \xdef\consHI{3}
\xdef\consHL{5} \xdef\consHV{1} \xdef\consHF{3} \xdef\consHY{5} \xdef\consHW{1}

\xdef\consRC{3} \xdef\consRS{5} \xdef\consRT{5} \xdef\consRP{5} \xdef\consRA{3}
\xdef\consRG{5} \xdef\consRN{5} \xdef\consRD{3} \xdef\consRE{5} \xdef\consRQ{5}
\xdef\consRH{6} \xdef\consRR{10} \xdef\consRK{8} \xdef\consRM{3} \xdef\consRI{3}
\xdef\consRL{3} \xdef\consRV{3} \xdef\consRF{1} \xdef\consRY{1} \xdef\consRW{3}

\xdef\consKC{0} \xdef\consKS{5} \xdef\consKT{6} \xdef\consKP{3} \xdef\consKA{5}
\xdef\consKG{3} \xdef\consKN{6} \xdef\consKD{5} \xdef\consKE{6} \xdef\consKQ{6}
\xdef\consKH{5} \xdef\consKR{8} \xdef\consKK{10} \xdef\consKM{3} \xdef\consKI{3}
\xdef\consKL{3} \xdef\consKV{5} \xdef\consKF{1} \xdef\consKY{1} \xdef\consKW{1}

\xdef\consMC{3} \xdef\consMS{5} \xdef\consMT{5} \xdef\consMP{3} \xdef\consMA{5}
\xdef\consMG{1} \xdef\consMN{1} \xdef\consMD{3} \xdef\consME{3} \xdef\consMQ{3}
\xdef\consMH{3} \xdef\consMR{3} \xdef\consMK{3} \xdef\consMM{10} \xdef\consMI{6}
\xdef\consML{8} \xdef\consMV{6} \xdef\consMF{5} \xdef\consMY{3} \xdef\consMW{5}

\xdef\consIC{3} \xdef\consIS{3} \xdef\consIT{5} \xdef\consIP{3} \xdef\consIA{3}
\xdef\consIG{3} \xdef\consIN{3} \xdef\consID{1} \xdef\consIE{1} \xdef\consIQ{1}
\xdef\consIH{3} \xdef\consIR{3} \xdef\consIK{3} \xdef\consIM{6} \xdef\consII{10}
\xdef\consIL{8} \xdef\consIV{3} \xdef\consIF{6} \xdef\consIY{5} \xdef\consIW{5}

\xdef\consLC{3} \xdef\consLS{3} \xdef\consLT{3} \xdef\consLP{5} \xdef\consLA{3}
\xdef\consLG{3} \xdef\consLN{1} \xdef\consLD{1} \xdef\consLE{1} \xdef\consLQ{3}
\xdef\consLH{5} \xdef\consLR{3} \xdef\consLK{3} \xdef\consLM{8} \xdef\consLI{8}
\xdef\consLL{10} \xdef\consLV{3} \xdef\consLF{6} \xdef\consLY{5} \xdef\consLW{6}

\xdef\consVC{3} \xdef\consVS{6} \xdef\consVT{6} \xdef\consVP{6} \xdef\consVA{8}
\xdef\consVG{6} \xdef\consVN{3} \xdef\consVD{5} \xdef\consVE{6} \xdef\consVQ{3}
\xdef\consVH{1} \xdef\consVR{3} \xdef\consVK{5} \xdef\consVM{6} \xdef\consVI{3}
\xdef\consVL{3} \xdef\consVV{10} \xdef\consVF{6} \xdef\consVY{5} \xdef\consVW{5}

\xdef\consFC{5} \xdef\consFS{5} \xdef\consFT{3} \xdef\consFP{5} \xdef\consFA{5}
\xdef\consFG{3} \xdef\consFN{3} \xdef\consFD{1} \xdef\consFE{3} \xdef\consFQ{1}
\xdef\consFH{3} \xdef\consFR{1} \xdef\consFK{1} \xdef\consFM{5} \xdef\consFI{6}
\xdef\consFL{6} \xdef\consFV{6} \xdef\consFF{10} \xdef\consFY{8} \xdef\consFW{5}

\xdef\consYC{5} \xdef\consYS{5} \xdef\consYT{3} \xdef\consYP{3} \xdef\consYA{3}
\xdef\consYG{3} \xdef\consYN{5} \xdef\consYD{3} \xdef\consYE{1} \xdef\consYQ{3}
\xdef\consYH{5} \xdef\consYR{1} \xdef\consYK{1} \xdef\consYM{3} \xdef\consYI{5}
\xdef\consYL{5} \xdef\consYV{5} \xdef\consYF{8} \xdef\consYY{10} \xdef\consYW{5}

\xdef\consWC{5} \xdef\consWS{3} \xdef\consWT{1} \xdef\consWP{3} \xdef\consWA{3}
\xdef\consWG{5} \xdef\consWN{0} \xdef\consWD{0} \xdef\consWE{1} \xdef\consWQ{1}
\xdef\consWH{1} \xdef\consWR{3} \xdef\consWK{1} \xdef\consWM{5} \xdef\consWI{5}
\xdef\consWL{6} \xdef\consWV{5} \xdef\consWF{5} \xdef\consWY{5} \xdef\consWW{10}

\gappenalty{0} \xdef\m@trixf@ctor{10}

\else

\xdef\temp@{PAM250}
\ifx\first@\temp@

%%%% PAM250

\xdef\consCC{4} \xdef\consCS{0} \xdef\consCT{-2} \xdef\consCP{-3} \xdef\consCA{-2}
\xdef\consCG{-3} \xdef\consCN{-4} \xdef\consCD{2} \xdef\consCE{-5} \xdef\consCQ{-5}
\xdef\consCH{-3} \xdef\consCR{-4} \xdef\consCK{-5} \xdef\consCM{-5} \xdef\consCI{-2}
\xdef\consCL{-6} \xdef\consCV{-2} \xdef\consCF{-4} \xdef\consCY{0} \xdef\consCW{-8}
\xdef\consCB{-4} \xdef\consCZ{-5} \xdef\consCX{-3}

\xdef\consSC{0} \xdef\consSS{3} \xdef\consST{1} \xdef\consSP{1} \xdef\consSA{1}
\xdef\consSG{1} \xdef\consSN{1} \xdef\consSD{0} \xdef\consSE{0} \xdef\consSQ{-1}
\xdef\consSH{-1} \xdef\consSR{0} \xdef\consSK{0} \xdef\consSM{-2} \xdef\consSI{-1}
\xdef\consSL{-3} \xdef\consSV{-1} \xdef\consSF{-3} \xdef\consSY{-3} \xdef\consSW{-2}
\xdef\consSB{0} \xdef\consSZ{0} \xdef\consSX{0}

\xdef\consTC{-2} \xdef\consTS{1} \xdef\consTT{3} \xdef\consTP{0} \xdef\consTA{1}
\xdef\consTG{0} \xdef\consTN{0} \xdef\consTD{0} \xdef\consTE{0} \xdef\consTQ{-1}
\xdef\consTH{-1} \xdef\consTR{-1} \xdef\consTK{0} \xdef\consTM{-1} \xdef\consTI{0}
\xdef\consTL{-2} \xdef\consTV{0} \xdef\consTF{-2} \xdef\consTY{-3} \xdef\consTW{-5}
\xdef\consTB{0} \xdef\consTZ{-1} \xdef\consTX{0}

\xdef\consPC{-3} \xdef\consPS{1} \xdef\consPT{0} \xdef\consPP{6} \xdef\consPA{1}
\xdef\consPG{-1} \xdef\consPN{-1} \xdef\consPD{-1} \xdef\consPE{-1} \xdef\consPQ{0}
\xdef\consPH{0} \xdef\consPR{0} \xdef\consPK{-1} \xdef\consPM{-2} \xdef\consPI{-2}
\xdef\consPL{-3} \xdef\consPV{-1} \xdef\consPF{-5} \xdef\consPY{-5} \xdef\consPW{-6}
\xdef\consPB{-1} \xdef\consPZ{0} \xdef\consPX{-1}

\xdef\consAC{-2} \xdef\consAS{1} \xdef\consAT{1} \xdef\consAP{1} \xdef\consAA{2}
\xdef\consAG{1} \xdef\consAN{0} \xdef\consAD{0} \xdef\consAE{0} \xdef\consAQ{0}
\xdef\consAH{-1} \xdef\consAR{-2} \xdef\consAK{-1} \xdef\consAM{-1} \xdef\consAI{-1}
\xdef\consAL{-2} \xdef\consAV{0} \xdef\consAF{-4} \xdef\consAY{-3} \xdef\consAW{-6}
\xdef\consAB{0} \xdef\consAZ{0} \xdef\consAX{0}

\xdef\consGC{-3} \xdef\consGS{1} \xdef\consGT{0} \xdef\consGP{-1} \xdef\consGA{1}
\xdef\consGG{5} \xdef\consGN{0} \xdef\consGD{1} \xdef\consGE{0} \xdef\consGQ{-1}
\xdef\consGH{-2} \xdef\consGR{-3} \xdef\consGK{-2} \xdef\consGM{-3} \xdef\consGI{-3}
\xdef\consGL{-4} \xdef\consGV{-1} \xdef\consGF{-5} \xdef\consGY{-5} \xdef\consGW{-7}
\xdef\consGB{0} \xdef\consGZ{0} \xdef\consGX{-1}

\xdef\consNC{-4} \xdef\consNS{1} \xdef\consNT{0} \xdef\consNP{-1} \xdef\consNA{0}
\xdef\consNG{0} \xdef\consNN{2} \xdef\consND{2} \xdef\consNE{1} \xdef\consNQ{1}
\xdef\consNH{2} \xdef\consNR{0} \xdef\consNK{1} \xdef\consNM{-2} \xdef\consNI{-2}
\xdef\consNL{-3} \xdef\consNV{-2} \xdef\consNF{-4} \xdef\consNY{-2} \xdef\consNW{-4}
\xdef\consNB{2} \xdef\consNZ{1} \xdef\consNX{0}

\xdef\consDC{-5} \xdef\consDS{0} \xdef\consDT{0} \xdef\consDP{-1} \xdef\consDA{0}
\xdef\consDG{1} \xdef\consDN{2} \xdef\consDD{4} \xdef\consDE{3} \xdef\consDQ{2}
\xdef\consDH{1} \xdef\consDR{-1} \xdef\consDK{0} \xdef\consDM{-3} \xdef\consDI{-2}
\xdef\consDL{-4} \xdef\consDV{-2} \xdef\consDF{-6} \xdef\consDY{-4} \xdef\consDW{-7}
\xdef\consDB{3} \xdef\consDZ{3} \xdef\consDX{-1}

\xdef\consEC{-5} \xdef\consES{0} \xdef\consET{0} \xdef\consEP{-1} \xdef\consEA{0}
\xdef\consEG{0} \xdef\consEN{1} \xdef\consED{3} \xdef\consEE{4} \xdef\consEQ{2}
\xdef\consEH{1} \xdef\consER{-1} \xdef\consEK{0} \xdef\consEM{-2} \xdef\consEI{-2}
\xdef\consEL{-3} \xdef\consEV{-2} \xdef\consEF{-5} \xdef\consEY{-4} \xdef\consEW{-7}
\xdef\consEB{3} \xdef\consEZ{3} \xdef\consEX{-1}

\xdef\consQC{-5} \xdef\consQS{-1} \xdef\consQT{-1} \xdef\consQP{0} \xdef\consQA{0}
\xdef\consQG{-1} \xdef\consQN{1} \xdef\consQD{2} \xdef\consQE{2} \xdef\consQQ{4}
\xdef\consQH{3} \xdef\consQR{1} \xdef\consQK{1} \xdef\consQM{-1} \xdef\consQI{-2}
\xdef\consQL{-2} \xdef\consQV{-2} \xdef\consQF{-5} \xdef\consQY{-4} \xdef\consQW{-5}
\xdef\consQB{1} \xdef\consQZ{3} \xdef\consQX{-1}

\xdef\consHC{-3} \xdef\consHS{-1} \xdef\consHT{-1} \xdef\consHP{0} \xdef\consHA{-1}
\xdef\consHG{-2} \xdef\consHN{2} \xdef\consHD{1} \xdef\consHE{1} \xdef\consHQ{3}
\xdef\consHH{6} \xdef\consHR{2} \xdef\consHK{0} \xdef\consHM{-2} \xdef\consHI{-2}
\xdef\consHL{-2} \xdef\consHV{-2} \xdef\consHF{-2} \xdef\consHY{-5} \xdef\consHW{-7}
\xdef\consHB{1} \xdef\consHZ{2} \xdef\consHX{-1}

\xdef\consRC{-4} \xdef\consRS{0} \xdef\consRT{-1} \xdef\consRP{0} \xdef\consRA{-2}
\xdef\consRG{-3} \xdef\consRN{0} \xdef\consRD{-1} \xdef\consRE{-1} \xdef\consRQ{1}
\xdef\consRH{2} \xdef\consRR{6} \xdef\consRK{3} \xdef\consRM{0} \xdef\consRI{-2}
\xdef\consRL{-3} \xdef\consRV{-2} \xdef\consRF{-4} \xdef\consRY{-4} \xdef\consRW{2}
\xdef\consRB{-1} \xdef\consRZ{0} \xdef\consRX{-1}

\xdef\consKC{-5} \xdef\consKS{0} \xdef\consKT{0} \xdef\consKP{-1} \xdef\consKA{-1}
\xdef\consKG{-2} \xdef\consKN{1} \xdef\consKD{0} \xdef\consKE{0} \xdef\consKQ{1}
\xdef\consKH{0} \xdef\consKR{3} \xdef\consKK{5} \xdef\consKM{0} \xdef\consKI{-2}
\xdef\consKL{-3} \xdef\consKV{-2} \xdef\consKF{-5} \xdef\consKY{-4} \xdef\consKW{-3}
\xdef\consKB{1} \xdef\consKZ{-2} \xdef\consKX{-1}

\xdef\consMC{-5} \xdef\consMS{-2} \xdef\consMT{-1} \xdef\consMP{-2} \xdef\consMA{-1}
\xdef\consMG{-3} \xdef\consMN{-2} \xdef\consMD{-3} \xdef\consME{-2} \xdef\consMQ{-1}
\xdef\consMH{-2} \xdef\consMR{0} \xdef\consMK{0} \xdef\consMM{6} \xdef\consMI{2}
\xdef\consML{4} \xdef\consMV{2} \xdef\consMF{0} \xdef\consMY{-2} \xdef\consMW{-4}
\xdef\consMB{-2} \xdef\consMZ{-2} \xdef\consMX{-1}

\xdef\consIC{-2} \xdef\consIS{-1} \xdef\consIT{0} \xdef\consIP{-2} \xdef\consIA{-1}
\xdef\consIG{-3} \xdef\consIN{-2} \xdef\consID{-2} \xdef\consIE{-2} \xdef\consIQ{-2}
\xdef\consIH{-2} \xdef\consIR{-2} \xdef\consIK{-2} \xdef\consIM{2} \xdef\consII{5}
\xdef\consIL{2} \xdef\consIV{4} \xdef\consIF{1} \xdef\consIY{-1} \xdef\consIW{-5}
\xdef\consIB{-2} \xdef\consIZ{-2} \xdef\consIX{-1}

\xdef\consLC{-6} \xdef\consLS{-3} \xdef\consLT{-2} \xdef\consLP{-3} \xdef\consLA{-2}
\xdef\consLG{-4} \xdef\consLN{-3} \xdef\consLD{-4} \xdef\consLE{-3} \xdef\consLQ{-2}
\xdef\consLH{-2} \xdef\consLR{-3} \xdef\consLK{-3} \xdef\consLM{4} \xdef\consLI{2}
\xdef\consLL{6} \xdef\consLV{2} \xdef\consLF{2} \xdef\consLY{-1} \xdef\consLW{-2}
\xdef\consLB{-3} \xdef\consLZ{-3} \xdef\consLX{-1}

\xdef\consVC{-2} \xdef\consVS{-1} \xdef\consVT{0} \xdef\consVP{-1} \xdef\consVA{0}
\xdef\consVG{-1} \xdef\consVN{-2} \xdef\consVD{-2} \xdef\consVE{-2} \xdef\consVQ{-2}
\xdef\consVH{-2} \xdef\consVR{-2} \xdef\consVK{-2} \xdef\consVM{2} \xdef\consVI{4}
\xdef\consVL{2} \xdef\consVV{4} \xdef\consVF{-1} \xdef\consVY{-2} \xdef\consVW{-6}
\xdef\consVB{-2} \xdef\consVZ{-2} \xdef\consVX{-1}

\xdef\consFC{-4} \xdef\consFS{-3} \xdef\consFT{-2} \xdef\consFP{-5} \xdef\consFA{-4}
\xdef\consFG{-5} \xdef\consFN{-4} \xdef\consFD{-6} \xdef\consFE{-5} \xdef\consFQ{-5}
\xdef\consFH{-2} \xdef\consFR{-4} \xdef\consFK{-5} \xdef\consFM{0} \xdef\consFI{1}
\xdef\consFL{2} \xdef\consFV{-1} \xdef\consFF{9} \xdef\consFY{7} \xdef\consFW{0}
\xdef\consFB{-4} \xdef\consFZ{-5} \xdef\consFX{-2}

\xdef\consYC{0} \xdef\consYS{-3} \xdef\consYT{-3} \xdef\consYP{-5} \xdef\consYA{-3}
\xdef\consYG{-5} \xdef\consYN{-2} \xdef\consYD{-4} \xdef\consYE{-4} \xdef\consYQ{-4}
\xdef\consYH{0} \xdef\consYR{-4} \xdef\consYK{-4} \xdef\consYM{-2} \xdef\consYI{-1}
\xdef\consYL{-1} \xdef\consYV{-2} \xdef\consYF{7} \xdef\consYY{10} \xdef\consYW{0}
\xdef\consYB{-3} \xdef\consYZ{-4} \xdef\consYX{-2}

\xdef\consWC{-8} \xdef\consWS{-2} \xdef\consWT{-5} \xdef\consWP{-6} \xdef\consWA{-6}
\xdef\consWG{-7} \xdef\consWN{-4} \xdef\consWD{-7} \xdef\consWE{-7} \xdef\consWQ{-5}
\xdef\consWH{-3} \xdef\consWR{2} \xdef\consWK{-3} \xdef\consWM{-4} \xdef\consWI{-5}
\xdef\consWL{-2} \xdef\consWV{-6} \xdef\consWF{0} \xdef\consWY{0} \xdef\consWW{17}
\xdef\consWB{-5} \xdef\consWZ{-6} \xdef\consWX{-4}

\xdef\consBC{-4} \xdef\consBS{0} \xdef\consBT{0} \xdef\consBP{-1} \xdef\consBA{0}
\xdef\consBG{0} \xdef\consBN{2} \xdef\consBD{3} \xdef\consBE{3} \xdef\consBQ{1}
\xdef\consBH{1} \xdef\consBR{-1} \xdef\consBK{1} \xdef\consBM{-2} \xdef\consBI{-2}
\xdef\consBL{-3} \xdef\consBV{-2} \xdef\consBF{-4} \xdef\consBY{-3} \xdef\consBW{-5}
\xdef\consBB{3} \xdef\consBZ{2}  \xdef\consBX{-1}

\xdef\consZC{-5} \xdef\consZS{0} \xdef\consZT{-1} \xdef\consZP{0} \xdef\consZA{0}
\xdef\consZG{0} \xdef\consZN{1} \xdef\consZD{3} \xdef\consZE{3} \xdef\consZQ{3}
\xdef\consZH{2} \xdef\consZR{0} \xdef\consZK{0} \xdef\consZM{-2} \xdef\consZI{-2}
\xdef\consZL{-3} \xdef\consZV{-2} \xdef\consZF{-5} \xdef\consZY{-4} \xdef\consZW{-6}
\xdef\consZB{2} \xdef\consZZ{3}  \xdef\consZX{-1}

\xdef\consXC{-3} \xdef\consXS{0} \xdef\consXT{0} \xdef\consXP{-1} \xdef\consXA{0}
\xdef\consXG{-1} \xdef\consXN{0} \xdef\consXD{-1} \xdef\consXE{-1} \xdef\consXQ{-1}
\xdef\consXH{-1} \xdef\consXR{-1} \xdef\consXK{-1} \xdef\consXM{-1} \xdef\consXI{-1}
\xdef\consXL{-1} \xdef\consXV{-1} \xdef\consXF{-2} \xdef\consXY{-2} \xdef\consXW{-4}
\xdef\consXB{-1} \xdef\consXZ{-1}  \xdef\consXX{-1}

\expandafter\xdef\csname cons..\endcsname{1}
\gappenalty{-8} \xdef\m@trixf@ctor{10}

\else
\xdef\temp@{PAM100} \xdef\m@trixf@ctor{10}
\ifx\first@\temp@

%%%% PAM100

\xdef\consCC{14} \xdef\consCS{-1} \xdef\consCT{-5} \xdef\consCP{-6} \xdef\consCA{-5}
\xdef\consCG{-8} \xdef\consCN{-8} \xdef\consCD{-11} \xdef\consCE{-11} \xdef\consCQ{-11}
\xdef\consCH{-6} \xdef\consCR{-6} \xdef\consCK{-11} \xdef\consCM{-11} \xdef\consCI{-5}
\xdef\consCL{-12} \xdef\consCV{-4} \xdef\consCF{-10} \xdef\consCY{-2} \xdef\consCW{-13}
\xdef\consCB{-6} \xdef\consCZ{-8}  \xdef\consCX{-5}

\xdef\consSC{-1} \xdef\consSS{6} \xdef\consST{2} \xdef\consSP{1} \xdef\consSA{2}
\xdef\consSG{1} \xdef\consSN{2} \xdef\consSD{-1} \xdef\consSE{-2} \xdef\consSQ{-3}
\xdef\consSH{-4} \xdef\consSR{-1} \xdef\consSK{-2} \xdef\consSM{-4} \xdef\consSI{-4}
\xdef\consSL{-7} \xdef\consSV{-4} \xdef\consSF{-5} \xdef\consSY{-6} \xdef\consSW{-4}
\xdef\consSB{0} \xdef\consSZ{-2}  \xdef\consSX{1}

\xdef\consTC{-5} \xdef\consTS{2} \xdef\consTT{7} \xdef\consTP{-1} \xdef\consTA{2}
\xdef\consTG{-3} \xdef\consTN{0} \xdef\consTD{-2} \xdef\consTE{-3} \xdef\consTQ{-3}
\xdef\consTH{-5} \xdef\consTR{-4} \xdef\consTK{-1} \xdef\consTM{-2} \xdef\consTI{-1}
\xdef\consTL{-5} \xdef\consTV{-1} \xdef\consTF{-6} \xdef\consTY{-6} \xdef\consTW{-10}
\xdef\consTB{-1} \xdef\consTZ{-2}  \xdef\consTX{-1}

\xdef\consPC{-6} \xdef\consPS{1} \xdef\consPT{-1} \xdef\consPP{10} \xdef\consPA{1}
\xdef\consPG{-3} \xdef\consPN{-3} \xdef\consPD{-4} \xdef\consPE{-3} \xdef\consPQ{-1}
\xdef\consPH{-2} \xdef\consPR{-2} \xdef\consPK{-4} \xdef\consPM{-6} \xdef\consPI{-6}
\xdef\consPL{-5} \xdef\consPV{-4} \xdef\consPF{-9} \xdef\consPY{-11} \xdef\consPW{-11}
\xdef\consPB{-3} \xdef\consPZ{-1}  \xdef\consPX{-2}

\xdef\consAC{-5} \xdef\consAS{2} \xdef\consAT{2} \xdef\consAP{1} \xdef\consAA{6}
\xdef\consAG{1} \xdef\consAN{-1} \xdef\consAD{-1} \xdef\consAE{0} \xdef\consAQ{-2}
\xdef\consAH{-5} \xdef\consAR{-5} \xdef\consAK{-4} \xdef\consAM{-3} \xdef\consAI{-3}
\xdef\consAL{-5} \xdef\consAV{0} \xdef\consAF{-7} \xdef\consAY{-6} \xdef\consAW{-11}
\xdef\consAB{-1} \xdef\consAZ{-1}  \xdef\consAX{-1}

\xdef\consGC{-8} \xdef\consGS{1} \xdef\consGT{-3} \xdef\consGP{-3} \xdef\consGA{1}
\xdef\consGG{8} \xdef\consGN{-1} \xdef\consGD{-1} \xdef\consGE{-2} \xdef\consGQ{-5}
\xdef\consGH{-7} \xdef\consGR{-8} \xdef\consGK{-5} \xdef\consGM{-8} \xdef\consGI{-7}
\xdef\consGL{-8} \xdef\consGV{-4} \xdef\consGF{-8} \xdef\consGY{-11} \xdef\consGW{-13}
\xdef\consGB{-1} \xdef\consGZ{-2}  \xdef\consGX{-2}

\xdef\consNC{-8} \xdef\consNS{2} \xdef\consNT{0} \xdef\consNP{-3} \xdef\consNA{-1}
\xdef\consNG{-1} \xdef\consNN{7} \xdef\consND{4} \xdef\consNE{1} \xdef\consNQ{-1}
\xdef\consNH{2} \xdef\consNR{-3} \xdef\consNK{1} \xdef\consNM{-5} \xdef\consNI{-4}
\xdef\consNL{-6} \xdef\consNV{-5} \xdef\consNF{-6} \xdef\consNY{-3} \xdef\consNW{-8}
\xdef\consNB{4} \xdef\consNZ{0}  \xdef\consNX{-1}

\xdef\consDC{-11} \xdef\consDS{-1} \xdef\consDT{-2} \xdef\consDP{-4} \xdef\consDA{-1}
\xdef\consDG{-1} \xdef\consDN{4} \xdef\consDD{8} \xdef\consDE{5} \xdef\consDQ{1}
\xdef\consDH{-1} \xdef\consDR{-6} \xdef\consDK{-2} \xdef\consDM{-8} \xdef\consDI{-6}
\xdef\consDL{-9} \xdef\consDV{-6} \xdef\consDF{-11} \xdef\consDY{-9} \xdef\consDW{-13}
\xdef\consDB{4} \xdef\consDZ{3}  \xdef\consDX{-2}

\xdef\consEC{-11} \xdef\consES{-2} \xdef\consET{-3} \xdef\consEP{-3} \xdef\consEA{0}
\xdef\consEG{-2} \xdef\consEN{1} \xdef\consED{5} \xdef\consEE{8} \xdef\consEQ{4}
\xdef\consEH{-2} \xdef\consER{-5} \xdef\consEK{-2} \xdef\consEM{-6} \xdef\consEI{-5}
\xdef\consEL{-7} \xdef\consEV{-5} \xdef\consEF{-11} \xdef\consEY{-7} \xdef\consEW{-14}
\xdef\consEB{3} \xdef\consEZ{4}  \xdef\consEX{-2}

\xdef\consQC{-11} \xdef\consQS{-3} \xdef\consQT{-3} \xdef\consQP{-1} \xdef\consQA{-2}
\xdef\consQG{-5} \xdef\consQN{-1} \xdef\consQD{1} \xdef\consQE{4} \xdef\consQQ{9}
\xdef\consQH{4} \xdef\consQR{1} \xdef\consQK{-1} \xdef\consQM{-2} \xdef\consQI{-5}
\xdef\consQL{-3} \xdef\consQV{-5} \xdef\consQF{-10} \xdef\consQY{-9} \xdef\consQW{-11}
\xdef\consQB{0} \xdef\consQZ{5}  \xdef\consQX{-2}

\xdef\consHC{-6} \xdef\consHS{-4} \xdef\consHT{-5} \xdef\consHP{-2} \xdef\consHA{-5}
\xdef\consHG{-7} \xdef\consHN{2} \xdef\consHD{-1} \xdef\consHE{-2} \xdef\consHQ{4}
\xdef\consHH{11} \xdef\consHR{1} \xdef\consHK{-3} \xdef\consHM{-7} \xdef\consHI{-7}
\xdef\consHL{-5} \xdef\consHV{-6} \xdef\consHF{-4} \xdef\consHY{-1} \xdef\consHW{-7}
\xdef\consHB{1} \xdef\consHZ{1}  \xdef\consHX{-2}

\xdef\consRC{-6} \xdef\consRS{-1} \xdef\consRT{-4} \xdef\consRP{-2} \xdef\consRA{-5}
\xdef\consRG{-8} \xdef\consRN{-3} \xdef\consRD{-6} \xdef\consRE{-5} \xdef\consRQ{1}
\xdef\consRH{1} \xdef\consRR{10} \xdef\consRK{3} \xdef\consRM{-2} \xdef\consRI{-4}
\xdef\consRL{-7} \xdef\consRV{-6} \xdef\consRF{-7} \xdef\consRY{-10} \xdef\consRW{1}
\xdef\consRB{-3} \xdef\consRZ{-1}  \xdef\consRX{-2}

\xdef\consKC{-11} \xdef\consKS{-2} \xdef\consKT{-1} \xdef\consKP{-4} \xdef\consKA{-4}
\xdef\consKG{-5} \xdef\consKN{1} \xdef\consKD{-2} \xdef\consKE{-2} \xdef\consKQ{-1}
\xdef\consKH{-3} \xdef\consKR{3} \xdef\consKK{8} \xdef\consKM{1} \xdef\consKI{-4}
\xdef\consKL{-6} \xdef\consKV{-6} \xdef\consKF{-11} \xdef\consKY{-10} \xdef\consKW{-9}
\xdef\consKB{0} \xdef\consKZ{-1}  \xdef\consKX{-2}

\xdef\consMC{-11} \xdef\consMS{-4} \xdef\consMT{-2} \xdef\consMP{-6} \xdef\consMA{-3}
\xdef\consMG{-8} \xdef\consMN{-5} \xdef\consMD{-8} \xdef\consME{-6} \xdef\consMQ{-2}
\xdef\consMH{-7} \xdef\consMR{-2} \xdef\consMK{1} \xdef\consMM{13} \xdef\consMI{2}
\xdef\consML{4} \xdef\consMV{1} \xdef\consMF{-2} \xdef\consMY{-8} \xdef\consMW{-11}
\xdef\consMB{-4} \xdef\consMZ{-2}  \xdef\consMX{-2}

\xdef\consIC{-5} \xdef\consIS{-4} \xdef\consIT{-1} \xdef\consIP{-6} \xdef\consIA{-3}
\xdef\consIG{-7} \xdef\consIN{-4} \xdef\consID{-6} \xdef\consIE{-5} \xdef\consIQ{-5}
\xdef\consIH{-7} \xdef\consIR{-4} \xdef\consIK{-4} \xdef\consIM{2} \xdef\consII{9}
\xdef\consIL{2} \xdef\consIV{5} \xdef\consIF{0} \xdef\consIY{-4} \xdef\consIW{-12}
\xdef\consIB{-3} \xdef\consIZ{-3}  \xdef\consIX{-2}

\xdef\consLC{-12} \xdef\consLS{-7} \xdef\consLT{-5} \xdef\consLP{-5} \xdef\consLA{-5}
\xdef\consLG{-8} \xdef\consLN{-6} \xdef\consLD{-9} \xdef\consLE{-7} \xdef\consLQ{-3}
\xdef\consLH{-5} \xdef\consLR{-7} \xdef\consLK{-6} \xdef\consLM{4} \xdef\consLI{2}
\xdef\consLL{9} \xdef\consLV{1} \xdef\consLF{0} \xdef\consLY{-5} \xdef\consLW{-7}
\xdef\consLB{-5} \xdef\consLZ{-4}  \xdef\consLX{-3}

\xdef\consVC{-4} \xdef\consVS{-4} \xdef\consVT{-1} \xdef\consVP{-4} \xdef\consVA{0}
\xdef\consVG{-4} \xdef\consVN{-5} \xdef\consVD{-6} \xdef\consVE{-5} \xdef\consVQ{-5}
\xdef\consVH{-6} \xdef\consVR{-6} \xdef\consVK{-6} \xdef\consVM{1} \xdef\consVI{5}
\xdef\consVL{1} \xdef\consVV{8} \xdef\consVF{-5} \xdef\consVY{-6} \xdef\consVW{-14}
\xdef\consVB{-4} \xdef\consVZ{-3}  \xdef\consVX{-2}

\xdef\consFC{-10} \xdef\consFS{-5} \xdef\consFT{-6} \xdef\consFP{-9} \xdef\consFA{-7}
\xdef\consFG{-8} \xdef\consFN{-6} \xdef\consFD{-11} \xdef\consFE{-11} \xdef\consFQ{-10}
\xdef\consFH{-4} \xdef\consFR{-7} \xdef\consFK{-11} \xdef\consFM{-2} \xdef\consFI{0}
\xdef\consFL{0} \xdef\consFV{-5} \xdef\consFF{12} \xdef\consFY{6} \xdef\consFW{-2}
\xdef\consFB{-6} \xdef\consFZ{-7}  \xdef\consFX{-4}

\xdef\consYC{-2} \xdef\consYS{-6} \xdef\consYT{-6} \xdef\consYP{-11} \xdef\consYA{-6}
\xdef\consYG{-11} \xdef\consYN{-3} \xdef\consYD{-9} \xdef\consYE{-7} \xdef\consYQ{-9}
\xdef\consYH{-1} \xdef\consYR{-10} \xdef\consYK{-10} \xdef\consYM{-8} \xdef\consYI{-4}
\xdef\consYL{-5} \xdef\consYV{-6} \xdef\consYF{6} \xdef\consYY{13} \xdef\consYW{-2}
\xdef\consYB{-4} \xdef\consYZ{-6}  \xdef\consYX{-4}

\xdef\consWC{-13} \xdef\consWS{-4} \xdef\consWT{-10} \xdef\consWP{-11} \xdef\consWA{-11}
\xdef\consWG{-13} \xdef\consWN{-8} \xdef\consWD{-13} \xdef\consWE{-14} \xdef\consWQ{-11}
\xdef\consWH{-7} \xdef\consWR{1} \xdef\consWK{-9} \xdef\consWM{-11} \xdef\consWI{-12}
\xdef\consWL{-7} \xdef\consWV{-14} \xdef\consWF{-2} \xdef\consWY{-2} \xdef\consWW{19}
\xdef\consWB{-6} \xdef\consWZ{-8}  \xdef\consWX{-6}

\xdef\consBC{-6} \xdef\consBS{0} \xdef\consBT{-1} \xdef\consBP{-3} \xdef\consBA{-1}
\xdef\consBG{-1} \xdef\consBN{4} \xdef\consBD{4} \xdef\consBE{3} \xdef\consBQ{0}
\xdef\consBH{1} \xdef\consBR{-3} \xdef\consBK{0} \xdef\consBM{-4} \xdef\consBI{-3}
\xdef\consBL{-5} \xdef\consBV{-4} \xdef\consBF{-6} \xdef\consBY{-4} \xdef\consBW{-6}
\xdef\consBB{4} \xdef\consBZ{2}  \xdef\consBX{-2}

\xdef\consZC{-8} \xdef\consZS{-2} \xdef\consZT{-2} \xdef\consZP{-1} \xdef\consZA{-1}
\xdef\consZG{-2} \xdef\consZN{0} \xdef\consZD{3} \xdef\consZE{4} \xdef\consZQ{5}
\xdef\consZH{1} \xdef\consZR{-1} \xdef\consZK{-1} \xdef\consZM{-2} \xdef\consZI{-3}
\xdef\consZL{-4} \xdef\consZV{-3} \xdef\consZF{-7} \xdef\consZY{-6} \xdef\consZW{-8}
\xdef\consZB{2} \xdef\consZZ{5}  \xdef\consZX{-2}

\xdef\consXC{-5} \xdef\consXS{-1} \xdef\consXT{-1} \xdef\consXP{-2} \xdef\consXA{-1}
\xdef\consXG{-2} \xdef\consXN{-1} \xdef\consXD{-2} \xdef\consXE{-2} \xdef\consXQ{-2}
\xdef\consXH{-2} \xdef\consXR{-2} \xdef\consXK{-2} \xdef\consXM{-2} \xdef\consXI{-2}
\xdef\consXL{-3} \xdef\consXV{-2} \xdef\consXF{-4} \xdef\consXY{-4} \xdef\consXW{-6}
\xdef\consXB{-2} \xdef\consXZ{-2}  \xdef\consXX{-2}

\expandafter\xdef\csname cons..\endcsname{1}
\gappenalty{-9} \xdef\m@trixf@ctor{10}

\else
\xdef\temp@{BLOSUM62}
\ifx\first@\temp@

%%%% BLOSUM62

\xdef\consCC{9} \xdef\consCS{-1} \xdef\consCT{-1} \xdef\consCP{-3} \xdef\consCA{0}
\xdef\consCG{-3} \xdef\consCN{-3} \xdef\consCD{-3} \xdef\consCE{-4} \xdef\consCQ{-3}
\xdef\consCH{-3} \xdef\consCR{-3} \xdef\consCK{-3} \xdef\consCM{-1} \xdef\consCI{-1}
\xdef\consCL{-1} \xdef\consCV{-1} \xdef\consCF{-2} \xdef\consCY{-2} \xdef\consCW{-2}

\xdef\consSC{-1} \xdef\consSS{4} \xdef\consST{1} \xdef\consSP{-1} \xdef\consSA{1}
\xdef\consSG{0} \xdef\consSN{1} \xdef\consSD{0} \xdef\consSE{0} \xdef\consSQ{0}
\xdef\consSH{-1} \xdef\consSR{-1} \xdef\consSK{0} \xdef\consSM{-1} \xdef\consSI{-2}
\xdef\consSL{-2} \xdef\consSV{-2} \xdef\consSF{-2} \xdef\consSY{-2} \xdef\consSW{-3}

\xdef\consTC{-1} \xdef\consTS{1} \xdef\consTT{4} \xdef\consTP{1} \xdef\consTA{-1}
\xdef\consTG{1} \xdef\consTN{0} \xdef\consTD{1} \xdef\consTE{0} \xdef\consTQ{0}
\xdef\consTH{0} \xdef\consTR{-1} \xdef\consTK{0} \xdef\consTM{-1} \xdef\consTI{-2}
\xdef\consTL{-2} \xdef\consTV{-2} \xdef\consTF{-2} \xdef\consTY{-2} \xdef\consTW{-3}

\xdef\consPC{-3} \xdef\consPS{-1} \xdef\consPT{1} \xdef\consPP{7} \xdef\consPA{-1}
\xdef\consPG{-2} \xdef\consPN{-1} \xdef\consPD{-1} \xdef\consPE{-1} \xdef\consPQ{-1}
\xdef\consPH{-2} \xdef\consPR{-2} \xdef\consPK{-1} \xdef\consPM{-2} \xdef\consPI{-3}
\xdef\consPL{-3} \xdef\consPV{-2} \xdef\consPF{-4} \xdef\consPY{-3} \xdef\consPW{-4}

\xdef\consAC{0} \xdef\consAS{1} \xdef\consAT{-1} \xdef\consAP{-1} \xdef\consAA{4}
\xdef\consAG{0} \xdef\consAN{-1} \xdef\consAD{-2} \xdef\consAE{-1} \xdef\consAQ{-1}
\xdef\consAH{-2} \xdef\consAR{-1} \xdef\consAK{-1} \xdef\consAM{-1} \xdef\consAI{-1}
\xdef\consAL{-1} \xdef\consAV{-2} \xdef\consAF{-2} \xdef\consAY{-2} \xdef\consAW{-3}

\xdef\consGC{-3} \xdef\consGS{0} \xdef\consGT{1} \xdef\consGP{-2} \xdef\consGA{0}
\xdef\consGG{6} \xdef\consGN{-2} \xdef\consGD{-1} \xdef\consGE{-2} \xdef\consGQ{-2}
\xdef\consGH{-2} \xdef\consGR{-2} \xdef\consGK{-2} \xdef\consGM{-3} \xdef\consGI{-4}
\xdef\consGL{-4} \xdef\consGV{0} \xdef\consGF{-3} \xdef\consGY{-3} \xdef\consGW{-2}

\xdef\consNC{-3} \xdef\consNS{1} \xdef\consNT{0} \xdef\consNP{-2} \xdef\consNA{-2}
\xdef\consNG{0} \xdef\consNN{6} \xdef\consND{1} \xdef\consNE{0} \xdef\consNQ{0}
\xdef\consNH{-1} \xdef\consNR{0} \xdef\consNK{0} \xdef\consNM{-2} \xdef\consNI{-3}
\xdef\consNL{-3} \xdef\consNV{-3} \xdef\consNF{-3} \xdef\consNY{-2} \xdef\consNW{-4}

\xdef\consDC{-3} \xdef\consDS{0} \xdef\consDT{1} \xdef\consDP{-1} \xdef\consDA{-2}
\xdef\consDG{-1} \xdef\consDN{1} \xdef\consDD{6} \xdef\consDE{2} \xdef\consDQ{0}
\xdef\consDH{-1} \xdef\consDR{-2} \xdef\consDK{-1} \xdef\consDM{-3} \xdef\consDI{-3}
\xdef\consDL{-4} \xdef\consDV{-3} \xdef\consDF{-3} \xdef\consDY{-3} \xdef\consDW{-4}

\xdef\consEC{-4} \xdef\consES{0} \xdef\consET{0} \xdef\consEP{-1} \xdef\consEA{-1}
\xdef\consEG{-2} \xdef\consEN{0} \xdef\consED{2} \xdef\consEE{5} \xdef\consEQ{2}
\xdef\consEH{0} \xdef\consER{0} \xdef\consEK{1} \xdef\consEM{-2} \xdef\consEI{-3}
\xdef\consEL{-3} \xdef\consEV{-3} \xdef\consEF{-3} \xdef\consEY{-2} \xdef\consEW{-3}

\xdef\consQC{-3} \xdef\consQS{0} \xdef\consQT{0} \xdef\consQP{-1} \xdef\consQA{-1}
\xdef\consQG{-2} \xdef\consQN{0} \xdef\consQD{0} \xdef\consQE{2} \xdef\consQQ{5}
\xdef\consQH{0} \xdef\consQR{1} \xdef\consQK{1} \xdef\consQM{0} \xdef\consQI{-3}
\xdef\consQL{-2} \xdef\consQV{-2} \xdef\consQF{-3} \xdef\consQY{-1} \xdef\consQW{-2}

\xdef\consHC{-3} \xdef\consHS{-1} \xdef\consHT{0} \xdef\consHP{-2} \xdef\consHA{-2}
\xdef\consHG{-2} \xdef\consHN{1} \xdef\consHD{1} \xdef\consHE{0} \xdef\consHQ{0}
\xdef\consHH{8} \xdef\consHR{0} \xdef\consHK{-1} \xdef\consHM{-2} \xdef\consHI{-3}
\xdef\consHL{-3} \xdef\consHV{-2} \xdef\consHF{-1} \xdef\consHY{2} \xdef\consHW{-2}

\xdef\consRC{-3} \xdef\consRS{-1} \xdef\consRT{-1} \xdef\consRP{-2} \xdef\consRA{-1}
\xdef\consRG{-2} \xdef\consRN{0} \xdef\consRD{-2} \xdef\consRE{0} \xdef\consRQ{1}
\xdef\consRH{0} \xdef\consRR{5} \xdef\consRK{2} \xdef\consRM{-1} \xdef\consRI{-3}
\xdef\consRL{-2} \xdef\consRV{-3} \xdef\consRF{-3} \xdef\consRY{-2} \xdef\consRW{-3}

\xdef\consKC{-3} \xdef\consKS{0} \xdef\consKT{0} \xdef\consKP{-1} \xdef\consKA{-1}
\xdef\consKG{-2} \xdef\consKN{0} \xdef\consKD{-1} \xdef\consKE{1} \xdef\consKQ{1}
\xdef\consKH{-1} \xdef\consKR{2} \xdef\consKK{5} \xdef\consKM{-1} \xdef\consKI{-3}
\xdef\consKL{-2} \xdef\consKV{-3} \xdef\consKF{-3} \xdef\consKY{-2} \xdef\consKW{-3}

\xdef\consMC{-1} \xdef\consMS{-1} \xdef\consMT{-1} \xdef\consMP{-2} \xdef\consMA{-1}
\xdef\consMG{-3} \xdef\consMN{-2} \xdef\consMD{-3} \xdef\consME{-2} \xdef\consMQ{0}
\xdef\consMH{-2} \xdef\consMR{-1} \xdef\consMK{-1} \xdef\consMM{5} \xdef\consMI{1}
\xdef\consML{2} \xdef\consMV{-2} \xdef\consMF{0} \xdef\consMY{-1} \xdef\consMW{-1}

\xdef\consIC{-1} \xdef\consIS{-2} \xdef\consIT{-2} \xdef\consIP{-3} \xdef\consIA{-1}
\xdef\consIG{-4} \xdef\consIN{-3} \xdef\consID{-3} \xdef\consIE{-3} \xdef\consIQ{-3}
\xdef\consIH{-3} \xdef\consIR{-3} \xdef\consIK{-3} \xdef\consIM{1} \xdef\consII{4}
\xdef\consIL{2} \xdef\consIV{1} \xdef\consIF{0} \xdef\consIY{-1} \xdef\consIW{-3}

\xdef\consLC{-1} \xdef\consLS{-2} \xdef\consLT{-2} \xdef\consLP{-3} \xdef\consLA{-1}
\xdef\consLG{-4} \xdef\consLN{-3} \xdef\consLD{-4} \xdef\consLE{-3} \xdef\consLQ{-2}
\xdef\consLH{-3} \xdef\consLR{-2} \xdef\consLK{-2} \xdef\consLM{2} \xdef\consLI{2}
\xdef\consLL{4} \xdef\consLV{3} \xdef\consLF{0} \xdef\consLY{-1} \xdef\consLW{-2}

\xdef\consVC{-1} \xdef\consVS{-2} \xdef\consVT{-2} \xdef\consVP{-2} \xdef\consVA{0}
\xdef\consVG{-3} \xdef\consVN{-3} \xdef\consVD{-3} \xdef\consVE{-2} \xdef\consVQ{-2}
\xdef\consVH{-3} \xdef\consVR{-3} \xdef\consVK{-2} \xdef\consVM{1} \xdef\consVI{3}
\xdef\consVL{1} \xdef\consVV{4} \xdef\consVF{-1} \xdef\consVY{-1} \xdef\consVW{-3}

\xdef\consFC{-2} \xdef\consFS{-2} \xdef\consFT{-2} \xdef\consFP{-4} \xdef\consFA{-2}
\xdef\consFG{-3} \xdef\consFN{-3} \xdef\consFD{-3} \xdef\consFE{-3} \xdef\consFQ{-3}
\xdef\consFH{-1} \xdef\consFR{-3} \xdef\consFK{-3} \xdef\consFM{0} \xdef\consFI{0}
\xdef\consFL{0} \xdef\consFV{-1} \xdef\consFF{6} \xdef\consFY{3} \xdef\consFW{1}

\xdef\consYC{-2} \xdef\consYS{-2} \xdef\consYT{-2} \xdef\consYP{-3} \xdef\consYA{-2}
\xdef\consYG{-3} \xdef\consYN{-2} \xdef\consYD{-3} \xdef\consYE{-2} \xdef\consYQ{-1}
\xdef\consYH{2} \xdef\consYR{-2} \xdef\consYK{-2} \xdef\consYM{-1} \xdef\consYI{-1}
\xdef\consYL{-1} \xdef\consYV{-1} \xdef\consYF{3} \xdef\consYY{7} \xdef\consYW{2}

\xdef\consWC{-2} \xdef\consWS{-3} \xdef\consWT{-3} \xdef\consWP{-4} \xdef\consWA{-3}
\xdef\consWG{-2} \xdef\consWN{-4} \xdef\consWD{-4} \xdef\consWE{-3} \xdef\consWQ{-2}
\xdef\consWH{-2} \xdef\consWR{-3} \xdef\consWK{-3} \xdef\consWM{-1} \xdef\consWI{-3}
\xdef\consWL{-2} \xdef\consWV{-3} \xdef\consWF{1} \xdef\consWY{2} \xdef\consWW{11}

\gappenalty{0} \xdef\m@trixf@ctor{10}

\else

\message{<Unknown residue weight matrix - using `identity'>} \weighttable{identity}

\fi
\fi
\fi
\fi
\fi
}

\def\setweight#1#2#3{%
   \expandafter\xdef\csname cons#1#2\endcsname{#3}
   \expandafter\xdef\csname cons#2#1\endcsname{#3}
}

\weighttable{identity}
\gappenalty{0}

\def\c@d@ns{%
\codon{A}{GCA,GCG,GCC,GCT,GCU,GCN}
\codon{B}{---}
\codon{C}{TGC,TGT,UGC,UGU,TGY}
\codon{D}{GAC,GAT,GAU,GAY}
\codon{E}{GAA,GAG,GAR}
\codon{F}{TTC,TTT,UUC,UUU,TTY}
\codon{G}{GGA,GGG,GGC,GGT,GGU,GGN}
\codon{H}{CAC,CAT,CAY}
\codon{I}{ATA,ATC,ATT,AUA,AUC,AUU,ATH}
\codon{J}{---}
\codon{K}{AAA,AAG,AAG,AAR}
\codon{L}{CTA,CTG,CTC,CTT,TTA,TTG,CUG,CUG,CUC,CUU,UUA,UUG,YTN}
\codon{M}{ATG,AUG,ATG}
\codon{N}{AAC,AAT,AAU,AAY}
\codon{O}{---}
\codon{P}{CCA,CCG,CCC,CCT,CCU,CCN}
\codon{Q}{CAA,CAG,CAR}
\codon{R}{AGA,AGG,CGA,CGG,CGC,CGT,CGU,MGN}
\codon{S}{TCT,TCC,TCG,TCA,AGT,AGC,UCU,UCC,UCG,UCA,AGU,WSN}
\codon{T}{ACT,ACC,ACG,ACA,ACU,ACN}
\codon{U}{---}
\codon{V}{GTA,GTG,GTC,GTT,GUA,GUG,GUC,GUU,GTN}
\codon{W}{TGG,UGG,TGG}
\codon{X}{---}
\codon{Y}{TAC,TAT,UAC,UAU,TAY}
\codon{Z}{---}
\codon{.}{TAA,TAG,TGA,UAA,UAG,UGA,TRR}
}

\definecolor{GreenYellow}   {cmyk}{0.15,0,0.69,0}
\definecolor{Yellow}        {cmyk}{0,0,1,0}
\definecolor{Goldenrod}     {cmyk}{0,0.10,0.84,0}
\definecolor{Dandelion}     {cmyk}{0,0.29,0.84,0}
\definecolor{Apricot}       {cmyk}{0,0.32,0.52,0}
\definecolor{Peach}         {cmyk}{0,0.50,0.70,0}
\definecolor{Melon}         {cmyk}{0,0.46,0.50,0}
\definecolor{YellowOrange}  {cmyk}{0,0.42,1,0}
\definecolor{Orange}        {cmyk}{0,0.61,0.87,0}
\definecolor{BurntOrange}   {cmyk}{0,0.51,1,0}
\definecolor{Bittersweet}   {cmyk}{0,0.75,1,0.24}
\definecolor{RedOrange}     {cmyk}{0,0.77,0.87,0}
\definecolor{Mahagony}      {cmyk}{0,0.85,0.87,0.35}
\definecolor{Maroon}        {cmyk}{0,0.87,0.68,0.32}
\definecolor{BrickRed}      {cmyk}{0,0.89,0.94,0.28}
\definecolor{Red}           {cmyk}{0,1,1,0}
\definecolor{OrangeRed}     {cmyk}{0,1,0.50,0}
\definecolor{RubineRed}     {cmyk}{0,1,0.13,0}
\definecolor{WildStrawberry}{cmyk}{0,0.96,0.39,0}
\definecolor{Salmon}        {cmyk}{0,0.53,0.38,0}
\definecolor{CarnationPink} {cmyk}{0,0.63,0,0}
\definecolor{Magenta}       {cmyk}{0,1,0,0}
\definecolor{VioletRed}     {cmyk}{0,0.81,0,0}
\definecolor{Rhodamine}     {cmyk}{0,0.82,0,0}
\definecolor{Mulberry}      {cmyk}{0.34,0.90,0,0.02}
\definecolor{RedViolet}     {cmyk}{0.07,0.90,0,0.34}
\definecolor{Fuchsia}       {cmyk}{0.47,0.91,0,0.08}
\definecolor{Lavender}      {cmyk}{0,0.48,0,0}
\definecolor{Thistle}       {cmyk}{0.12,0.59,0,0}
\definecolor{Orchid}        {cmyk}{0.32,0.64,0,0}
\definecolor{DarkOrchid}    {cmyk}{0.40,0.80,0.20,0}
\definecolor{Purple}        {cmyk}{0.45,0.86,0,0}
\definecolor{Plum}          {cmyk}{0.50,1,0,0}
\definecolor{Violet}        {cmyk}{0.79,0.88,0,0}
\definecolor{RoyalPurple}   {cmyk}{0.75,0.90,0,0}
\definecolor{BlueViolet}    {cmyk}{0.86,0.91,0,0.04}
\definecolor{Periwinkle}    {cmyk}{0.57,0.55,0,0}
\definecolor{CadetBlue}     {cmyk}{0.62,0.57,0.23,0}
\definecolor{CornflowerBlue}{cmyk}{0.65,0.13,0,0}
\definecolor{MidnightBlue}  {cmyk}{0.98,0.13,0,0.43}
\definecolor{NavyBlue}      {cmyk}{0.94,0.54,0,0}
\definecolor{RoyalBlue}     {cmyk}{1,0.50,0,0}
\definecolor{Blue}          {cmyk}{1,1,0,0}
\definecolor{Cerulean}      {cmyk}{0.94,0.11,0,0}
\definecolor{Cyan}          {cmyk}{1,0,0,0}
\definecolor{ProcessBlue}   {cmyk}{0.96,0,0,0}
\definecolor{SkyBlue}       {cmyk}{0.62,0,0.12,0}
\definecolor{Turquoise}     {cmyk}{0.85,0,0.20,0}
\definecolor{TealBlue}      {cmyk}{0.86,0,0.34,0.02}
\definecolor{Aquamarine}    {cmyk}{0.82,0,0.30,0}
\definecolor{BlueGreen}     {cmyk}{0.85,0,0.33,0}
\definecolor{Emerald}       {cmyk}{1,0,0.50,0}
\definecolor{JungleGreen}   {cmyk}{0.99,0,0.52,0}
\definecolor{SeaGreen}      {cmyk}{0.69,0,0.50,0}
\definecolor{Green}         {cmyk}{1,0,1,0}
\definecolor{ForestGreen}   {cmyk}{0.91,0,0.88,0.12}
\definecolor{PineGreen}     {cmyk}{0.92,0,0.59,0.25}
\definecolor{LimeGreen}     {cmyk}{0.50,0,1,0}
\definecolor{YellowGreen}   {cmyk}{0.44,0,0.74,0}
\definecolor{SpringGreen}   {cmyk}{0.26,0,0.76,0}
\definecolor{OliveGreen}    {cmyk}{0.64,0,0.95,0.40}
\definecolor{RawSienna}     {cmyk}{0,0.72,1,0.45}
\definecolor{Sepia}         {cmyk}{0,0.83,1,0.70}
\definecolor{Brown}         {cmyk}{0,0.81,1,0.60}
\definecolor{Tan}           {cmyk}{0.14,0.42,0.56,0}
\definecolor{White}         {cmyk}{0,0,0,0}
\definecolor{Gray0}         {cmyk}{0,0,0,0}
\definecolor{Gray5}         {cmyk}{0,0,0,0.05}
\definecolor{Gray10}        {cmyk}{0,0,0,0.10}
\definecolor{Gray15}        {cmyk}{0,0,0,0.15}
\definecolor{Gray20}        {cmyk}{0,0,0,0.20}
\definecolor{Gray25}        {cmyk}{0,0,0,0.25}
\definecolor{Gray30}        {cmyk}{0,0,0,0.30}
\definecolor{LightGray}     {cmyk}{0,0,0,0.33}
\definecolor{Gray35}        {cmyk}{0,0,0,0.35}
\definecolor{Gray40}        {cmyk}{0,0,0,0.40}
\definecolor{Gray45}        {cmyk}{0,0,0,0.45}
\definecolor{Gray50}        {cmyk}{0,0,0,0.50}
\definecolor{Gray}          {cmyk}{0,0,0,0.50}
\definecolor{GrayDefault}   {cmyk}{0,0,0,0.50}
\definecolor{Gray55}        {cmyk}{0,0,0,0.55}
\definecolor{Gray60}        {cmyk}{0,0,0,0.60}
\definecolor{Gray65}        {cmyk}{0,0,0,0.65}
\definecolor{DarkGray}      {cmyk}{0,0,0,0.66}
\definecolor{Gray70}        {cmyk}{0,0,0,0.70}
\definecolor{Gray75}        {cmyk}{0,0,0,0.75}
\definecolor{Gray80}        {cmyk}{0,0,0,0.80}
\definecolor{Gray85}        {cmyk}{0,0,0,0.85}
\definecolor{Gray90}        {cmyk}{0,0,0,0.90}
\definecolor{Gray95}        {cmyk}{0,0,0,0.95}
\definecolor{Black}         {cmyk}{0,0,0,1}
\definecolor{Gray100}       {cmyk}{0,0,0,1}
\definecolor{TC0}           {cmyk}{0.4,0.4,0,0}
\definecolor{TC1}           {cmyk}{0.6,0,0.7,0}
\definecolor{TC2}           {cmyk}{0.4,0,0.7,0}
\definecolor{TC3}           {cmyk}{0.2,0,1,0}
\definecolor{TC4}           {cmyk}{0,0,1,0}
\definecolor{TC5}           {cmyk}{0,0.2,1,0}
\definecolor{TC6}           {cmyk}{0,0.4,1,0}
\definecolor{TC7}           {cmyk}{0,0.6,1,0}
\definecolor{TC8}           {cmyk}{0,0.8,1,0}
\definecolor{TC9}           {cmyk}{0,0.875,1,0}
\definecolor{TC99}          {cmyk}{0,0,0,0}
\definecolor{LightGreenYellow}   {cmyk}{0.08,0,0.35,0}
\definecolor{LightYellow}        {cmyk}{0,0,0.50,0}
\definecolor{LightGoldenrod}     {cmyk}{0,0.05,0.42,0}
\definecolor{LightDandelion}     {cmyk}{0,0.15,0.42,0}
\definecolor{LightApricot}       {cmyk}{0,0.16,0.26,0}
\definecolor{LightPeach}         {cmyk}{0,0.25,0.35,0}
\definecolor{LightMelon}         {cmyk}{0,0.23,0.25,0}
\definecolor{LightYellowOrange}  {cmyk}{0,0.21,0.50,0}
\definecolor{LightOrange}        {cmyk}{0,0.31,0.44,0}
\definecolor{LightBurntOrange}   {cmyk}{0,0.26,0.50,0}
\definecolor{LightBittersweet}   {cmyk}{0,0.38,0.50,0.12}
\definecolor{LightRedOrange}     {cmyk}{0,0.39,0.44,0}
\definecolor{LightMahagony}      {cmyk}{0,0.43,0.44,0.18}
\definecolor{LightMaroon}        {cmyk}{0,0.44,0.34,0.16}
\definecolor{LightBrickRed}      {cmyk}{0,0.45,0.47,0.14}
\definecolor{LightRed}           {cmyk}{0,0.50,0.50,0}
\definecolor{LightOrangeRed}     {cmyk}{0,0.50,0.25,0}
\definecolor{LightRubineRed}     {cmyk}{0,0.50,0.07,0}
\definecolor{LightWildStrawberry}{cmyk}{0,0.48,0.20,0}
\definecolor{LightSalmon}        {cmyk}{0,0.27,0.19,0}
\definecolor{LightCarnationPink} {cmyk}{0,0.32,0,0}
\definecolor{LightMagenta}       {cmyk}{0,0.50,0,0}
\definecolor{LightVioletRed}     {cmyk}{0,0.40,0,0}
\definecolor{LightRhodamine}     {cmyk}{0,0.41,0,0}
\definecolor{LightMulberry}      {cmyk}{0.17,0.45,0,0.01}
\definecolor{LightRedViolet}     {cmyk}{0.04,0.45,0,0.17}
\definecolor{LightFuchsia}       {cmyk}{0.24,0.46,0,0.04}
\definecolor{LightLavender}      {cmyk}{0,0.24,0,0}
\definecolor{LightThistle}       {cmyk}{0.06,0.30,0,0}
\definecolor{LightOrchid}        {cmyk}{0.16,0.32,0,0}
\definecolor{LightDarkOrchid}    {cmyk}{0.20,0.40,0.10,0}
\definecolor{LightPurple}        {cmyk}{0.23,0.43,0,0}
\definecolor{LightPlum}          {cmyk}{0.25,0.50,0,0}
\definecolor{LightViolet}        {cmyk}{0.40,0.44,0,0}
\definecolor{LightRoyalPurple}   {cmyk}{0.38,0.45,0,0}
\definecolor{LightBlueViolet}    {cmyk}{0.43,0.46,0,0.02}
\definecolor{LightPeriwinkle}    {cmyk}{0.29,0.28,0,0}
\definecolor{LightCadetBlue}     {cmyk}{0.31,0.29,0.12,0}
\definecolor{LightCornflowerBlue}{cmyk}{0.33,0.07,0,0}
\definecolor{LightMidnightBlue}  {cmyk}{0.49,0.07,0,0.22}
\definecolor{LightNavyBlue}      {cmyk}{0.47,0.27,0,0}
\definecolor{LightRoyalBlue}     {cmyk}{0.50,0.25,0,0}
\definecolor{LightBlue}          {cmyk}{0.50,0.50,0,0}
\definecolor{LightCerulean}      {cmyk}{0.47,0.06,0,0}
\definecolor{LightCyan}          {cmyk}{0.50,0,0,0}
\definecolor{LightProcessBlue}   {cmyk}{0.48,0,0,0}
\definecolor{LightSkyBlue}       {cmyk}{0.31,0,0.06,0}
\definecolor{LightTurquoise}     {cmyk}{0.43,0,0.10,0}
\definecolor{LightTealBlue}      {cmyk}{0.43,0,0.17,0.01}
\definecolor{LightAquamarine}    {cmyk}{0.41,0,0.15,0}
\definecolor{LightBlueGreen}     {cmyk}{0.43,0,0.17,0}
\definecolor{LightEmerald}       {cmyk}{0.50,0,0.25,0}
\definecolor{LightJungleGreen}   {cmyk}{0.50,0,0.26,0}
\definecolor{LightSeaGreen}      {cmyk}{0.35,0,0.25,0}
\definecolor{LightGreen}         {cmyk}{0.50,0,0.50,0}
\definecolor{LightForestGreen}   {cmyk}{0.46,0,0.44,0.06}
\definecolor{LightPineGreen}     {cmyk}{0.46,0,0.30,0.13}
\definecolor{LightLimeGreen}     {cmyk}{0.25,0,0.50,0}
\definecolor{LightYellowGreen}   {cmyk}{0.22,0,0.37,0}
\definecolor{LightSpringGreen}   {cmyk}{0.13,0,0.38,0}
\definecolor{LightOliveGreen}    {cmyk}{0.32,0,0.48,0.20}
\definecolor{LightRawSienna}     {cmyk}{0,0.36,0.50,0.23}
\definecolor{LightSepia}         {cmyk}{0,0.44,0.50,0.35}
\definecolor{LightBrown}         {cmyk}{0,0.41,0.50,0.30}
\definecolor{LightTan}           {cmyk}{0.07,0.21,0.28,0}
\definecolor{LightWhite}         {cmyk}{0,0,0,0}
\definecolor{LightGray0}         {cmyk}{0,0,0,0}
\definecolor{LightGray5}         {cmyk}{0,0,0,0.02}
\definecolor{LightGray10}        {cmyk}{0,0,0,0.05}
\definecolor{LightGray15}        {cmyk}{0,0,0,0.07}
\definecolor{LightGray20}        {cmyk}{0,0,0,0.10}
\definecolor{LightGray25}        {cmyk}{0,0,0,0.12}
\definecolor{LightGray30}        {cmyk}{0,0,0,0.15}
\definecolor{LightLightGray}     {cmyk}{0,0,0,0.16}
\definecolor{LightGray35}        {cmyk}{0,0,0,0.17}
\definecolor{LightGray40}        {cmyk}{0,0,0,0.20}
\definecolor{LightGray45}        {cmyk}{0,0,0,0.22}
\definecolor{LightGray50}        {cmyk}{0,0,0,0.25}
\definecolor{LightGray}          {cmyk}{0,0,0,0.25}
\definecolor{LightGray55}        {cmyk}{0,0,0,0.27}
\definecolor{LightGray60}        {cmyk}{0,0,0,0.30}
\definecolor{LightGray65}        {cmyk}{0,0,0,0.32}
\definecolor{LightDarkGray}      {cmyk}{0,0,0,0.33}
\definecolor{LightGray70}        {cmyk}{0,0,0,0.35}
\definecolor{LightGray75}        {cmyk}{0,0,0,0.37}
\definecolor{LightGray80}        {cmyk}{0,0,0,0.40}
\definecolor{LightGray85}        {cmyk}{0,0,0,0.42}
\definecolor{LightGray90}        {cmyk}{0,0,0,0.45}
\definecolor{LightGray95}        {cmyk}{0,0,0,0.47}
\definecolor{LightBlack}         {cmyk}{0,0,0,0.50}
\definecolor{LightGray100}       {cmyk}{0,0,0,0.50}
\definecolor{LightTC0}           {cmyk}{0.2,0.2,0,0}
\definecolor{LightTC1}           {cmyk}{0.3,0,0.35,0}
\definecolor{LightTC2}           {cmyk}{0.2,0,0.35,0}
\definecolor{LightTC3}           {cmyk}{0.1,0,0.5,0}
\definecolor{LightTC4}           {cmyk}{0,0,0.5,0}
\definecolor{LightTC5}           {cmyk}{0,0.1,0.5,0}
\definecolor{LightTC6}           {cmyk}{0,0.2,0.5,0}
\definecolor{LightTC7}           {cmyk}{0,0.3,0.5,0}
\definecolor{LightTC8}           {cmyk}{0,0.4,0.5,0}
\definecolor{LightTC99}          {cmyk}{0,0,0,0}
\definecolor{LightLightGreenYellow}   {cmyk}{0.04,0,0.17,0}
\definecolor{LightLightYellow}        {cmyk}{0,0,0.25,0}
\definecolor{LightLightGoldenrod}     {cmyk}{0,0.02,0.21,0}
\definecolor{LightLightDandelion}     {cmyk}{0,0.07,0.21,0}
\definecolor{LightLightApricot}       {cmyk}{0,0.08,0.13,0}
\definecolor{LightLightPeach}         {cmyk}{0,0.12,0.17,0}
\definecolor{LightLightMelon}         {cmyk}{0,0.11,0.12,0}
\definecolor{LightLightYellowOrange}  {cmyk}{0,0.10,0.25,0}
\definecolor{LightLightOrange}        {cmyk}{0,0.15,0.22,0}
\definecolor{LightLightBurntOrange}   {cmyk}{0,0.13,0.25,0}
\definecolor{LightLightBittersweet}   {cmyk}{0,0.19,0.25,0.06}
\definecolor{LightLightRedOrange}     {cmyk}{0,0.14,0.22,0}
\definecolor{LightLightMahagony}      {cmyk}{0,0.21,0.22,0.09}
\definecolor{LightLightMaroon}        {cmyk}{0,0.22,0.17,0.08}
\definecolor{LightLightBrickRed}      {cmyk}{0,0.22,0.23,0.07}
\definecolor{LightLightRed}           {cmyk}{0,0.25,0.25,0}
\definecolor{LightLightOrangeRed}     {cmyk}{0,0.25,0.12,0}
\definecolor{LightLightRubineRed}     {cmyk}{0,0.25,0.03,0}
\definecolor{LightLightWildStrawberry}{cmyk}{0,0.24,0.10,0}
\definecolor{LightLightSalmon}        {cmyk}{0,0.13,0.09,0}
\definecolor{LightLightCarnationPink} {cmyk}{0,0.16,0,0}
\definecolor{LightLightMagenta}       {cmyk}{0,0.25,0,0}
\definecolor{LightLightVioletRed}     {cmyk}{0,0.20,0,0}
\definecolor{LightLightRhodamine}     {cmyk}{0,0.20,0,0}
\definecolor{LightLightMulberry}      {cmyk}{0.08,0.22,0,0.005}
\definecolor{LightLightRedViolet}     {cmyk}{0.02,0.22,0,0.08}
\definecolor{LightLightFuchsia}       {cmyk}{0.12,0.23,0,0.02}
\definecolor{LightLightLavender}      {cmyk}{0,0.12,0,0}
\definecolor{LightLightThistle}       {cmyk}{0.03,0.15,0,0}
\definecolor{LightLightOrchid}        {cmyk}{0.08,0.16,0,0}
\definecolor{LightLightDarkOrchid}    {cmyk}{0.10,0.20,0.05,0}
\definecolor{LightLightPurple}        {cmyk}{0.11,0.21,0,0}
\definecolor{LightLightPlum}          {cmyk}{0.12,0.25,0,0}
\definecolor{LightLightViolet}        {cmyk}{0.20,0.22,0,0}
\definecolor{LightLightRoyalPurple}   {cmyk}{0.19,0.22,0,0}
\definecolor{LightLightBlueViolet}    {cmyk}{0.21,0.23,0,0.01}
\definecolor{LightLightPeriwinkle}    {cmyk}{0.14,0.14,0,0}
\definecolor{LightLightCadetBlue}     {cmyk}{0.15,0.14,0.06,0}
\definecolor{LightLightCornflowerBlue}{cmyk}{0.16,0.03,0,0}
\definecolor{LightLightMidnightBlue}  {cmyk}{0.24,0.03,0,0.11}
\definecolor{LightLightNavyBlue}      {cmyk}{0.23,0.13,0,0}
\definecolor{LightLightRoyalBlue}     {cmyk}{0.25,0.12,0,0}
\definecolor{LightLightBlue}          {cmyk}{0.25,0.25,0,0}
\definecolor{LightLightCerulean}      {cmyk}{0.23,0.03,0,0}
\definecolor{LightLightCyan}          {cmyk}{0.25,0,0,0}
\definecolor{LightLightProcessBlue}   {cmyk}{0.24,0,0,0}
\definecolor{LightLightSkyBlue}       {cmyk}{0.15,0,0.03,0}
\definecolor{LightLightTurquoise}     {cmyk}{0.21,0,0.05,0}
\definecolor{LightLightTealBlue}      {cmyk}{0.21,0,0.08,0.005}
\definecolor{LightLightAquamarine}    {cmyk}{0.20,0,0.07,0}
\definecolor{LightLightBlueGreen}     {cmyk}{0.21,0,0.08,0}
\definecolor{LightLightEmerald}       {cmyk}{0.25,0,0.12,0}
\definecolor{LightLightJungleGreen}   {cmyk}{0.25,0,0.13,0}
\definecolor{LightLightSeaGreen}      {cmyk}{0.17,0,0.12,0}
\definecolor{LightLightGreen}         {cmyk}{0.25,0,0.25,0}
\definecolor{LightLightForestGreen}   {cmyk}{0.23,0,0.22,0.03}
\definecolor{LightLightPineGreen}     {cmyk}{0.23,0,0.15,0.06}
\definecolor{LightLightLimeGreen}     {cmyk}{0.12,0,0.25,0}
\definecolor{LightLightYellowGreen}   {cmyk}{0.11,0,0.18,0}
\definecolor{LightLightSpringGreen}   {cmyk}{0.06,0,0.19,0}
\definecolor{LightLightOliveGreen}    {cmyk}{0.16,0,0.24,0.10}
\definecolor{LightLightRawSienna}     {cmyk}{0,0.18,0.25,0.11}
\definecolor{LightLightSepia}         {cmyk}{0,0.22,0.25,0.17}
\definecolor{LightLightBrown}         {cmyk}{0,0.20,0.25,0.15}
\definecolor{LightLightTan}           {cmyk}{0.03,0.10,0.14,0}
\definecolor{LightLightWhite}         {cmyk}{0,0,0,0}
\definecolor{LightLightGray0}         {cmyk}{0,0,0,0}
\definecolor{LightLightGray5}         {cmyk}{0,0,0,0.01}
\definecolor{LightLightGray10}        {cmyk}{0,0,0,0.02}
\definecolor{LightLightGray15}        {cmyk}{0,0,0,0.03}
\definecolor{LightLightGray20}        {cmyk}{0,0,0,0.05}
\definecolor{LightLightGray25}        {cmyk}{0,0,0,0.06}
\definecolor{LightLightGray30}        {cmyk}{0,0,0,0.07}
\definecolor{LightLightLightGray}     {cmyk}{0,0,0,0.08}
\definecolor{LightLightGray35}        {cmyk}{0,0,0,0.09}
\definecolor{LightLightGray40}        {cmyk}{0,0,0,0.10}
\definecolor{LightLightGray45}        {cmyk}{0,0,0,0.11}
\definecolor{LightLightGray50}        {cmyk}{0,0,0,0.12}
\definecolor{LightLightGray}          {cmyk}{0,0,0,0.13}
\definecolor{LightLightGray55}        {cmyk}{0,0,0,0.14}
\definecolor{LightLightGray60}        {cmyk}{0,0,0,0.15}
\definecolor{LightLightGray65}        {cmyk}{0,0,0,0.16}
\definecolor{LightLightDarkGray}      {cmyk}{0,0,0,0.17}
\definecolor{LightLightGray70}        {cmyk}{0,0,0,0.18}
\definecolor{LightLightGray75}        {cmyk}{0,0,0,0.19}
\definecolor{LightLightGray80}        {cmyk}{0,0,0,0.20}
\definecolor{LightLightGray85}        {cmyk}{0,0,0,0.21}
\definecolor{LightLightGray90}        {cmyk}{0,0,0,0.22}
\definecolor{LightLightGray95}        {cmyk}{0,0,0,0.23}
\definecolor{LightLightBlack}         {cmyk}{0,0,0,0.25}
\definecolor{LightLightGray100}       {cmyk}{0,0,0,0.25}
\definecolor{LightLightTC0}           {cmyk}{0.1,0.1,0,0}
\definecolor{LightLightTC1}           {cmyk}{0.15,0,0.175,0}
\definecolor{LightLightTC2}           {cmyk}{0.1,0,0.175,0}
\definecolor{LightLightTC3}           {cmyk}{0.05,0,0.25,0}
\definecolor{LightLightTC4}           {cmyk}{0,0,0.25,0}
\definecolor{LightLightTC5}           {cmyk}{0,0.05,0.25,0}
\definecolor{LightLightTC6}           {cmyk}{0,0.1,0.25,0}
\definecolor{LightLightTC7}           {cmyk}{0,0.15,0.25,0}
\definecolor{LightLightTC8}           {cmyk}{0,0.2,0.25,0}
\definecolor{LightLightTC99}          {cmyk}{0,0,0,0}
\definecolor{LightLightLightGreenYellow}   {cmyk}{0.02,0,0.08,0}
\definecolor{LightLightLightYellow}        {cmyk}{0,0,0.12,0}
\definecolor{LightLightLightGoldenrod}     {cmyk}{0,0.01,0.10,0}
\definecolor{LightLightLightDandelion}     {cmyk}{0,0.03,0.10,0}
\definecolor{LightLightLightApricot}       {cmyk}{0,0.04,0.06,0}
\definecolor{LightLightLightPeach}         {cmyk}{0,0.06,0.08,0}
\definecolor{LightLightLightMelon}         {cmyk}{0,0.05,0.06,0}
\definecolor{LightLightLightYellowOrange}  {cmyk}{0,0.05,0.12,0}
\definecolor{LightLightLightOrange}        {cmyk}{0,0.07,0.11,0}
\definecolor{LightLightLightBurntOrange}   {cmyk}{0,0.06,0.12,0}
\definecolor{LightLightLightBittersweet}   {cmyk}{0,0.09,0.12,0.03}
\definecolor{LightLightLightRedOrange}     {cmyk}{0,0.07,0.11,0}
\definecolor{LightLightLightMahagony}      {cmyk}{0,0.10,0.11,0.04}
\definecolor{LightLightLightMaroon}        {cmyk}{0,0.11,0.08,0.04}
\definecolor{LightLightLightBrickRed}      {cmyk}{0,0.11,0.11,0.03}
\definecolor{LightLightLightRed}           {cmyk}{0,0.12,0.12,0}
\definecolor{LightLightLightOrangeRed}     {cmyk}{0,0.12,0.06,0}
\definecolor{LightLightLightRubineRed}     {cmyk}{0,0.12,0.01,0}
\definecolor{LightLightLightWildStrawberry}{cmyk}{0,0.12,0.05,0}
\definecolor{LightLightLightSalmon}        {cmyk}{0,0.06,0.04,0}
\definecolor{LightLightLightCarnationPink} {cmyk}{0,0.08,0,0}
\definecolor{LightLightLightMagenta}       {cmyk}{0,0.12,0,0}
\definecolor{LightLightLightLightMagenta}  {cmyk}{0,0.06,0,0}
\definecolor{LightLightLightVioletRed}     {cmyk}{0,0.10,0,0}
\definecolor{LightLightLightRhodamine}     {cmyk}{0,0.10,0,0}
\definecolor{LightLightLightMulberry}      {cmyk}{0.04,0.11,0,0.002}
\definecolor{LightLightLightRedViolet}     {cmyk}{0.01,0.11,0,0.04}
\definecolor{LightLightLightFuchsia}       {cmyk}{0.06,0.11,0,0.01}
\definecolor{LightLightLightLavender}      {cmyk}{0,0.06,0,0}
\definecolor{LightLightLightThistle}       {cmyk}{0.01,0.07,0,0}
\definecolor{LightLightLightOrchid}        {cmyk}{0.04,0.08,0,0}
\definecolor{LightLightLightDarkOrchid}    {cmyk}{0.05,0.10,0.02,0}
\definecolor{LightLightLightPurple}        {cmyk}{0.05,0.10,0,0}
\definecolor{LightLightLightPlum}          {cmyk}{0.06,0.12,0,0}
\definecolor{LightLightLightViolet}        {cmyk}{0.10,0.11,0,0}
\definecolor{LightLightLightRoyalPurple}   {cmyk}{0.09,0.11,0,0}
\definecolor{LightLightLightBlueViolet}    {cmyk}{0.10,0.11,0,0.005}
\definecolor{LightLightLightPeriwinkle}    {cmyk}{0.07,0.07,0,0}
\definecolor{LightLightLightCadetBlue}     {cmyk}{0.07,0.07,0.03,0}
\definecolor{LightLightLightCornflowerBlue}{cmyk}{0.08,0.01,0,0}
\definecolor{LightLightLightMidnightBlue}  {cmyk}{0.12,0.01,0,0.05}
\definecolor{LightLightLightNavyBlue}      {cmyk}{0.11,0.06,0,0}
\definecolor{LightLightLightRoyalBlue}     {cmyk}{0.12,0.06,0,0}
\definecolor{LightLightLightBlue}          {cmyk}{0.12,0.12,0,0}
\definecolor{LightLightLightCerulean}      {cmyk}{0.11,0.01,0,0}
\definecolor{LightLightLightCyan}          {cmyk}{0.12,0,0,0}
\definecolor{LightLightLightProcessBlue}   {cmyk}{0.12,0,0,0}
\definecolor{LightLightLightSkyBlue}       {cmyk}{0.07,0,0.01,0}
\definecolor{LightLightLightTurquoise}     {cmyk}{0.10,0,0.02,0}
\definecolor{LightLightLightTealBlue}      {cmyk}{0.10,0,0.04,0.002}
\definecolor{LightLightLightAquamarine}    {cmyk}{0.10,0,0.03,0}
\definecolor{LightLightLightBlueGreen}     {cmyk}{0.10,0,0.04,0}
\definecolor{LightLightLightEmerald}       {cmyk}{0.12,0,0.06,0}
\definecolor{LightLightLightJungleGreen}   {cmyk}{0.12,0,0.06,0}
\definecolor{LightLightLightSeaGreen}      {cmyk}{0.08,0,0.06,0}
\definecolor{LightLightLightGreen}         {cmyk}{0.12,0,0.12,0}
\definecolor{LightLightLightForestGreen}   {cmyk}{0.11,0,0.11,0.01}
\definecolor{LightLightLightPineGreen}     {cmyk}{0.11,0,0.07,0.03}
\definecolor{LightLightLightLimeGreen}     {cmyk}{0.06,0,0.12,0}
\definecolor{LightLightLightYellowGreen}   {cmyk}{0.05,0,0.09,0}
\definecolor{LightLightLightSpringGreen}   {cmyk}{0.03,0,0.09,0}
\definecolor{LightLightLightOliveGreen}    {cmyk}{0.08,0,0.12,0.05}
\definecolor{LightLightLightRawSienna}     {cmyk}{0,0.09,0.12,0.05}
\definecolor{LightLightLightSepia}         {cmyk}{0,0.11,0.12,0.06}
\definecolor{LightLightLightBrown}         {cmyk}{0,0.10,0.12,0.07}
\definecolor{LightLightLightTan}           {cmyk}{0.01,0.05,0.07,0}
\definecolor{LightLightLightWhite}         {cmyk}{0,0,0,0}
\definecolor{LightLightLightGray0}         {cmyk}{0,0,0,0}
\definecolor{LightLightLightGray5}         {cmyk}{0,0,0,0.005}
\definecolor{LightLightLightGray10}        {cmyk}{0,0,0,0.01}
\definecolor{LightLightLightGray15}        {cmyk}{0,0,0,0.015}
\definecolor{LightLightLightGray20}        {cmyk}{0,0,0,0.025}
\definecolor{LightLightLightGray25}        {cmyk}{0,0,0,0.03}
\definecolor{LightLightLightGray30}        {cmyk}{0,0,0,0.035}
\definecolor{LightLightLightLightGray}     {cmyk}{0,0,0,0.04}
\definecolor{LightLightLightGray35}        {cmyk}{0,0,0,0.045}
\definecolor{LightLightLightGray40}        {cmyk}{0,0,0,0.05}
\definecolor{LightLightLightGray45}        {cmyk}{0,0,0,0.055}
\definecolor{LightLightLightGray50}        {cmyk}{0,0,0,0.06}
\definecolor{LightLightLightGray}          {cmyk}{0,0,0,0.065}
\definecolor{LightLightLightGray55}        {cmyk}{0,0,0,0.07}
\definecolor{LightLightLightGray60}        {cmyk}{0,0,0,0.075}
\definecolor{LightLightLightGray65}        {cmyk}{0,0,0,0.08}
\definecolor{LightLightLightDarkGray}      {cmyk}{0,0,0,0.085}
\definecolor{LightLightLightGray70}        {cmyk}{0,0,0,0.09}
\definecolor{LightLightLightGray75}        {cmyk}{0,0,0,0.095}
\definecolor{LightLightLightGray80}        {cmyk}{0,0,0,0.10}
\definecolor{LightLightLightGray85}        {cmyk}{0,0,0,0.105}
\definecolor{LightLightLightGray90}        {cmyk}{0,0,0,0.11}
\definecolor{LightLightLightGray95}        {cmyk}{0,0,0,0.115}
\definecolor{LightLightLightBlack}         {cmyk}{0,0,0,0.12}
\definecolor{LightLightLightGray100}       {cmyk}{0,0,0,0.125}
\definecolor{LightLightLightTC0}           {cmyk}{0.05,0.05,0,0}
\definecolor{LightLightLightTC1}           {cmyk}{0.075,0,0.086,0}
\definecolor{LightLightLightTC2}           {cmyk}{0.05,0,0.086,0}
\definecolor{LightLightLightTC3}           {cmyk}{0.025,0,0.125,0}
\definecolor{LightLightLightTC4}           {cmyk}{0,0,0.125,0}
\definecolor{LightLightLightTC5}           {cmyk}{0,0.025,0.125,0}
\definecolor{LightLightLightTC6}           {cmyk}{0,0.05,0.125,0}
\definecolor{LightLightLightTC7}           {cmyk}{0,0.0175,0.125,0}
\definecolor{LightLightLightTC8}           {cmyk}{0,0.1,0.125,0}
\definecolor{LightLightLightTC99}          {cmyk}{0,0,0,0}
\definecolor{BlueRed5}           {rgb} {0.15,0.17,0.55}
\definecolor{BlueRed10}          {rgb} {0.20,0.23,0.57}
\definecolor{BlueRed15}          {rgb} {0.24,0.29,0.60}
\definecolor{BlueRed20}          {rgb} {0.33,0.35,0.64}
\definecolor{BlueRed25}          {rgb} {0.43,0.43,0.68}
\definecolor{BlueRed30}          {rgb} {0.52,0.52,0.73}
\definecolor{BlueRed35}          {rgb} {0.60,0.60,0.78}
\definecolor{BlueRed40}          {rgb} {0.70,0.70,0.84}
\definecolor{BlueRed45}          {rgb} {0.80,0.80,0.85}
\definecolor{BlueRed50}          {rgb} {0.86,0.82,0.82}
\definecolor{BlueRed55}          {rgb} {0.87,0.73,0.73}
\definecolor{BlueRed60}          {rgb} {0.89,0.64,0.64}
\definecolor{BlueRed65}          {rgb} {0.90,0.55,0.55}
\definecolor{BlueRed70}          {rgb} {0.91,0.47,0.46}
\definecolor{BlueRed75}          {rgb} {0.91,0.39,0.37}
\definecolor{BlueRed80}          {rgb} {0.90,0.33,0.28}
\definecolor{BlueRed85}          {rgb} {0.89,0.25,0.20}
\definecolor{BlueRed90}          {rgb} {0.88,0.23,0.14}
\definecolor{BlueRed95}          {rgb} {0.87,0.21,0.09}
\definecolor{BlueRed100}         {rgb} {0.87,0.16,0.04}
\definecolor{RedBlue100}         {rgb} {0.15,0.17,0.55}
\definecolor{RedBlue95}          {rgb} {0.15,0.17,0.55}
\definecolor{RedBlue90}          {rgb} {0.20,0.23,0.57}
\definecolor{RedBlue85}          {rgb} {0.24,0.29,0.60}
\definecolor{RedBlue80}          {rgb} {0.33,0.35,0.64}
\definecolor{RedBlue75}          {rgb} {0.43,0.43,0.68}
\definecolor{RedBlue70}          {rgb} {0.52,0.52,0.73}
\definecolor{RedBlue65}          {rgb} {0.60,0.60,0.78}
\definecolor{RedBlue60}          {rgb} {0.70,0.70,0.84}
\definecolor{RedBlue55}          {rgb} {0.80,0.80,0.85}
\definecolor{RedBlue50}          {rgb} {0.86,0.82,0.82}
\definecolor{RedBlue45}          {rgb} {0.87,0.73,0.73}
\definecolor{RedBlue40}          {rgb} {0.89,0.64,0.64}
\definecolor{RedBlue35}          {rgb} {0.90,0.55,0.55}
\definecolor{RedBlue30}          {rgb} {0.91,0.47,0.46}
\definecolor{RedBlue25}          {rgb} {0.91,0.39,0.37}
\definecolor{RedBlue20}          {rgb} {0.90,0.33,0.28}
\definecolor{RedBlue15}          {rgb} {0.89,0.25,0.20}
\definecolor{RedBlue10}          {rgb} {0.88,0.23,0.14}
\definecolor{RedBlue5}           {rgb} {0.87,0.21,0.09}
\definecolor{GreenRed5}          {rgb} {0,1,0}
\definecolor{GreenRed10}         {rgb} {0.05,0.95,0}
\definecolor{GreenRed15}         {rgb} {0.10,0.90,0}
\definecolor{GreenRed20}         {rgb} {0.15,0.85,0}
\definecolor{GreenRed25}         {rgb} {0.20,0.80,0}
\definecolor{GreenRed30}         {rgb} {0.25,0.75,0}
\definecolor{GreenRed35}         {rgb} {0.30,0.70,0}
\definecolor{GreenRed40}         {rgb} {0.35,0.65,0}
\definecolor{GreenRed45}         {rgb} {0.40,0.60,0}
\definecolor{GreenRed50}         {rgb} {0.45,0.55,0}
\definecolor{GreenRed55}         {rgb} {0.50,0.50,0}
\definecolor{GreenRed60}         {rgb} {0.55,0.45,0}
\definecolor{GreenRed65}         {rgb} {0.60,0.40,0}
\definecolor{GreenRed70}         {rgb} {0.65,0.35,0}
\definecolor{GreenRed75}         {rgb} {0.70,0.30,0}
\definecolor{GreenRed80}         {rgb} {0.75,0.25,0}
\definecolor{GreenRed85}         {rgb} {0.80,0.20,0}
\definecolor{GreenRed90}         {rgb} {0.85,0.15,0}
\definecolor{GreenRed95}         {rgb} {0.90,0.10,0}
\definecolor{GreenRed100}        {rgb} {0.95,0.05,0}
\definecolor{RedGreen100}        {rgb} {0.05,0.95,0}
\definecolor{RedGreen95}         {rgb} {0.10,0.90,0}
\definecolor{RedGreen90}         {rgb} {0.15,0.85,0}
\definecolor{RedGreen85}         {rgb} {0.20,0.80,0}
\definecolor{RedGreen80}         {rgb} {0.25,0.75,0}
\definecolor{RedGreen75}         {rgb} {0.30,0.70,0}
\definecolor{RedGreen70}         {rgb} {0.35,0.65,0}
\definecolor{RedGreen65}         {rgb} {0.40,0.60,0}
\definecolor{RedGreen60}         {rgb} {0.45,0.55,0}
\definecolor{RedGreen55}         {rgb} {0.50,0.50,0}
\definecolor{RedGreen50}         {rgb} {0.55,0.45,0}
\definecolor{RedGreen45}         {rgb} {0.60,0.40,0}
\definecolor{RedGreen40}         {rgb} {0.65,0.35,0}
\definecolor{RedGreen35}         {rgb} {0.70,0.30,0}
\definecolor{RedGreen30}         {rgb} {0.75,0.25,0}
\definecolor{RedGreen25}         {rgb} {0.80,0.20,0}
\definecolor{RedGreen20}         {rgb} {0.85,0.15,0}
\definecolor{RedGreen15}         {rgb} {0.90,0.10,0}
\definecolor{RedGreen10}         {rgb} {0.95,0.05,0}
\definecolor{RedGreen5}          {rgb} {1,0,0}
\definecolor{ColdHot5}           {rgb} {0,0.08,1}
\definecolor{ColdHot10}          {rgb} {0,0.29,1}
\definecolor{ColdHot15}          {rgb} {0,0.49,1}
\definecolor{ColdHot20}          {rgb} {0,0.70,1}
\definecolor{ColdHot25}          {rgb} {0,0.90,1}
\definecolor{ColdHot30}          {rgb} {0,1,0.87}
\definecolor{ColdHot35}          {rgb} {0,1,0.68}
\definecolor{ColdHot40}          {rgb} {0,1,0.46}
\definecolor{ColdHot45}          {rgb} {0,1,0.25}
\definecolor{ColdHot50}          {rgb} {0,1,0.04}
\definecolor{ColdHot55}          {rgb} {0.16,1,0}
\definecolor{ColdHot60}          {rgb} {0.35,1,0}
\definecolor{ColdHot65}          {rgb} {0.56,1,0}
\definecolor{ColdHot70}          {rgb} {0.79,1,0}
\definecolor{ColdHot75}          {rgb} {0.98,1,0}
\definecolor{ColdHot80}          {rgb} {1,0.82,0}
\definecolor{ColdHot85}          {rgb} {1,0.60,0}
\definecolor{ColdHot90}          {rgb} {1,0.40,0}
\definecolor{ColdHot95}          {rgb} {1,0.20,0}
\definecolor{ColdHot100}         {rgb} {0.91,0,0}
\definecolor{HotCold100}         {rgb} {0,0.08,1}
\definecolor{HotCold95}          {rgb} {0,0.29,1}
\definecolor{HotCold90}          {rgb} {0,0.49,1}
\definecolor{HotCold85}          {rgb} {0,0.70,1}
\definecolor{HotCold80}          {rgb} {0,0.90,1}
\definecolor{HotCold75}          {rgb} {0,1,0.87}
\definecolor{HotCold70}          {rgb} {0,1,0.68}
\definecolor{HotCold65}          {rgb} {0,1,0.46}
\definecolor{HotCold60}          {rgb} {0,1,0.25}
\definecolor{HotCold55}          {rgb} {0,1,0.04}
\definecolor{HotCold50}          {rgb} {0.16,1,0}
\definecolor{HotCold45}          {rgb} {0.35,1,0}
\definecolor{HotCold40}          {rgb} {0.56,1,0}
\definecolor{HotCold35}          {rgb} {0.79,1,0}
\definecolor{HotCold30}          {rgb} {0.98,1,0}
\definecolor{HotCold25}          {rgb} {1,0.82,0}
\definecolor{HotCold20}          {rgb} {1,0.60,0}
\definecolor{HotCold15}          {rgb} {1,0.40,0}
\definecolor{HotCold10}          {rgb} {1,0.20,0}
\definecolor{HotCold5}           {rgb} {0.91,0,0}
\expandafter\def\csname BlueRed5\endcsname{[0.15,0.17,0.55]}
\expandafter\def\csname BlueRed10\endcsname{[0.20,0.23,0.57]}
\expandafter\def\csname BlueRed15\endcsname{[0.24,0.29,0.60]}
\expandafter\def\csname BlueRed20\endcsname{[0.33,0.35,0.64]}
\expandafter\def\csname BlueRed25\endcsname{[0.43,0.43,0.68]}
\expandafter\def\csname BlueRed30\endcsname{[0.52,0.52,0.73]}
\expandafter\def\csname BlueRed35\endcsname{[0.60,0.60,0.78]}
\expandafter\def\csname BlueRed40\endcsname{[0.70,0.70,0.84]}
\expandafter\def\csname BlueRed45\endcsname{[0.80,0.80,0.85]}
\expandafter\def\csname BlueRed50\endcsname{[0.86,0.82,0.82]}
\expandafter\def\csname BlueRed55\endcsname{[0.87,0.73,0.73]}
\expandafter\def\csname BlueRed60\endcsname{[0.89,0.64,0.64]}
\expandafter\def\csname BlueRed65\endcsname{[0.90,0.55,0.55]}
\expandafter\def\csname BlueRed70\endcsname{[0.91,0.47,0.46]}
\expandafter\def\csname BlueRed75\endcsname{[0.91,0.39,0.37]}
\expandafter\def\csname BlueRed80\endcsname{[0.90,0.33,0.28]}
\expandafter\def\csname BlueRed85\endcsname{[0.89,0.25,0.20]}
\expandafter\def\csname BlueRed90\endcsname{[0.88,0.23,0.14]}
\expandafter\def\csname BlueRed95\endcsname{[0.87,0.21,0.09]}
\expandafter\def\csname BlueRed100\endcsname{[0.87,0.16,0.04]}
\expandafter\def\csname RedBlue100\endcsname{[0.15,0.17,0.55]}
\expandafter\def\csname RedBlue95\endcsname{[0.15,0.17,0.55]}
\expandafter\def\csname RedBlue90\endcsname{[0.20,0.23,0.57]}
\expandafter\def\csname RedBlue85\endcsname{[0.24,0.29,0.60]}
\expandafter\def\csname RedBlue80\endcsname{[0.33,0.35,0.64]}
\expandafter\def\csname RedBlue75\endcsname{[0.43,0.43,0.68]}
\expandafter\def\csname RedBlue70\endcsname{[0.52,0.52,0.73]}
\expandafter\def\csname RedBlue65\endcsname{[0.60,0.60,0.78]}
\expandafter\def\csname RedBlue60\endcsname{[0.70,0.70,0.84]}
\expandafter\def\csname RedBlue55\endcsname{[0.80,0.80,0.85]}
\expandafter\def\csname RedBlue50\endcsname{[0.86,0.82,0.82]}
\expandafter\def\csname RedBlue45\endcsname{[0.87,0.73,0.73]}
\expandafter\def\csname RedBlue40\endcsname{[0.89,0.64,0.64]}
\expandafter\def\csname RedBlue35\endcsname{[0.90,0.55,0.55]}
\expandafter\def\csname RedBlue30\endcsname{[0.91,0.47,0.46]}
\expandafter\def\csname RedBlue25\endcsname{[0.91,0.39,0.37]}
\expandafter\def\csname RedBlue20\endcsname{[0.90,0.33,0.28]}
\expandafter\def\csname RedBlue15\endcsname{[0.89,0.25,0.20]}
\expandafter\def\csname RedBlue10\endcsname{[0.88,0.23,0.14]}
\expandafter\def\csname RedBlue5\endcsname{[0.87,0.21,0.09]}
\expandafter\def\csname GreenRed5\endcsname{[0,1,0]}
\expandafter\def\csname GreenRed10\endcsname{[0.05,0.95,0]}
\expandafter\def\csname GreenRed15\endcsname{[0.10,0.90,0]}
\expandafter\def\csname GreenRed20\endcsname{[0.15,0.85,0]}
\expandafter\def\csname GreenRed25\endcsname{[0.20,0.80,0]}
\expandafter\def\csname GreenRed30\endcsname{[0.25,0.75,0]}
\expandafter\def\csname GreenRed35\endcsname{[0.30,0.70,0]}
\expandafter\def\csname GreenRed40\endcsname{[0.35,0.65,0]}
\expandafter\def\csname GreenRed45\endcsname{[0.40,0.60,0]}
\expandafter\def\csname GreenRed50\endcsname{[0.45,0.55,0]}
\expandafter\def\csname GreenRed55\endcsname{[0.50,0.50,0]}
\expandafter\def\csname GreenRed60\endcsname{[0.55,0.45,0]}
\expandafter\def\csname GreenRed65\endcsname{[0.60,0.40,0]}
\expandafter\def\csname GreenRed70\endcsname{[0.65,0.35,0]}
\expandafter\def\csname GreenRed75\endcsname{[0.70,0.30,0]}
\expandafter\def\csname GreenRed80\endcsname{[0.75,0.25,0]}
\expandafter\def\csname GreenRed85\endcsname{[0.80,0.20,0]}
\expandafter\def\csname GreenRed90\endcsname{[0.85,0.15,0]}
\expandafter\def\csname GreenRed95\endcsname{[0.90,0.10,0]}
\expandafter\def\csname GreenRed100\endcsname{[0.95,0.05,0]}
\expandafter\def\csname RedGreen100\endcsname{[0.05,0.95,0]}
\expandafter\def\csname RedGreen95\endcsname{[0.10,0.90,0]}
\expandafter\def\csname RedGreen90\endcsname{[0.15,0.85,0]}
\expandafter\def\csname RedGreen85\endcsname{[0.20,0.80,0]}
\expandafter\def\csname RedGreen80\endcsname{[0.25,0.75,0]}
\expandafter\def\csname RedGreen75\endcsname{[0.30,0.70,0]}
\expandafter\def\csname RedGreen70\endcsname{[0.35,0.65,0]}
\expandafter\def\csname RedGreen65\endcsname{[0.40,0.60,0]}
\expandafter\def\csname RedGreen60\endcsname{[0.45,0.55,0]}
\expandafter\def\csname RedGreen55\endcsname{[0.50,0.50,0]}
\expandafter\def\csname RedGreen50\endcsname{[0.55,0.45,0]}
\expandafter\def\csname RedGreen45\endcsname{[0.60,0.40,0]}
\expandafter\def\csname RedGreen40\endcsname{[0.65,0.35,0]}
\expandafter\def\csname RedGreen35\endcsname{[0.70,0.30,0]}
\expandafter\def\csname RedGreen30\endcsname{[0.75,0.25,0]}
\expandafter\def\csname RedGreen25\endcsname{[0.80,0.20,0]}
\expandafter\def\csname RedGreen20\endcsname{[0.85,0.15,0]}
\expandafter\def\csname RedGreen15\endcsname{[0.90,0.10,0]}
\expandafter\def\csname RedGreen10\endcsname{[0.95,0.05,0]}
\expandafter\def\csname RedGreen5\endcsname{[1,0,0]}
\expandafter\def\csname ColdHot5\endcsname{[0,0.08,1]}
\expandafter\def\csname ColdHot10\endcsname{[0,0.29,1]}
\expandafter\def\csname ColdHot15\endcsname{[0,0.49,1]}
\expandafter\def\csname ColdHot20\endcsname{[0,0.70,1]}
\expandafter\def\csname ColdHot25\endcsname{[0,0.90,1]}
\expandafter\def\csname ColdHot30\endcsname{[0,1,0.87]}
\expandafter\def\csname ColdHot35\endcsname{[0,1,0.68]}
\expandafter\def\csname ColdHot40\endcsname{[0,1,0.46]}
\expandafter\def\csname ColdHot45\endcsname{[0,1,0.25]}
\expandafter\def\csname ColdHot50\endcsname{[0,1,0.04]}
\expandafter\def\csname ColdHot55\endcsname{[0.16,1,0]}
\expandafter\def\csname ColdHot60\endcsname{[0.35,1,0]}
\expandafter\def\csname ColdHot65\endcsname{[0.56,1,0]}
\expandafter\def\csname ColdHot70\endcsname{[0.79,1,0]}
\expandafter\def\csname ColdHot75\endcsname{[0.98,1,0]}
\expandafter\def\csname ColdHot80\endcsname{[1,0.82,0]}
\expandafter\def\csname ColdHot85\endcsname{[1,0.60,0]}
\expandafter\def\csname ColdHot90\endcsname{[1,0.40,0]}
\expandafter\def\csname ColdHot95\endcsname{[1,0.20,0]}
\expandafter\def\csname ColdHot100\endcsname{[0.91,0,0]}
\expandafter\def\csname HotCold100\endcsname{[0,0.08,1]}
\expandafter\def\csname HotCold95\endcsname{[0,0.29,1]}
\expandafter\def\csname HotCold90\endcsname{[0,0.49,1]}
\expandafter\def\csname HotCold85\endcsname{[0,0.70,1]}
\expandafter\def\csname HotCold80\endcsname{[0,0.90,1]}
\expandafter\def\csname HotCold75\endcsname{[0,1,0.87]}
\expandafter\def\csname HotCold70\endcsname{[0,1,0.68]}
\expandafter\def\csname HotCold65\endcsname{[0,1,0.46]}
\expandafter\def\csname HotCold60\endcsname{[0,1,0.25]}
\expandafter\def\csname HotCold55\endcsname{[0,1,0.04]}
\expandafter\def\csname HotCold50\endcsname{[0.16,1,0]}
\expandafter\def\csname HotCold45\endcsname{[0.35,1,0]}
\expandafter\def\csname HotCold40\endcsname{[0.56,1,0]}
\expandafter\def\csname HotCold35\endcsname{[0.79,1,0]}
\expandafter\def\csname HotCold30\endcsname{[0.98,1,0]}
\expandafter\def\csname HotCold25\endcsname{[1,0.82,0]}
\expandafter\def\csname HotCold20\endcsname{[1,0.60,0]}
\expandafter\def\csname HotCold15\endcsname{[1,0.40,0]}
\expandafter\def\csname HotCold10\endcsname{[1,0.20,0]}
\expandafter\def\csname HotCold5\endcsname{[0.91,0,0]}

\def\make@lower{%
\if\first@ A\xdef\first@{a}\else \if\first@ B\xdef\first@{b}\else
\if\first@ C\xdef\first@{c}\else \if\first@ D\xdef\first@{d}\else
\if\first@ E\xdef\first@{e}\else \if\first@ F\xdef\first@{f}\else
\if\first@ G\xdef\first@{g}\else \if\first@ H\xdef\first@{h}\else
\if\first@ I\xdef\first@{i}\else \if\first@ J\xdef\first@{j}\else
\if\first@ K\xdef\first@{k}\else \if\first@ L\xdef\first@{l}\else
\if\first@ M\xdef\first@{m}\else \if\first@ N\xdef\first@{n}\else
\if\first@ O\xdef\first@{o}\else \if\first@ P\xdef\first@{p}\else
\if\first@ Q\xdef\first@{q}\else \if\first@ R\xdef\first@{r}\else
\if\first@ S\xdef\first@{s}\else \if\first@ T\xdef\first@{t}\else
\if\first@ U\xdef\first@{u}\else \if\first@ V\xdef\first@{v}\else
\if\first@ W\xdef\first@{w}\else \if\first@ X\xdef\first@{x}\else
\if\first@ Y\xdef\first@{y}\else \if\first@ Z\xdef\first@{z}\else
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}

\def\make@upper{%
\if\first@ a\xdef\first@{A}\else \if\first@ b\xdef\first@{B}\else
\if\first@ c\xdef\first@{C}\else \if\first@ d\xdef\first@{D}\else
\if\first@ e\xdef\first@{E}\else \if\first@ f\xdef\first@{F}\else
\if\first@ g\xdef\first@{G}\else \if\first@ h\xdef\first@{H}\else
\if\first@ i\xdef\first@{I}\else \if\first@ j\xdef\first@{J}\else
\if\first@ k\xdef\first@{K}\else \if\first@ l\xdef\first@{L}\else
\if\first@ m\xdef\first@{M}\else \if\first@ n\xdef\first@{N}\else
\if\first@ o\xdef\first@{O}\else \if\first@ p\xdef\first@{P}\else
\if\first@ q\xdef\first@{Q}\else \if\first@ r\xdef\first@{R}\else
\if\first@ s\xdef\first@{S}\else \if\first@ t\xdef\first@{T}\else
\if\first@ u\xdef\first@{U}\else \if\first@ v\xdef\first@{V}\else
\if\first@ w\xdef\first@{W}\else \if\first@ x\xdef\first@{X}\else
\if\first@ y\xdef\first@{Y}\else \if\first@ z\xdef\first@{Z}\else
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}

\def\type@get#1 MSF: #2 Type: #3 #4@{\seqtype{#3}}
\def\inf@@get#1 #2 #3 #4 #5 #6@{%
   \def\first@{#1}
   \def\second@{#2}
   \def\third@{#3}
   \xdef\fourth@{#4 @}
   \expandafter\check@letter\fourth@
   \ifnumber
      \def\fourth@{#4}
   \else
      \xdef\fourth@{#5 @}
      \expandafter\check@letter\fourth@
      \ifnumber
         \def\fourth@{#5}
      \else
         \def\fourth@{99999999}
      \fi
   \fi
   \def\fifth@{#5}
   \def\last@{#6}}
\def\check@char#1{\letterfalse \ifnum\catcode`#1=11 \lettertrue \fi
                  \numberfalse \ifnum\catcode`#1=12 \numbertrue \fi
                  \xdef\code@num{\the\catcode`#1}
                  \xdef\char@num{`#1}}
\def\check@letter#1#2@{\letterfalse\ifnum\catcode`#1=11 \lettertrue\fi%
                       \numberfalse\ifnum\catcode`#1=12 \numbertrue\fi}
\def\seq@get#1 #2@{\def\first@{#1} \def\seq@line{#2}}
\def\res@get#1#2@{\def\first@{#1} \def\seq@line{#2&@}}
\def\tot@get#1#2@{%
   \xdef\first@{#1}
   \expandafter\xdef\csname seq\the\triple@count\endcsname{#2&@}}
\def\dis@get#1#2@{%
   \xdef\first@{#1}
   \expandafter\xdef\csname res\the\triple@count\endcsname{#1}
   \expandafter\xdef\csname seq\the\triple@count\endcsname{#2&@}}
\def\firstchar@get#1#2@{\def\first@{#1}\def\third@{#2@}}
\def\residue@get#1#2@{\xdef\first@{#1}
                      \xdef\char@num{`#1}
                      \expandafter\xdef\csname res\the\loopcount\endcsname{\first@}
                      \expandafter\xdef\csname sequence\the\loopcount\endcsname{#2@}}
\def\remove@fromseq#1@{\expandafter\xdef\csname sequence\the\loopcount\endcsname{#1}}
\def\get@temp#1@{\xdef\temp@{#1}}
\def\TC@get#1#2@{\xdef\char@num{`#1}
                 \ifnum\char@num=45 \xdef\TC@first@{*}
                 \else
                       \ifnum\char@num>57 \xdef\TC@first@{*}
                       \else
                          \xdef\TC@first@{#1}
                       \fi
                 \fi
                 \expandafter\xdef\csname TC@num\the\loopcount\endcsname{\TC@first@}
                 \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{#2@}}
\def\sublogo@get#1 @{\xdef\first@{#1}}
\def\re@write#1,#2@{%
   \xdef\third@{#2,@}
   \xdef\first@{\csname hide@@@seq#1\endcsname}
   \ifx\first@\last@
   \else
      \xdef\first@{#1&}
      \ifx\first@\ampers@nd \else \advance\innerloopcount by 1 \fi
      \if\second@ e \xdef\second@{\csname @rd#1\endcsname}
      \else \xdef\second@{\second@,\csname @rd#1\endcsname}\fi
   \fi
   }
\def\order@set#1,#2@{%
   \xdef\second@{#2,@}
      \expandafter\xdef\csname @rd#1\endcsname{\the\loopcount}
      \expandafter\xdef\csname res@count\the\loopcount\endcsname{%
                    \csname pos#1\endcsname}
      \expandafter\xdef\csname hide@seq\the\loopcount\endcsname{%
                    \csname hide@@seq#1\endcsname}
      \expandafter\xdef\csname hide@name\the\loopcount\endcsname{%
                    \csname hide@@name#1\endcsname}
      \expandafter\xdef\csname hide@number\the\loopcount\endcsname{%
                    \csname hide@@number#1\endcsname}
      \expandafter\xdef\csname seq@start\the\loopcount\endcsname{%
                    \csname seq@@start#1\endcsname}
      \expandafter\xdef\csname seq@len\the\loopcount\endcsname{%
                    \csname seq@@len#1\endcsname}
      \expandafter\xdef\csname seqname\the\loopcount\endcsname{%
                    \csname seq@name#1\endcsname}
      \expandafter\xdef\csname newseqname\the\loopcount\endcsname{%
                    \csname newseq@name#1\endcsname}
      \expandafter\xdef\csname seq@gap\the\loopcount\endcsname{%
                    \csname seq@@gap#1\endcsname}
      \expandafter\xdef\csname name@col\the\loopcount\endcsname{%
                    \csname name@@col#1\endcsname}
      \expandafter\xdef\csname number@col\the\loopcount\endcsname{%
                    \csname number@@col#1\endcsname}
      \expandafter\xdef\csname stack@reg\the\loopcount\endcsname{%
                    \csname stack@@reg#1\endcsname}
      \expandafter\xdef\csname stack@tintreg\the\loopcount\endcsname{%
                    \csname stack@@tintreg#1\endcsname}
      \expandafter\xdef\csname stack@emphreg\the\loopcount\endcsname{%
                    \csname stack@@emphreg#1\endcsname}
      \expandafter\xdef\csname stack@lowerreg\the\loopcount\endcsname{%
                    \csname stack@@lowerreg#1\endcsname}
      \expandafter\xdef\csname stack@framereg\the\loopcount\endcsname{%
                    \csname stack@@framereg#1\endcsname}
      \expandafter\xdef\csname stack@shadingreg\the\loopcount\endcsname{%
                    \csname stack@@shadingreg#1\endcsname}
      \expandafter\xdef\csname stack@top\the\loopcount\endcsname{%
                    \csname stack@@top#1\endcsname}
      \expandafter\xdef\csname stack@ttop\the\loopcount\endcsname{%
                    \csname stack@@ttop#1\endcsname}
      \expandafter\xdef\csname stack@tttop\the\loopcount\endcsname{%
                    \csname stack@@tttop#1\endcsname}
      \expandafter\xdef\csname stack@ttttop\the\loopcount\endcsname{%
                    \csname stack@@ttttop#1\endcsname}
      \expandafter\xdef\csname stack@bottom\the\loopcount\endcsname{%
                    \csname stack@@bottom#1\endcsname}
      \expandafter\xdef\csname stack@bbottom\the\loopcount\endcsname{%
                    \csname stack@@bbottom#1\endcsname}
      \expandafter\xdef\csname stack@bbbottom\the\loopcount\endcsname{%
                    \csname stack@@bbbottom#1\endcsname}
      \expandafter\xdef\csname stack@bbbbottom\the\loopcount\endcsname{%
                    \csname stack@@bbbbottom#1\endcsname}
}
\def\reorder@seqs#1{%
   \loopcount=0
   \loop
      \advance\loopcount by 1
         \expandafter\xdef\csname pos\the\loopcount\endcsname{%
                 \csname res@count\the\loopcount\endcsname}
         \expandafter\xdef\csname hide@@seq\the\loopcount\endcsname{%
            \csname hide@seq\the\loopcount\endcsname}
         \expandafter\xdef\csname hide@@name\the\loopcount\endcsname{%
            \csname hide@name\the\loopcount\endcsname}
         \expandafter\xdef\csname hide@@number\the\loopcount\endcsname{%
            \csname hide@number\the\loopcount\endcsname}
         \expandafter\xdef\csname seq@@start\the\loopcount\endcsname{%
            \csname seq@start\the\loopcount\endcsname}
         \expandafter\xdef\csname seq@@len\the\loopcount\endcsname{%
            \csname seq@len\the\loopcount\endcsname}
         \expandafter\xdef\csname seq@name\the\loopcount\endcsname{%
            \csname seqname\the\loopcount\endcsname}
         \expandafter\xdef\csname newseq@name\the\loopcount\endcsname{%
            \csname newseqname\the\loopcount\endcsname}
         \expandafter\xdef\csname seq@@gap\the\loopcount\endcsname{%
            \csname seq@gap\the\loopcount\endcsname}
         \expandafter\xdef\csname name@@col\the\loopcount\endcsname{%
            \csname name@col\the\loopcount\endcsname}
         \expandafter\xdef\csname number@@col\the\loopcount\endcsname{%
            \csname number@col\the\loopcount\endcsname}
         \expandafter\xdef\csname stack@@reg\the\loopcount\endcsname{%
            \csname stack@reg\the\loopcount\endcsname}
         \expandafter\xdef\csname stack@@tintreg\the\loopcount\endcsname{%
            \csname stack@tintreg\the\loopcount\endcsname}
         \expandafter\xdef\csname stack@@emphreg\the\loopcount\endcsname{%
            \csname stack@emphreg\the\loopcount\endcsname}
         \expandafter\xdef\csname stack@@lowerreg\the\loopcount\endcsname{%
            \csname stack@lowerreg\the\loopcount\endcsname}
         \expandafter\xdef\csname stack@@framereg\the\loopcount\endcsname{%
            \csname stack@framereg\the\loopcount\endcsname}
         \expandafter\xdef\csname stack@@shadingreg\the\loopcount\endcsname{%
            \csname stack@shadingreg\the\loopcount\endcsname}
         \expandafter\xdef\csname stack@@top\the\loopcount\endcsname{%
            \csname stack@top\the\loopcount\endcsname}
         \expandafter\xdef\csname stack@@ttop\the\loopcount\endcsname{%
            \csname stack@ttop\the\loopcount\endcsname}
         \expandafter\xdef\csname stack@@tttop\the\loopcount\endcsname{%
            \csname stack@tttop\the\loopcount\endcsname}
         \expandafter\xdef\csname stack@@ttttop\the\loopcount\endcsname{%
            \csname stack@ttttop\the\loopcount\endcsname}
         \expandafter\xdef\csname stack@@bottom\the\loopcount\endcsname{%
            \csname stack@bottom\the\loopcount\endcsname}
         \expandafter\xdef\csname stack@@bbottom\the\loopcount\endcsname{%
            \csname stack@bbottom\the\loopcount\endcsname}
         \expandafter\xdef\csname stack@@bbbottom\the\loopcount\endcsname{%
            \csname stack@bbbottom\the\loopcount\endcsname}
         \expandafter\xdef\csname stack@@bbbbottom\the\loopcount\endcsname{%
            \csname stack@bbbbottom\the\loopcount\endcsname}
   \ifnum\loopcount<\killseq@count \repeat
   \xdef\third@{#1}
   \loopcount=0 \innerloopcount=0 \xdef\last@{kill} \xdef\second@{e}
   \loop
      \advance\loopcount by 1
      \expandafter\re@write\third@
   \ifnum\loopcount<\seq@count \repeat
   \ifnum\innerloopcount<\killseq@count
       \@latex@error{Not enough sequences specified in `orderseqs'
       (\the\innerloopcount/\the\killseq@count)}\@ehc
   \fi
   \loopcount=0 \xdef\second@{\second@,@}
   \loop
      \advance\loopcount by 1
      \expandafter\order@set\second@
   \ifnum\loopcount<\killseq@count \repeat
   \ifnum\cons@num>0 \xdef\cons@num{\csname @rd\cons@num\endcsname} \fi
   \ifnum\rule@num>0 \xdef\rule@num{\csname @rd\rule@num\endcsname} \fi
   \ifnum\divref@>0  \xdef\divref@{\csname @rd\divref@\endcsname} \fi
   \loopcount=0
   \loop
      \advance\loopcount by 1
      \expandafter\xdef\csname pos\the\loopcount\endcsname{0}
   \ifnum\loopcount<\killseq@count \repeat
}
\def\group@get#1,#2@{%
   \def\group@set{\expandafter\residue@get\second@
                 \ifnum\char@num>96 \make@upper \fi
                 \ifx\first@\ampers@nd
                 \else \expandafter\xdef\csname \prfx grp\first@\endcsname{\the\loopcount}
                 \xdef\second@{\csname sequence\the\loopcount\endcsname} \group@set
                 \fi}
   \xdef\second@{#1 &@} \xdef\third@{#2&,@} \group@set}
\def\get@item#1,#2@{\xdef\first@{#2@}\xdef\first@@{#2}\xdef\fourth@{#1}}
\def\get@first@@#1-#2@{\xdef\first@@{#1}}
\def\get@digit#1,#2@{%
   \def\check@series##1-##2##3@{%
                    \xdef\first@@{##2}\xdef\fourth@{##1}\xdef\fourth@@{##3}}
   \xdef\first@{#2@}
   \xdef\fourth@{#1-&@}
   \expandafter\check@series\fourth@
   \ifx\first@@\ampers@nd
   \else
      \xdef\first@@{\first@@\fourth@@-&@}
      \expandafter\get@first@@\first@@
      \loopcount=\fourth@
      \ifnum\first@@>\fourth@
         \advance\loopcount by 1
         \xdef\first@{\the\loopcount-\first@@,#2@}
      \else
         \ifnum\first@@<\fourth@
            \advance\loopcount by -1
            \xdef\first@{\the\loopcount-\first@@,#2@}
         \fi
      \fi
   \fi
}
\def\donot@shade{%
   \expandafter\check@letter\first@
   \ifletter
      \expandafter\get@item\first@
      \xdef\first@{\fourth@}
      \get@name@number
      \xdef\third@{\csname hide@seq\first@\endcsname} \xdef\second@{kill}
      \ifx\third@\second@
      \else
         \expandafter\xdef\csname hide@seq\first@\endcsname{noshade}
      \fi
      \xdef\first@{\first@@ @}
      \donot@shade
   \else
      \expandafter\get@digit\first@
      \ifx\fourth@\ampers@nd
      \else
         \xdef\third@{\csname hide@seq\fourth@\endcsname} \xdef\second@{kill}
         \ifx\third@\second@
         \else
            \expandafter\xdef\csname hide@seq\fourth@\endcsname{noshade}
         \fi
        \donot@shade
      \fi
   \fi}
\def\clear@res@nums#1{%
   \temp@count=65
   \loop
      \xdef\first@@{\csname ch@r@\the\temp@count\endcsname}
      \expandafter\xdef\csname res@num\first@@ #1\endcsname{0}
      \advance\temp@count by 1
   \ifnum\temp@count>90\else\repeat
   \expandafter\xdef\csname res@num\d@t #1\endcsname{0}
   \expandafter\xdef\csname res@num\questi@n #1\endcsname{0}
}
\def\setsubfamily@{%
   \expandafter\check@letter\first@
   \ifletter
      \expandafter\get@item\first@
      \xdef\first@{\fourth@}
      \get@name@number
      \advance\res@count by 1
      \expandafter\xdef\csname subfamily@num\first@\endcsname{\subfamily@count}
      \xdef\first@{\first@@ @}
      \setsubfamily@
   \else
      \expandafter\get@digit\first@
      \ifx\fourth@\ampers@nd
      \else
         \advance\res@count by 1
         \expandafter\xdef\csname subfamily@num\fourth@\endcsname{\subfamily@count}
         \setsubfamily@
      \fi
   \fi
}
\def\hideseq@{%
   \expandafter\check@letter\first@
   \ifletter
      \expandafter\get@item\first@
      \xdef\first@{\fourth@}
      \get@name@number
      \xdef\third@{\csname hide@seq\first@\endcsname} \xdef\second@{kill}
      \ifx\third@\second@
      \else
         \expandafter\xdef\csname hide@seq\first@\endcsname{true}
      \fi
      \xdef\first@{\first@@ @}
      \hideseq@
   \else
      \expandafter\get@digit\first@
      \ifx\fourth@\ampers@nd
      \else
         \xdef\third@{\csname hide@seq\fourth@\endcsname} \xdef\second@{kill}
         \ifx\third@\second@
         \else
            \expandafter\xdef\csname hide@seq\fourth@\endcsname{true}
         \fi
        \hideseq@
      \fi
   \fi}
\def\hidename@{%
   \expandafter\check@letter\first@
   \ifletter
      \expandafter\get@item\first@
      \xdef\first@{\fourth@}
      \get@name@number
      \expandafter\xdef\csname hide@name\first@\endcsname{yes}
      \xdef\first@{\first@@ @}
      \hidename@
   \else
      \expandafter\get@digit\first@
      \ifx\fourth@\ampers@nd
      \else
         \expandafter\xdef\csname hide@name\fourth@\endcsname{yes}
         \hidename@
      \fi
   \fi}
\def\hidenumber@{%
   \expandafter\check@letter\first@
   \ifletter
      \expandafter\get@item\first@
      \xdef\first@{\fourth@}
      \get@name@number
      \expandafter\xdef\csname hide@number\first@\endcsname{yes}
      \xdef\first@{\first@@ @}
      \hidenumber@
   \else
      \expandafter\get@digit\first@
      \ifx\fourth@\ampers@nd
      \else
         \expandafter\xdef\csname hide@number\fourth@\endcsname{yes}
         \hidenumber@
      \fi
   \fi}
\def\namecolor@{%
   \expandafter\check@letter\first@
   \ifletter
      \expandafter\get@item\first@
      \xdef\first@{\fourth@}
      \get@name@number
      \expandafter\xdef\csname name@col\first@\endcsname{\third@}
      \xdef\first@{\first@@ @}
      \namecolor@
   \else
      \expandafter\get@digit\first@
      \ifx\fourth@\ampers@nd
      \else
         \expandafter\xdef\csname name@col\fourth@\endcsname{\third@}
         \namecolor@
      \fi
   \fi}
\def\numbercolor@{%
   \expandafter\check@letter\first@
   \ifletter
      \expandafter\get@item\first@
      \xdef\first@{\fourth@}
      \get@name@number
      \expandafter\xdef\csname number@col\first@\endcsname{\third@}
      \xdef\first@{\first@@ @}
      \numbercolor@
   \else
      \expandafter\get@digit\first@
      \ifx\fourth@\ampers@nd
      \else
         \expandafter\xdef\csname number@col\fourth@\endcsname{\third@}
         \numbercolor@
      \fi
   \fi}
\def\killseq@{%
   \expandafter\check@letter\first@
   \ifletter
      \expandafter\get@item\first@
      \xdef\first@{\fourth@}
      \get@name@number
      \ifnum\first@>\seq@count
      \else
      \ifnum\killseq@count>1
         \xdef\third@{\csname hide@seq\first@\endcsname} \xdef\second@{kill}
         \ifx\third@\second@
         \else
            \expandafter\xdef\csname hide@seq\first@\endcsname{kill}
            \expandafter\xdef\csname hide@@@seq\first@\endcsname{kill}
            \ifnum\first@=\cons@num \xdef\cons@num{0} \fi
            \advance\killseq@count by -1
            \seq@percent=100 \divide\seq@percent by \killseq@count
         \fi
      \fi\fi
      \xdef\first@{\first@@ @}
      \killseq@
   \else
      \expandafter\get@digit\first@
      \ifx\fourth@\ampers@nd
      \else
      \ifnum\fourth@>\seq@count
      \else
      \ifnum\killseq@count>1
         \xdef\third@{\csname hide@seq\fourth@\endcsname} \xdef\second@{kill}
         \ifx\third@\second@
         \else
            \expandafter\xdef\csname hide@seq\fourth@\endcsname{kill}
            \expandafter\xdef\csname hide@@@seq\fourth@\endcsname{kill}
            \ifnum\fourth@=\cons@num \xdef\cons@num{0} \fi
            \advance\killseq@count by -1
            \seq@percent=100 \divide\seq@percent by \killseq@count
         \fi
      \fi\fi
      \killseq@
      \fi
   \fi}
\def\kill@loop{%
   \advance\innerloopcount by 1
   \xdef\first@{\csname hide@seq\the\innerloopcount\endcsname}
   \ifx\first@\second@ \kill@loop \fi}
\def\kill@seqnow{%
   \xdef\first@{\csname hide@seq\the\loopcount\endcsname} \xdef\second@{kill}
   \innerloopcount=\loopcount
   \ifx\first@\second@
      \kill@loop
      \expandafter\xdef\csname hide@seq\the\loopcount\endcsname{%
            \csname hide@seq\the\innerloopcount\endcsname}
      \expandafter\xdef\csname seqname\the\loopcount\endcsname{%
            \csname seqname\the\innerloopcount\endcsname}
      \expandafter\xdef\csname newseqname\the\loopcount\endcsname{%
            \csname newseqname\the\innerloopcount\endcsname}
      \expandafter\xdef\csname seq@gap\the\loopcount\endcsname{%
            \csname seq@gap\the\innerloopcount\endcsname}
      \expandafter\xdef\csname stack@reg\the\loopcount\endcsname{%
            \csname stack@reg\the\innerloopcount\endcsname}
      \expandafter\xdef\csname stack@tintreg\the\loopcount\endcsname{%
            \csname stack@tintreg\the\innerloopcount\endcsname}
      \expandafter\xdef\csname stack@emphreg\the\loopcount\endcsname{%
            \csname stack@emphreg\the\innerloopcount\endcsname}
      \expandafter\xdef\csname stack@lowerreg\the\loopcount\endcsname{%
            \csname stack@lowerreg\the\innerloopcount\endcsname}
      \expandafter\xdef\csname stack@framereg\the\loopcount\endcsname{%
            \csname stack@framereg\the\innerloopcount\endcsname}
      \expandafter\xdef\csname stack@shadingreg\the\loopcount\endcsname{%
            \csname stack@shadingreg\the\innerloopcount\endcsname}
      \expandafter\xdef\csname stack@top\the\loopcount\endcsname{%
            \csname stack@top\the\innerloopcount\endcsname}
      \expandafter\xdef\csname stack@ttop\the\loopcount\endcsname{%
            \csname stack@ttop\the\innerloopcount\endcsname}
      \expandafter\xdef\csname stack@tttop\the\loopcount\endcsname{%
            \csname stack@tttop\the\innerloopcount\endcsname}
      \expandafter\xdef\csname stack@ttttop\the\loopcount\endcsname{%
            \csname stack@ttttop\the\innerloopcount\endcsname}
      \expandafter\xdef\csname stack@bottom\the\loopcount\endcsname{%
            \csname stack@bottom\the\innerloopcount\endcsname}
      \expandafter\xdef\csname stack@bbottom\the\loopcount\endcsname{%
            \csname stack@bbottom\the\innerloopcount\endcsname}
      \expandafter\xdef\csname stack@bbbottom\the\loopcount\endcsname{%
            \csname stack@bbbottom\the\innerloopcount\endcsname}
      \expandafter\xdef\csname stack@bbbbottom\the\loopcount\endcsname{%
            \csname stack@bbbbottom\the\innerloopcount\endcsname}
      \expandafter\xdef\csname res@count\the\loopcount\endcsname{%
            \csname res@count\the\innerloopcount\endcsname}
      \expandafter\xdef\csname hide@seq\the\innerloopcount\endcsname{kill}
      \ifnum\loopcount=\rule@num \hideruler \fi
   \fi
   \expandafter\xdef\csname @rd\the\innerloopcount\endcsname{\the\loopcount}
   \advance\loopcount by 1
   \ifnum\loopcount>\killseq@count
      \ifnum\rule@num>0\xdef\rule@num{\csname @rd\rule@num\endcsname}\fi
      \ifnum\cons@num>0\xdef\cons@num{\csname @rd\cons@num\endcsname}\fi
   \else
      \kill@seqnow
   \fi}
\def\get@sim#1#2@{\xdef\sim@char{#1} \xdef\last@{#2 &@}}
\def\getsim@char{%
   \advance\innerloopcount by 1
   \ifnum\innerloopcount>\m@x
   \else
      \expandafter\get@sim\last@
      \ifx\second@\sim@char \xdef\third@{2} \innerloopcount=\m@x \fi
      \getsim@char
   \fi}
\def\get@count(#1)#2@{\xdef\last@{#2 &@} \xdef\m@x{#1}}
\def\get@nums#1..#2@{\xdef\first@{#1} \xdef\second@{#2}}
\def\func@shading#1{%
   \clearfuncgroups
   \xdef\temp@{#1}
   \xdef\second@{charge}
   \ifx\temp@\second@
      \ifgerm@n
      \funcgroup{sauer ($-$)}{DE}{White}{Red}{upper}{up}
      \funcgroup{basisch ($+$)}{KRH}{White}{Blue}{upper}{up}
      \else
      \ifsp@nish
      \funcgroup{\'acido ($-$)}{DE}{White}{Red}{upper}{up}
      \funcgroup{b\'asico ($+$)}{KRH}{White}{Blue}{upper}{up}
      \else
      \funcgroup{acidic ($-$)}{DE}{White}{Red}{upper}{up}
      \funcgroup{basic ($+$)}{KRH}{White}{Blue}{upper}{up}
      \fi
      \fi
   \else
   \xdef\second@{hydropathy}
   \ifx\temp@\second@
      \ifgerm@n
      \funcgroup{sauer ($-$)}{DE}{White}{Red}{upper}{up}
      \funcgroup{basisch ($+$)}{KRH}{White}{Blue}{upper}{up}
      \funcgroup{polar ungeladen}{YSTGNQC}{Black}{Yellow}{upper}{up}
      \funcgroup{hydrophob unpolar}{AFPMWVIL}{White}{Green}{upper}{up}
      \else
      \ifsp@nish
      \funcgroup{\'acido ($-$)}{DE}{White}{Red}{upper}{up}
      \funcgroup{b\'asico ($+$)}{KRH}{White}{Blue}{upper}{up}
      \funcgroup{polar sin carga}{YSTGNQC}{Black}{Yellow}{upper}{up}
      \funcgroup{hidrof\'obico no polar}{AFPMWVIL}{White}{Green}{upper}{up}
      \else
      \funcgroup{acidic ($-$)}{DE}{White}{Red}{upper}{up}
      \funcgroup{basic ($+$)}{KRH}{White}{Blue}{upper}{up}
      \funcgroup{polar uncharged}{YSTGNQC}{Black}{Yellow}{upper}{up}
      \funcgroup{hydrophobic nonpolar}{AFPMWVIL}{White}{Green}{upper}{up}
      \fi
      \fi
   \else
   \xdef\second@{chemical}
   \ifx\temp@\second@
      \ifgerm@n
      \funcgroup{sauer ($-$)}{DE}{White}{Red}{upper}{up}
      \funcgroup{aliphatisch}{AGVIL}{White}{Black}{upper}{up}
      \funcgroup{aliphatisch (klein)}{AG}{White}{Gray}{upper}{up}
      \funcgroup{Amid}{NQ}{White}{Green}{upper}{up}
      \funcgroup{aromatisch}{FYW}{White}{Brown}{upper}{up}
      \funcgroup{basisch (+)}{KRH}{White}{Blue}{upper}{up}
      \funcgroup{Hydroxyl}{ST}{Black}{Magenta}{upper}{up}
      \funcgroup{Imin}{P}{Black}{Orange}{upper}{up}
      \funcgroup{Schwefel}{CM}{Black}{Yellow}{upper}{up}
      \else
      \ifsp@nish
      \funcgroup{\'acido ($-$)}{DE}{White}{Red}{upper}{up}
      \funcgroup{alif\'atico}{AGVIL}{White}{Black}{upper}{up}
      \funcgroup{alif\'atico (parvo)}{AG}{White}{Gray}{upper}{up}
      \funcgroup{amida}{NQ}{White}{Green}{upper}{up}
      \funcgroup{arom\'atico}{FYW}{White}{Brown}{upper}{up}
      \funcgroup{b\'asico ($+$)}{KRH}{White}{Blue}{upper}{up}
      \funcgroup{hidr\'oxido}{ST}{Black}{Magenta}{upper}{up}
      \funcgroup{imino}{P}{Black}{Orange}{upper}{up}
      \funcgroup{azufre}{CM}{Black}{Yellow}{upper}{up}
      \else
      \funcgroup{acidic ($-$)}{DE}{White}{Red}{upper}{up}
      \funcgroup{aliphatic}{AGVIL}{White}{Black}{upper}{up}
      \funcgroup{aliphatic (small)}{AG}{White}{Gray}{upper}{up}
      \funcgroup{amide}{NQ}{White}{Green}{upper}{up}
      \funcgroup{aromatic}{FYW}{White}{Brown}{upper}{up}
      \funcgroup{basic ($+$)}{KRH}{White}{Blue}{upper}{up}
      \funcgroup{hydroxyl}{ST}{Black}{Magenta}{upper}{up}
      \funcgroup{imino}{P}{Black}{Orange}{upper}{up}
      \funcgroup{sulfur}{CM}{Black}{Yellow}{upper}{up}
      \fi
      \fi
   \else
   \xdef\second@{structure}
   \ifx\temp@\second@
      \ifgerm@n
      \funcgroup{extern}{DEHKNQR}{Black}{Orange}{upper}{up}
      \funcgroup{ambivalent}{ACGPSTWY}{Black}{Yellow}{upper}{up}
      \funcgroup{intern}{FILMV}{White}{Green}{upper}{up}
      \else
      \ifsp@nish
      \funcgroup{externo}{DEHKNQR}{Black}{Orange}{upper}{up}
      \funcgroup{ambivalente}{ACGPSTWY}{Black}{Yellow}{upper}{up}
      \funcgroup{interno}{FILMV}{White}{Green}{upper}{up}
      \else
      \funcgroup{external}{DEHKNQR}{Black}{Orange}{upper}{up}
      \funcgroup{ambivalent}{ACGPSTWY}{Black}{Yellow}{upper}{up}
      \funcgroup{internal}{FILMV}{White}{Green}{upper}{up}
      \fi
      \fi
   \else
   \xdef\second@{standard area}
   \ifx\temp@\second@
      \ifgerm@n
      \funcgroup{\ 88,1 (G); Standard Seitenkettenfl\"ache %
                             (\AA$^2$)}%
                {G}{Black}{BrickRed}{upper}{up}
      \funcgroup{118,2 (A); 129,8 (S)}{AS}{Black}{Orange}{upper}{up}
      \funcgroup{146,1 (C); 146,8 (P)}%
                {CP}{Black}{Yellow}{upper}{up}
      \funcgroup{152,5 (T); 158,7 (D); 164,5 (V); 165,5 (N)}%
                {TDVN}{Black}{YellowGreen}{upper}{up}
      \funcgroup{181,0 (I); 186,2 (E)}{IE}{White}{PineGreen}{upper}{up}
      \funcgroup{193,1 (L); 193,2 (Q); 202,5 (H); 203,3 (M)}%
                {LQHM}{Black}{SkyBlue}{upper}{up}
      \funcgroup{222,8 (F); 225,8 (K)}{FK}{White}{RoyalPurple}{upper}{up}
      \funcgroup{238,8 (Y)}{Y}{White}{RedViolet}{upper}{up}
      \funcgroup{256,0 (R); 266,2 (W)}{RW}{White}{Black}{upper}{up}
      \else
      \ifsp@nish
      \funcgroup{\ 88.1 (G); Superficie est\'andar de la cadena lateral (\AA$^2$)}%
                {G}{Black}{BrickRed}{upper}{up}
      \funcgroup{118.2 (A); 129.8 (S)}{AS}{Black}{Orange}{upper}{up}
      \funcgroup{146.1 (C); 146.8 (P)}%
                {CP}{Black}{Yellow}{upper}{up}
      \funcgroup{152.5 (T); 158.7 (D); 164.5 (V); 165.5 (N)}%
                {TDVN}{Black}{YellowGreen}{upper}{up}
      \funcgroup{181.0 (I); 186.2 (E)}{IE}{White}{PineGreen}{upper}{up}
      \funcgroup{193.1 (L); 193.2 (Q); 202.5 (H); 203.3 (M)}%
                {LQHM}{Black}{SkyBlue}{upper}{up}
      \funcgroup{222.8 (F); 225.8 (K)}{FK}{White}{RoyalPurple}{upper}{up}
      \funcgroup{238.8 (Y)}{Y}{White}{RedViolet}{upper}{up}
      \funcgroup{256.0 (R); 266.2 (W)}{RW}{White}{Black}{upper}{up}
      \else
      \funcgroup{\ 88.1 (G); Standard sidechain area (\AA$^2$)}%
                {G}{Black}{BrickRed}{upper}{up}
      \funcgroup{118.2 (A); 129.8 (S)}{AS}{Black}{Orange}{upper}{up}
      \funcgroup{146.1 (C); 146.8 (P)}%
                {CP}{Black}{Yellow}{upper}{up}
      \funcgroup{152.5 (T); 158.7 (D); 164.5 (V); 165.5 (N)}%
                {TDVN}{Black}{YellowGreen}{upper}{up}
      \funcgroup{181.0 (I); 186.2 (E)}{IE}{White}{PineGreen}{upper}{up}
      \funcgroup{193.1 (L); 193.2 (Q); 202.5 (H); 203.3 (M)}%
                {LQHM}{Black}{SkyBlue}{upper}{up}
      \funcgroup{222.8 (F); 225.8 (K)}{FK}{White}{RoyalPurple}{upper}{up}
      \funcgroup{238.8 (Y)}{Y}{White}{RedViolet}{upper}{up}
      \funcgroup{256.0 (R); 266.2 (W)}{RW}{White}{Black}{upper}{up}
      \fi
      \fi
   \else
   \xdef\second@{accessible area}
   \ifx\temp@\second@
      \ifgerm@n
      \funcgroup{\ 13,9 (C); Zug\"angliche Seitenkettenfl\"ache %
                            (\AA$^2$)}%
                {CIV}{Black}{BrickRed}{upper}{up}
      \funcgroup{\ 23,0 (I); 23,5 (V); 25,2 (G)}%
                {IVG}{Black}{Orange}{upper}{up}
      \funcgroup{\ 28,7 (F); 29,0 (L); 30,5 (M); 31,5 (A)}%
                {FLMA}{Black}{Yellow}{upper}{up}
      \funcgroup{\ 41,7 (W); 44,2 (S); 46,0 (T); 46,7 (H)}%
                {WSTH}{Black}{YellowGreen}{upper}{up}
      \funcgroup{\ 53,7 (P)}{P}{White}{PineGreen}{upper}{up}
      \funcgroup{\ 59,1 (Y); 60,9 (D); 62,2 (N)}%
                {YDN}{Black}{SkyBlue}{upper}{up}
      \funcgroup{\ 72,3 (E); 74,0 (Q)}{EQ}{White}{RoyalPurple}{upper}{up}
      \funcgroup{\ 93,8 (R)}{R}{White}{RedViolet}{upper}{up}
      \funcgroup{110,3 (K)}{K}{White}{Black}{upper}{up}
      \else
      \ifsp@nish
      \funcgroup{\ 13.9 (C); Superficie accesible de la cadena lateral (\AA$^2$)}%
                {CIV}{Black}{BrickRed}{upper}{up}
      \funcgroup{\ 23.0 (I); 23.5 (V); 25.2 (G)}%
                {IVG}{Black}{Orange}{upper}{up}
      \funcgroup{\ 28.7 (F); 29.0 (L); 30.5 (M); 31.5 (A)}%
                {FLMA}{Black}{Yellow}{upper}{up}
      \funcgroup{\ 41.7 (W); 44.2 (S); 46.0 (T); 46.7 (H)}%
                {WSTH}{Black}{YellowGreen}{upper}{up}
      \funcgroup{\ 53.7 (P)}{P}{White}{PineGreen}{upper}{up}
      \funcgroup{\ 59.1 (Y); 60.9 (D); 62.2 (N)}%
                {YDN}{Black}{SkyBlue}{upper}{up}
      \funcgroup{\ 72.3 (E); 74.0 (Q)}{EQ}{White}{RoyalPurple}{upper}{up}
      \funcgroup{\ 93.8 (R)}{R}{White}{RedViolet}{upper}{up}
      \funcgroup{110.3 (K)}{K}{White}{Black}{upper}{up}
      \else
      \funcgroup{\ 13.9 (C); Accessible sidechain area (\AA$^2$)}%
                {CIV}{Black}{BrickRed}{upper}{up}
      \funcgroup{\ 23.0 (I); 23.5 (V); 25.2 (G)}%
                {IVG}{Black}{Orange}{upper}{up}
      \funcgroup{\ 28.7 (F); 29.0 (L); 30.5 (M); 31.5 (A)}%
                {FLMA}{Black}{Yellow}{upper}{up}
      \funcgroup{\ 41.7 (W); 44.2 (S); 46.0 (T); 46.7 (H)}%
                {WSTH}{Black}{YellowGreen}{upper}{up}
      \funcgroup{\ 53.7 (P)}{P}{White}{PineGreen}{upper}{up}
      \funcgroup{\ 59.1 (Y); 60.9 (D); 62.2 (N)}%
                {YDN}{Black}{SkyBlue}{upper}{up}
      \funcgroup{\ 72.3 (E); 74.0 (Q)}{EQ}{White}{RoyalPurple}{upper}{up}
      \funcgroup{\ 93.8 (R)}{R}{White}{RedViolet}{upper}{up}
      \funcgroup{110.3 (K)}{K}{White}{Black}{upper}{up}
      \fi
      \fi
   \else
   \xdef\second@{rasmol}
   \ifx\temp@\second@
      \funcgroup{Asp, Glu}{DE}{Red}{White}{upper}{up}
      \funcgroup{Arg, Lys, His}{KRH}{Blue}{White}{upper}{up}
      \funcgroup{Phe, Tyr, Trp}{FYW}{MidnightBlue}{White}{upper}{up}
      \funcgroup{Ala, Gly}{AG}{Gray}{White}{upper}{up}
      \funcgroup{Cys, Met}{CM}{Yellow}{White}{upper}{up}
      \funcgroup{Ser, Thr}{ST}{Orange}{White}{upper}{up}
      \funcgroup{Asn, Gln}{NQ}{Cyan}{White}{upper}{up}
      \funcgroup{Leu, Val, Ile}{LVI}{Green}{White}{upper}{up}
      \funcgroup{Pro}{P}{Apricot}{White}{upper}{up}
   \else
   \message{<Unknown shading mode - clearing `funcgroups'>}
   \fi\fi\fi\fi\fi\fi\fi
}
\def\shadeallresidues{\all@fshadetrue}
\def\get@fromstack#1;#2;#3;#4;#5@{%
   \xdef\first@{#1} \xdef\second@{#2}
   \xdef\third@{#3} \xdef\fourth@{#4} \xdef\last@{#5@}
}
\def\getregion@fromstack#1{%
   \xdef\temp@{#1}
   \xdef\first@{\csname stack@reg\temp@\endcsname}
   \expandafter\get@fromstack\first@
   \expandafter\xdef\csname style\temp@\endcsname{\first@}
   \expandafter\xdef\csname start\temp@\endcsname{\second@}
   \expandafter\xdef\csname stop\temp@\endcsname{\third@}
   \expandafter\xdef\csname all\temp@\endcsname{\fourth@}
   \expandafter\xdef\csname stack@reg\temp@\endcsname{\last@}
}
\def\sort@stack{%
   \expandafter\get@fromstack\last@
   \ifx\first@\ampers@nd
      \xdef\tmpstack{\tmpstack\the\loopcount;\st@rt;\st@p;\@ll;&;&;&;&;@}
   \else
   \ifnum\st@rt<\second@
      \xdef\tmpstack{\tmpstack\the\loopcount;\st@rt;\st@p;\@ll;%
                     \first@;\second@;\third@;\fourth@;\last@}
   \else
      \xdef\tmpstack{\tmpstack\first@;\second@;\third@;\fourth@;}
      \sort@stack
   \fi\fi
}
\def\get@regions#1..#2,#3@{%
   \xdef\st@rt{#1} \xdef\st@p{#2} \xdef\list@{#3}
   \xdef\last@{\csname stack@reg\seq@\endcsname}
   \xdef\tmpstack{}
   \sort@stack
   \expandafter\xdef\csname stack@reg\seq@\endcsname{\tmpstack}
}
\def\get@fromemphstack#1;#2;#3;#4@{%
   \xdef\first@{#1} \xdef\second@{#2}
   \xdef\third@{#3} \xdef\last@{#4@}
}
\def\getregion@fromemphstack#1{%
   \xdef\temp@{#1}
   \xdef\first@{\csname stack@emphreg\temp@\endcsname}
   \expandafter\get@fromemphstack\first@
   \expandafter\xdef\csname emphstart\temp@\endcsname{\first@}
   \expandafter\xdef\csname emphstop\temp@\endcsname{\second@}
   \expandafter\xdef\csname emphall\temp@\endcsname{\third@}
   \expandafter\xdef\csname stack@emphreg\temp@\endcsname{\last@}
}
\def\sort@emphstack{%
   \expandafter\get@fromemphstack\last@
   \ifx\first@\ampers@nd
      \xdef\tmpstack{\tmpstack\st@rt;\st@p;\@ll;&;&;&;@}
   \else
   \ifnum\st@rt<\second@
      \xdef\tmpstack{\tmpstack\st@rt;\st@p;\@ll;\first@;\second@;\third@;\last@}
   \else
      \xdef\tmpstack{\tmpstack\first@;\second@;\third@;} \sort@emphstack
   \fi\fi
}
\def\get@emphregions#1..#2,#3@{%
   \regionalemphtrue
   \xdef\st@rt{#1} \xdef\st@p{#2} \xdef\list@{#3}
   \xdef\last@{\csname stack@emphreg\seq@\endcsname}
   \xdef\tmpstack{}
   \sort@emphstack
   \expandafter\xdef\csname stack@emphreg\seq@\endcsname{\tmpstack}
}
\def\getregion@fromlowerstack#1{%
   \xdef\temp@{#1}
   \xdef\first@{\csname stack@lowerreg\temp@\endcsname}
   \expandafter\get@fromemphstack\first@
   \expandafter\xdef\csname lowerstart\temp@\endcsname{\first@}
   \expandafter\xdef\csname lowerstop\temp@\endcsname{\second@}
   \expandafter\xdef\csname lowerall\temp@\endcsname{\third@}
   \expandafter\xdef\csname stack@lowerreg\temp@\endcsname{\last@}
}
\def\sort@lowerstack{%
   \expandafter\get@fromemphstack\last@
   \ifx\first@\ampers@nd
      \xdef\tmpstack{\tmpstack\st@rt;\st@p;\@ll;&;&;&;@}
   \else
   \ifnum\st@rt<\second@
      \xdef\tmpstack{\tmpstack\st@rt;\st@p;\@ll;\first@;\second@;\third@;\last@}
   \else
      \xdef\tmpstack{\tmpstack\first@;\second@;\third@;} \sort@lowerstack
   \fi\fi
}
\def\get@lowerregions#1..#2,#3@{%
   \regionallowertrue
   \xdef\st@rt{#1} \xdef\st@p{#2} \xdef\list@{#3}
   \xdef\last@{\csname stack@lowerreg\seq@\endcsname}
   \xdef\tmpstack{}
   \sort@lowerstack
   \expandafter\xdef\csname stack@lowerreg\seq@\endcsname{\tmpstack}
}
\def\get@fromdomstack#1;#2;#3@{%
   \xdef\first@{#1} \xdef\second@{#2}
   \xdef\last@{#3@}
}
\def\sort@domstack{%
   \expandafter\get@fromdomstack\last@
   \ifx\first@\ampers@nd
      \xdef\tmpstack{\tmpstack\st@rt;\st@p;&;&;@}
   \else
   \ifnum\st@rt<\second@
      \xdef\tmpstack{\tmpstack\st@rt;\st@p;\first@;\second@;\last@}
   \else
      \xdef\tmpstack{\tmpstack\first@;\second@;} \sort@domstack
   \fi\fi
}
\def\get@domainregions#1..#2,#3@{%
   \xdef\st@rt{#1} \xdef\st@p{#2} \xdef\list@{#3}
   \xdef\last@{\stack@dom}
   \xdef\tmpstack{}
   \sort@domstack
   \xdef\stack@dom{\tmpstack}
}
\def\get@domain{%
   \expandafter\get@fromdomstack\last@
   \ifx\first@\ampers@nd
   \else
      \loopcount=\first@
      \loop
         \xdef\domain@num@list{\domain@num@list \the\loopcount,}
         \advance\loopcount by 1
      \ifnum\loopcount>\second@\else\repeat
      \get@domain
   \fi
}
\def\getregion@fromtintstack#1{%
   \xdef\temp@{#1}
   \xdef\first@{\csname stack@tintreg\temp@\endcsname}
   \expandafter\get@fromemphstack\first@
   \expandafter\xdef\csname tintstart\temp@\endcsname{\first@}
   \expandafter\xdef\csname tintstop\temp@\endcsname{\second@}
   \expandafter\xdef\csname tintall\temp@\endcsname{\third@}
   \expandafter\xdef\csname stack@tintreg\temp@\endcsname{\last@}
}
\def\get@tintregions#1..#2,#3@{%
   \regionaltinttrue
   \xdef\st@rt{#1} \xdef\st@p{#2} \xdef\list@{#3}
   \xdef\last@{\csname stack@tintreg\seq@\endcsname}
   \xdef\tmpstack{}
   \sort@emphstack
   \expandafter\xdef\csname stack@tintreg\seq@\endcsname{\tmpstack}
}
\def\getregion@fromframestack#1{%
   \xdef\temp@{#1}
   \xdef\first@{\csname stack@framereg\temp@\endcsname}
   \expandafter\get@fromemphstack\first@
   \expandafter\xdef\csname framestart\temp@\endcsname{\first@}
   \expandafter\xdef\csname framestop\temp@\endcsname{\second@}
   \expandafter\xdef\csname framestyle\temp@\endcsname{\third@}
   \expandafter\xdef\csname stack@framereg\temp@\endcsname{\last@}
}
\def\get@frameregions#1..#2,#3@{%
   \frame@true
   \xdef\st@rt{#1} \xdef\st@p{#2} \xdef\list@{#3}
   \xdef\last@{\csname stack@framereg\seq@\endcsname}
   \xdef\tmpstack{}
   \sort@emphstack
   \expandafter\xdef\csname stack@framereg\seq@\endcsname{\tmpstack}
}
\def\getregion@fromshadingstack#1{%
   \xdef\temp@{#1}
   \xdef\first@{\csname stack@shadingreg\temp@\endcsname}
   \expandafter\get@fromemphstack\first@
   \expandafter\xdef\csname shadingstart\temp@\endcsname{\first@}
   \expandafter\xdef\csname shadingstop\temp@\endcsname{\second@}
   \expandafter\xdef\csname shadingstyle\temp@\endcsname{\third@}
   \expandafter\xdef\csname stack@shadingreg\temp@\endcsname{\last@}
}
\def\get@shadingregions#1..#2,#3@{%
   \shading@true
   \xdef\st@rt{#1} \xdef\st@p{#2} \xdef\list@{#3}
   \xdef\last@{\csname stack@shadingreg\seq@\endcsname}
   \xdef\tmpstack{}
   \sort@emphstack
   \expandafter\xdef\csname stack@shadingreg\seq@\endcsname{\tmpstack}
}
\def\getregion@fromfstack#1{%
   \xdef\temp@{#1}
   \xdef\first@{\csname stack@\bottop@\temp@\endcsname}
   \expandafter\get@fromstack\first@
   \expandafter\xdef\csname text\bottop@\temp@\endcsname{\first@}
   \expandafter\xdef\csname start\bottop@\temp@\endcsname{\second@}
   \expandafter\xdef\csname stop\bottop@\temp@\endcsname{\third@}
   \ifx\fourth@\ampers@nd \xdef\fourth@{///} \fi
   \expandafter\xdef\csname style\bottop@\temp@\endcsname{\fourth@}
   \expandafter\xdef\csname stack@\bottop@\temp@\endcsname{\last@}
}
\def\sort@fstack{%
   \expandafter\get@fromstack\last@
   \ifx\first@\ampers@nd
      \xdef\tmpstack{\tmpstack\f@text@;\st@rt;\st@p;\style@;&;&;&;&;@}
   \else
   \ifnum\st@rt<\second@
      \xdef\tmpstack{\tmpstack\f@text@;\st@rt;\st@p;\style@;%
                     \first@;\second@;\third@;\fourth@;\last@}
   \else
      \xdef\tmpstack{\tmpstack\first@;\second@;\third@;\fourth@;}
      \sort@fstack
   \fi\fi
}
\def\get@fregions#1..#2,#3@{%
   \xdef\st@rt{#1}
   \ifx\temp@\y@
      \xdef\st@p{#1}
   \else
      \xdef\st@p{#2}
   \fi
   \xdef\list@{#3}
   \xdef\last@{\csname stack@\bottop@\seq@\endcsname}
   \xdef\tmpstack{}
   \sort@fstack
   \expandafter\xdef\csname stack@\bottop@\seq@\endcsname{\tmpstack}
}
\def\getarrow@shape#1#2#3#4&{%
   \xdef\first@@{#1}\xdef\second@@{#2}\xdef\third@@{#3}
   \if\first@@ v
      \if\second@@ =
      \else \xdef\style@{\first@@ v\third@@#4} \fi
   \else
   \if\first@@ v
      \if\second@@ =
      \else \xdef\style@{\first@@ v\third@@#4} \fi
   \else
   \if\third@@ v
      \if\second@@ =
      \else \xdef\style@{\first@@ v\third@@#4} \fi
   \else
   \if\third@@ v
      \if\second@@ =
      \else \xdef\style@{\first@@ v\third@@#4} \fi
   \fi\fi\fi\fi
}
\def\get@shape#1#2#3{%
   \xdef\first@@{#1}\xdef\second@@{#2}\xdef\third@@{#3}%
   \if\second@@ v \xdef\second@@{arrow}%
   \fi%
   \if\second@@ = \xdef\second@@{doublearrow}%
   \fi%
}
\def\getstyle@left#1#2#3#4@{%
   \ifstop@
      \xdef\style@@{\csname fstyle\bottop@\the\loopcount\endcsname}
   \else
   \xdef\style@@{#2}
   \xdef\temp@{-}
   \ifx\style@@\temp@ \xdef\style@@{#1#2-#4}
   \else
   \xdef\temp@{v}
   \ifx\style@@\temp@ \xdef\style@@{#1#2-#4}
   \else
   \xdef\temp@{=}
   \ifx\style@@\temp@ \xdef\style@@{#1#2=#4}
   \else
      \xdef\style@@{\csname fstyle\bottop@\the\loopcount\endcsname}
   \fi\fi\fi\fi
}
\def\getstyle@right#1#2#3#4@{%
   \xdef\style@@{#2}
   \xdef\temp@{-}
   \ifx\style@@\temp@
      \expandafter\xdef\csname fstyle\bottop@\the\loopcount\endcsname{-#2#3#4}
   \fi
   \xdef\temp@{v}
   \ifx\style@@\temp@
      \expandafter\xdef\csname fstyle\bottop@\the\loopcount\endcsname{-#2#3#4}
   \fi
   \xdef\temp@{=}
   \ifx\style@@\temp@
      \expandafter\xdef\csname fstyle\bottop@\the\loopcount\endcsname{=#2#3#4}
   \fi
}
\def\opt@color#1[#2]#3&{\xdef\fourth@{#1}\xdef\f@color{#2}}
\def\graph@opt@color#1[#2]:#3[#4][#5]#6&{%
   \xdef\fourth@{#1}
   \xdef\f@color{#2}
   \xdef\ffourth@{#3}
   \xdef\ff@color{#4}
   \xdef\fffourth@{#5}}
\def\arrow@col@width#1[#2][#3]#4&{\xdef\fourth@{#1}\xdef\f@color{#2}\xdef\rule@@thick{#3}}
\def\second@color#1,&{\xdef\back@color{#1}}
\def\two@opt@color#1,#2@{%
   \xdef\sixth@{#1}%
   \xdef\seventh@{#2}%
   \ifx\first@\ampers@nd%
   \else%
      \xdef\frame@color{#1}%
      \ifx\seventh@\ampers@nd%
         \xdef\back@color{#1}%
         \xdef\backtext@color{White}%
      \else%
         \expandafter\second@color\seventh@%
      \fi%
   \fi%
}
\def\test@get#1#2@{%
   \xdef\temp@{#1} \xdef\third@@{#2@}
   \ifx\temp@\ampers@nd
   \else
      \if \temp@ X
         \xdef\temp@{\second@@}
      \fi
      \ifx\temp@\second@@
         \xdef\third@@{\second@@}
      \else
         \expandafter\test@get\third@@
      \fi
   \fi
}
\def\get@@second@#1#2@{\xdef\second@@{#1}\xdef\first@@{#2@}}
\def\get@@third@#1]#2@{\xdef\third@@{#1&@}\xdef\fifth@@{#2@}}
\def\get@third@#1#2@{\xdef\third@@{#1}\xdef\fifth@@{#2@}}
\def\find@motif{%
   \expandafter\get@@second@\first@@
   \ifx\second@@\ampers@nd
   \else
      \ifx\second@@\d@t
      \else
         \advance\temp@count by 1
         \if \third@@ X
            \xdef\third@@{\second@@}
         \fi
         \ifx\third@@\br@cket
            \expandafter\get@@third@\fifth@@
            \expandafter\test@get\third@@
         \fi
         \ifx\second@@\third@@
            \ifx\nineth@@\n@
               \xdef\st@rt{\the\temp@count}
               \xdef\st@p{n}
            \fi
            \xdef\nineth@@{y}
            \expandafter\get@third@\fifth@@
            \ifx\third@@\ampers@nd
               \xdef\st@p{\the\temp@count}
               \xdef\list@{}
               \xdef\tmpstack{}
               \xdef\temp@{shade}
               \ifx\temp@\temp@@
                  \xdef\last@{\csname stack@reg\seq@\endcsname}
                  \loopcount=\style@
                  \sort@stack
                  \expandafter\xdef\csname stack@reg\seq@\endcsname{\tmpstack}
               \else
               \xdef\temp@{emph}
               \ifx\temp@\temp@@
                  \regionalemphtrue
                  \xdef\last@{\csname stack@emphreg\seq@\endcsname}
                  \sort@emphstack
                  \expandafter\xdef\csname stack@emphreg\seq@\endcsname{\tmpstack}
               \else
               \xdef\temp@{lower}
               \ifx\temp@\temp@@
                  \regionallowertrue
                  \xdef\last@{\csname stack@lowerreg\seq@\endcsname}
                  \sort@lowerstack
                  \expandafter\xdef\csname stack@lowerreg\seq@\endcsname{\tmpstack}
               \else
               \xdef\temp@{tint}
               \ifx\temp@\temp@@
                  \regionaltinttrue
                  \xdef\last@{\csname stack@tintreg\seq@\endcsname}
                  \sort@emphstack
                  \expandafter\xdef\csname stack@tintreg\seq@\endcsname{\tmpstack}
               \else
               \xdef\temp@{frame}
               \ifx\temp@\temp@@
                  \frame@true
                  \xdef\last@{\csname stack@framereg\seq@\endcsname}
                  \sort@emphstack
                  \expandafter\xdef\csname stack@framereg\seq@\endcsname{\tmpstack}
               \else
               \xdef\temp@{shading}
               \ifx\temp@\temp@@
                  \shading@true
                  \xdef\last@{\csname stack@shadingreg\seq@\endcsname}
                  \sort@emphstack
                  \expandafter\xdef\csname stack@shadingreg\seq@\endcsname{\tmpstack}
               \else
               \xdef\temp@{ttttop}
               \ifx\temp@\temp@@
                  \xdef\last@{\csname stack@ttttop\seq@\endcsname}
                  \sort@fstack
                  \expandafter\xdef\csname stack@ttttop\seq@\endcsname{\tmpstack}
               \else
               \xdef\temp@{tttop}
               \ifx\temp@\temp@@
                  \xdef\last@{\csname stack@tttop\seq@\endcsname}
                  \sort@fstack
                  \expandafter\xdef\csname stack@tttop\seq@\endcsname{\tmpstack}
               \else
               \xdef\temp@{ttop}
               \ifx\temp@\temp@@
                  \xdef\last@{\csname stack@ttop\seq@\endcsname}
                  \sort@fstack
                  \expandafter\xdef\csname stack@ttop\seq@\endcsname{\tmpstack}
               \else
               \xdef\temp@{top}
               \ifx\temp@\temp@@
                  \xdef\last@{\csname stack@top\seq@\endcsname}
                  \sort@fstack
                  \expandafter\xdef\csname stack@top\seq@\endcsname{\tmpstack}
               \else
               \xdef\temp@{bottom}
               \ifx\temp@\temp@@
                  \xdef\last@{\csname stack@bottom\seq@\endcsname}
                  \sort@fstack
                  \expandafter\xdef\csname stack@bottom\seq@\endcsname{\tmpstack}
               \else
               \xdef\temp@{bbottom}
               \ifx\temp@\temp@@
                  \xdef\last@{\csname stack@bbottom\seq@\endcsname}
                  \sort@fstack
                  \expandafter\xdef\csname stack@bbottom\seq@\endcsname{\tmpstack}
               \else
               \xdef\temp@{bbbottom}
               \ifx\temp@\temp@@
                  \xdef\last@{\csname stack@bbbottom\seq@\endcsname}
                  \sort@fstack
                  \expandafter\xdef\csname stack@bbbottom\seq@\endcsname{\tmpstack}
               \else
               \xdef\temp@{bbbbottom}
               \ifx\temp@\temp@@
                  \xdef\last@{\csname stack@bbbbottom\seq@\endcsname}
                  \sort@fstack
                  \expandafter\xdef\csname stack@bbbbottom\seq@\endcsname{\tmpstack}
               \fi
               \fi
               \fi
               \fi
               \fi
               \fi
               \fi
               \fi
               \fi
               \fi
               \fi
               \fi
               \fi
               \fi
               \xdef\fifth@@{\m@tif} \expandafter\get@third@\fifth@@
               \xdef\nineth@@{n}
            \fi
         \else
            \ifx\nineth@@\y@
               \xdef\first@@{\second@@\first@@}
               \advance\temp@count by -1
            \fi
            \xdef\nineth@@{n} \xdef\st@p{n}
            \xdef\fifth@@{\m@tif} \expandafter\get@third@\fifth@@
         \fi
      \fi
   \find@motif
   \fi
}
\def\prep@motif{%

   \def\get@motif@specs##1,##2,##3,##4,##5,&{%
      \xdef\seq@{##1} \xdef\temp@@{##2} \xdef\@ll{##3} \def\fourth@@{##4} \xdef\fifth@@{##5&@}
   }

   \loopcount=0
   \loop
      \advance\loopcount by 1
      \expandafter\xdef\csname stack@reg\the\loopcount\endcsname{\csname style\the\loopcount\endcsname;%
                                                                 \csname start\the\loopcount\endcsname;%
                                                                 \csname stop\the\loopcount\endcsname;%
                                                                 \csname all\the\loopcount\endcsname;%
                                                                 \csname stack@reg\the\loopcount\endcsname}
      \expandafter\xdef\csname stack@emphreg\the\loopcount\endcsname{\csname emphstart\the\loopcount\endcsname;%
                                                                 \csname emphstop\the\loopcount\endcsname;%
                                                                 \csname emphall\the\loopcount\endcsname;%
                                                                 \csname stack@emphreg\the\loopcount\endcsname}
      \expandafter\xdef\csname stack@lowerreg\the\loopcount\endcsname{\csname lowerstart\the\loopcount\endcsname;%
                                                                 \csname lowerstop\the\loopcount\endcsname;%
                                                                 \csname lowerall\the\loopcount\endcsname;%
                                                                 \csname stack@lowerreg\the\loopcount\endcsname}
      \expandafter\xdef\csname stack@tintreg\the\loopcount\endcsname{\csname tintstart\the\loopcount\endcsname;%
                                                                 \csname tintstop\the\loopcount\endcsname;%
                                                                 \csname tintall\the\loopcount\endcsname;%
                                                                 \csname stack@tintreg\the\loopcount\endcsname}
      \expandafter\xdef\csname stack@framereg\the\loopcount\endcsname{\csname framestart\the\loopcount\endcsname;%
                                                                 \csname framestop\the\loopcount\endcsname;%
                                                                 \csname framestyle\the\loopcount\endcsname;%
                                                                 \csname stack@framereg\the\loopcount\endcsname}
      \expandafter\xdef\csname stack@shadingreg\the\loopcount\endcsname{\csname shadingstart\the\loopcount\endcsname;%
                                                                 \csname shadingstop\the\loopcount\endcsname;%
                                                                 \csname shadingstyle\the\loopcount\endcsname;%
                                                                 \csname stack@shadingreg\the\loopcount\endcsname}
      \expandafter\xdef\csname stack@ttttop\the\loopcount\endcsname{\csname textttttop\the\loopcount\endcsname;%
                                                                 \csname startttttop\the\loopcount\endcsname;%
                                                                 \csname stopttttop\the\loopcount\endcsname;%
                                                                 \csname stylettttop\the\loopcount\endcsname;%
                                                                 \csname stack@ttttop\the\loopcount\endcsname}
      \expandafter\xdef\csname stack@tttop\the\loopcount\endcsname{\csname texttttop\the\loopcount\endcsname;%
                                                                 \csname starttttop\the\loopcount\endcsname;%
                                                                 \csname stoptttop\the\loopcount\endcsname;%
                                                                 \csname styletttop\the\loopcount\endcsname;%
                                                                 \csname stack@tttop\the\loopcount\endcsname}
      \expandafter\xdef\csname stack@ttop\the\loopcount\endcsname{\csname textttop\the\loopcount\endcsname;%
                                                                 \csname startttop\the\loopcount\endcsname;%
                                                                 \csname stopttop\the\loopcount\endcsname;%
                                                                 \csname stylettop\the\loopcount\endcsname;%
                                                                 \csname stack@ttop\the\loopcount\endcsname}
      \expandafter\xdef\csname stack@top\the\loopcount\endcsname{\csname texttop\the\loopcount\endcsname;%
                                                                 \csname starttop\the\loopcount\endcsname;%
                                                                 \csname stoptop\the\loopcount\endcsname;%
                                                                 \csname styletop\the\loopcount\endcsname;%
                                                                 \csname stack@top\the\loopcount\endcsname}
      \expandafter\xdef\csname stack@bottom\the\loopcount\endcsname{\csname textbottom\the\loopcount\endcsname;%
                                                                 \csname startbottom\the\loopcount\endcsname;%
                                                                 \csname stopbottom\the\loopcount\endcsname;%
                                                                 \csname stylebottom\the\loopcount\endcsname;%
                                                                 \csname stack@bottom\the\loopcount\endcsname}
      \expandafter\xdef\csname stack@bbottom\the\loopcount\endcsname{\csname textbbottom\the\loopcount\endcsname;%
                                                                 \csname startbbottom\the\loopcount\endcsname;%
                                                                 \csname stopbbottom\the\loopcount\endcsname;%
                                                                 \csname stylebbottom\the\loopcount\endcsname;%
                                                                 \csname stack@bbottom\the\loopcount\endcsname}
      \expandafter\xdef\csname stack@bbbottom\the\loopcount\endcsname{\csname textbbbottom\the\loopcount\endcsname;%
                                                                 \csname startbbbottom\the\loopcount\endcsname;%
                                                                 \csname stopbbbottom\the\loopcount\endcsname;%
                                                                 \csname stylebbbottom\the\loopcount\endcsname;%
                                                                 \csname stack@bbbottom\the\loopcount\endcsname}
      \expandafter\xdef\csname stack@bbbbottom\the\loopcount\endcsname{\csname textbbbbottom\the\loopcount\endcsname;%
                                                                 \csname startbbbbottom\the\loopcount\endcsname;%
                                                                 \csname stopbbbbottom\the\loopcount\endcsname;%
                                                                 \csname stylebbbbottom\the\loopcount\endcsname;%
                                                                 \csname stack@bbbbottom\the\loopcount\endcsname}
   \ifnum\loopcount<\seq@num\repeat
   \temp@@count=0
   \loop
      \advance\temp@@count by 1
      \xdef\first@@{\csname motif\the\temp@@count\endcsname}
      \expandafter\get@motif@specs\first@@
      \xdef\first@@{\csname sequence\seq@\endcsname &@}
      \temp@count=\csname res@count\seq@\endcsname
      \xdef\f@text@{\@ll}
      \xdef\style@{\fourth@@}
      \xdef\m@tif{\fifth@@} \expandafter\get@third@\fifth@@
      \xdef\nineth@@{n} \xdef\st@p{n}
      \find@motif
   \ifnum\temp@@count<\motif@num\repeat
   \loopcount=0
   \loop
      \advance\loopcount by 1
      \expandafter\getregion@fromstack{\the\loopcount}
      \expandafter\getregion@fromtintstack{\the\loopcount}
      \expandafter\getregion@fromemphstack{\the\loopcount}
      \expandafter\getregion@fromlowerstack{\the\loopcount}
      \expandafter\getregion@fromframestack{\the\loopcount}
      \expandafter\getregion@fromshadingstack{\the\loopcount}
      \xdef\bottop@{top}       \expandafter\getregion@fromfstack{\the\loopcount}
      \xdef\bottop@{ttop}      \expandafter\getregion@fromfstack{\the\loopcount}
      \xdef\bottop@{tttop}     \expandafter\getregion@fromfstack{\the\loopcount}
      \xdef\bottop@{ttttop}    \expandafter\getregion@fromfstack{\the\loopcount}
      \xdef\bottop@{bottom}    \expandafter\getregion@fromfstack{\the\loopcount}
      \xdef\bottop@{bbottom}   \expandafter\getregion@fromfstack{\the\loopcount}
      \xdef\bottop@{bbbottom}  \expandafter\getregion@fromfstack{\the\loopcount}
      \xdef\bottop@{bbbbottom} \expandafter\getregion@fromfstack{\the\loopcount}
   \ifnum\loopcount<\seq@num\repeat
}

\def\test@motif#1#2@{%
   \xdef\temp@{shade}
   \ifx\temp@\temp@@ \xdef\style@{\the\loopcount} \fi
   \xdef\temp@{emph}
   \ifx\temp@\temp@@ \xdef\style@{0} \fi
   \xdef\temp@{lower}
   \ifx\temp@\temp@@ \xdef\style@{0} \fi
   \xdef\temp@{tint}
   \ifx\temp@\temp@@ \xdef\style@{0} \fi
   \xdef\temp@{frame}
   \ifx\temp@\temp@@ \xdef\style@{0} \fi
   \xdef\temp@{shading}
   \ifx\temp@\temp@@ \xdef\style@{0} \fi
   \xdef\temp@{#1#2}
   \xdef\first@{#1}
   \ifx\first@\br@cket
      \xdef\label@motif{y}
      \temp@count=\motif@num
      \advance\temp@count by 1
      \xdef\motif@num{\the\temp@count}
      \expandafter\xdef\csname motif\the\temp@count\endcsname{\seq@,\temp@@,\@ll,\style@,\temp@}
      \xdef\list@{&}
   \else
      \expandafter\check@char\first@
      \ifletter
         \xdef\label@motif{y}
         \temp@count=\motif@num
         \advance\temp@count by 1
         \xdef\motif@num{\the\temp@count}
         \expandafter\xdef\csname motif\the\temp@count\endcsname{\seq@,\temp@@,\@ll,\style@,\temp@}
         \xdef\list@{&}
      \fi
   \fi
}

\def\test@PDB#1:#2,#3,#4,#5,#6@{%
   \xdef\last@{#1[,]&}\expandafter\opt@color\last@
   \xdef\PDB@distance{no}
   \ifx\f@color\comm@
   \else
      \xdef\f@color{\f@color .&&@}
      \expandafter\coord@get\f@color
      \xdef\temp@{\c@@rd @}
      \expandafter\check@letter\temp@
      \ifletter
      \else
         \temp@count=\c@@rd
         \multiply\temp@count by \temp@count
         \xdef\PDB@distance{\the\temp@count}
      \fi
   \fi
   \xdef\PDB@hitpos{0}
   \xdef\PDB@stack{}
   \xdef\PDB@name{#2}
   \xdef\PDB@type{point}
   \ifx\fourth@\PDB@type
      \xdef\PDB@{y}
      \xdef\last@{#3[,]&}\expandafter\opt@color\last@
      \xdef\PDB@refnum@a{\fourth@}
      \ifx\f@color\C@lpha
         \xdef\PDB@back@side@a{CA}
      \else
         \xdef\PDB@back@side@a{side}
      \fi
      \xdef\PDB@refnum@b{0} \xdef\PDB@back@side@b{x}
      \xdef\PDB@refnum@c{0} \xdef\PDB@back@side@c{x}
      \ifx\PDB@distance\n@ \xdef\PDB@distance{3600}\fi
      \load@PDB
      \expandafter\get@item\PDB@stack \xdef\list@{\first@@}
   \else
      \xdef\PDB@type{line}
      \ifx\fourth@\PDB@type
         \xdef\PDB@{y}
         \xdef\last@{#3[,]&}\expandafter\opt@color\last@
         \xdef\PDB@refnum{\fourth@}
         \ifx\f@color\C@lpha
            \xdef\PDB@back@side{CA}
         \else
            \xdef\PDB@back@side{side}
         \fi
         \xdef\last@{#4[,]&}\expandafter\opt@color\last@
         \ifnum\PDB@refnum<\fourth@
            \xdef\PDB@refnum@a{\PDB@refnum}
            \xdef\PDB@refnum@b{\fourth@}
            \xdef\PDB@back@side@a{\PDB@back@side}
            \ifx\f@color\C@lpha
               \xdef\PDB@back@side@b{CA}
            \else
               \xdef\PDB@back@side@b{side}
            \fi
         \else
            \xdef\PDB@refnum@b{\PDB@refnum}
            \xdef\PDB@refnum@a{\fourth@}
            \xdef\PDB@back@side@b{\PDB@back@side}
            \ifx\f@color\C@lpha
               \xdef\PDB@back@side@a{CA}
            \else
               \xdef\PDB@back@side@a{side}
            \fi
         \fi
         \xdef\PDB@refnum@c{0} \xdef\PDB@back@side@c{x}
         \ifx\PDB@distance\n@ \xdef\PDB@distance{100}\fi
         \load@PDB
         \expandafter\get@item\PDB@stack \xdef\list@{\first@@}
      \else
         \xdef\PDB@type{plane}
         \ifx\fourth@\PDB@type
            \xdef\PDB@{y}
            \xdef\last@{#3[,]&}\expandafter\opt@color\last@
            \xdef\PDB@refnum{\fourth@}
            \ifx\f@color\C@lpha
               \xdef\PDB@back@side{CA}
            \else
               \xdef\PDB@back@side{side}
            \fi
            \xdef\last@{#4[,]&}\expandafter\opt@color\last@
            \ifnum\PDB@refnum<\fourth@
               \xdef\PDB@refnum@a{\PDB@refnum}
               \xdef\PDB@refnum@b{\fourth@}
               \xdef\PDB@back@side@a{\PDB@back@side}
               \ifx\f@color\C@lpha
                  \xdef\PDB@back@side@b{CA}
               \else
                  \xdef\PDB@back@side@b{side}
               \fi
            \else
               \xdef\PDB@refnum@b{\PDB@refnum}
               \xdef\PDB@refnum@a{\fourth@}
               \xdef\PDB@back@side@b{\PDB@back@side}
               \ifx\f@color\C@lpha
                  \xdef\PDB@back@side@a{CA}
               \else
                  \xdef\PDB@back@side@a{side}
               \fi
            \fi
            \xdef\last@{#5[,]&}\expandafter\opt@color\last@
            \xdef\PDB@refnum{\fourth@}
            \ifx\f@color\C@lpha
               \xdef\PDB@back@side{CA}
            \else
               \xdef\PDB@back@side{side}
            \fi
            \ifnum\PDB@refnum>\PDB@refnum@b
               \xdef\PDB@refnum@c{\PDB@refnum}
               \xdef\PDB@back@side@c{\PDB@back@side}
            \else
               \ifnum\PDB@refnum>\PDB@refnum@a
                  \xdef\PDB@refnum@c{\PDB@refnum@b}
                  \xdef\PDB@back@side@c{\PDB@back@side@b}
                  \xdef\PDB@refnum@b{\PDB@refnum}
                  \xdef\PDB@back@side@b{\PDB@back@side}
               \else
                  \xdef\PDB@refnum@c{\PDB@refnum@b}
                  \xdef\PDB@back@side@c{\PDB@back@side@b}
                  \xdef\PDB@refnum@b{\PDB@refnum@a}
                  \xdef\PDB@back@side@b{\PDB@back@side@a}
                  \xdef\PDB@refnum@a{\PDB@refnum}
                  \xdef\PDB@back@side@a{\PDB@back@side}
               \fi
            \fi
            \ifx\PDB@distance\n@ \xdef\PDB@distance{100}\fi
            \load@PDB
            \expandafter\get@item\PDB@stack \xdef\list@{\first@@}
         \else
            \xdef\temp@{\list@ @}
            \expandafter\test@motif\temp@
         \fi
      \fi
   \fi
}

\def\test@fill#1:#2:#3&{%
   \xdef\last@{#1[,][,]&}\expandafter\arrow@col@width\last@%
   \xdef\second@@{\fourth@}%
   \xdef\last@{///}%
   \ifx\fourth@\last@%
     \xdef\second@@{empty}%
   \else
   \xdef\last@{translate}%
   \ifx\fourth@\last@%
     \xdef\second@@{translate}%
     \xdef\fill@char{#2[,]&}%
     \expandafter\opt@color\fill@char%
     \xdef\fill@char{\fourth@}%
   \else
   \xdef\last@{fill}%
   \ifx\fourth@\last@
     \xdef\second@@{fill}%
     \xdef\fill@char{#2[,]&}%
     \expandafter\opt@color\fill@char%
     \xdef\fill@char{\fourth@}%
   \else
  \xdef\last@{bar}%
   \ifx\fourth@\last@
     \xdef\second@@{bar}%
     \xdef\b@r{bar}%
     \ifx\f@color\comm@
        \xdef\g@min{,}\xdef\g@max{,}%
     \else
        \xdef\f@color{\f@color @}%
        \expandafter\get@item\f@color%
        \xdef\g@min{\fourth@} \xdef\g@max{\first@@}%
        \xdef\pm@shift{\fourth@}%
     \fi%
     \xdef\fill@char{#2[,]&}%
     \expandafter\opt@color\fill@char%
     \ifx\f@color\comm@\xdef\f@color{GrayDefault}\fi%
     \xdef\fill@char{\fourth@}%
     \xdef\box@color{\f@color,&@}%
     \expandafter\two@opt@color\box@color%
   \else
   \xdef\last@{color}%
   \ifx\fourth@\last@
     \xdef\second@@{color}%
     \ifx\f@color\comm@
        \xdef\g@min{,}\xdef\g@max{,}%
     \else
        \xdef\f@color{\f@color @}%
        \expandafter\get@item\f@color%
        \xdef\g@min{\fourth@} \xdef\g@max{\first@@}%
     \fi%
     \xdef\fill@char{#2[,]&}%
     \expandafter\opt@color\fill@char%
     \ifx\f@color\comm@\xdef\f@color{GrayDefault}\fi%
     \xdef\fill@char{\fourth@}%
   \else
     \xdef\last@{box}%
     \ifx\fourth@\last@%
        \xdef\second@@{box}%
        \ifx\f@color\comm@\xdef\f@color{White}\fi%
        \xdef\seventh@{\f@color @}\expandafter\check@letter\seventh@%
        \ifnumber%
           \ifx\rule@@thick\comm@%
              \xdef\rule@@thick{\f@color}%
              \xdef\box@color{White,&@}%
           \else%
              \xdef\seventh@{\rule@@thick}%
              \xdef\rule@@thick{\f@color}%
              \xdef\box@color{\seventh@,&@}%
           \fi%
        \else%
           \xdef\box@color{\f@color,&@}%
        \fi%
        \expandafter\two@opt@color\box@color%
        \xdef\fill@char{#2[,]&}%
        \expandafter\opt@color\fill@char%
        \xdef\fill@char{\fourth@}%
   \else
     \xdef\last@{plotcolor}%
     \ifx\fourth@\last@%
        \xdef\second@@{plotcolor}%
        \ifx\f@color\comm@%
           \xdef\pm@shift{0}%
        \else%
           \xdef\pm@shift{\f@color}%
        \fi%
        \xdef\fill@char{#2[,]&}%
        \expandafter\opt@color\fill@char%
        \xdef\fill@char{\fourth@}%
   \else
     \xdef\last@{plotbar}%
     \ifx\fourth@\last@%
        \xdef\second@@{plotbar}%
        \xdef\b@r{bar}%
        \ifx\f@color\comm@
           \xdef\pm@shift{0}%
        \else
           \xdef\pm@shift{\f@color}%
        \fi%
        \xdef\fill@char{#2[,]&}%
        \expandafter\opt@color\fill@char%
        \ifx\f@color\comm@\xdef\f@color{GrayDefault}\fi%
        \xdef\fill@char{\fourth@}%
        \xdef\box@color{\f@color,&@}%
         \expandafter\two@opt@color\box@color%
     \else
        \xdef\arrow@color{\f@color}%
        \ifx\arrow@color\comm@\xdef\arrow@color{Black}\fi%
        \xdef\seventh@{\f@color @}\expandafter\check@letter\seventh@%
        \ifnumber%
           \ifx\rule@@thick\comm@%
              \xdef\rule@@thick{\f@color}%
              \xdef\arrow@color{Black}%
           \else%
              \xdef\seventh@{\rule@@thick}%
              \xdef\rule@@thick{\f@color}%
              \xdef\arrow@color{\seventh@}%
           \fi%
        \fi%
        \xdef\fill@char{#2[,]&}%
        \expandafter\opt@color\fill@char%
        \xdef\fill@char{\fourth@}%
        \ifx\f@color\comm@\xdef\f@color{Black,White}\fi%
        \xdef\backtext@color{White}%
        \xdef\f@color{\f@color,&@}%
        \expandafter\two@opt@color\f@color%
        \xdef\f@color{\arrow@color}%
     \fi
   \fi
   \fi
   \fi
   \fi
   \fi
   \fi
   \fi
   \xdef\seventh@{\f@color @}\expandafter\check@letter\seventh@%
   \ifnumber%
      \ifx\rule@@thick\comm@%
         \xdef\rule@@thick{\f@color}%
         \xdef\f@color{Black}%
      \else%
         \xdef\seventh@{\rule@@thick}%
         \xdef\rule@@thick{\f@color}%
         \xdef\f@color{\seventh@}%
      \fi%
   \fi%
   \ifx\rule@@thick\comm@\xdef\rule@@thick{\the\rule@thick}\fi%
   \ifx\f@color\comm@\xdef\f@color{Black}\fi}
\def\clear@groups{%
    \expandafter\xdef\csname \prfx grpA\endcsname{ -1}
    \expandafter\xdef\csname \prfx grpB\endcsname{ -2}
    \expandafter\xdef\csname \prfx grpC\endcsname{ -3}
    \expandafter\xdef\csname \prfx grpD\endcsname{ -4}
    \expandafter\xdef\csname \prfx grpE\endcsname{ -5}
    \expandafter\xdef\csname \prfx grpF\endcsname{ -6}
    \expandafter\xdef\csname \prfx grpG\endcsname{ -7}
    \expandafter\xdef\csname \prfx grpH\endcsname{ -8}
    \expandafter\xdef\csname \prfx grpI\endcsname{ -9}
    \expandafter\xdef\csname \prfx grpJ\endcsname{-10}
    \expandafter\xdef\csname \prfx grpK\endcsname{-11}
    \expandafter\xdef\csname \prfx grpL\endcsname{-12}
    \expandafter\xdef\csname \prfx grpM\endcsname{-13}
    \expandafter\xdef\csname \prfx grpN\endcsname{-14}
    \expandafter\xdef\csname \prfx grpO\endcsname{-15}
    \expandafter\xdef\csname \prfx grpP\endcsname{-16}
    \expandafter\xdef\csname \prfx grpQ\endcsname{-17}
    \expandafter\xdef\csname \prfx grpR\endcsname{-18}
    \expandafter\xdef\csname \prfx grpS\endcsname{-19}
    \expandafter\xdef\csname \prfx grpT\endcsname{-20}
    \expandafter\xdef\csname \prfx grpU\endcsname{-21}
    \expandafter\xdef\csname \prfx grpV\endcsname{-22}
    \expandafter\xdef\csname \prfx grpW\endcsname{-23}
    \expandafter\xdef\csname \prfx grpX\endcsname{-24}
    \expandafter\xdef\csname \prfx grpY\endcsname{-25}
    \expandafter\xdef\csname \prfx grpZ\endcsname{-26}
    \expandafter\xdef\csname \prfx grp-\endcsname{-999}
    \expandafter\xdef\csname \prfx grp.\endcsname{-999}
    \expandafter\xdef\csname \prfx grp=\endcsname{-999}
}
\def\inactivate@chars{%
   \catcode`\#=12
   \catcode`\"=12
   \catcode`\~=12
   \catcode`\^=12
   \catcode`\_=12
   }
\def\numcount{\the\loopcount}
\def\Alphacount{\@Alph\loopcount}
\def\alphacount{\@alph\loopcount}
\def\romancount{\@roman\loopcount}
\def\Romancount{\@Roman\loopcount}
\def\cut@name#1.#2@{\global\xdef\file@n@me{#1}}
\def\coord@get#1.#2#3@{%
   \xdef\temp@{#2}
   \ifx\temp@\ampers@nd \xdef\temp@{0} \fi
   \xdef\c@@rd{#1\temp@}
}
\def\struc@get#1 #2 #3 #4 #5 #6 #7 #8 #9@{%
    \xdef\first@{#1} \xdef\second@{#2} \xdef\third@{#3}  \xdef\fourth@{#4}
    \xdef\fifth@{#5} \xdef\sixth@{#6}  \xdef\seventh@{#7}\xdef\eighth@{#8}
    \xdef\nineth@{#9}}
\def\get@PHD#1|#2|#3@{\xdef\PHD@line{\PHD@line #2}}
\def\write@PHDsec{%
 \expandafter\get@sim\last@
 \ifx\sim@char\c@mp
      \def\end@{\the\innerloopcount}
      \advance\innerloopcount by 1
 \else
      \ifnum\end@<\begin@ \xdef\end@{\begin@}\fi
      \if\c@mp .
      \else
      \if\c@mp L
      \else
      \if\c@mp H
        \ifx\show@Hsec\yes
         \loopcount=\first@
         \advance\loopcount by 1
         \xdef\first@{\the\loopcount}
         \ifx\m@p\yes
         \immediate\write\featurefile{%
         \string\feature{\bottop@Hsec}{\begin@..\end@}%
               {\label@Hsec}{\text@Hsec}}
         \else
         \immediate\write\featurefile{%
         \string\feature{\bottop@Hsec}{\st@rt}{\begin@..\end@}%
               {\label@Hsec}{\text@Hsec}}\fi
        \fi
      \else
      \if\c@mp E
        \ifx\show@Esec\yes
         \loopcount=\second@
         \advance\loopcount by 1
         \xdef\second@{\the\loopcount}
         \ifx\m@p\yes
         \immediate\write\featurefile{%
         \string\feature{\bottop@Esec}{\begin@..\end@}%
               {\label@Esec}{\text@Esec}}
         \else
         \immediate\write\featurefile{%
         \string\feature{\bottop@Esec}{\st@rt}{\begin@..\end@}%
               {\label@Esec}{\text@Esec}}\fi
        \fi
      \fi\fi\fi\fi
      \xdef\c@mp{\sim@char}
      \advance\innerloopcount by 1
      \xdef\begin@{\the\innerloopcount}
   \fi
 \ifx\sim@char\ampers@nd\else\write@PHDsec\fi
}
\def\write@PHDtopo{%
 \expandafter\get@sim\last@
 \ifx\sim@char\c@mp
      \def\end@{\the\innerloopcount}
      \advance\innerloopcount by 1
 \else
      \ifnum\end@<\begin@ \xdef\end@{\begin@}\fi
      \if\c@mp .
      \else
      \if\c@mp L
      \else
      \if\c@mp T
        \ifx\show@TMtop\yes
         \loopcount=\first@
         \advance\loopcount by 1
         \xdef\first@{\the\loopcount}
         \ifx\m@p\yes
         \immediate\write\featurefile{%
         \string\feature{\bottop@TMtop}{\begin@..\end@}%
               {\label@TMtop}{\text@TMtop}}
         \else
         \immediate\write\featurefile{%
         \string\feature{\bottop@TMtop}{\st@rt}{\begin@..\end@}%
               {\label@TMtop}{\text@TMtop}}\fi
        \fi
      \else
      \if\c@mp i
        \ifx\show@itop\yes
         \loopcount=\second@
         \advance\loopcount by 1
         \xdef\second@{\the\loopcount}
         \ifx\m@p\yes
         \immediate\write\featurefile{%
         \string\feature{\bottop@itop}{\begin@..\end@}%
               {\label@itop}{\text@itop}}
         \else
         \immediate\write\featurefile{%
         \string\feature{\bottop@itop}{\st@rt}{\begin@..\end@}%
               {\label@itop}{\text@itop}}\fi
        \fi
      \else
      \if\c@mp o
        \ifx\show@etop\yes
         \loopcount=\second@
         \advance\loopcount by 1
         \xdef\second@{\the\loopcount}
         \ifx\m@p\yes
         \immediate\write\featurefile{%
         \string\feature{\bottop@etop}{\begin@..\end@}%
               {\label@etop}{\text@etop}}
         \else
         \immediate\write\featurefile{%
         \string\feature{\bottop@etop}{\st@rt}{\begin@..\end@}%
               {\label@etop}{\text@etop}}\fi
        \fi
      \fi\fi\fi\fi\fi
      \xdef\c@mp{\sim@char}
      \advance\innerloopcount by 1
      \xdef\begin@{\the\innerloopcount}
 \fi
 \ifx\sim@char\ampers@nd\else\write@PHDtopo\fi
}
\def\include@T@coffee{%
    \bgroup
    \immediate\openin\structurefile = \TC@first@\relax
    \ifeof\structurefile
      \PackageError{TeXshade}
      {File `\TC@first@' not found}
      {\MessageBreak
       The file you specified is missing or you have \MessageBreak
       misspelled it. \MessageBreak\MessageBreak
       No T-Coffee shading will be displayed (using "similar"). \MessageBreak
       Type <return> to proceed. \MessageBreak
       Type X <return> to quit. \MessageBreak
}
       \immediate\closein\structurefile\egroup
       \simmodetrue  \funcmodefalse \T@coffeefalse
    \else
    \message{<T-Coffee shading>}
    \xdef\first@{} \xdef\temp@{*}
    \loop
       \read\structurefile to \readline
       \xdef\test@{\expandafter\string\readline}
       \ifx\test@\par@
       \else
          \xdef\structureline{\readline & & & & & & & & &@}
          \expandafter\struc@get\structureline
          \ifx\first@\temp@ \xdef\temp@{y}
             \read\structurefile to \readline
             \read\structurefile to \readline
          \fi
       \fi
    \ifx\temp@\y@ \else\repeat
    \loopcount=0
    \xdef\temp@{cons}
    \loop
       \read\structurefile to \readline
       \xdef\test@{\expandafter\string\readline}
       \ifx\test@\par@
       \else
          \xdef\structureline{\readline & & & & & & & & &@}
          \expandafter\struc@get\structureline
          \if\second@ :
             \advance\loopcount by 1\relax
             \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{}
          \fi
       \fi
    \ifx\first@\temp@\expandafter\xdef\csname T@coffee0\endcsname{} \else\repeat
    \xdef\temp@{\the\loopcount}
    \loopcount=0
    \loop
       \read\structurefile to \readline
       \xdef\test@{\expandafter\string\readline}
       \ifx\test@\par@
       \else
          \xdef\structureline{\readline & & & & & & & & &@}
          \expandafter\struc@get\structureline
          \advance\loopcount by 1
          \ifnum\loopcount=\temp@ \loopcount=0 \fi
          \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{\csname T@coffee\the\loopcount\endcsname \third@}
       \fi
    \ifeof\structurefile \else\repeat
    \closein\structurefile
    \loopcount=0
    \loop
       \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{\csname T@coffee\the\loopcount\endcsname @}
       \advance\loopcount by 1
    \ifnum\loopcount=\temp@ \else\repeat
    \egroup
    \def\n@m@tch{{$\bullet$}}
    \expandafter\def\csname fg@color0\endcsname{TC0}
    \expandafter\def\csname fg@color1\endcsname{TC1}
    \expandafter\def\csname fg@color2\endcsname{TC2}
    \expandafter\def\csname fg@color3\endcsname{TC3}
    \expandafter\def\csname fg@color4\endcsname{TC4}
    \expandafter\def\csname fg@color5\endcsname{TC5}
    \expandafter\def\csname fg@color6\endcsname{TC6}
    \expandafter\def\csname fg@color7\endcsname{TC7}
    \expandafter\def\csname fg@color8\endcsname{TC8}
    \expandafter\def\csname fg@color9\endcsname{TC9}
    \expandafter\def\csname fg@textcolor0\endcsname{Black}
    \expandafter\def\csname fg@textcolor1\endcsname{Black}
    \expandafter\def\csname fg@textcolor2\endcsname{Black}
    \expandafter\def\csname fg@textcolor3\endcsname{Black}
    \expandafter\def\csname fg@textcolor4\endcsname{Black}
    \expandafter\def\csname fg@textcolor5\endcsname{Black}
    \expandafter\def\csname fg@textcolor6\endcsname{Black}
    \expandafter\def\csname fg@textcolor7\endcsname{Black}
    \expandafter\def\csname fg@textcolor8\endcsname{Black}
    \expandafter\def\csname fg@textcolor9\endcsname{Black}
   \fi
 }

\def\include@DSSP{%
  \xdef\first@{\csname optiondssp\the\loopcount\endcsname}
  \xdef\bottop@{\csname bottopdssp\the\loopcount\endcsname}
  \xdef\st@rt{\csname doseqdssp\the\loopcount\endcsname}
  \xdef\structurefilename{\csname filenamedssp\the\loopcount\endcsname}
  \bgroup
   \xdef\file@n@me{\structurefilename .@}
   \expandafter\cut@name\file@n@me
   \xdef\file@n@me{\file@n@me.sec}
   \ifx\first@\file@n@me
   \else
      \immediate\openin\alignfile = \file@n@me\relax
      \ifeof\alignfile \xdef\first@{make new} \fi
      \immediate\closein\alignfile
   \fi
   \xdef\temp@{make new}
   \ifx\first@\temp@
    \def\par{}
    \inactivate@chars
    \immediate\openin\structurefile = \structurefilename\relax
    \ifeof\structurefile
      \PackageError{TeXshade}
      {File `\structurefilename' not found}
      {\MessageBreak
       The `DSSP' file you specified is missing or you have \MessageBreak
       misspelled it. \MessageBreak\MessageBreak
       No labels for secondary structures will be displayed. \MessageBreak
       Type <return> to proceed. \MessageBreak
       Type X <return> to quit. \MessageBreak
}
       \immediate\closein\structurefile\egroup
    \else
    \message{[\structurefilename] ->}
    \xdef\second@{} \xdef\temp@{RESIDUE}
    \loop
       \read\structurefile to \readline
       \xdef\test@{\expandafter\string\readline}
       \xdef\structureline{\readline & & & & & & & & &@}
       \expandafter\struc@get\structureline
       \ifx\second@\temp@ \xdef\temp@{AA}\fi
    \ifx\third@\temp@ \else\repeat
    \immediate\openout\featurefile = \file@n@me
    \xdef\c@mp{+}
    \xdef\begin@{\csname seq@start\st@rt\endcsname}
    \xdef\end@{\csname seq@start\st@rt\endcsname}
    \xdef\st@rt@{\begin@}
    \expandafter\innerloopcount=\csname seq@start\st@rt\endcsname
    \advance\innerloopcount by -1
    \xdef\first@@{0} \xdef\second@@{0} \xdef\third@@{0}
    \xdef\fourth@@{0} \xdef\fifth@@{0} \xdef\sixth@@{0}
    \xdef\seventh@@{0}
    \loop
       \read\structurefile to \readline
       \xdef\test@{\expandafter\string\readline}
       \ifx\test@\par@
       \else
             \xdef\structureline{\readline & & & & & & & & &@}
             \expandafter\struc@get\structureline
             \if\c@mp + \xdef\c@mp{\fifth@}\fi
             \ifx\fifth@\c@mp
                \ifx\fc@DSSP\y@
                   \temp@count=\first@
                \else
                   \temp@count=\second@
                \fi
                \advance\temp@count by \st@rt@
                \advance\temp@count by -1
                \xdef\end@{\the\temp@count}
             \else
                   \ifnum\begin@>0
                      \ifnum\end@<\begin@ \xdef\end@{\begin@}\fi
                      \if\c@mp C
                      \else
                      \if\c@mp H
                        \ifx\show@Hdssp\yes
                         \loopcount=\first@@
                         \advance\loopcount by 1
                         \xdef\first@@{\the\loopcount}
                         \ifx\m@p\yes
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Hdssp}{\begin@..\end@}%
                            {\label@Hdssp}{\text@Hdssp}}
                         \else
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Hdssp}{\st@rt}{\begin@..\end@}%
                            {\label@Hdssp}{\text@Hdssp}}\fi
                        \fi
                      \else
                      \if\c@mp G
                        \ifx\show@Gdssp\yes
                         \loopcount=\second@@
                         \advance\loopcount by 1
                         \xdef\second@@{\the\loopcount}
                         \ifx\m@p\yes
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Gdssp}{\begin@..\end@}%
                            {\label@Gdssp}{\text@Gdssp}}
                         \else
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Gdssp}{\st@rt}{\begin@..\end@}%
                            {\label@Gdssp}{\text@Gdssp}}\fi
                        \fi
                      \else
                      \if\c@mp I
                        \ifx\show@Idssp\yes
                         \loopcount=\third@@
                         \advance\loopcount by 1
                         \xdef\third@@{\the\loopcount}
                         \ifx\m@p\yes
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Idssp}{\begin@..\end@}%
                            {\label@Idssp}{\text@Idssp}}
                         \else
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Idssp}{\st@rt}{\begin@..\end@}%
                            {\label@Idssp}{\text@Idssp}}\fi
                        \fi
                      \else
                      \if\c@mp E
                        \ifx\show@Edssp\yes
                         \loopcount=\fourth@@
                         \advance\loopcount by 1
                         \xdef\fourth@@{\the\loopcount}
                         \advance\innerloopcount by 1
                         \ifx\m@p\yes
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Edssp}{\begin@..\end@}%
                            {\label@Edssp}{\text@Edssp}}
                         \else
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Edssp}{\st@rt}{\begin@..\end@}%
                            {\label@Edssp}{\text@Edssp}}\fi
                        \fi
                      \else
                      \if\c@mp B
                        \ifx\show@Bdssp\yes
                         \loopcount=\fifth@@
                         \advance\loopcount by 1
                         \xdef\fifth@@{\the\loopcount}
                         \ifx\m@p\yes
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Bdssp}{\begin@..\end@}%
                            {\label@Bdssp}{\text@Bdssp}}
                         \else
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Bdssp}{\st@rt}{\begin@..\end@}%
                            {\label@Bdssp}{\text@Bdssp}}\fi
                        \fi
                      \else
                      \if\c@mp T
                        \ifx\show@Tdssp\yes
                         \loopcount=\sixth@@
                         \advance\loopcount by 1
                         \xdef\sixth@@{\the\loopcount}
                         \ifx\m@p\yes
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Tdssp}{\begin@..\end@}%
                            {\label@Tdssp}{\text@Tdssp}}
                         \else
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Tdssp}{\st@rt}{\begin@..\end@}%
                            {\label@Tdssp}{\text@Tdssp}}\fi
                        \fi
                      \else
                      \if\c@mp S
                        \ifx\show@Sdssp\yes
                         \loopcount=\seventh@@
                         \advance\loopcount by 1
                         \xdef\seventh@@{\the\loopcount}
                         \ifx\m@p\yes
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Sdssp}{\begin@..\end@}%
                            {\label@Sdssp}{\text@Sdssp}}
                         \else
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Sdssp}{\st@rt}{\begin@..\end@}%
                            {\label@Sdssp}{\text@Sdssp}}\fi
                        \fi
                      \fi\fi\fi\fi\fi\fi\fi\fi
                   \fi
                   \xdef\c@mp{\fifth@}
                   \ifx\fc@DSSP\y@
                      \temp@count=\first@
                   \else
                      \temp@count=\second@
                   \fi
                   \advance\temp@count by \st@rt@
                   \advance\temp@count by -1
                   \xdef\begin@{\the\temp@count}
             \fi
       \fi
    \ifeof\structurefile \else\repeat
    \closein\structurefile
    \immediate\closeout\featurefile
    \egroup
    \input{\file@n@me}
   \fi
   \else
    \egroup
    \message{using existing file:}
    \input{\file@n@me}
   \fi
 }

\def\include@HMMTOP{%
 \def\get@HMMTOP@TMs##1-##2 ##3@{%
     \xdef\temp@@{\temp@@\fourth@@##1\fourth@@##2}
     \xdef\structureline{##3 @}
  }
  \def\get@HMMTOP{%
     \ifnum\temp@count<\fifth@
        \advance\temp@count by 1
        \expandafter\get@HMMTOP@TMs\structureline
        \get@HMMTOP
     \fi
  }
  \def\rem@ve@TM@info Transmembrane helices: ##1@{%
     \xdef\structureline{##1 @}
     \temp@count=0
     \get@HMMTOP
  }
 \xdef\bottop@{\csname bottopHMMTOP\the\loopcount\endcsname}
  \xdef\st@rt{\csname doseqHMMTOP\the\loopcount\endcsname}
  \xdef\first@{\csname optionHMMTOP\the\loopcount\endcsname}
  \xdef\structurefilename{\csname filenameHMMTOP\the\loopcount\endcsname}
  \bgroup
   \xdef\file@n@me{\structurefilename .@}
   \expandafter\cut@name\file@n@me
   \xdef\file@n@me{\file@n@me.top}
   \ifx\first@\file@n@me
   \else
      \immediate\openin\alignfile = \file@n@me\relax
      \ifeof\alignfile \xdef\first@{make new} \fi
      \immediate\closein\alignfile
   \fi
   \xdef\temp@{make new}
   \ifx\first@\temp@
    \def\par{}
    \inactivate@chars
    \immediate\openin\structurefile = \structurefilename\relax
    \ifeof\structurefile
      \PackageError{TeXshade}
      {File `\structurefilename' not found}
      {\MessageBreak
       The `HMMTOP' file you specified is missing or you have \MessageBreak
       misspelled it. \MessageBreak\MessageBreak
       No labels for secondary structures will be displayed. \MessageBreak
       Type <return> to proceed. \MessageBreak
       Type X <return> to quit. \MessageBreak
}
       \immediate\closein\structurefile\egroup
    \else
    \message{[\structurefilename] ->}
    \immediate\openout\featurefile = \file@n@me

    \xdef\first@{\csname fileseqHMMTOP\the\loopcount\endcsname @}
    \expandafter\check@letter\first@
    \ifletter
       \xdef\st@p{\csname fileseqHMMTOP\the\loopcount\endcsname}
    \else
       \xdef\first@{\csname fileseqHMMTOP\the\loopcount\endcsname}
       \ifnum\first@=0
          \xdef\st@p{0}
       \else
          \xdef\st@p{\csname fileseqHMMTOP\the\loopcount\endcsname}
       \fi
    \fi
    \xdef\temp@{yes} \innerloopcount=0
    \loop
       \read\structurefile to \readline
       \xdef\test@{\expandafter\string\readline}
       \ifx\test@\par@
       \else
          \xdef\structureline{\readline & & & & & & & & &@}
          \expandafter\struc@get\structureline
          \ifx\first@\@HP
             \ifx\temp@\yes \xdef\temp@{\readline} \fi
             \ifletter
                \ifx\st@p\third@ \xdef\temp@{\readline} \fi
             \else
             \ifnum\st@p=0
                \expandafter\ifx\csname seqname\st@rt\endcsname\third@
                   \xdef\temp@{\readline} \xdef\st@p{-1}
                \else
                   \expandafter\ifx\csname newseqname\st@rt\endcsname\third@
                      \xdef\temp@{\readline} \xdef\st@p{-1}
               \fi
            \fi
         \else
            \advance\innerloopcount by 1
            \ifnum\st@p=\innerloopcount \xdef\temp@{\readline} \fi
         \fi
         \fi
      \else
      \xdef\first@@{Protein:}
      \ifx\first@\first@@
         \xdef\second@@{\second@}
         \xdef\temp@@{>HP:} \xdef\fourth@@{ }
             \read\structurefile to \readline
             \xdef\structureline{\readline & & & & & & & & &@}
             \expandafter\struc@get\structureline
             \xdef\temp@@{\temp@@\fourth@@\second@\fourth@@\second@@}
             \read\structurefile to \readline
             \xdef\structureline{\readline & & & & & & & & &@}
             \expandafter\struc@get\structureline
             \xdef\temp@@{\temp@@\fourth@@\second@}
             \read\structurefile to \readline
             \xdef\structureline{\readline & & & & & & & & &@}
             \expandafter\struc@get\structureline
             \xdef\temp@@{\temp@@\fourth@@\fifth@}
             \read\structurefile to \readline
             \xdef\structureline{\readline @}
             \expandafter\rem@ve@TM@info\structureline
             \xdef\temp@@{\temp@@\fourth@@}
             \ifx\temp@\yes \xdef\temp@{\temp@@} \fi
             \ifletter
                \ifx\st@p\third@ \xdef\temp@{\temp@@} \fi
             \else
             \ifnum\st@p=0
                \expandafter\ifx\csname seqname\st@rt\endcsname\second@@
                   \xdef\temp@{\temp@@}
                \else
                   \expandafter\ifx\csname newseqname\st@rt\endcsname\second@@
                      \xdef\temp@{\temp@@}
               \fi
            \fi
         \else
            \advance\innerloopcount by 1
            \ifnum\st@p=\innerloopcount \xdef\temp@{\temp@@} \fi
         \fi
         \fi
      \fi
          \fi
       \fi
    \ifeof\structurefile \else\repeat
    \xdef\seq@line{\temp@ @}
    \innerloopcount=0
    \loop
       \advance\innerloopcount by 1
       \expandafter\seq@get\seq@line
       \xdef\seq@line{\seq@line @}
       \ifnum\innerloopcount=4 \xdef\c@mp{\first@} \fi
    \ifnum\innerloopcount=5 \xdef\st@p{\first@} \else \repeat
    \xdef\first@{IN}
    \ifx\c@mp\first@ \xdef\c@mp{i} \else \xdef\c@mp{e} \fi
    \xdef\begin@{1} \xdef\first@@{0} \xdef\second@@{0}
    \innerloopcount=0
    \loop
       \advance\innerloopcount by 1
       \expandafter\seq@get\seq@line
       \xdef\seq@line{\seq@line @}
       \temp@count=\first@
       \advance\temp@count by -1
       \xdef\end@{\the\temp@count}
       \loopcount=\second@@
       \advance\loopcount by 1
       \xdef\second@@{\the\loopcount}
       \if\c@mp i
          \ifx\show@i@HMMTOP\yes
          \immediate\write\featurefile{%
             \string\feature{\bottop@i@HMMTOP}{\st@rt}{\begin@..\end@}%
             {\label@i@HMMTOP}{\text@i@HMMTOP}}\fi
          \xdef\c@mp{e}
       \else
          \ifx\show@e@HMMTOP\yes
          \immediate\write\featurefile{%
             \string\feature{\bottop@e@HMMTOP}{\st@rt}{\begin@..\end@}%
             {\label@e@HMMTOP}{\text@e@HMMTOP}}\fi
          \xdef\c@mp{i}
       \fi
       \advance\temp@count by 1
       \xdef\begin@{\the\temp@count}
       \expandafter\seq@get\seq@line
       \xdef\seq@line{\seq@line @}
       \xdef\end@{\first@}
       \loopcount=\first@@
       \advance\loopcount by 1
       \xdef\first@@{\the\loopcount}
       \ifx\show@TM@HMMTOP\yes
          \immediate\write\featurefile{%
          \string\feature{\bottop@TM@HMMTOP}{\st@rt}{\begin@..\end@}%
          {\label@TM@HMMTOP}{\text@TM@HMMTOP}}\fi
       \temp@count=\end@ \advance\temp@count by 1 \xdef\begin@{\the\temp@count}
    \ifnum\innerloopcount=\st@p\else\repeat
    \closein\structurefile
    \immediate\closeout\featurefile
    \egroup

    \input{\file@n@me}
   \fi
   \else
    \egroup
    \message{using existing file:}
    \input{\file@n@me}
   \fi
 }

\def\include@stride{%
  \xdef\first@{\csname optionstride\the\loopcount\endcsname}
  \xdef\bottop@{\csname bottopstride\the\loopcount\endcsname}
  \xdef\st@rt{\csname doseqstride\the\loopcount\endcsname}
  \xdef\structurefilename{\csname filenamestride\the\loopcount\endcsname}
  \bgroup
   \xdef\file@n@me{\structurefilename .@}
   \expandafter\cut@name\file@n@me
   \xdef\file@n@me{\file@n@me.sec}
   \ifx\first@\file@n@me
   \else
      \immediate\openin\alignfile = \file@n@me\relax
      \ifeof\alignfile \xdef\first@{make new} \fi
      \immediate\closein\alignfile
   \fi
   \xdef\temp@{make new}
   \ifx\first@\temp@
    \def\par{}
    \inactivate@chars
    \immediate\openin\structurefile = \structurefilename\relax
    \ifeof\structurefile
      \PackageError{TeXshade}
      {File `\structurefilename' not found}
      {\MessageBreak
       The `STRIDE' file you specified is missing or you have \MessageBreak
       misspelled it. \MessageBreak\MessageBreak
       No labels for secondary structures will be displayed. \MessageBreak
       Type <return> to proceed. \MessageBreak
       Type X <return> to quit. \MessageBreak
}
       \immediate\closein\structurefile\egroup
    \else
    \message{[\structurefilename] ->}
    \immediate\openout\featurefile = \file@n@me
    \xdef\c@mp{+}
    \xdef\begin@{\csname seq@start\st@rt\endcsname}
    \xdef\end@{\csname seq@start\st@rt\endcsname}
    \xdef\st@rt@{\begin@}
    \expandafter\innerloopcount=\csname seq@start\st@rt\endcsname
    \advance\innerloopcount by -1
    \xdef\first@@{0} \xdef\second@@{0} \xdef\third@@{0}
    \xdef\fourth@@{0} \xdef\fifth@@{0} \xdef\sixth@@{0}
    \loop
       \read\structurefile to \readline
       \xdef\test@{\expandafter\string\readline}
       \ifx\test@\par@
       \else
          \xdef\structureline{\readline & & & & & & & & &@}
          \expandafter\struc@get\structureline
          \ifx\first@\@asg
             \if\c@mp + \xdef\c@mp{\sixth@}\fi
             \ifx\sixth@\c@mp
                \temp@count=\fifth@
                \advance\temp@count by \st@rt@
                \advance\temp@count by -1
                \xdef\end@{\the\temp@count}
             \else
                   \ifnum\begin@>0
                      \ifnum\end@<\begin@ \xdef\end@{\begin@}\fi
                      \if\c@mp C
                      \else
                      \if\c@mp H
                        \ifx\show@Hstride\yes
                         \loopcount=\first@@
                         \advance\loopcount by 1
                         \xdef\first@@{\the\loopcount}
                         \ifx\m@p\yes
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Hstride}{\begin@..\end@}%
                            {\label@Hstride}{\text@Hstride}}
                         \else
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Hstride}{\st@rt}{\begin@..\end@}%
                            {\label@Hstride}{\text@Hstride}}\fi
                        \fi
                      \else
                      \if\c@mp G
                        \ifx\show@Gstride\yes
                         \loopcount=\second@@
                         \advance\loopcount by 1
                         \xdef\second@@{\the\loopcount}
                         \ifx\m@p\yes
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Gstride}{\begin@..\end@}%
                            {\label@Gstride}{\text@Gstride}}
                         \else
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Gstride}{\st@rt}{\begin@..\end@}%
                            {\label@Gstride}{\text@Gstride}}\fi
                        \fi
                      \else
                      \if\c@mp I
                        \ifx\show@Istride\yes
                         \loopcount=\third@@
                         \advance\loopcount by 1
                         \xdef\third@@{\the\loopcount}
                         \ifx\m@p\yes
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Istride}{\begin@..\end@}%
                            {\label@Istride}{\text@Istride}}
                         \else
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Istride}{\st@rt}{\begin@..\end@}%
                            {\label@Istride}{\text@Istride}}\fi
                        \fi
                      \else
                      \if\c@mp E
                        \ifx\show@Estride\yes
                         \loopcount=\fourth@@
                         \advance\loopcount by 1
                         \xdef\fourth@@{\the\loopcount}
                         \advance\innerloopcount by 1
                         \ifx\m@p\yes
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Estride}{\begin@..\end@}%
                            {\label@Estride}{\text@Estride}}
                         \else
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Estride}{\st@rt}{\begin@..\end@}%
                            {\label@Estride}{\text@Estride}}\fi
                        \fi
                      \else
                      \if\c@mp B
                        \ifx\show@Bstride\yes
                         \loopcount=\fifth@@
                         \advance\loopcount by 1
                         \xdef\fifth@@{\the\loopcount}
                         \ifx\m@p\yes
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Bstride}{\begin@..\end@}%
                            {\label@Bstride}{\text@Bstride}}
                         \else
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Bstride}{\st@rt}{\begin@..\end@}%
                            {\label@Bstride}{\text@Bstride}}\fi
                        \fi
                      \else
                      \if\c@mp T
                        \ifx\show@Tstride\yes
                         \loopcount=\sixth@@
                         \advance\loopcount by 1
                         \xdef\sixth@@{\the\loopcount}
                         \ifx\m@p\yes
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Tstride}{\begin@..\end@}%
                            {\label@Tstride}{\text@Tstride}}
                         \else
                         \immediate\write\featurefile{%
                            \string\feature{\bottop@Tstride}{\st@rt}{\begin@..\end@}%
                            {\label@Tstride}{\text@Tstride}}\fi
                        \fi
                      \fi\fi\fi\fi\fi\fi\fi
                   \fi
                   \xdef\c@mp{\sixth@}
                   \temp@count=\fifth@
                   \advance\temp@count by \st@rt@
                   \advance\temp@count by -1
                   \xdef\begin@{\the\temp@count}
             \fi
          \fi
       \fi
    \ifeof\structurefile \else\repeat
    \closein\structurefile
    \immediate\closeout\featurefile
    \egroup
    \input{\file@n@me}
   \fi
   \else
    \egroup
    \message{using existing file:}
    \input{\file@n@me}
   \fi
 }
\def\include@PHD{%
  \xdef\first@{\csname optionphd\the\loopcount\endcsname}
  \xdef\bottop@{\csname bottopphd\the\loopcount\endcsname}
  \xdef\st@rt{\csname doseqphd\the\loopcount\endcsname}
  \xdef\m@de{\csname modephd\the\loopcount\endcsname}
  \xdef\structurefilename{\csname filenamephd\the\loopcount\endcsname}
  \bgroup
   \xdef\file@n@me{\structurefilename .@}
   \expandafter\cut@name\file@n@me
   \xdef\temp@{structure}
   \ifx\m@de\temp@
      \xdef\temp@{\file@n@me .sec}
      \immediate\openin\alignfile = \temp@\relax
      \ifeof\alignfile \xdef\first@{make new} \fi
      \immediate\closein\alignfile
   \else
   \xdef\temp@{topology}
   \ifx\m@de\temp@
      \xdef\temp@{\file@n@me .top}
      \immediate\openin\alignfile = \temp@\relax
      \ifeof\alignfile \xdef\first@{make new} \fi
      \immediate\closein\alignfile
   \else
      \message{<Unknown type - ignoring \noexpand\includePHD>}
      \xdef\first@{ignore}
   \fi\fi
   \xdef\temp@{make new}
   \ifx\first@\temp@
    \def\par{}
    \xdef\PHD@line{}
    \inactivate@chars
    \immediate\openin\structurefile=\structurefilename\relax
    \ifeof\structurefile
      \PackageError{TeXshade}%
      {File `\structurefilename' not found}%
      {\MessageBreak
       The `PHD' file you specified is missing or you have \MessageBreak
       misspelled it. \MessageBreak\MessageBreak
       No labels for secondary structures will be displayed. \MessageBreak
       Type <return> to proceed. \MessageBreak
       Type X <return> to quit. \MessageBreak
}
       \immediate\closein\structurefile\egroup
    \else
    \message{[\structurefilename] ->}
    \loop
       \read\structurefile to \readline
       \xdef\structureline{\readline & & & & & & & & &@}
       \expandafter\struc@get\structureline
       \xdef\temp@{structure}
       \ifx\m@de\temp@
          \xdef\temp@{SUB}
          \ifx\temp@\first@
             \xdef\temp@{sec}
             \ifx\temp@\second@
                \xdef\third@{\third@ @}
                \expandafter\get@PHD\third@
             \fi
          \else
             \ifx\temp@\second@
                \xdef\temp@{sec}
                \ifx\temp@\third@
                   \xdef\fourth@{\fourth@ @}
                   \expandafter\get@PHD\fourth@
                \fi
             \fi
          \fi
       \else
       \xdef\temp@{topology}
       \ifx\m@de\temp@
          \xdef\temp@{PHDThtm}
          \ifx\temp@\first@
             \xdef\second@{\second@ @}
             \expandafter\get@PHD\second@
          \fi
       \fi\fi
    \ifeof\structurefile \else\repeat
    \closein\structurefile
    \xdef\c@mp{+}
    \xdef\begin@{\csname seq@start\st@rt\endcsname}
    \xdef\end@{\csname seq@start\st@rt\endcsname}
    \expandafter\innerloopcount=\csname seq@start\st@rt\endcsname
    \advance\innerloopcount by -1
    \xdef\first@{0} \xdef\second@{0} \xdef\third@{0}
    \xdef\fourth@{0} \xdef\fifth@{0} \xdef\sixth@{0}
    \xdef\last@{\PHD@line &@}
    \xdef\temp@{structure}
    \ifx\temp@\m@de
       \xdef\file@n@me{\file@n@me .sec}
       \immediate\openout\featurefile = \file@n@me\relax
       \write@PHDsec
    \fi
    \xdef\temp@{topology}
    \ifx\temp@\m@de
       \xdef\file@n@me{\file@n@me .top}
       \immediate\openout\featurefile = \file@n@me\relax
       \write@PHDtopo
    \fi
    \immediate\closeout\featurefile
    \egroup
    \input{\file@n@me}
   \fi
   \else
    \egroup
    \xdef\temp@{ignore}
    \ifx\temp@\first@
    \else
       \message{using existing file:}
       \xdef\temp@{structure}
       \ifx\temp@\m@de \xdef\file@n@me{\file@n@me .sec} \fi
       \xdef\temp@{topology}
       \ifx\temp@\m@de \xdef\file@n@me{\file@n@me .top} \fi
       \input{\file@n@me}
    \fi
   \fi}
\def\show@DSSP{%
   \expandafter\get@item\first@
   \ifx\fourth@\ampers@nd
   \else
      \xdef\temp@{alpha}
      \ifx\fourth@\temp@ \xdef\show@Hdssp{\second@}\fi
      \xdef\temp@{3-10}
      \ifx\fourth@\temp@ \xdef\show@Gdssp{\second@}\fi
      \xdef\temp@{pi}
      \ifx\fourth@\temp@ \xdef\show@Idssp{\second@}\fi
      \xdef\temp@{beta}
      \ifx\fourth@\temp@ \xdef\show@Edssp{\second@}\fi
      \xdef\temp@{bridge}
      \ifx\fourth@\temp@ \xdef\show@Bdssp{\second@}\fi
      \xdef\temp@{turn}
      \ifx\fourth@\temp@ \xdef\show@Tdssp{\second@}\fi
      \xdef\temp@{bend}
      \ifx\fourth@\temp@ \xdef\show@Sdssp{\second@}\fi
      \show@DSSP
   \fi}
\def\show@HMMTOP{%
   \expandafter\get@item\first@
   \ifx\fourth@\ampers@nd
   \else
      \xdef\temp@{internal}
      \ifx\fourth@\temp@ \xdef\show@i@HMMTOP{\second@}\fi
      \xdef\temp@{external}
      \ifx\fourth@\temp@ \xdef\show@e@HMMTOP{\second@}\fi
      \xdef\temp@{TM}
      \ifx\fourth@\temp@ \xdef\show@TM@HMMTOP{\second@}\fi
      \show@HMMTOP
   \fi}
\def\show@STRIDE{%
   \expandafter\get@item\first@
   \ifx\fourth@\ampers@nd
   \else
      \xdef\temp@{alpha}
      \ifx\fourth@\temp@ \xdef\show@Hstride{\second@}\fi
      \xdef\temp@{3-10}
      \ifx\fourth@\temp@ \xdef\show@Gstride{\second@}\fi
      \xdef\temp@{pi}
      \ifx\fourth@\temp@ \xdef\show@Istride{\second@}\fi
      \xdef\temp@{beta}
      \ifx\fourth@\temp@ \xdef\show@Estride{\second@}\fi
      \xdef\temp@{bridge}
      \ifx\fourth@\temp@ \xdef\show@Bstride{\second@}\fi
      \xdef\temp@{turn}
      \ifx\fourth@\temp@ \xdef\show@Tstride{\second@}\fi
      \show@STRIDE
   \fi}
\def\show@PHDtopo{%
   \expandafter\get@item\first@
   \ifx\fourth@\ampers@nd
   \else
      \xdef\temp@{internal}
      \ifx\fourth@\temp@ \xdef\show@itop{\second@}\fi
      \xdef\temp@{external}
      \ifx\fourth@\temp@ \xdef\show@etop{\second@}\fi
      \xdef\temp@{TM}
      \ifx\fourth@\temp@ \xdef\show@TMtop{\second@}\fi
      \show@PHDtopo
   \fi}
\def\show@PHDsec{%
   \expandafter\get@item\first@
   \ifx\fourth@\ampers@nd
   \else
      \xdef\temp@{alpha}
      \ifx\fourth@\temp@ \xdef\show@Hsec{\second@}\fi
      \xdef\temp@{beta}
      \ifx\fourth@\temp@ \xdef\show@Esec{\second@}\fi
      \show@PHDsec
   \fi}
\def\get@triplet#1,#2@{%
   \xdef\third@{#1}
   \ifx\third@\ampers@nd
   \else
      \expandafter\xdef\csname @\third@\endcsname{\first@}
      \expandafter\xdef\csname rev@\first@\endcsname{\third@}
  \xdef\fourth@{#2,&,@}
  \expandafter\get@triplet\fourth@
   \fi}
\def\get@dom@count#1,#2@{\res@count=#1 \xdef\temp@{#2 @}}
\def\get@name@number{%
   \xdef\second@{n}
   \loopcount=0
   \loop
      \advance\loopcount by 1
      \expandafter\ifx\csname newseqname\the\loopcount\endcsname\first@
         \xdef\first@{\the\loopcount} \loopcount=\seq@count
         \xdef\second@{y}
      \fi
   \ifnum\loopcount=\seq@count \else \repeat
   \ifx\second@\n@
      \message{<Sequence name `\first@' was not found - using first sequence.>}
      \xdef\first@{1}
   \fi
}
\def\get@name@number@table{%
   \xdef\second@{n}%
   \loopcount=0%
   \loop%
      \advance\loopcount by 1%
      \expandafter\ifx\csname newseqname\the\loopcount\endcsname\first@%
         \xdef\first@{\the\loopcount}\loopcount=\seq@num%
         \xdef\second@{y}%
      \fi%
   \ifnum\loopcount=\seq@num\else\repeat%
   \ifx\second@\n@%
      \message{<Sequence name `\first@' was not found - using first sequence.>}%
      \xdef\first@{1}%
   \fi%
}

\def\calc@distance@point{%
   \loopcount=\xref@coord@a \advance\loopcount by -\x@coord\relax
   \multiply\loopcount by \loopcount \xdef\x@distance{\the\loopcount}
   \loopcount=\yref@coord@a \advance\loopcount by -\y@coord\relax
   \multiply\loopcount by \loopcount \xdef\y@distance{\the\loopcount}
   \loopcount=\zref@coord@a \advance\loopcount by -\z@coord\relax
   \multiply\loopcount by \loopcount \xdef\z@distance{\the\loopcount}
   \advance\loopcount by \y@distance\relax
   \advance\loopcount by \x@distance\relax
   \ifnum\loopcount > \PDB@distance \else
      \loopcount=\PDB@hitpos \advance\loopcount by 1
      \ifnum\loopcount=\PDB@pos
      \else
         \xdef\PDB@stack{\PDB@stack\PDB@hitpos,\PDB@pos..}
      \fi
      \xdef\PDB@hitpos{\PDB@pos}
   \fi
}

\def\calc@distance@line{%
   \loopcount=\x@coord\relax \multiply\loopcount by \x@orient
   \temp@count=\y@coord \relax \multiply\temp@count by \y@orient
   \advance\loopcount by \temp@count
   \temp@count=\z@coord \relax \multiply\temp@count by \z@orient
   \advance\loopcount by \temp@count
   \advance\loopcount by -\c@nst@
   \xdef\z@hler{\the\loopcount}
   \multiply\loopcount by \x@orient \divide\loopcount by \f@ct@r \advance\loopcount by \xref@coord@a
   \advance\loopcount by -\x@coord
   \multiply\loopcount by \loopcount \xdef\x@distance{\the\loopcount}
   \loopcount=\z@hler
   \multiply\loopcount by \y@orient \divide\loopcount by \f@ct@r \advance\loopcount by \yref@coord@a
   \advance\loopcount by -\y@coord
   \multiply\loopcount by \loopcount \xdef\y@distance{\the\loopcount}
   \loopcount=\z@hler
   \multiply\loopcount by \z@orient \divide\loopcount by \f@ct@r \advance\loopcount by \zref@coord@a
   \advance\loopcount by -\z@coord
   \multiply\loopcount by \loopcount \xdef\z@distance{\the\loopcount}
   \advance\loopcount by \y@distance\relax
   \advance\loopcount by \x@distance\relax
   \ifnum\loopcount > \PDB@distance \else
      \loopcount=\PDB@hitpos \advance\loopcount by 1
      \ifnum\loopcount=\PDB@pos
      \else
         \xdef\PDB@stack{\PDB@stack\PDB@hitpos,\PDB@pos..}
      \fi
      \xdef\PDB@hitpos{\PDB@pos}
   \fi
}

\def\intr@@t{%
   \loopcount=\r@@t
   \temp@count=1
   \loop
      \advance\loopcount by \temp@count
      \divide\loopcount by 2
      \temp@count=\r@@t
      \divide\temp@count by \loopcount
   \ifnum\loopcount>\temp@count\repeat
}

\def\calc@distance@plane{%
   \loopcount=\x@coord\relax
   \multiply\loopcount by \x@orient
   \temp@count=\y@coord \relax
   \multiply\temp@count by \y@orient
   \advance\loopcount by \temp@count
   \temp@count=\z@coord \relax
   \multiply\temp@count by \z@orient
   \advance\loopcount by \temp@count
   \advance\loopcount by \c@nst@
   \divide\loopcount by \f@ct@r
   \multiply\loopcount by \loopcount
   \ifnum\loopcount > \PDB@distance \else
      \loopcount=\PDB@hitpos \advance\loopcount by 1
      \ifnum\loopcount=\PDB@pos
      \else
         \xdef\PDB@stack{\PDB@stack\PDB@hitpos,\PDB@pos..}
      \fi
      \xdef\PDB@hitpos{\PDB@pos}
   \fi
}

\def\load@PDB{%
    \bgroup
    \immediate\openin\structurefile = \PDB@name\relax
    \ifeof\structurefile
      \PackageError{TeXshade}
      {File `\PDB@name' not found}
      {\MessageBreak
       The file you specified is missing or you have \MessageBreak
       misspelled it. \MessageBreak\MessageBreak
       No PDB domain labeling will be displayed. \MessageBreak
       Type <return> to proceed. \MessageBreak
       Type X <return> to quit. \MessageBreak
}
       \immediate\closein\structurefile\egroup
    \else
    \message{<reading PDB: \PDB@name>}
    \xdef\first@{}
    \loop
       \read\structurefile to \readline
       \xdef\test@{\expandafter\string\readline}
       \ifx\test@\par@
       \else
          \xdef\structureline{\readline & & & & & & & & &@}
          \expandafter\struc@get\structureline
          \ifx\first@\@TOM
             \ifx\PDB@back@side@a\C@lpha
                \ifx\third@\C@lpha
                   \xdef\temp@@@{\fifth@ &&@}
                   \expandafter\check@letter\temp@@@
                   \ifnumber
                      \ifnum\fifth@=\PDB@refnum@a
                         \xdef\sixth@{\sixth@ &.&&@} \expandafter\coord@get\sixth@ \xdef\xref@coord@a{\c@@rd}
                         \xdef\seventh@{\seventh@ &.&&@} \expandafter\coord@get\seventh@ \xdef\yref@coord@a{\c@@rd}
                         \xdef\eighth@{\eighth@ &.&&@} \expandafter\coord@get\eighth@ \xdef\zref@coord@a{\c@@rd}
                      \fi
                   \else
                      \ifnum\sixth@=\PDB@refnum@a
                         \xdef\seventh@{\seventh@ &.&&@} \expandafter\coord@get\seventh@ \xdef\xref@coord@a{\c@@rd}
                         \xdef\eighth@{\eighth@ &.&&@} \expandafter\coord@get\eighth@ \xdef\yref@coord@a{\c@@rd}
                         \xdef\nineth@{\nineth@ &.&&@} \expandafter\coord@get\nineth@ \xdef\zref@coord@a{\c@@rd}
                      \fi
                   \fi
                \fi
             \else
                \xdef\temp@@@{\fifth@ &&@}
                \expandafter\check@letter\temp@@@
                \ifnumber
                   \ifnum\fifth@=\PDB@refnum@a
                      \xdef\sixth@{\sixth@ &.&&@} \expandafter\coord@get\sixth@ \xdef\xref@coord@a{\c@@rd}
                      \xdef\seventh@{\seventh@ &.&&@} \expandafter\coord@get\seventh@ \xdef\yref@coord@a{\c@@rd}
                      \xdef\eighth@{\eighth@ &.&&@} \expandafter\coord@get\eighth@ \xdef\zref@coord@a{\c@@rd}
                   \fi
                \else
                   \ifnum\sixth@=\PDB@refnum@a
                      \xdef\seventh@{\seventh@ &.&&@} \expandafter\coord@get\seventh@ \xdef\xref@coord@a{\c@@rd}
                      \xdef\eighth@{\eighth@ &.&&@} \expandafter\coord@get\eighth@ \xdef\yref@coord@a{\c@@rd}
                      \xdef\nineth@{\nineth@ &.&&@} \expandafter\coord@get\nineth@ \xdef\zref@coord@a{\c@@rd}
                   \fi
                \fi
             \fi
             \ifx\PDB@back@side@b\C@lpha
                \ifx\third@\C@lpha
                   \xdef\temp@@@{\fifth@ &&@}
                   \expandafter\check@letter\temp@@@
                   \ifnumber
                      \ifnum\fifth@=\PDB@refnum@b
                         \xdef\sixth@{\sixth@ &.&&@} \expandafter\coord@get\sixth@ \xdef\xref@coord@b{\c@@rd}
                         \xdef\seventh@{\seventh@ &.&&@} \expandafter\coord@get\seventh@ \xdef\yref@coord@b{\c@@rd}
                         \xdef\eighth@{\eighth@ &.&&@} \expandafter\coord@get\eighth@ \xdef\zref@coord@b{\c@@rd}
                      \fi
                   \else
                      \ifnum\sixth@=\PDB@refnum@b
                         \xdef\seventh@{\seventh@ &.&&@} \expandafter\coord@get\seventh@ \xdef\xref@coord@b{\c@@rd}
                         \xdef\eighth@{\eighth@ &.&&@} \expandafter\coord@get\eighth@ \xdef\yref@coord@b{\c@@rd}
                         \xdef\nineth@{\nineth@ &.&&@} \expandafter\coord@get\nineth@ \xdef\zref@coord@b{\c@@rd}
                      \fi
                   \fi
                \fi
             \else
                \xdef\temp@@@{\fifth@ &&@}
                \expandafter\check@letter\temp@@@
                \ifnumber
                   \ifnum\fifth@=\PDB@refnum@b
                      \xdef\sixth@{\sixth@ &.&&@} \expandafter\coord@get\sixth@ \xdef\xref@coord@b{\c@@rd}
                      \xdef\seventh@{\seventh@ &.&&@} \expandafter\coord@get\seventh@ \xdef\yref@coord@b{\c@@rd}
                      \xdef\eighth@{\eighth@ &.&&@} \expandafter\coord@get\eighth@ \xdef\zref@coord@b{\c@@rd}
                   \fi
                \else
                   \ifnum\sixth@=\PDB@refnum@b
                      \xdef\seventh@{\seventh@ &.&&@} \expandafter\coord@get\seventh@ \xdef\xref@coord@b{\c@@rd}
                      \xdef\eighth@{\eighth@ &.&&@} \expandafter\coord@get\eighth@ \xdef\yref@coord@b{\c@@rd}
                      \xdef\nineth@{\nineth@ &.&&@} \expandafter\coord@get\nineth@ \xdef\zref@coord@b{\c@@rd}
                   \fi
                \fi
             \fi
             \ifx\PDB@back@side@c\C@lpha
                \ifx\third@\C@lpha
                   \xdef\temp@@@{\fifth@ &&@}
                   \expandafter\check@letter\temp@@@
                   \ifnumber
                      \ifnum\fifth@=\PDB@refnum@c
                         \xdef\sixth@{\sixth@ &.&&@} \expandafter\coord@get\sixth@ \xdef\xref@coord@c{\c@@rd}
                         \xdef\seventh@{\seventh@ &.&&@} \expandafter\coord@get\seventh@ \xdef\yref@coord@c{\c@@rd}
                         \xdef\eighth@{\eighth@ &.&&@} \expandafter\coord@get\eighth@ \xdef\zref@coord@c{\c@@rd}
                      \fi
                   \else
                      \ifnum\sixth@=\PDB@refnum@c
                         \xdef\seventh@{\seventh@ &.&&@} \expandafter\coord@get\seventh@ \xdef\xref@coord@c{\c@@rd}
                         \xdef\eighth@{\eighth@ &.&&@} \expandafter\coord@get\eighth@ \xdef\yref@coord@c{\c@@rd}
                         \xdef\nineth@{\nineth@ &.&&@} \expandafter\coord@get\nineth@ \xdef\zref@coord@c{\c@@rd}
                      \fi
                   \fi
                \fi
             \else
                \xdef\temp@@@{\fifth@ &&@}
                \expandafter\check@letter\temp@@@
                \ifnumber
                   \ifnum\fifth@=\PDB@refnum@c
                      \xdef\sixth@{\sixth@ &.&&@} \expandafter\coord@get\sixth@ \xdef\xref@coord@c{\c@@rd}
                      \xdef\seventh@{\seventh@ &.&&@} \expandafter\coord@get\seventh@ \xdef\yref@coord@c{\c@@rd}
                      \xdef\eighth@{\eighth@ &.&&@} \expandafter\coord@get\eighth@ \xdef\zref@coord@c{\c@@rd}
                   \fi
                \else
                   \ifnum\sixth@=\PDB@refnum@c
                      \xdef\seventh@{\seventh@ &.&&@} \expandafter\coord@get\seventh@ \xdef\xref@coord@c{\c@@rd}
                      \xdef\eighth@{\eighth@ &.&&@} \expandafter\coord@get\eighth@ \xdef\yref@coord@c{\c@@rd}
                      \xdef\nineth@{\nineth@ &.&&@} \expandafter\coord@get\nineth@ \xdef\zref@coord@c{\c@@rd}
                   \fi
                \fi
             \fi
          \fi
       \fi
    \ifeof\structurefile \else\repeat
    \closein\structurefile
    \ifx\PDB@type\@line@
       \loopcount=\xref@coord@a \advance\loopcount by -\xref@coord@b \xdef\x@orient{\the\loopcount}
       \loopcount=\yref@coord@a \advance\loopcount by -\yref@coord@b \xdef\y@orient{\the\loopcount}
       \loopcount=\zref@coord@a \advance\loopcount by -\zref@coord@b \xdef\z@orient{\the\loopcount}
       \loopcount=\xref@coord@a \multiply\loopcount by \x@orient
       \temp@count=\yref@coord@a \multiply\temp@count by \y@orient
       \advance\loopcount by \temp@count
       \temp@count=\zref@coord@a \multiply\temp@count by \z@orient
       \advance\loopcount by \temp@count
       \xdef\c@nst@{\the\loopcount}
       \loopcount=\x@orient \multiply\loopcount by \x@orient
       \temp@count=\y@orient \multiply\temp@count by \y@orient
       \advance\loopcount by \temp@count
       \temp@count=\z@orient \multiply\temp@count by \z@orient
       \advance\loopcount by \temp@count
       \xdef\f@ct@r{\the\loopcount}
    \fi
    \ifx\PDB@type\@plane@
       \loopcount=\xref@coord@a \advance\loopcount by -\xref@coord@b \xdef\x@orient@r{\the\loopcount}
       \loopcount=\yref@coord@a \advance\loopcount by -\yref@coord@b \xdef\y@orient@r{\the\loopcount}
       \loopcount=\zref@coord@a \advance\loopcount by -\zref@coord@b \xdef\z@orient@r{\the\loopcount}
       \loopcount=\xref@coord@a \advance\loopcount by -\xref@coord@c \xdef\x@orient@s{\the\loopcount}
       \loopcount=\yref@coord@a \advance\loopcount by -\yref@coord@c \xdef\y@orient@s{\the\loopcount}
       \loopcount=\zref@coord@a \advance\loopcount by -\zref@coord@c \xdef\z@orient@s{\the\loopcount}
       \loopcount=\y@orient@r \multiply\loopcount by \z@orient@s
       \temp@count=\z@orient@r \multiply\temp@count by \y@orient@s
       \advance\loopcount by -\temp@count \divide\loopcount by 100 \xdef\x@orient{\the\loopcount}
       \loopcount=\z@orient@r \multiply\loopcount by \x@orient@s
       \temp@count=\x@orient@r \multiply\temp@count by \z@orient@s
       \advance\loopcount by -\temp@count \divide\loopcount by 100 \xdef\y@orient{\the\loopcount}
       \loopcount=\x@orient@r \multiply\loopcount by \y@orient@s
       \temp@count=\y@orient@r \multiply\temp@count by \x@orient@s
       \advance\loopcount by -\temp@count \divide\loopcount by 100 \xdef\z@orient{\the\loopcount}
       \loopcount=\x@orient \multiply\loopcount by \xref@coord@a
       \temp@count=\y@orient \multiply\temp@count by \yref@coord@a
       \advance\loopcount by \temp@count
       \temp@count=\z@orient \multiply\temp@count by \zref@coord@a
       \advance\loopcount by \temp@count
       \multiply\loopcount by -1\relax
       \xdef\c@nst@{\the\loopcount}
       \loopcount=\x@orient \multiply\loopcount by \loopcount
       \temp@count=\y@orient \multiply\temp@count by \temp@count
       \advance\loopcount by \temp@count
       \temp@count=\z@orient \multiply\temp@count by \temp@count
       \advance\loopcount by \temp@count
       \xdef\r@@t{\the\loopcount} \intr@@t
       \xdef\f@ct@r{\the\loopcount}
    \fi
    \immediate\openin\structurefile = \PDB@name\relax
    \xdef\first@{}
    \loop
       \read\structurefile to \readline
       \xdef\test@{\expandafter\string\readline}
       \ifx\test@\par@
       \else
          \xdef\structureline{\readline & & & & & & & & &@}
          \expandafter\struc@get\structureline
          \ifx\first@\@TOM
                \xdef\temp@@@{\fifth@ &&@}
                \expandafter\check@letter\temp@@@
                \ifnumber
                      \xdef\PDB@pos{\fifth@}
                      \xdef\sixth@{\sixth@ &.&&@} \expandafter\coord@get\sixth@ \xdef\x@coord{\c@@rd}
                      \xdef\seventh@{\seventh@ &.&&@} \expandafter\coord@get\seventh@ \xdef\y@coord{\c@@rd}
                      \xdef\eighth@{\eighth@ &.&&@} \expandafter\coord@get\eighth@ \xdef\z@coord{\c@@rd}
                \else
                      \xdef\PDB@pos{\sixth@}
                      \xdef\seventh@{\seventh@ &.&&@} \expandafter\coord@get\seventh@ \xdef\x@coord{\c@@rd}
                      \xdef\eighth@{\eighth@ &.&&@} \expandafter\coord@get\eighth@ \xdef\y@coord{\c@@rd}
                      \xdef\nineth@{\nineth@ &.&&@} \expandafter\coord@get\nineth@ \xdef\z@coord{\c@@rd}
                \fi
                \ifnum\PDB@hitpos=\PDB@pos
                \else
                   \ifx\PDB@type\@point@
                      \calc@distance@point
                   \else
                      \ifx\PDB@type\@line@
                         \calc@distance@line
                      \else
                         \ifx\PDB@type\@plane@
                            \calc@distance@plane
                         \fi
                      \fi
                   \fi
                \fi
          \fi
       \fi
    \ifeof\structurefile \xdef\PDB@stack{\PDB@stack\PDB@hitpos,&@}
    \else\repeat
    \closein\structurefile

   \fi
   \egroup
 }

%%%%% Definition of user commands

\def\clearfuncgroups{\xdef\prfx{func} \clear@groups \xdef\fgroup@num{0}}
\clearfuncgroups
\def\germanlanguage{\germ@ntrue \sp@nishfalse \def\cons@name{Konsensus}}
\def\spanishlanguage{\germ@nfalse \sp@nishtrue \def\cons@name{consenso}}
\def\englishlanguage{\germ@nfalse \sp@nishfalse \def\cons@name{consensus}}
\def\showlegend{\legend@true}
\def\hidelegend{\legend@false}
\def\movelegend#1#2{%
   \setlength\hspace@legend{#1}
   \setlength\vspace@legend{#2}
}
\newcommand{\showcaption}[2][bottom]{\def\cap@pos{#1}\def\c@p{#2}}
\def\shortcaption#1{\def\c@pshort{#1}}
\def\funcgroup#1#2#3#4#5#6{%
   \xdef\first@{#1}
   \loopcount=0 \innerloopcount=0
   \loop
      \advance\loopcount by 1
      \ifx\csname fgroup@name\the\loopcount\endcsname\first@
          \innerloopcount=\loopcount \loopcount=\fgroup@num
      \fi
   \ifnum\loopcount<\fgroup@num \repeat
   \ifnum\innerloopcount=0
     \ifnum\fgroup@num<9
      \innerloopcount=\fgroup@num
      \advance\innerloopcount by 1 \xdef\fgroup@num{\the\innerloopcount}
     \else \message{<Too many \noexpand\funcgroups>}
     \fi
   \fi
   \ifnum\innerloopcount>0
      \expandafter\xdef\csname fgroup@name\the\innerloopcount\endcsname{\first@}
      \expandafter\xdef\csname fg@textcolor\the\innerloopcount\endcsname{#3}
      \expandafter\xdef\csname fg@color\the\innerloopcount\endcsname{#4}
      \expandafter\xdef\csname funcm@tch\the\innerloopcount\endcsname{#5}
      \expandafter\def\csname func@style\the\innerloopcount\endcsname{%
          \csname text#6\endcsname}
      \xdef\prfx{func}
      \xdef\third@{#2&,@} \loopcount=\innerloopcount
      \expandafter\group@get\third@
  \fi}
\def\pepgroups#1{%
   \xdef\prfx{pep}
    \clear@groups
    \xdef\third@{#1&,@} \loopcount=0
    \loop \expandafter\group@get\third@ \advance\loopcount by 1
    \ifnum\loopcount<10 \repeat}
\def\DNAgroups#1{%
   \xdef\prfx{DNA}
    \clear@groups
    \xdef\third@{#1&,@} \loopcount=0
    \loop \expandafter\group@get\third@ \advance\loopcount by 1
    \ifnum\loopcount<10 \repeat}
\def\pepsims#1#2{\xdef\prfx{pep}
   \def\sim@set{\expandafter\residue@get\second@
                 \ifx\first@\ampers@nd
                 \else \advance\innerloopcount by 1

                 \expandafter\xdef\csname simpair\third@\first@\endcsname{1}
                 \expandafter\xdef\csname simpair\first@\third@\endcsname{1}

                 \xdef\second@{\csname sequence\the\loopcount\endcsname} \sim@set
                 \fi}
   \xdef\first@{#1} \make@upper \xdef\third@{\first@}
   \xdef\last@{#2} \xdef\second@{#2 &@} \innerloopcount=0 \sim@set
   \expandafter\xdef\csname \prfx sim\third@\endcsname{%
               (\the\innerloopcount)\last@}}
\def\DNAsims#1#2{\xdef\prfx{DNA}
   \def\sim@set{\expandafter\residue@get\second@
                 \ifx\first@\ampers@nd
                 \else \advance\innerloopcount by 1
                 \xdef\second@{\csname sequence\the\loopcount\endcsname} \sim@set
                 \fi}
   \xdef\first@{#1} \make@upper \xdef\third@{\first@}
   \xdef\last@{#2} \xdef\second@{#2 &@} \innerloopcount=0 \sim@set
   \expandafter\xdef\csname \prfx sim\third@\endcsname{%
               (\the\innerloopcount)\last@}}
\def\fingerprint#1{%
   \ifnum #1 >0
   \residuesperline*{#1}
   \def\finger@linenum{#1}
   \shownames{left}
   \hidenumbering
   \rulersteps{100}
   \nomatchresidues{}{Gray10}{}{}
   \loopcount=0
   \loop
      \advance\loopcount by 1
      \separationline{\the\loopcount}
   \ifnum\loopcount<\seq@count\repeat
   \fi}
\def\printPDBlist#1{%
     \xdef\list@{}
     \xdef\temp@{#1,,,:,,,,@} \expandafter\test@PDB\temp@
     \xdef\first@{\list@ &}
     \ifx\first@\ampers@nd
     \else
        \xdef\first@{\list@ @}
        \loop
           \expandafter\get@item\first@
           \fourth@
        \ifx\first@@\ampers@nd\else{,\ }\repeat
     \fi
}
\def\messagePDBlist#1{%
     \xdef\list@{}
     \xdef\temp@{#1,,,:,,,,@} \expandafter\test@PDB\temp@
     \xdef\first@{\list@ &}
     \ifx\first@\ampers@nd
     \else
        \message{(#1:}
        \xdef\first@{\list@ @}%
        \loop%
           \expandafter\get@item\first@%
           \message{\fourth@}%
        \ifx\first@@\ampers@nd\else\repeat%
        \message{)}
     \fi
}
\def\shaderegion#1#2#3#4{%
   \regionalshadetrue
   \xdef\seq@{#1}
   \xdef\temp@{consensus} \ifx\seq@\temp@ \xdef\seq@{0} \fi
   \xdef\first@{\seq@ @} \expandafter\check@letter\first@
   \xdef\first@{\seq@}
   \ifletter \get@name@number \xdef\seq@{\first@} \fi
   \ifnum\seq@>\seq@count
     \message{<Ignored `\seq@' in \noexpand\shaderegion or \noexpand\shadeblock>}
   \else
     \ifx\@ll\yes \xdef\@ll{y}\else \xdef\@ll{n}\fi
     \loopcount=\seq@regions
     \advance\loopcount by 1
     \xdef\seq@regions{\the\loopcount}
     \expandafter\xdef\csname fgseqregion\the\loopcount\endcsname{#3}
     \expandafter\xdef\csname bgseqregion\the\loopcount\endcsname{#4}
     \xdef\list@{#2,&}
     \xdef\temp@@{shade}
     \xdef\temp@{#2,,,:,,,,@} \expandafter\test@PDB\temp@
     \ifx\list@\ampers@nd
     \else
        \loop
           \xdef\list@{\list@ @}
           \expandafter\get@regions\list@
        \ifx\list@\ampers@nd\else\repeat
     \fi
   \fi
}
\def\shadeblock#1#2#3#4{%
   \xdef\seq@{#1}
      \xdef\@ll{yes}
      \shaderegion{#1}{#2}{#3}{#4}
      \xdef\@ll{}
}
\def\tintregion#1#2{%
   \xdef\seq@{#1}
   \xdef\temp@{consensus} \ifx\seq@\temp@ \xdef\seq@{0} \fi
   \xdef\first@{\seq@ @} \expandafter\check@letter\first@
   \xdef\first@{\seq@}
   \ifletter \get@name@number \xdef\seq@{\first@} \fi
   \ifnum\seq@>\seq@count
     \message{<Ignored seq `\seq@' in \noexpand\tintregion or \noexpand\tintblock>}
   \else
     \ifx\@ll\yes \xdef\@ll{y}\else \xdef\@ll{n}\fi
     \xdef\list@{#2,&}
     \xdef\temp@@{tint} \loopcount=0
     \xdef\temp@{#2,,,:,,,,@} \expandafter\test@PDB\temp@
     \ifx\list@\ampers@nd
     \else
        \loop
           \xdef\list@{\list@ @}
           \expandafter\get@tintregions\list@
        \ifx\list@\ampers@nd\else\repeat
     \fi
   \fi
}
\def\tintblock#1#2{%
   \xdef\seq@{#1}
      \xdef\@ll{yes}
      \tintregion{#1}{#2}
      \xdef\@ll{}
}
\def\tintdefault#1{%
   \xdef\first@{#1}
   \xdef\second@{strong}
   \ifx\first@\second@
      \xdef\light@{LightLightLight}
   \else
   \xdef\second@{medium}
   \ifx\first@\second@
      \xdef\light@{LightLight}
   \else
   \xdef\second@{weak}
   \ifx\first@\second@
      \xdef\light@{Light}
   \else
      \xdef\light@{LightLight}
   \fi\fi\fi
}
\def\lowerregion#1#2{%
   \xdef\seq@{#1}
   \xdef\temp@{consensus} \ifx\seq@\temp@ \xdef\seq@{0} \fi
   \xdef\first@{\seq@ @} \expandafter\check@letter\first@
   \xdef\first@{\seq@}
   \ifletter \get@name@number \xdef\seq@{\first@} \fi
   \ifnum\seq@>\seq@count
     \message{<Ignored seq `\seq@' in \noexpand\lowerregion or \noexpand\lowerblock>}
   \else
     \ifx\@ll\yes \xdef\@ll{y}\else \xdef\@ll{n}\fi
     \xdef\list@{#2,&}
     \xdef\temp@@{lower} \loopcount=0
     \xdef\temp@{#2,,,:,,,,@} \expandafter\test@PDB\temp@
     \ifx\list@\ampers@nd
     \else
        \loop
           \xdef\list@{\list@ @}
           \expandafter\get@lowerregions\list@
        \ifx\list@\ampers@nd\else\repeat
     \fi
   \fi
}
\def\lowerblock#1#2{%
   \xdef\seq@{#1}
      \xdef\@ll{yes}
      \lowerregion{#1}{#2}
      \xdef\@ll{}
}
\def\emphregion#1#2{%
   \xdef\seq@{#1}
   \xdef\temp@{consensus} \ifx\seq@\temp@ \xdef\seq@{0} \fi
   \xdef\first@{\seq@ @} \expandafter\check@letter\first@
   \xdef\first@{\seq@}
   \ifletter \get@name@number \xdef\seq@{\first@} \fi
   \ifnum\seq@>\seq@count
     \message{<Ignored seq `\seq@' in \noexpand\emphregion or \noexpand\emphblock>}
   \else
     \ifx\@ll\yes \xdef\@ll{y}\else \xdef\@ll{n}\fi
     \xdef\list@{#2,&}
     \xdef\temp@@{emph} \loopcount=0
     \xdef\temp@{#2,,,:,,,,@} \expandafter\test@PDB\temp@
     \ifx\list@\ampers@nd
     \else
        \loop
           \xdef\list@{\list@ @}
           \expandafter\get@emphregions\list@
        \ifx\list@\ampers@nd\else\repeat
     \fi
   \fi
}
\def\emphblock#1#2{%
   \xdef\seq@{#1}
      \xdef\@ll{yes}
      \emphregion{#1}{#2}
      \xdef\@ll{}
}
\def\emphdefault#1{\def\res@style{\csname text#1\endcsname}}
\def\frameblock#1#2#3{%
   \xdef\seq@{#1}
   \xdef\temp@{consensus} \ifx\seq@\temp@ \xdef\seq@{0} \fi
   \xdef\first@{\seq@ @} \expandafter\check@letter\first@
   \xdef\first@{\seq@}
   \ifletter \get@name@number \xdef\seq@{\first@} \fi
   \ifnum\seq@>\seq@count
     \message{<Ignored seq `\seq@' in \noexpand\frameblock>}
   \else
     \xdef\@ll{#3}
     \xdef\list@{#2,&}
     \xdef\temp@@{frame} \loopcount=0
     \xdef\temp@{#2,,,:,,,,@} \expandafter\test@PDB\temp@
     \ifx\list@\ampers@nd
     \else
        \loop
           \xdef\list@{\list@ @}
           \expandafter\get@frameregions\list@
        \ifx\list@\ampers@nd\else\repeat
     \fi
   \fi
}
\def\changeshadingcolors#1#2#3{%
   \xdef\seq@{#1}
   \xdef\temp@{consensus} \ifx\seq@\temp@ \xdef\seq@{0} \fi
   \xdef\first@{\seq@ @} \expandafter\check@letter\first@
   \xdef\first@{\seq@}
   \ifletter \get@name@number \xdef\seq@{\first@} \fi
   \ifnum\seq@>\seq@count
     \message{<Ignored seq `\seq@' in \noexpand\changeshadingcolors>}
   \else
     \xdef\@ll{#3}
     \xdef\list@{#2,&}
     \xdef\temp@@{shading} \loopcount=0
     \xdef\temp@{#2,,,:,,,,@}    \expandafter\test@PDB\temp@
     \ifx\list@\ampers@nd
     \else
        \loop
           \xdef\list@{\list@ @}
           \expandafter\get@shadingregions\list@
        \ifx\list@\ampers@nd\else\repeat
     \fi
   \fi
}
\def\bargraphstretch#1{\def\b@r@stretch{#1}}
\def\colorscalestretch#1{\def\sc@le@stretch{#1}}
\def\rm@@measure#1#2@{%
   \xdef\test@{#1}
   \ifx\test@\ampers@nd
   \else
      \expandafter\check@char\test@
      \ifnumber\xdef\first@{\first@ #1}
         \xdef\second@{#2 &@}
         \expandafter\rm@@measure\second@
      \fi
   \fi
}
\def\rm@measure#1.#2@{\xdef\first@{#1.}\xdef\second@{#2 @}\xdef\third@{#1}\expandafter\rm@@measure\second@}
\def\pm@calc{%
    \temp@@length=100000sp
    \temp@@length=\g@min\temp@@length
    \innerloopcount=\temp@@length
    \xdef\min@{\the\innerloopcount}
    \arrow@height=\temp@@length
    \temp@@length=100000sp
    \temp@@length=\g@max\temp@@length
    \advance\temp@@length by -\arrow@height
    \innerloopcount=\temp@@length
    \divide\innerloopcount by 100
    \ifnum\innerloopcount=0 \innerloopcount=1 \fi
    \xdef\m@x{\the\innerloopcount}
    \xdef\test@{\g@min pt}
    \setlength\arrow@width{\test@}
    \xdef\test@{\g@max pt}
    \setlength\arrow@height{\test@}
    \advance\arrow@height by -\arrow@width
    \ifdim\arrow@width<0pt\temp@@length=-\arrow@width\xdef\test@{y}\else\temp@@length=\arrow@width\xdef\test@{n}\fi
    \ifdim\arrow@height>0pt
       \ifx\test@\n@ \xdef\test@{y} \else \xdef\test@{n} \fi
       \ifdim\temp@@length<\arrow@height\temp@@length=\arrow@height\fi
    \else
       \ifdim\temp@@length>-\arrow@height\temp@@length=\arrow@height\fi
    \fi
    \ifdim\temp@@length<100pt\arrow@width=100\arrow@width\arrow@height=100\arrow@height\else
    \ifdim\temp@@length<10pt\arrow@width=1000\arrow@width\arrow@height=1000\arrow@height\else
    \ifdim\temp@@length<1pt\arrow@width=10000\arrow@width\arrow@height=10000\arrow@height\else
    \ifdim\temp@@length<0.1pt\arrow@width=100000\arrow@width\arrow@height=100000\arrow@height\else
    \ifdim\temp@@length<0.01pt\arrow@width=1000000\arrow@width \arrow@height=1000000\arrow@height\else
    \ifdim\temp@@length<0.001pt\arrow@width=10000000\arrow@width \arrow@height=10000000\arrow@height\else
    \ifdim\temp@@length<0.0001pt\arrow@width=100000000\arrow@width \arrow@height=100000000\arrow@height\else
    \ifdim\temp@@length<0.00001pt\arrow@width=1000000000\arrow@width \arrow@height=1000000000\arrow@height
    \fi\fi\fi\fi\fi\fi\fi\fi
    \ifx\test@\y@
       \xdef\pm@{0}
    \else
       \xdef\test@{-\the\arrow@height @}
       \expandafter\rm@measure\test@
       \divide\arrow@width by \third@
       \xdef\pm@{\the\arrow@width @}
       \expandafter\rm@measure\pm@
       \xdef\pm@{\first@}
    \fi
}
\def\read@graph{%
    \bgroup
    \immediate\openin\structurefile = \fill@char\relax
    \ifeof\structurefile
      \PackageError{TeXshade}
      {File `\fill@char' not found}
      {\MessageBreak
       The file you specified is missing or you have \MessageBreak
       misspelled it. \MessageBreak\MessageBreak
       No feature graph will be displayed. \MessageBreak
       Type <return> to proceed. \MessageBreak
       Type X <return> to quit. \MessageBreak
}
       \immediate\closein\structurefile\egroup
    \else
    \ifx\g@min\comm@
    \def\par@{}
    \xdef\g@min{,} \xdef\g@max{,}
    \loop
       \read\structurefile to \readline
       \xdef\test@{\expandafter\string\readline}
       \ifx\test@\par@
       \else
       \xdef\second@{\test@ @}
       \expandafter\check@letter\second@
       \ifletter
          \xdef\second@{\expandafter\string\readline}
          \xdef\second@{\second@ @}
          \expandafter\firstchar@get\second@
          \if\first@ - \numbertrue\fi
       \fi
       \ifnumber
          \temp@@length=1pt
          \temp@@length=\test@\temp@@length
          \innerloopcount=\temp@@length
          \ifx\g@min\comm@ \xdef\min@{\test@ pt} \xdef\g@min{\test@}
          \else
             \ifdim\temp@@length<\min@\relax \xdef\min@{\the\temp@@length} \xdef\g@min{\test@} \fi\fi%
          \ifx\g@max\comm@ \xdef\m@x{\test@ pt} \xdef\g@max{\test@}
          \else
             \ifdim\temp@@length>\m@x\relax \xdef\m@x{\the\temp@@length} \xdef\g@max{\test@} \fi\fi%
       \fi
       \fi
    \ifeof\structurefile\else\repeat
    \fi
    \immediate\closein\structurefile
    \pm@calc
    \expandafter\temp@count=\csname seq@start\seq@\endcsname
    \advance\temp@count by -1
    \xdef\temp@@@{n}
    \immediate\openin\structurefile = \fill@char\relax
    \loop
       \read\structurefile to \readline
       \xdef\test@{\expandafter\string\readline}
       \ifx\test@\par@
       \else
       \xdef\second@{\test@ @}
       \expandafter\check@letter\second@
       \ifletter
          \xdef\second@{\expandafter\string\readline}
          \xdef\second@{\second@ @}
          \expandafter\firstchar@get\second@
          \if\first@ - \numbertrue
          \else
             \if\first@ N
                \expandafter\firstchar@get\third@
                \if\first@ a
                   \expandafter\firstchar@get\third@
                   \if\first@ N
                     \advance\temp@count by 1
                     \ifnum\temp@count=0 \temp@count=1 \fi
                     \ifnum\temp@count<\st@rt
                     \else
                        \ifnum\temp@count>\st@p
                        \else
                           \ifx\temp@@@\n@
                              \xdef\temp@@@{N}
                           \else
                              \xdef\temp@@@{\temp@@@,N}
                           \fi
                        \fi
                     \fi
                   \fi
                \fi
             \fi
          \fi
       \fi
       \ifnumber
          \advance\temp@count by 1
          \ifnum\temp@count=0 \temp@count=1 \fi
          \ifnum\temp@count<\st@rt
          \else
             \ifnum\temp@count>\st@p
             \else
                \temp@@length=100000sp
                \temp@@length=\test@\temp@@length
                \innerloopcount=\temp@@length
                \advance\innerloopcount by 1
                \xdef\test@{\pm@ pt}
                \ifdim\test@=0pt
                   \advance\innerloopcount by -\min@
                \else
                   \ifx\b@r\n@
                      \advance\innerloopcount by -\min@
                   \fi
                \fi
                \divide\innerloopcount by \m@x
                \ifx\temp@@@\n@
                   \xdef\temp@@@{\the\innerloopcount}
                \else
                   \xdef\temp@@@{\temp@@@,\the\innerloopcount}
                \fi
             \fi
          \fi
       \fi
       \fi
    \ifeof\structurefile\else\repeat
    \immediate\closein\structurefile
    \xdef\temp@@@{\temp@@@,@} \xdef\temp@@{y}
    \fi
    \egroup
}
\def\sort@gstack{%
   \expandafter\get@fromstack\last@
   \ifx\first@\ampers@nd
      \xdef\tmpstack{\tmpstack\f@text@&;&;&;&;@}
   \else
   \ifnum\loopcount<\second@
      \xdef\tmpstack{\tmpstack\f@text@\first@;\second@;\third@;\fourth@;\last@}
   \else
      \xdef\tmpstack{\tmpstack\first@;\second@;\third@;\fourth@;}
      \sort@gstack
   \fi\fi
}
\def\get@gregion#1..#2,#3&{%
   \xdef\st@rt{#1} \xdef\st@p{#2} \xdef\list@{#3}
}
\def\do@bargraph{%
   \expandafter\get@gregion\list@
   \expandafter\ifnum\csname seq@start\seq@\endcsname>\st@rt
   \else
   \xdef\temp@@{n}
   \xdef\b@r{y}
   \xdef\pm@{0}
   \xdef\temp@@@{\fill@char,@}
   \expandafter\check@letter\temp@@@
   \ifletter
      \read@graph
   \else
      \ifx\g@min\comm@ \xdef\g@min{0} \fi
      \ifx\g@max\comm@ \xdef\g@max{100} \fi
      \pm@calc
      \xdef\temp@@@{\fill@char,@}
      \xdef\temp@@{y}
   \fi
   \ifx\temp@@\y@
   \loopcount=\st@rt
   \xdef\tmpstack{}
   \loop
      \expandafter\get@item\temp@@@
      \xdef\temp@@@{\first@}
      \xdef\style@{bar[\pm@,0]:\fourth@[\f@color]}
      \xdef\tmpstack{\tmpstack\f@text@;\the\loopcount;\the\loopcount;\style@;}
      \advance\loopcount by 1
      \ifnum\loopcount=0 \loopcount=1 \fi
   \ifnum\loopcount>\st@p
   \else\repeat
      \xdef\f@text@{\tmpstack} \xdef\tmpstack{}
      \xdef\last@{\csname stack@\bottop@\seq@\endcsname}
      \sort@gstack
      \expandafter\xdef\csname stack@\bottop@\seq@\endcsname{\tmpstack}
   \fi
   \fi
   \xdef\list@{\list@ &}
   \ifx\list@\ampers@nd\else\do@bargraph\fi
}
\def\do@colorgraph{%
   \expandafter\get@gregion\list@
   \expandafter\ifnum\csname seq@start\seq@\endcsname>\st@rt
   \else
   \xdef\temp@@{n}
   \xdef\b@r{n}
   \xdef\pm@{0}
   \xdef\temp@@@{\fill@char,@}
   \expandafter\check@letter\temp@@@
   \ifletter
      \read@graph
   \else
      \ifx\g@min\comm@ \xdef\g@min{0} \fi
      \ifx\g@max\comm@ \xdef\g@max{100} \fi
      \pm@calc
      \xdef\temp@@@{\fill@char,@}
      \xdef\temp@@{y}
   \fi
   \ifx\temp@@\y@
   \loopcount=\st@rt
   \xdef\tmpstack{}
   \loop
      \xdef\last@{\csname stack@\bottop@\seq@\endcsname}
      \expandafter\get@item\temp@@@
      \xdef\temp@@@{\first@}
      \ifx\fourth@\N@
         \xdef\style@{color:50[White]}
      \else
         \ifnum\fourth@<1 \xdef\fourth@{1} \fi
         \innerloopcount=\fourth@
         \advance\innerloopcount by 4
         \divide\innerloopcount by 5
         \multiply\innerloopcount by 5
         \ifnum\innerloopcount>100 \innerloopcount=100 \fi
         \xdef\style@{color:50[\f@color\the\innerloopcount]}
      \fi
      \xdef\tmpstack{\tmpstack\f@text@;\the\loopcount;\the\loopcount;\style@;}
      \advance\loopcount by 1
      \ifnum\loopcount=0 \loopcount=1 \fi
   \ifnum\loopcount>\st@p
   \else\repeat
      \xdef\f@text@{\tmpstack} \xdef\tmpstack{}
      \xdef\last@{\csname stack@\bottop@\seq@\endcsname}
      \sort@gstack
      \expandafter\xdef\csname stack@\bottop@\seq@\endcsname{\tmpstack}
   \fi
   \fi
   \xdef\list@{\list@ &}
   \ifx\list@\ampers@nd\else\do@colorgraph\fi
}
\def\feature#1#2#3#4#5{%
   \xdef\bottop@{#1}
   \xdef\temp@{top}
   \ifx\bottop@\temp@ \topfeaturetrue\fi
   \xdef\temp@{ttop}
   \ifx\bottop@\temp@ \ttopfeaturetrue\fi
   \xdef\temp@{tttop}
   \ifx\bottop@\temp@ \tttopfeaturetrue\fi
   \xdef\temp@{ttttop}
   \ifx\bottop@\temp@ \ttttopfeaturetrue\fi
   \xdef\temp@{bottom}
   \ifx\bottop@\temp@ \bottomfeaturetrue\fi
   \xdef\temp@{bbottom}
   \ifx\bottop@\temp@ \bbottomfeaturetrue\fi
   \xdef\temp@{bbbottom}
   \ifx\bottop@\temp@ \bbbottomfeaturetrue\fi
   \xdef\temp@{bbbbottom}
   \ifx\bottop@\temp@ \bbbbottomfeaturetrue\fi
   \xdef\seq@{#2}
   \xdef\temp@{consensus} \ifx\seq@\temp@ \xdef\seq@{0} \fi
   \xdef\first@{\seq@ @} \expandafter\check@letter\first@
   \xdef\first@{\seq@}
   \ifletter \get@name@number \xdef\seq@{\first@} \fi
   \ifnum\seq@>\seq@count
      \message{<Ignored seq `\seq@' in \noexpand\feature>}
   \else
   \ifnum\seq@>-1
   \xdef\temp@{#4::&}\expandafter\test@fill\temp@
   \xdef\last@{bar}
   \ifx\second@@\last@
      \xdef\last@{hydrophobicity}
      \ifx\last@\fourth@
         \xdef\second@@{bh}
      \else
         \xdef\last@{molweight}
         \ifx\last@\fourth@
            \xdef\second@@{bm}
         \else
            \xdef\last@{charge}
            \ifx\last@\fourth@
               \xdef\second@@{bc}
            \else
               \xdef\last@{conservation}
               \ifx\last@\fourth@
                  \xdef\second@@{bcons}
               \fi
            \fi
         \fi
      \fi
   \fi
   \xdef\last@{color}
   \ifx\second@@\last@
      \xdef\last@{hydrophobicity}
      \ifx\last@\fourth@
         \xdef\second@@{ch}
      \else
         \xdef\last@{molweight}
         \ifx\last@\fourth@
            \xdef\second@@{cm}
         \else
            \xdef\last@{charge}
            \ifx\last@\fourth@
               \xdef\second@@{cc}
            \else
               \xdef\last@{conservation}
               \ifx\last@\fourth@
                  \xdef\second@@{ccons}
               \fi
            \fi
         \fi
      \fi
   \fi
   \xdef\last@{bar}
   \ifx\second@@\last@
      \xdef\list@{#3,&}
      \xdef\style@{#4}
      \def\f@text@{#5}
      \do@bargraph
      \xdef\temp@{bottom}
      \ifx\bottop@\temp@ \xdef\bottom@stretch{y}\fi
      \xdef\temp@{bbottom}
      \ifx\bottop@\temp@ \xdef\bbottom@stretch{y}\fi
      \xdef\temp@{bbbottom}
      \ifx\bottop@\temp@ \xdef\bbbottom@stretch{y}\fi
      \xdef\temp@{bbbbottom}
      \ifx\bottop@\temp@ \xdef\bbbbottom@stretch{y}\fi
   \else
   \xdef\last@{color}
   \ifx\second@@\last@
      \xdef\list@{#3,&}
      \xdef\style@{#4}
      \def\f@text@{#5}
      \do@colorgraph
   \else
   \xdef\f@@color{\f@color}
   \def\f@text@{#5}
   \xdef\f@color{\f@@color}
   \xdef\temp@{#4&}
   \ifx\temp@\ampers@nd
      \xdef\list@{#3,&}
      \xdef\style@{&}
      \def\f@text@{#5}
   \else
      \xdef\last@{restriction}
      \ifx\second@@\last@
         \xdef\temp@{\bottop@ @}
         \expandafter\firstchar@get\temp@
         \xdef\temp@{y}
         \if\first@ t
            \xdef\style@{fill:\kern0.9\box@width$\blacktriangledown$[\f@color]}
         \else
            \xdef\style@{fill:\kern0.9\box@width$\blacktriangle$[\f@color]}
         \fi
         \xdef\f@text@{\kern0.9\box@width#5}
      \else
      \xdef\last@{bh}
      \ifx\second@@\last@
         \ifx\f@color\gr@ydef@ult\xdef\f@color{Gray50}\fi
         \xdef\style@{plot[bar]:Hydro[\f@color][-53]}
      \else
      \xdef\last@{bm}
      \ifx\second@@\last@
         \ifx\f@color\gr@ydef@ult\xdef\f@color{Gray50}\fi
         \xdef\style@{plot[bar]:molw[\f@color][0]}
      \else
      \xdef\last@{bc}
      \ifx\second@@\last@
         \ifx\f@color\gr@ydef@ult\xdef\f@color{Gray50}\fi
         \xdef\style@{plot[bar]:charge[\f@color][-50]}
      \else
      \xdef\last@{bcons}
      \ifx\second@@\last@
         \ifx\f@color\gr@ydef@ult\xdef\f@color{Gray50}\fi
         \xdef\last@{T-Coffee}
         \ifx\f@color\last@
            \xdef\T@coffee@bcons{y}
            \xdef\f@color{Gray50}
         \fi
         \xdef\style@{cons[bar]:cons[\f@color][0]}
      \else
      \xdef\last@{ch}
      \ifx\second@@\last@
         \ifx\f@color\gr@ydef@ult\xdef\f@color{RedGreen}\fi
         \xdef\style@{plot[color]:Hydro[\f@color][-53]}
      \else
      \xdef\last@{cm}
      \ifx\second@@\last@
         \ifx\f@color\gr@ydef@ult\xdef\f@color{Gray}\fi
         \xdef\style@{plot[color]:molw[\f@color][0]}
      \else
      \xdef\last@{cc}
      \ifx\second@@\last@
         \ifx\f@color\gr@ydef@ult\xdef\f@color{RedBlue}\fi
         \xdef\style@{plot[color]:charge[\f@color][-50]}
      \else
      \xdef\last@{ccons}
      \ifx\second@@\last@
         \ifx\f@color\gr@ydef@ult\xdef\f@color{ColdHot}\fi
         \xdef\last@{T-Coffee}
         \ifx\f@color\last@
            \xdef\T@coffee@ccons{y}
            \xdef\f@color{TC}
         \fi
         \xdef\style@{cons[color]:cons[\f@color][0]}
      \else
         \xdef\style@{#4} \expandafter\getarrow@shape\temp@
      \fi
      \fi
      \fi
      \fi
      \fi
      \fi
      \fi
      \fi
      \fi
   \xdef\list@{#3,&}
   \xdef\@ll{\f@text@}
   \xdef\temp@@{\bottop@}
   \xdef\temp@{#3,,,:,,,,@} \expandafter\test@PDB\temp@
   \fi
   \loopcount=0
   \ifx\list@\ampers@nd
   \else
      \loop
         \advance\loopcount by 1\relax
         \xdef\list@{\list@ @}
         \expandafter\get@fregions\list@
      \ifx\list@\ampers@nd\else\repeat
   \fi
   \fi\fi\fi
   \fi
}
\def\showfeaturename#1#2{\expandafter\xdef\csname featuretextn@me#1\endcsname{#2}}
\def\showfeaturestylename#1#2{\expandafter\xdef\csname featurestylesn@me#1\endcsname{#2}}
\def\hidefeaturename#1{\expandafter\xdef\csname featuretextn@me#1\endcsname{}}
\def\hidefeaturenames{\xdef\featuretextn@mettop{}\xdef\featuretextn@metop{}\xdef\featuretextn@mebottom{}\xdef\featuretextn@mebbottom{}
    \xdef\featuretextn@metttop{}\xdef\featuretextn@mettttop{}\xdef\featuretextn@mebbbbottom{}\xdef\featuretextn@mebbbottom{}}
\def\hidefeaturestylename#1{\expandafter\xdef\csname featurestylesn@me#1\endcsname{}}
\def\hidefeaturestylenames{\xdef\featurestylesn@mettop{}\xdef\featurestylesn@metop{}\xdef\featurestylesn@mebottom{}\xdef\featurestylesn@mebbottom{}
    \xdef\featurestylesn@metttop{}\xdef\featurestylesn@mettttop{}\xdef\featurestylesn@mebbbbottom{}\xdef\featurestylesn@mebbbottom{}}
\def\seqtype#1{\xdef\seq@type{#1}
               \if\seq@type P \xdef\prefix@{pep}
               \else \if\seq@type p \xdef\seq@type{P} \xdef\prefix@{pep}
               \else \xdef\seq@type{N} \xdef\prefix@{DNA} \fi\fi}
\def\nameseq#1#2{%
   \xdef\first@{#1 @} \expandafter\check@letter\first@
   \xdef\first@{#1}   \ifletter \get@name@number \fi
   \expandafter\xdef\csname newseqname\first@\endcsname{#2}
}
\newcommand\threshold[2][n]{%
   \xdef\first@{#1}
   \ifx\first@\n@
   \xdef\thresh@ld{#2}
   \else
      \all@shadetrue
      \ifnum\first@>#2
         \xdef\thresh@ld{#2}
         \xdef\all@thresh@ld{#1}
      \else
         \xdef\thresh@ld{#1}
         \xdef\all@thresh@ld{#2}
      \fi
   \fi
}
\def\constosingleseq#1{%
   \xdef\first@{#1 @} \expandafter\check@letter\first@
   \xdef\first@{#1}   \ifletter \get@name@number \fi
   \ifnum\first@>\seq@count
   \message{<Ignored seq `#1' in \noexpand\constosingleseq>}
   \else
   \ifnum\first@>0 \xdef\cons@num{\first@} \hideconsensus\fi\fi
}
\def\constoallseqs{\xdef\cons@num{0}}
\def\residuesperline{%
   \def\@rplfix*##1{%
      \res@perline=##1
      \ifnum\res@perline<1 \res@perline=1\fi \rpl@fixtrue}
   \def\@rplvar ##1{%
      \res@perline=##1
      \ifnum\res@perline<5 \res@perline=5\fi \rpl@fixfalse}
   \def\decide@{\ifx\l@@k * \let\next\@rplfix \else \let\next\@rplvar \fi \next}
   \futurelet\l@@k\decide@}
\def\numberingwidth#1{\def\num@width{#1}}
\def\charstretch#1{%
   \def\char@stretch{#1}
   \xdef\temp@{\char@stretch .00@} \expandafter\coord@get\temp@ \loopcount=\c@@rd
   \multiply \loopcount by 7
   \divide \loopcount by 10
   \ifnum\loopcount<10
      \xdef\temp@{0\the\loopcount @}
   \else
      \xdef\temp@{\the\loopcount @}
   \fi
   \expandafter\decimal@B\temp@
   \ifnum\loopcount>99
      \xdef\char@stretch@W{#1}
   \else
      \xdef\char@stretch@W{\temp@}
   \fi
}
\def\linestretch#1{\def\line@stretch{#1}}
\def\logostretch#1{%
   \def\logo@stretch{#1}
   \setlength\temp@@length{1000sp}
   \setlength\temp@@length{\logo@stretch\temp@@length}
   \loopcount=\temp@@length
   \xdef\logo@stretch@IOOO{\the\loopcount}
}
\def\noblockskip{\def\block@skip{\vspace{0pt}}}
\def\smallblockskip{\def\block@skip{\vspace{\baselineskip}}}
\def\medblockskip{\def\block@skip{\vspace{1.5\baselineskip}}}
\def\bigblockskip{\def\block@skip{\vspace{2\baselineskip}}}
\def\vblockspace#1{\def\block@skip{\vspace{#1}}}
\def\topspace#1{\def\t@sp@ce{#1}}
\def\ttopspace#1{\def\tt@sp@ce{#1}}
\def\tttopspace#1{\def\ttt@sp@ce{#1}}
\def\ttttopspace#1{\def\tttt@sp@ce{#1}}
\def\bottomspace#1{\def\b@sp@ce{#1}}
\def\bbottomspace#1{\def\bb@sp@ce{#1}}
\def\bbbottomspace#1{\def\bbb@sp@ce{#1}}
\def\bbbbottomspace#1{\def\bbbb@sp@ce{#1}}
\def\rulerspace#1{\def\ruler@sp@ce{#1}}
\def\fixblockspace{\fix@true}
\def\flexblockspace{\fix@false}
\def\nosepline{\def\seq@skip{\relax}}
\def\smallsepline{\def\seq@skip{\vspace{3pt}}\def\sep@space{3pt}}
\def\medsepline{\def\seq@skip{\vspace{6pt}}\def\sep@space{6pt}}
\def\bigsepline{\def\seq@skip{\vspace{12pt}}\def\sep@space{12pt}}
\def\vsepspace#1{\def\seq@skip{\vspace{#1}}\xdef\sep@space{#1}}
\def\separationline#1{%
   \xdef\first@@{#1}
   \xdef\first@{#1 @} \expandafter\check@letter\first@
   \xdef\first@{#1}
   \ifletter \get@name@number \xdef\first@@{\first@} \fi
   \ifnum\first@@>\seq@count \xdef\first@@{1}
   \else
      \ifnum\first@@<0 \xdef\first@@{1}
      \else
         \expandafter\def\csname seq@gap\first@@\endcsname{yes}
         \loopcount=\seq@gap@num
         \advance\loopcount by 1
         \xdef\seq@gap@num{\the\loopcount}
      \fi
   \fi}
\newcommand{\shadingmode}[2][-1]{%
   \T@coffeefalse
   \xdef\last@{#2}
   \xdef\first@{identical}
   \ifx\first@\last@
      \simmodefalse \funcmodefalse
      \xdef\second@{#1 @} \expandafter\check@letter\second@
      \ifnumber \all@shadetrue
         \ifnum#1<0 \all@shadefalse
         \else
         \ifnum#1>100 \xdef\all@thresh@ld{100}
         \else
            \xdef\all@thresh@ld{#1}
         \fi\fi
      \else
         \xdef\last@{#1}
         \xdef\first@{allmatchspecial}
         \ifx\last@\first@
            \xdef\all@thresh@ld{100} \all@shadetrue
         \fi
      \fi
   \else
   \xdef\first@{similar}
   \ifx\first@\last@
      \simmodetrue  \funcmodefalse
      \xdef\second@{#1 @} \expandafter\check@letter\second@
      \ifnumber \all@shadetrue
         \ifnum#1<0 \all@shadefalse
         \else
         \ifnum#1>100 \xdef\all@thresh@ld{100}
         \else
            \xdef\all@thresh@ld{#1}
         \fi\fi
      \else
         \xdef\last@{#1}
         \xdef\first@{allmatchspecial}
         \ifx\last@\first@
            \xdef\all@thresh@ld{100} \all@shadetrue
         \fi
      \fi
   \else
   \xdef\first@{functional}
   \ifx\first@\last@
      \if\seq@type N \message{<No functional shading on DNA sequences>}
      \else \simmodefalse \funcmodetrue \func@shading{#1}
            \xdef\seq@type{P} \xdef\prefix@{pep} \fi
   \else
   \xdef\first@{T-Coffee}
   \ifx\first@\last@
      \simmodefalse \funcmodefalse \T@coffeetrue
      \xdef\second@{#1 @} \expandafter\check@letter\second@
      \ifletter \xdef\TC@first@{#1}\include@T@coffee\fi
   \else
   \xdef\first@{diverse}
   \ifx\first@\last@
      \xdef\last@{#1}
      \ifnum\last@>\seq@count \xdef\last@{1}\fi
      \ifnum\last@<1 \xdef\last@{1}\fi
      \simmodetrue  \funcmodefalse
      \threshold{0}
      \xdef\divref@{\last@}
      \constosingleseq{\last@}
      \nomatchresidues{Black}{White}{lower}{up}
      \similarresidues{Black}{White}{lower}{up}
      \conservedresidues{Black}{White}{{.}}{up}
      \allmatchresidues{Black}{White}{{.}}{up}
      \gapchar{-}
      \hideconsensus
   \else
   \message{<Unknown shading mode - using `similar'>}
   \simmodetrue  \funcmodefalse
   \fi\fi\fi\fi\fi}
\def\hideallmatchpositions{\xdef\all@out{y}}
\def\showallmatchpositions{\xdef\all@out{n}}
\newcommand\allmatchspecial[1][100]{%
   \ifnum#1<0
      \xdef\all@thresh@ld{0}
   \else
   \ifnum#1>100
      \xdef\all@thresh@ld{100}
   \else
      \xdef\all@thresh@ld{#1}
   \fi\fi
   \all@shadetrue}
\def\allmatchspecialoff{\all@shadefalse}
\def\stopchar#1{\def\st@p@char{#1}}
\def\gapchar#1{%
   \xdef\first@{rule}\xdef\second@{#1}
   \ifx\first@\second@\def\gap@char{o}
   \else\def\gap@char{#1}\fi}
\def\gaprule#1{\def\gap@rulethick{#1}}
\def\domaingaprule#1{\def\domgap@rulethick{#1}}
\newcommand{\setends}[3][&]{%
  \xdef\start@seq{#2}
  \xdef\temp@{consensus}
  \ifx\start@seq\temp@
%%%     \message{<\noexpand\setends does not accept `consensus'>}
     \xdef\start@seq{0}
%%%%%%%%%%
            \xdef\second@{#3@} \expandafter\get@nums\second@
            \xdef\start@num{\first@} \xdef\end@num{\second@}
            \ifnum\start@num<1 \xdef\start@num{1}\fi
            \ifnum\end@num<\start@num \xdef\end@num{\start@num}\fi
            \loopcount=\end@num
            \advance\loopcount by 1
            \advance\loopcount by -\start@num
            \xdef\end@num{\the\loopcount}
            \start@false
%%%%%%%%%%
  \else
     \xdef\first@{\start@seq @} \expandafter\check@letter\first@
     \xdef\first@{\start@seq}
     \ifletter \get@name@number \xdef\start@seq{\first@} \fi
     \ifnum\start@seq>\seq@count
         \message{<\noexpand\setends{} error: sequence `#2' not defined>}
         \xdef\start@seq{0}
     \else
         \ifnum\start@seq<1
            \message{<\noexpand\setends{} error: sequence `#2' not defined>}
            \xdef\start@seq{0}
         \else
            \xdef\second@{#3@} \expandafter\get@nums\second@
            \xdef\start@num{\first@} \xdef\end@num{\second@}
            \ifnum\start@num=0 \xdef\allow@zero{y}\fi
            \ifnum\end@num=0 \xdef\allow@zero{y}\fi
            \start@false
         \fi
     \fi
  \fi
  \xdef\first@{#1}\ifx\first@\ampers@nd\else\startnumber{#2}{#1}\fi
}
\newcommand{\startnumber}[3][&]{%
   \xdef\first@{#2} \xdef\second@{consensus}
   \ifx\first@\second@
      \ifnum#3=0 \xdef\allow@zero{y} \fi
      \expandafter\xdef\csname seq@start0\endcsname{#2}
      \cons@count=#3 \advance\cons@count by -1\relax
      \expandafter\xdef\csname res@count0\endcsname{\the\cons@count}
   \else
      \xdef\first@{#2 @} \expandafter\check@letter\first@
      \xdef\first@{#2}   \ifletter \get@name@number \fi
      \ifnum\first@>\seq@count \message{<Ignored seq `#2' in \noexpand\startnumber>}
      \else
         \xdef\second@{#3}
         \ifnum\second@=0 \xdef\allow@zero{y} \fi
         \expandafter\xdef\csname seq@start\first@\endcsname{\second@}
         \res@count=\second@
         \advance\res@count by -1
         \expandafter\xdef\csname res@count\first@\endcsname{\the\res@count}
      \fi
   \fi
   \xdef\first@{#1}\ifx\first@\ampers@nd\else\setends{#2}{#1}\fi
   }
\def\seqlength#1#2{%
   \xdef\first@{#1 @} \expandafter\check@letter\first@
   \xdef\first@{#1}   \ifletter \get@name@number \fi
   \ifnum\first@>\seq@count \message{<Ignored seq `#1' in \noexpand\seqlength>}
   \else
      \xdef\second@{#2} \ifnum\second@<0 \xdef\second@{1} \fi
      \expandafter\xdef\csname seq@len\first@\endcsname{\second@}
   \fi}
\newcommand\shownumbering[2][n]{%
   \xdef\first@{#1}\ifx\first@\n@\else\xdef\numbering@fg{#1}\fi
   \xdef\first@{#2}
   \xdef\second@{left}
   \ifx\first@\second@ \numbers@lefttrue \numbers@rightfalse \numbers@true \fi
   \xdef\second@{right}
   \ifx\first@\second@ \numbers@leftfalse \numbers@righttrue \numbers@true \fi
   \xdef\second@{leftright}
   \ifx\first@\second@ \numbers@lefttrue \numbers@righttrue \numbers@true \fi
   }
\def\hidenumbering{\numbers@false}
\def\hidenumber#1{\xdef\first@{#1,&,@} \hidenumber@}
\newcommand\shownames[2][n]{%
   \xdef\first@{#1}\ifx\first@\n@\else\xdef\names@fg{#1}\fi
   \xdef\first@{#2} \xdef\second@{left}
   \ifx\first@\second@ \names@rightfalse \else \names@righttrue \fi
   \names@true}
\def\hidenames{\names@false}
\def\hidename#1{\xdef\first@{#1,&,@} \hidename@}
\def\hideresidues{\hidechartrue}
\def\showresidues{\hidecharfalse}
\def\alignment#1{%
   \xdef\first@{#1}
   \xdef\temp@{left}
      \ifx\first@\temp@ \xdef\c@factor{0}
      \else
         \xdef\temp@{center}
         \ifx\first@\temp@ \xdef\c@factor{0.5}
         \else
            \xdef\temp@{right}
            \ifx\first@\temp@ \xdef\c@factor{1}
   \fi\fi\fi}
\def\donotshade#1{%
   \xdef\temp@{consensus}
   \xdef\first@{#1}
   \ifx\first@\temp@
      \consensuscolors{Black}{White}{Black}{White}{Black}{White}
   \else
      \xdef\first@{#1,&,@} \donot@shade
   \fi}
\def\hideseqs{\xdef\hide@seqs{y}}
\def\showseqs{\xdef\hide@seqs{n}}
\def\hideseq#1{\xdef\first@{#1,&,@} \hideseq@}
\def\killseq#1{\xdef\first@{#1,&,@} \killseq@}
\def\hidesequencelogo{\show@logofalse}
\def\hidesubfamilylogo{\show@sublogofalse}
\def\logo@group@get#1#2@{%
   \xdef\first@{#1}\xdef\third@{#2@}
   \ifx\first@\ampers@nd
   \else
      \ifnum`#1>96 \make@upper\fi
      \expandafter\xdef\csname logo@col\first@\endcsname{\second@}
      \expandafter\logo@group@get\third@
   \fi
}
\def\logocolor#1#2{%
   \xdef\logo@colors@set{yes}
   \xdef\second@{#2}
   \xdef\third@{#1&@}
   \expandafter\logo@group@get\third@
}
\newcommand\clearlogocolors[1][Black]{%
   \logocolor{ABCDEFGHIJKLMNOPQRSTUVWXYZ}{#1}
}
\def\dofrequencycorrection{\xdef\do@freq@correction{y}}
\def\undofrequencycorrection{\xdef\do@freq@correction{n}}
\newcommand\showlogoscale[2][Black]{\xdef\logo@scalecol{#1}\xdef\show@logoscale{#2}}
\def\hidelogoscale{\xdef\show@logoscale{n}}
\def\hidenegatives{\xdef\hide@negatives{y}\xdef\sublogo@tint{}}
\newcommand\shownegatives[1][medium]{%
   \xdef\hide@negatives{n}
   \xdef\first@{#1}
   \xdef\second@{full}
   \ifx\first@\second@
      \xdef\sublogo@tint{}
   \else
   \xdef\second@{strong}
   \ifx\first@\second@
      \xdef\sublogo@tint{Light}
   \else
   \xdef\second@{medium}
   \ifx\first@\second@
      \xdef\sublogo@tint{LightLight}
   \else
   \xdef\second@{weak}
   \ifx\first@\second@
      \xdef\sublogo@tint{LightLightLight}
   \else
      \xdef\sublogo@tint{LightLight}
   \fi\fi\fi\fi
}
\def\set@logocolors{%
   \xdef\second@{undefined}
   \ifx\first@\second@
      \if\logo@colors@set\n@
         \xdef\first@{standard}
      \fi
   \fi
   \xdef\second@{standard}
   \ifx\first@\second@
    \if\seq@type A
      \xdef\logo@colors@set{n}
    \else
      \if\seq@type P
         \xdef\first@{rasmol}
      \else
         \xdef\first@{nucleotide}
      \fi
    \fi
   \fi
   \xdef\second@{nucleotide}
   \ifx\first@\second@
      \clearlogocolors
      \logocolor{G}{Black}
      \logocolor{A}{Green}
      \logocolor{TU}{Red}
      \logocolor{C}{Blue}
   \else
   \xdef\second@{rasmol}
   \ifx\first@\second@
      \clearlogocolors
      \logocolor{DE}{Red}
      \logocolor{CM}{Yellow}
      \logocolor{KR}{Blue}
      \logocolor{ST}{Orange}
      \logocolor{FY}{MidnightBlue}
      \logocolor{NQ}{Cyan}
      \logocolor{G}{LightGray}
      \logocolor{LVI}{Green}
      \logocolor{A}{DarkGray}
      \logocolor{W}{CarnationPink}
      \logocolor{H}{CornflowerBlue}
      \logocolor{P}{Apricot}
      \logocolor{BZ}{LightMagenta}
   \else
   \xdef\second@{chemical}
   \ifx\first@\second@
      \clearlogocolors
      \logocolor{DE}{Red}
      \logocolor{VIL}{Black}
      \logocolor{AG}{Gray}
      \logocolor{NQ}{Green}
      \logocolor{FYW}{Brown}
      \logocolor{KRH}{Blue}
      \logocolor{ST}{Magenta}
      \logocolor{P}{Orange}
      \logocolor{CM}{Yellow}
   \else
   \xdef\second@{hydropathy}
   \ifx\first@\second@
      \clearlogocolors
      \logocolor{DE}{Red}
      \logocolor{KRH}{Blue}
      \logocolor{YSTGNQC}{Yellow}
      \logocolor{AFPMWVIL}{Green}
   \else
   \xdef\second@{structure}
   \ifx\first@\second@
      \clearlogocolors
      \logocolor{DEHKNQR}{Orange}
      \logocolor{ACGPSTWY}{Yellow}
      \logocolor{FILMV}{Green}
   \else
   \xdef\second@{standard area}
   \ifx\first@\second@
      \clearlogocolors
      \logocolor{G}{BrickRed}
      \logocolor{AS}{Orange}
      \logocolor{CP}{Yellow}
      \logocolor{TDVN}{YellowGreen}
      \logocolor{IE}{PineGreen}
      \logocolor{LQHM}{SkyBlue}
      \logocolor{FK}{RoyalPurple}
      \logocolor{Y}{RedViolet}
      \logocolor{RW}{Black}
   \else
   \xdef\second@{accessible area}
   \ifx\first@\second@
      \clearlogocolors
      \logocolor{C}{BrickRed}
      \logocolor{IVG}{Orange}
      \logocolor{FLMA}{Yellow}
      \logocolor{WSTH}{YellowGreen}
      \logocolor{P}{PineGreen}
      \logocolor{YDN}{SkyBlue}
      \logocolor{EQ}{RoyalPurple}
      \logocolor{R}{RedViolet}
      \logocolor{K}{Black}
   \fi\fi\fi\fi\fi\fi\fi
}
\newcommand\findsubfamily[2][n]{%
   \xdef\first@{#1}
   \ifx\first@\n@
   \else
      \xdef\subfamily@threshold{#1}
   \fi
   \xdef\subfamily@seq{#2}
}
\def\setsubfamily#1{%
   \xdef\sub@family@setting{#1}
   \loopcount=1
   \loop
      \expandafter\xdef\csname subfamily@num\the\loopcount\endcsname{1}
      \advance\loopcount by 1
   \ifnum\loopcount>\seq@count\else\repeat
   \xdef\subfamily@count{2}
   \res@count=0
   \xdef\first@{#1,&,@}
   \setsubfamily@
   \clear@res@nums{1}
   \clear@res@nums{2}
   \expandafter\xdef\csname group@num2\endcsname{\the\res@count}
   \loopcount=\seq@count
   \advance\loopcount by -\res@count
   \expandafter\xdef\csname group@num1\endcsname{\the\loopcount}
}
\def\subfamilythreshold#1{\xdef\subfamily@threshold{#1}}
\newcommand\showsubfamilylogo[2][undefined]{%
   \xdef\first@{#1} \set@logocolors
   \xdef\first@{#2} \xdef\last@{top}
   \ifx\first@\last@\xdef\sublogo@top{0}\else\xdef\sublogo@top{1}\fi
   \show@sublogotrue
}
\def\relevance#1{%
   \def\sig@max{#1}
   \setlength\temp@@length{1000sp}
   \setlength\temp@@length{\sig@max\temp@@length}
   \loopcount=\temp@@length
   \xdef\sig@max{\the\loopcount}
}
\newcommand\showrelevance[2][Black]{\def\sig@color{#1}\def\sig@char{#2}\xdef\hide@sig{n}}
\def\hiderelevance{\xdef\hide@sig{y}}
\newcommand\showsequencelogo[2][undefined]{%
   \xdef\first@{#1} \set@logocolors
   \xdef\first@{#2} \xdef\last@{top}
   \ifx\first@\last@\xdef\logo@top{0}\else\xdef\logo@top{1}\fi
   \show@logotrue
}
\newcommand\showconsensus[2][n]{%
   \xdef\text@scale{n}
   \xdef\box@scale{n}
   \xdef\first@{#1}
   \ifx\first@\n@
      \xdef\collect@cons@colors{no}
   \else
      \xdef\first@{#1,&,@}
      \expandafter\get@item\first@
      \xdef\c@nsc@l{\fourth@}
      \xdef\first@@{Gray}
      \ifx\c@nsc@l\first@@\xdef\text@scale{y}\else
      \xdef\first@@{RedBlue}
      \ifx\c@nsc@l\first@@\xdef\text@scale{y}\else
      \xdef\first@@{BlueRed}
      \ifx\c@nsc@l\first@@\xdef\text@scale{y}\else
      \xdef\first@@{RedGreen}
      \ifx\c@nsc@l\first@@\xdef\text@scale{y}\else
      \xdef\first@@{GreenRed}
      \ifx\c@nsc@l\first@@\xdef\text@scale{y}\else
      \xdef\first@@{ColdHot}
      \ifx\c@nsc@l\first@@\xdef\text@scale{y}\else
      \xdef\first@@{HotCold}
      \ifx\c@nsc@l\first@@\xdef\text@scale{y}
      \fi\fi\fi\fi\fi\fi\fi
      \expandafter\get@item\first@
      \ifx\fourth@\ampers@nd
         \xdef\c@nssc@le{White}
      \else
         \xdef\c@nssc@le{\fourth@}
         \xdef\first@{Gray}
         \ifx\c@nssc@le\first@\xdef\box@scale{y}\else
         \xdef\first@{RedBlue}
         \ifx\c@nssc@le\first@\xdef\box@scale{y}\else
         \xdef\first@{BlueRed}
         \ifx\c@nssc@le\first@\xdef\box@scale{y}\else
         \xdef\first@{RedGreen}
         \ifx\c@nssc@le\first@\xdef\box@scale{y}\else
         \xdef\first@{GreenRed}
         \ifx\c@nssc@le\first@\xdef\box@scale{y}\else
         \xdef\first@{ColdHot}
         \ifx\c@nssc@le\first@\xdef\box@scale{y}\else
         \xdef\first@{HotCold}
         \ifx\c@nssc@le\first@\xdef\box@scale{y}\else
         \fi\fi\fi\fi\fi\fi\fi
      \fi
      \xdef\collect@cons@colors{y}
   \fi
   \xdef\first@{#2} \xdef\last@{top}
   \ifx\first@\last@\xdef\cons@top{0}\else\xdef\cons@top{1}\fi
   \show@construe}
\def\consensuscolors#1#2#3#4#5#6{%
   \xdef\last@{\ampers@nd}
   \xdef\first@{#1&}\xdef\second@{#2&}
   \ifx\first@\last@\else\def\ConsTextNomatch{#1}\fi
   \ifx\second@\last@\else\def\ConsNomatch{#2}\fi
   \xdef\first@{#3&}\xdef\second@{#4&}
   \ifx\first@\last@\else\def\ConsTextMatch{#3}\fi
   \ifx\second@\last@\else\def\ConsMatch{#4}\fi
   \xdef\first@{#5&}\xdef\second@{#6&}
   \ifx\first@\last@\else\def\ConsTextAllmatch{#5}\fi
   \ifx\second@\last@\else\def\ConsAllmatch{#6}\fi
}
\def\defconsensus#1#2#3{%
   \xdef\second@{#1&}
   \ifx\second@\ampers@nd   \else \def\n@m@tch{#1}\fi
   \xdef\second@{#2&}
   \ifx\second@\ampers@nd   \else \def\m@tch{#2}\fi
   \xdef\second@{#3&}
   \ifx\second@\ampers@nd   \else \def\@llm@tch{#3}\fi}
\def\hideconsensus{\show@consfalse}
\def\nameconsensus#1{\def\cons@name{#1}}
\def\namesequencelogo#1{\def\logo@name@user{#1}}
\newcommand\namesubfamilylogo[2][]{\def\sublogo@name@neg{#1}\def\sublogo@name@user{#2}}
\def\hideleadinggaps{\sh@wg@psfalse}
\def\showleadinggaps{\sh@wg@pstrue}
\newcommand\showruler[3][n]{%
   \xdef\first@{#1}
   \ifx\first@\n@\else\xdef\ruler@fg{#1}\fi
   \xdef\first@{consensus} \xdef\second@{#3}
   \xdef\third@{bottom}    \xdef\fourth@{#2}
   \ifx\third@\fourth@ \xdef\rule@top{1}\else\xdef\rule@top{0}\fi
   \ifx\first@\second@ \xdef\rule@num{0}
   \else
     \xdef\first@{#3 @} \expandafter\check@letter\first@
     \xdef\first@{#3}   \ifletter \get@name@number \fi
     \ifnum\first@>\seq@count
     \else
        \ifnum\first@>0
           \xdef\rule@num{\first@}
        \fi
      \fi
   \fi
   \xdef\ruler@{}}
\def\hideruler{\xdef\rule@num{-1}}
\def\allowzero{\xdef\allow@zero{y}}
\def\disallowzero{\xdef\allow@zero{n}}
\def\rulersteps#1{%
   \xdef\ruler@step{#1}
   \ifnum#1<4 \xdef\ruler@rot{90}\fi
}
\def\rotateruler{\xdef\ruler@rot{90}}
\def\unrotateruler{\xdef\ruler@rot{0}}
\def\namerulerpos#1#2{%
   \expandafter\xdef\csname alt@ruler#1\endcsname{#2}
}
\def\featurerule#1{\setlength\rule@thick{#1}}
\def\orderseqs#1{%
   \def\order@loop{%
      \expandafter\check@letter\first@
      \ifletter
         \expandafter\get@item\first@
         \xdef\first@{\fourth@}
         \get@name@number
         \xdef\seq@order{\seq@order,\first@}
         \xdef\first@{\first@@ @}
         \order@loop
      \else
         \expandafter\get@digit\first@
         \ifx\fourth@\ampers@nd
         \else
            \xdef\seq@order{\seq@order,\fourth@}
            \order@loop
         \fi
      \fi}
   \xdef\first@{#1,&,@}
   \xdef\seq@order{}
   \order@loop
   \xdef\seq@order{\seq@order @}
   \expandafter\get@item\seq@order
   \xdef\seq@order{\first@@,@}
}
\def\setfamily#1#2{%
   \xdef\second@{#2&}
   \ifx\second@\ampers@nd
   \else
   \xdef\first@{#1}
   \xdef\second@{#2}
   \xdef\temp@{rm}
   \ifx\second@\temp@
      \xdef\third@{\rmdefault}
   \else
      \xdef\temp@{sf}
      \ifx\second@\temp@
         \xdef\third@{\sfdefault}
      \else
         \xdef\temp@{tt}
         \ifx\second@\temp@
            \xdef\third@{\ttdefault}
         \else
            \xdef\third@{\second@}
   \fi\fi\fi
   \xdef\temp@{featurenames}
   \ifx\first@\temp@ \xdef\ftext@family{\third@}
   \else
   \xdef\temp@{featurestylenames}
   \ifx\first@\temp@ \xdef\fstyles@family{\third@}
   \else
   \xdef\temp@{features}
   \ifx\first@\temp@ \xdef\featuretext@family{\third@}
   \else
   \xdef\temp@{featurestyles}
   \ifx\first@\temp@ \xdef\featurestyles@family{\third@}
   \else
   \xdef\temp@{numbering}
   \ifx\first@\temp@ \xdef\numbertext@family{\third@}
   \else
   \xdef\temp@{names}
   \ifx\first@\temp@ \xdef\namestext@family{\third@}
   \else
   \xdef\temp@{residues}
   \ifx\first@\temp@ \xdef\residues@family{\third@}
   \else
   \xdef\temp@{legend}
   \ifx\first@\temp@ \xdef\legend@family{\third@}
   \else
   \xdef\temp@{labels}
   \ifx\first@\temp@ \xdef\label@family{\third@}
   \else
   \xdef\temp@{ruler}
   \ifx\first@\temp@ \xdef\ruler@family{\second@}
   \else
   \xdef\temp@{all}
   \ifx\first@\temp@
      \xdef\ftext@family{\third@}
      \xdef\fstyles@family{\third@}
      \xdef\featuretext@family{\third@}
      \xdef\featurestyles@family{\third@}
      \xdef\numbertext@family{\third@}
      \xdef\namestext@family{\third@}
      \xdef\residues@family{\third@}
      \xdef\legend@family{\third@}
      \xdef\label@family{\third@}
      \xdef\ruler@family{\second@}
   \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
   \fi
}
\def\setseries#1#2{%
   \xdef\second@{#2&}
   \ifx\second@\ampers@nd
   \else
   \xdef\first@{#1}
   \xdef\second@{#2}
   \xdef\temp@{bf}
   \ifx\second@\temp@
      \xdef\third@{\bfdefault}
   \else
      \xdef\temp@{md}
      \ifx\second@\temp@
         \xdef\third@{\mddefault}
      \else
         \xdef\third@{\second@}
   \fi\fi
   \xdef\temp@{featurenames}
   \ifx\first@\temp@ \xdef\ftext@series{\third@}
   \else
   \xdef\temp@{featurestylenames}
   \ifx\first@\temp@ \xdef\fstyles@series{\third@}
   \else
   \xdef\temp@{features}
   \ifx\first@\temp@ \xdef\featuretext@series{\third@}
   \else
   \xdef\temp@{featurestyles}
   \ifx\first@\temp@ \xdef\featurestyles@series{\third@}
   \else
   \xdef\temp@{numbering}
   \ifx\first@\temp@ \xdef\numbertext@series{\third@}
   \else
   \xdef\temp@{names}
   \ifx\first@\temp@ \xdef\namestext@series{\third@}
   \else
   \xdef\temp@{residues}
   \ifx\first@\temp@ \xdef\residues@series{\third@}
   \else
   \xdef\temp@{legend}
   \ifx\first@\temp@ \xdef\legend@series{\third@}
   \else
   \xdef\temp@{labels}
   \ifx\first@\temp@ \xdef\label@series{\third@}
   \else
   \xdef\temp@{all}
   \ifx\first@\temp@
      \xdef\ftext@series{\third@}
      \xdef\fstyles@series{\third@}
      \xdef\featuretext@series{\third@}
      \xdef\featurestyles@series{\third@}
      \xdef\numbertext@series{\third@}
      \xdef\namestext@series{\third@}
      \xdef\residues@series{\third@}
      \xdef\legend@series{\third@}
      \xdef\label@series{\third@}
   \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
   \fi
}
\def\setshape#1#2{%
   \xdef\second@{#2&}
   \ifx\second@\ampers@nd
   \else
   \xdef\first@{#1}
   \xdef\second@{#2}
   \xdef\temp@{it}
   \ifx\second@\temp@
      \xdef\third@{\itdefault}
   \else
      \xdef\temp@{sl}
      \ifx\second@\temp@
         \xdef\third@{\sldefault}
      \else
         \xdef\temp@{sc}
         \ifx\second@\temp@
            \xdef\third@{\scdefault}
         \else
            \xdef\temp@{up}
            \ifx\second@\temp@
               \xdef\third@{\updefault}
            \else
               \xdef\third@{\second@}
   \fi\fi\fi\fi
   \xdef\temp@{featurenames}
   \ifx\first@\temp@ \xdef\ftext@shape{\third@}
   \else
   \xdef\temp@{featurestylenames}
   \ifx\first@\temp@ \xdef\fstyles@shape{\third@}
   \else
   \xdef\temp@{features}
   \ifx\first@\temp@ \xdef\featuretext@shape{\third@}
   \else
   \xdef\temp@{featurestyles}
   \ifx\first@\temp@ \xdef\featurestyles@shape{\third@}
   \else
   \xdef\temp@{numbering}
   \ifx\first@\temp@ \xdef\numbertext@shape{\third@}
   \else
   \xdef\temp@{names}
   \ifx\first@\temp@ \xdef\namestext@shape{\third@}
   \else
   \xdef\temp@{residues}
   \ifx\first@\temp@ \xdef\residues@shape{\third@}
   \else
   \xdef\temp@{legend}
   \ifx\first@\temp@ \xdef\legend@shape{\third@}
   \else
   \xdef\temp@{labels}
   \ifx\first@\temp@ \xdef\label@shape{\third@}
   \else
   \xdef\temp@{all}
   \ifx\first@\temp@
      \xdef\ftext@shape{\third@}
      \xdef\fstyles@shape{\third@}
      \xdef\featuretext@shape{\third@}
      \xdef\featurestyles@shape{\third@}
      \xdef\numbertext@shape{\third@}
      \xdef\namestext@shape{\third@}
      \xdef\residues@shape{\third@}
      \xdef\legend@shape{\third@}
      \xdef\label@shape{\third@}
   \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
   \fi
}
\def\setsize#1#2{%
   \xdef\second@{#2&}
   \ifx\second@\ampers@nd
   \else
   \xdef\first@{#1}
   \xdef\temp@{features}
   \ifx\first@\temp@
      \def\featuretext@size{\csname #2\endcsname}
   \else
   \xdef\temp@{featurestyles}
   \ifx\first@\temp@
      \def\featurestyles@size{\csname #2\endcsname}
   \else
   \xdef\temp@{featurenames}
   \ifx\first@\temp@
      \def\ftext@size{\csname #2\endcsname}
   \else
   \xdef\temp@{featurestylenames}
   \ifx\first@\temp@
      \def\fstyles@size{\csname #2\endcsname}
   \else
   \xdef\temp@{numbering}
   \ifx\first@\temp@
      \def\numbertext@size{\csname #2\endcsname}
   \else
   \xdef\temp@{names}
   \ifx\first@\temp@
      \def\namestext@size{\csname #2\endcsname}
   \else
   \xdef\temp@{legend}
   \ifx\first@\temp@
      \def\legend@size{\csname #2\endcsname}
   \else
   \xdef\temp@{labels}
   \ifx\first@\temp@
      \def\label@size{\csname #2\endcsname}
   \else
   \xdef\temp@{residues}
   \ifx\first@\temp@
      \def\residues@size{\csname #2\endcsname}
      \xdef\res@size{#2}
   \else
   \xdef\temp@{all}
   \ifx\first@\temp@
      \def\featuretext@size{\csname #2\endcsname}
      \def\featurestyles@size{\csname #2\endcsname}
      \def\ftext@size{\csname #2\endcsname}
      \def\fstyles@size{\csname #2\endcsname}
      \def\numbertext@size{\csname #2\endcsname}
      \def\namestext@size{\csname #2\endcsname}
      \def\legend@size{\csname #2\endcsname}
      \def\label@size{\csname #2\endcsname}
      \def\residues@size{\csname #2\endcsname}
      \xdef\res@size{#2}
   \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
   \xdef\temp@{Huge}
   \ifx\temp@\res@size
      \def\bottomruler@size{\csname Large\endcsname}
   \else
   \xdef\temp@{huge}
   \ifx\temp@\res@size
      \def\bottomruler@size{\csname large\endcsname}
   \else
   \xdef\temp@{LARGE}
   \ifx\temp@\res@size
      \def\bottomruler@size{\csname normalsize\endcsname}
   \else
   \xdef\temp@{Large}
   \ifx\temp@\res@size
      \def\bottomruler@size{\csname small\endcsname}
   \else
   \xdef\temp@{large}
   \ifx\temp@\res@size
      \def\bottomruler@size{\csname footnotesize\endcsname}
   \else
   \xdef\temp@{normalsize}
   \ifx\temp@\res@size
      \def\bottomruler@size{\csname scriptsize\endcsname}
   \else
      \def\bottomruler@size{\csname tiny\endcsname}
   \fi\fi\fi\fi\fi\fi
   \fi
   \xdef\temp@{ruler}
   \ifx\first@\temp@
      \def\bottomruler@size{\csname #2\endcsname}
   \fi
}
\def\setfont#1#2#3#4#5{%
   \setfamily{#1}{#2}\setseries{#1}{#3}
   \setshape{#1}{#4}\setsize{#1}{#5}}
\def\featurenamesrm{\setfamily{featurenames}{rm}}
\def\featurenamessf{\setfamily{featurenames}{sf}}
\def\featurenamestt{\setfamily{featurenames}{tt}}
\def\featurenamesmd{\setseries{featurenames}{md}}
\def\featurenamesbf{\setseries{featurenames}{bf}}
\def\featurenamesup{\setshape {featurenames}{up}}
\def\featurenamesit{\setshape {featurenames}{it}}
\def\featurenamessl{\setshape {featurenames}{sl}}
\def\featurenamessc{\setshape {featurenames}{sc}}
\def\featurenamestiny        {\setsize{featurenames}{tiny}}
\def\featurenamesscriptsize  {\setsize{featurenames}{scriptsize}}
\def\featurenamesfootnotesize{\setsize{featurenames}{footnotesize}}
\def\featurenamessmall       {\setsize{featurenames}{small}}
\def\featurenamesnormalsize  {\setsize{featurenames}{normalsize}}
\def\featurenameslarge       {\setsize{featurenames}{large}}
\def\featurenamesLarge       {\setsize{featurenames}{Large}}
\def\featurenamesLARGE       {\setsize{featurenames}{LARGE}}
\def\featurenameshuge        {\setsize{featurenames}{huge}}
\def\featurenamesHuge        {\setsize{featurenames}{Huge}}
\def\featurestylenamesrm{\setfamily{featurestylenames}{rm}}
\def\featurestylenamessf{\setfamily{featurestylenames}{sf}}
\def\featurestylenamestt{\setfamily{featurestylenames}{tt}}
\def\featurestylenamesmd{\setseries{featurestylenames}{md}}
\def\featurestylenamesbf{\setseries{featurestylenames}{bf}}
\def\featurestylenamesup{\setshape {featurestylenames}{up}}
\def\featurestylenamesit{\setshape {featurestylenames}{it}}
\def\featurestylenamessl{\setshape {featurestylenames}{sl}}
\def\featurestylenamessc{\setshape {featurestylenames}{sc}}
\def\featurestylenamestiny        {\setsize{featurestylenames}{tiny}}
\def\featurestylenamesscriptsize  {\setsize{featurestylenames}{scriptsize}}
\def\featurestylenamesfootnotesize{\setsize{featurestylenames}{footnotesize}}
\def\featurestylenamessmall       {\setsize{featurestylenames}{small}}
\def\featurestylenamesnormalsize  {\setsize{featurestylenames}{normalsize}}
\def\featurestylenameslarge       {\setsize{featurestylenames}{large}}
\def\featurestylenamesLarge       {\setsize{featurestylenames}{Large}}
\def\featurestylenamesLARGE       {\setsize{featurestylenames}{LARGE}}
\def\featurestylenameshuge        {\setsize{featurestylenames}{huge}}
\def\featurestylenamesHuge        {\setsize{featurestylenames}{Huge}}
\def\featuresrm{\setfamily{features}{rm}}
\def\featuressf{\setfamily{features}{sf}}
\def\featurestt{\setfamily{features}{tt}}
\def\featuresmd{\setseries{features}{md}}
\def\featuresbf{\setseries{features}{bf}}
\def\featuresup{\setshape {features}{up}}
\def\featuresit{\setshape {features}{it}}
\def\featuressl{\setshape {features}{sl}}
\def\featuressc{\setshape {features}{sc}}
\def\featurestiny        {\setsize{features}{tiny}}
\def\featuresscriptsize  {\setsize{features}{scriptsize}}
\def\featuresfootnotesize{\setsize{features}{footnotesize}}
\def\featuressmall       {\setsize{features}{small}}
\def\featuresnormalsize  {\setsize{features}{normalsize}}
\def\featureslarge       {\setsize{features}{large}}
\def\featuresLarge       {\setsize{features}{Large}}
\def\featuresLARGE       {\setsize{features}{LARGE}}
\def\featureshuge        {\setsize{features}{huge}}
\def\featuresHuge        {\setsize{features}{Huge}}
\def\featurestylesrm{\setfamily{featurestyles}{rm}}
\def\featurestylessf{\setfamily{featurestyles}{sf}}
\def\featurestylestt{\setfamily{featurestyles}{tt}}
\def\featurestylesmd{\setseries{featurestyles}{md}}
\def\featurestylesbf{\setseries{featurestyles}{bf}}
\def\featurestylesup{\setshape {featurestyles}{up}}
\def\featurestylesit{\setshape {featurestyles}{it}}
\def\featurestylessl{\setshape {featurestyles}{sl}}
\def\featurestylessc{\setshape {featurestyles}{sc}}
\def\featurestylestiny        {\setsize{featurestyles}{tiny}}
\def\featurestylesscriptsize  {\setsize{featurestyles}{scriptsize}}
\def\featurestylesfootnotesize{\setsize{featurestyles}{footnotesize}}
\def\featurestylessmall       {\setsize{featurestyles}{small}}
\def\featurestylesnormalsize  {\setsize{featurestyles}{normalsize}}
\def\featurestyleslarge       {\setsize{featurestyles}{large}}
\def\featurestylesLarge       {\setsize{featurestyles}{Large}}
\def\featurestylesLARGE       {\setsize{featurestyles}{LARGE}}
\def\featurestyleshuge        {\setsize{featurestyles}{huge}}
\def\featurestylesHuge        {\setsize{featurestyles}{Huge}}
\def\numberingrm{\setfamily{numbering}{rm}}
\def\numberingsf{\setfamily{numbering}{sf}}
\def\numberingtt{\setfamily{numbering}{tt}}
\def\numberingmd{\setseries{numbering}{md}}
\def\numberingbf{\setseries{numbering}{bf}}
\def\numberingup{\setshape {numbering}{up}}
\def\numberingit{\setshape {numbering}{it}}
\def\numberingsl{\setshape {numbering}{sl}}
\def\numberingsc{\setshape {numbering}{sc}}
\def\numberingtiny        {\setsize{numbering}{tiny}}
\def\numberingscriptsize  {\setsize{numbering}{scriptsize}}
\def\numberingfootnotesize{\setsize{numbering}{footnotesize}}
\def\numberingsmall       {\setsize{numbering}{small}}
\def\numberingnormalsize  {\setsize{numbering}{normalsize}}
\def\numberinglarge       {\setsize{numbering}{large}}
\def\numberingLarge       {\setsize{numbering}{Large}}
\def\numberingLARGE       {\setsize{numbering}{LARGE}}
\def\numberinghuge        {\setsize{numbering}{huge}}
\def\numberingHuge        {\setsize{numbering}{Huge}}
\def\namesrm{\setfamily{names}{rm}}
\def\namessf{\setfamily{names}{sf}}
\def\namestt{\setfamily{names}{tt}}
\def\namesmd{\setseries{names}{md}}
\def\namesbf{\setseries{names}{bf}}
\def\namesup{\setshape {names}{up}}
\def\namesit{\setshape {names}{it}}
\def\namessl{\setshape {names}{sl}}
\def\namessc{\setshape {names}{sc}}
\def\namestiny        {\setsize{names}{tiny}}
\def\namesscriptsize  {\setsize{names}{scriptsize}}
\def\namesfootnotesize{\setsize{names}{footnotesize}}
\def\namessmall       {\setsize{names}{small}}
\def\namesnormalsize  {\setsize{names}{normalsize}}
\def\nameslarge       {\setsize{names}{large}}
\def\namesLarge       {\setsize{names}{Large}}
\def\namesLARGE       {\setsize{names}{LARGE}}
\def\nameshuge        {\setsize{names}{huge}}
\def\namesHuge        {\setsize{names}{Huge}}
\def\residuesrm{\setfamily{residues}{rm}}
\def\residuessf{\setfamily{residues}{sf}}
\def\residuestt{\setfamily{residues}{tt}}
\def\residuesmd{\setseries{residues}{md}}
\def\residuesbf{\setseries{residues}{bf}}
\def\residuesup{\setshape {residues}{up}}
\def\residuesit{\setshape {residues}{it}}
\def\residuessl{\setshape {residues}{sl}}
\def\residuessc{\setshape {residues}{sc}}
\def\residuestiny        {\setsize{residues}{tiny}}
\def\residuesscriptsize  {\setsize{residues}{scriptsize}}
\def\residuesfootnotesize{\setsize{residues}{footnotesize}}
\def\residuessmall       {\setsize{residues}{small}}
\def\residuesnormalsize  {\setsize{residues}{normalsize}}
\def\residueslarge       {\setsize{residues}{large}}
\def\residuesLarge       {\setsize{residues}{Large}}
\def\residuesLARGE       {\setsize{residues}{LARGE}}
\def\residueshuge        {\setsize{residues}{huge}}
\def\residuesHuge        {\setsize{residues}{Huge}}
\def\legendrm{\setfamily{legend}{rm}}
\def\legendsf{\setfamily{legend}{sf}}
\def\legendtt{\setfamily{legend}{tt}}
\def\legendmd{\setseries{legend}{md}}
\def\legendbf{\setseries{legend}{bf}}
\def\legendup{\setshape {legend}{up}}
\def\legendit{\setshape {legend}{it}}
\def\legendsl{\setshape {legend}{sl}}
\def\legendsc{\setshape {legend}{sc}}
\def\legendtiny        {\setsize{legend}{tiny}}
\def\legendscriptsize  {\setsize{legend}{scriptsize}}
\def\legendfootnotesize{\setsize{legend}{footnotesize}}
\def\legendsmall       {\setsize{legend}{small}}
\def\legendnormalsize  {\setsize{legend}{normalsize}}
\def\legendlarge       {\setsize{legend}{large}}
\def\legendLarge       {\setsize{legend}{Large}}
\def\legendLARGE       {\setsize{legend}{LARGE}}
\def\legendhuge        {\setsize{legend}{huge}}
\def\legendHuge        {\setsize{legend}{Huge}}
\def\rulerrm{\setfamily{ruler}{rm}}
\def\rulersf{\setfamily{ruler}{sf}}
\def\rulertt{\setfamily{ruler}{tt}}
\def\rulertiny        {\setsize{ruler}{tiny}}
\def\rulerscriptsize  {\setsize{ruler}{scriptsize}}
\def\rulerfootnotesize{\setsize{ruler}{footnotesize}}
\def\rulersmall       {\setsize{ruler}{small}}
\def\rulernormalsize  {\setsize{ruler}{normalsize}}
\def\rulerlarge       {\setsize{ruler}{large}}
\def\rulerLarge       {\setsize{ruler}{Large}}
\def\rulerLARGE       {\setsize{ruler}{LARGE}}
\def\rulerhuge        {\setsize{ruler}{huge}}
\def\rulerHuge        {\setsize{ruler}{Huge}}
\def\funcshadingstyle#1#2#3#4#5{%
  \xdef\temp@{nomatch} \xdef\first@{#1}
  \ifx\temp@\first@
     \xdef\first@{0}
  \else
     \xdef\first@{\csname funcgrp#1\endcsname}
  \fi
  \ifnum\first@>-1
     \expandafter\xdef\csname fg@textcolor\first@\endcsname{#2}
     \expandafter\xdef\csname fg@color\first@\endcsname{#3}
     \expandafter\xdef\csname funcm@tch\first@\endcsname{#4}
     \expandafter\def\csname func@style\first@\endcsname{\csname text#5\endcsname}
  \fi}
\def\defshadingcolors#1{%
   \expandafter\xdef\csname TextNomatch@#1\endcsname{\TextNomatch}
   \expandafter\xdef\csname Nomatch@#1\endcsname{\Nomatch}
   \expandafter\xdef\csname resn@m@tch@#1\endcsname{\resn@m@tch}

   \expandafter\xdef\csname TextSimilar@#1\endcsname{\TextSimilar}
   \expandafter\xdef\csname Similar@#1\endcsname{\Similar}
   \expandafter\xdef\csname ressimm@tch@#1\endcsname{\ressimm@tch}

   \expandafter\xdef\csname TextIdentical@#1\endcsname{\TextIdentical}
   \expandafter\xdef\csname Identical@#1\endcsname{\Identical}
   \expandafter\xdef\csname resm@tch@#1\endcsname{\resm@tch}

   \expandafter\xdef\csname TextAllmatch@#1\endcsname{\TextAllmatch}
   \expandafter\xdef\csname Allmatch@#1\endcsname{\Allmatch}
   \expandafter\xdef\csname res@llm@tch@#1\endcsname{\res@llm@tch}

   \expandafter\xdef\csname gap@fg@#1\endcsname{\gap@fg}
   \expandafter\xdef\csname gap@bg@#1\endcsname{\gap@bg}

}
\def\shadingcolors#1{%
  \gapcolors{Black}{White}
  \nomatchresidues{Black}{White}{upper}{up}
  \xdef\first@{#1} \xdef\second@{blues}
  \ifx\first@\second@
    \similarresidues{Black}{Magenta}{upper}{up}
    \conservedresidues{White}{RoyalBlue}{upper}{up}
    \allmatchresidues{Goldenrod}{RoyalPurple}{upper}{up}
  \else \xdef\second@{greens}
  \ifx\first@\second@
    \similarresidues{Black}{GreenYellow}{upper}{up}
    \conservedresidues{White}{PineGreen}{upper}{up}
    \allmatchresidues{YellowOrange}{OliveGreen}{upper}{up}
  \else \xdef\second@{reds}
  \ifx\first@\second@
    \similarresidues{Black}{YellowOrange}{upper}{up}
    \conservedresidues{White}{BrickRed}{upper}{up}
    \allmatchresidues{YellowGreen}{Mahagony}{upper}{up}
  \else \xdef\second@{black}
  \ifx\first@\second@
    \similarresidues{Black}{White}{upper}{sl}
    \conservedresidues{White}{Black}{upper}{up}
    \allmatchresidues{White}{Black}{upper}{sl}
  \else \xdef\second@{grays}
  \ifx\first@\second@
    \similarresidues{Black}{LightGray}{upper}{up}
    \conservedresidues{White}{DarkGray}{upper}{up}
    \allmatchresidues{White}{Black}{upper}{up}
  \else
    \xdef\TextNomatch{\csname TextNomatch@#1\endcsname}
    \xdef\Nomatch    {\csname Nomatch@#1\endcsname}
    \xdef\resn@m@tch {\csname resn@m@tch@#1\endcsname}
    \xdef\TextSimilar{\csname TextSimilar@#1\endcsname}
    \xdef\Similar    {\csname Similar@#1\endcsname}
    \xdef\ressimm@tch{\csname ressimm@tch@#1\endcsname}
    \xdef\TextIdentical{\csname TextIdentical@#1\endcsname}
    \xdef\Identical    {\csname Identical@#1\endcsname}
    \xdef\resm@tch     {\csname resm@tch@#1\endcsname}
    \xdef\TextAllmatch{\csname TextAllmatch@#1\endcsname}
    \xdef\Allmatch    {\csname Allmatch@#1\endcsname}
    \xdef\res@llm@tch {\csname res@llm@tch@#1\endcsname}
    \xdef\gap@fg    {\csname gap@fg@#1\endcsname}
    \xdef\gap@bg    {\csname gap@bg@#1\endcsname}
    \xdef\domgap@fg {\csname domgap@fg@#1\endcsname}
    \xdef\domgap@bg {\csname domgap@bg@#1\endcsname}
  \fi\fi\fi\fi\fi
  \xdef\first@{#1}
  \expandafter\defshadingcolors{\first@}
}
\def\nomatchresidues#1#2#3#4  {\xdef\first@{#1&}\xdef\second@{#2&}\xdef\third@{#3&}
                             \xdef\last@{\ampers@nd}
                             \ifx\first@\last@\else\def\TextNomatch{#1}
                               \expandafter\def\csname fg@textcolor0\endcsname{#1}
                             \fi
                             \ifx\second@\last@\else\gdef\Nomatch{#2}
                               \expandafter\def\csname fg@color0\endcsname{#2}
                             \fi
                             \ifx\third@\last@\else\def\resn@m@tch{#3}
                             \fi
                             \xdef\first@{#4&}
                             \ifx\first@\last@\else
                               \def\no@style{\csname text#4\endcsname}
                               \expandafter\def\csname func@style0\endcsname%
                                  {\csname text#4\endcsname}\fi}
\def\similarresidues#1#2#3#4  {\xdef\first@{#1&}\xdef\second@{#2&}\xdef\third@{#3&}
                             \xdef\last@{\ampers@nd}
                             \ifx\first@\last@\else\def\TextSimilar{#1}\fi
                             \ifx\second@\last@\else\gdef\Similar{#2}\fi
                             \ifx\third@\last@\else\def\ressimm@tch{#3}\fi
                             \xdef\first@{#4&}
                             \ifx\first@\last@\else
                               \def\sim@style{\csname text#4\endcsname}\fi}
\def\conservedresidues#1#2#3#4{\xdef\first@{#1&}\xdef\second@{#2&}\xdef\third@{#3&}
                             \xdef\last@{\ampers@nd}
                             \ifx\first@\last@\else\def\TextIdentical{#1}\fi
                             \ifx\second@\last@\else\gdef\Identical{#2}\fi
                             \ifx\third@\last@\else\def\resm@tch{#3}\fi
                             \xdef\first@{#4&}
                             \ifx\first@\last@\else
                               \def\id@style{\csname text#4\endcsname}\fi}
\def\allmatchresidues#1#2#3#4 {\xdef\first@{#1&}\xdef\second@{#2&}\xdef\third@{#3&}
                             \xdef\last@{\ampers@nd}
                             \ifx\first@\last@\else\def\TextAllmatch{#1}\fi
                             \ifx\second@\last@\else\gdef\Allmatch{#2}\fi
                             \ifx\third@\last@\else\def\res@llm@tch{#3}\fi
                             \xdef\first@{#4&}
                             \ifx\first@\last@\else
                               \def\all@style{\csname text#4\endcsname}\fi}
\def\gapcolors#1#2           {\xdef\first@{#1&}\xdef\second@{#2&}
                             \xdef\last@{\ampers@nd}
                             \ifx\first@\last@\else\def\gap@fg{#1}
                                \expandafter\def\csname fg@textcolor*\endcsname{#1}\fi
                             \ifx\second@\last@\else\def\gap@bg{#2}
                                \expandafter\def\csname fg@color*\endcsname{#2}\fi}
\def\domaingapcolors#1#2     {\xdef\first@{#1&}\xdef\second@{#2&}
                             \xdef\last@{\ampers@nd}
                             \ifx\first@\last@\else\def\domgap@fg{#1}
                                \expandafter\def\csname fg@textcolor!\endcsname{#1}\fi
                             \ifx\second@\last@\else\def\domgap@bg{#2}
                                \expandafter\def\csname fg@color!\endcsname{#2}\fi}
\def\shadebox#1{%
   \xdef\first@{White}%
   \xdef\third@{#1}%
   \xdef\second@{nomatch}%
   \ifx\second@\third@
      \ifx\Nomatch\first@\white@box\else\textcolor{\Nomatch}{\box@rule}\fi%
   \else
   \xdef\second@{similar}%
   \ifx\second@\third@
      \ifx\Similar\first@\white@box\else\textcolor{\Similar}{\box@rule}\fi%
   \else
   \xdef\second@{conserved}%
   \ifx\second@\third@
      \ifx\Identical\first@\white@box\else\textcolor{\Identical}{\box@rule}\fi%
   \else
   \xdef\second@{allmatch}%
   \ifx\second@\third@
      \ifx\Allmatch\first@\white@box\else\textcolor{\Allmatch}{\box@rule}\fi%
   \else
   \ifx\third@\first@\white@box\else\textcolor{\third@}{\box@rule}\fi
   \fi\fi\fi\fi}
\def\featurenamescolor#1{%
   \expandafter\xdef\csname ftext@fg@ttttop\endcsname{#1}
   \expandafter\xdef\csname ftext@fg@tttop\endcsname{#1}
   \expandafter\xdef\csname ftext@fg@ttop\endcsname{#1}
   \expandafter\xdef\csname ftext@fg@top\endcsname{#1}
   \expandafter\xdef\csname ftext@fg@bottom\endcsname{#1}
   \expandafter\xdef\csname ftext@fg@bbottom\endcsname{#1}
   \expandafter\xdef\csname ftext@fg@bbbottom\endcsname{#1}
   \expandafter\xdef\csname ftext@fg@bbbbottom\endcsname{#1}
}
\def\featurestylenamescolor#1{%
   \expandafter\xdef\csname fstyles@fg@ttttop\endcsname{#1}
   \expandafter\xdef\csname fstyles@fg@tttop\endcsname{#1}
   \expandafter\xdef\csname fstyles@fg@ttop\endcsname{#1}
   \expandafter\xdef\csname fstyles@fg@top\endcsname{#1}
   \expandafter\xdef\csname fstyles@fg@bottom\endcsname{#1}
   \expandafter\xdef\csname fstyles@fg@bbottom\endcsname{#1}
   \expandafter\xdef\csname fstyles@fg@bbbottom\endcsname{#1}
   \expandafter\xdef\csname fstyles@fg@bbbbottom\endcsname{#1}
}
\def\featurenamecolor#1#2{\expandafter\xdef\csname ftext@fg@#1\endcsname{#2}}
\def\featurestylenamecolor#1#2{\expandafter\xdef\csname fstyles@fg@#1\endcsname{#2}}
\def\namescolor#1{\xdef\names@fg{#1}}
\def\namecolor#1#2{%
   \xdef\first@{consensus} \xdef\second@{#1}
   \ifx\first@\second@
      \expandafter\xdef\csname name@col0\endcsname{#2}
   \else
   \xdef\first@{featurenames} \xdef\second@{#1}
   \ifx\first@\second@
     \xdef\ftext@fg{#2}
   \else
   \xdef\first@{featurestylenames} \xdef\second@{#1}
   \ifx\first@\second@
     \xdef\fstyles@fg{#2}
   \else
      \xdef\first@{#1,&,@} \xdef\third@{#2} \namecolor@
   \fi\fi\fi
}
\def\numberingcolor#1{\xdef\numbering@fg{#1}}
\def\numbercolor#1#2{%
   \xdef\first@{consensus} \xdef\second@{#1}
   \ifx\first@\second@
      \expandafter\xdef\csname number@col0\endcsname{#2}
   \else
      \xdef\first@{#1,&,@} \xdef\third@{#2} \numbercolor@
   \fi
}
\def\legendcolor#1{\xdef\legend@fg{#1}}
\def\rulercolor#1{\xdef\ruler@fg{#1}}
\def\molweight#1#2{%
   \xdef\temp@{Da}%
   \xdef\second@{#2}%
   \ifx\second@\temp@\xdef\third@{Da}\else\xdef\third@{kDa}\fi%
   \xdef\first@{#1 @} \expandafter\check@letter\first@
   \xdef\first@{#1}   \ifletter \get@name@number \fi
   \xdef\first@{\csname @rd\first@\endcsname}%
   \loopcount=\csname mol@weight\first@\endcsname%
   \divide\loopcount by 10\relax%
   \innerloopcount=\loopcount%
   \hbox{%
   \ifnum\loopcount>1000%
      \divide\loopcount by 1000\relax%
      \pos@count=\loopcount%
      \multiply\loopcount by 1000\relax%
      \advance\innerloopcount by -\loopcount%
      \loopcount=\innerloopcount%
      \ifnum\loopcount>949\advance\pos@count by 1\relax\fi%
      \the\pos@count%
      \ifx\temp@\second@\ifgerm@n .\else {,}\fi\fi%
   \else%
      \ifx\second@\temp@ \else 0\fi%
   \fi%
   \ifx\second@\temp@%
      \the\loopcount%
      \loopcount=\csname mol@weight\first@\endcsname%
      \innerloopcount=\loopcount%
      \divide\loopcount by 10\relax%
      \multiply\loopcount by 10\relax%
      \advance\innerloopcount by -\loopcount\relax%
   \else%
      \divide\innerloopcount by 10\relax%
      \advance\innerloopcount by 5\relax%
      \divide\innerloopcount by 10\relax%
   \fi%
   \ifnum\innerloopcount>9\relax\innerloopcount=0\relax\fi%
   \ifgerm@n {,}\else .\fi%
   \the\innerloopcount~\third@}}
\newcommand\charge[2][o]{%
 \xdef\temp@{pep}%
 \ifx\prefix@\temp@%
   \xdef\first@{#2 @} \expandafter\check@letter\first@
   \xdef\first@{#2}   \ifletter \get@name@number \fi
   \xdef\second@{\csname @rd\first@\endcsname}%
   \loopcount=\csname ch@rge\second@\endcsname%
   \xdef\first@{#1}\make@lower%
   \if\first@ i\fi%
   \if\first@ o\advance\loopcount by \chargeNterm%
               \advance\loopcount by \chargeCterm\fi%
   \if\first@ n\advance\loopcount by \chargeNterm\fi%
   \if\first@ c\advance\loopcount by \chargeCterm\fi%
   \hbox{\ensuremath{%
   \ifnum\loopcount>0 +%
   \else\ifnum\loopcount=0 \pm%
   \else -\multiply\loopcount by -1\relax%
   \fi\fi%
   \innerloopcount=\loopcount%
   \divide\loopcount by 1000\relax%
   \the\loopcount%
   \multiply\loopcount by 1000\relax%
   \advance\innerloopcount by -\loopcount\relax%
   \divide\innerloopcount by 10\relax%
   \ifnum\innerloopcount=0%
   \else%
      \ifgerm@n {,}\else .\fi%
      \ifnum\innerloopcount<10 0\fi%
      \the\innerloopcount%
   \fi}}%
 \fi}
\def\TeXshade{%
   \setbox1=\hbox{\texttt{H}}%
   \def\logo@rule{\vrule depth0.25\ht1 height1.25\ht1 width\wd1}%
   \TeX%
   \logo@rule\kern-\wd1\textcolor{White}{\texttt{s}}%
   \logo@rule\kern-\wd1\textcolor{White}{\texttt{h}}%
   \texttt{a}%
   \logo@rule\kern-\wd1\textcolor{White}{\texttt{d}}%
   \texttt{e}}

\def\includeTCoffee#1{%
   \xdef\TC@first@{#1}\include@T@coffee}

\def\firstcolumnDSSP{\xdef\fc@DSSP{y}}
\def\secondcolumnDSSP{\xdef\fc@DSSP{n}}

\newcommand{\includeDSSP}[3][existing]{%
  \temp@count=\dssp@num
  \advance\temp@count by 1
  \xdef\dssp@num{\the\temp@count}
  \xdef\first@{#1} \xdef\temp@{existing}
  \ifx\first@\temp@ \else\xdef\first@{make new}\fi
  \expandafter\xdef\csname optiondssp\the\temp@count\endcsname{\first@}
  \xdef\first@{#2 @} \expandafter\check@letter\first@
  \xdef\first@{#2}   \ifletter \get@name@number \fi
  \expandafter\xdef\csname doseqdssp\the\temp@count\endcsname{\first@}
  \expandafter\xdef\csname filenamedssp\the\temp@count\endcsname{#3}
  \expandafter\ifnum\csname doseqdssp\the\temp@count\endcsname>\seq@count
     \message{<Ignoring `#2' in \noexpand\includeDSSP>}
     \advance\temp@count by -1
     \xdef\dssp@num{\the\temp@count}
  \fi
}

\newcommand{\includeHMMTOP}[3][existing]{%
  \temp@count=\HMMTOP@num
  \advance\temp@count by 1
  \xdef\HMMTOP@num{\the\temp@count}
  \xdef\first@{#1} \xdef\temp@{existing}
  \ifx\first@\temp@ \else\xdef\first@{make new}\fi
  \expandafter\xdef\csname optionHMMTOP\the\temp@count\endcsname{\first@}
  \xdef\first@{#2[,]&}\expandafter\opt@color\first@
  \ifx\f@color\comm@
     \expandafter\xdef\csname fileseqHMMTOP\the\temp@count\endcsname{0}
  \else
     \expandafter\xdef\csname fileseqHMMTOP\the\temp@count\endcsname{\f@color}
  \fi
  \xdef\first@{\fourth@ @} \expandafter\check@letter\first@
  \xdef\first@{\fourth@}   \ifletter \get@name@number \fi
  \expandafter\xdef\csname doseqHMMTOP\the\temp@count\endcsname{\first@}
  \expandafter\xdef\csname filenameHMMTOP\the\temp@count\endcsname{#3}
  \expandafter\ifnum\csname doseqHMMTOP\the\temp@count\endcsname>\seq@count
     \message{<Ignoring `#2' in \noexpand\includeHMMTOP>}
     \advance\temp@count by -1
     \xdef\HMMTOP@num{\the\temp@count}
  \fi
}

\newcommand{\includeSTRIDE}[3][existing]{%
  \temp@count=\stride@num
  \advance\temp@count by 1
  \xdef\stride@num{\the\temp@count}
  \xdef\first@{#1} \xdef\temp@{existing}
  \ifx\first@\temp@ \else\xdef\first@{make new}\fi
  \expandafter\xdef\csname optionstride\the\temp@count\endcsname{\first@}
  \xdef\first@{#2 @} \expandafter\check@letter\first@
  \xdef\first@{#2}   \ifletter \get@name@number \fi
  \expandafter\xdef\csname doseqstride\the\temp@count\endcsname{\first@}
  \expandafter\xdef\csname filenamestride\the\temp@count\endcsname{#3}
  \expandafter\ifnum\csname doseqstride\the\temp@count\endcsname>\seq@count
     \message{<Ignoring `#2' in \noexpand\includeSTRIDE>}
     \advance\temp@count by -1
     \xdef\stride@num{\the\temp@count}
  \fi
}
\newcommand{\includePHDsec}[3][existing]{%
  \temp@count=\PHD@num
  \advance\temp@count by 1
  \xdef\PHD@num{\the\temp@count}
  \xdef\first@{#1} \xdef\temp@{existing}
  \ifx\first@\temp@ \else\xdef\first@{make new}\fi
  \expandafter\xdef\csname optionphd\the\temp@count\endcsname{\first@}
  \xdef\first@{#2 @} \expandafter\check@letter\first@
  \xdef\first@{#2}   \ifletter \get@name@number \fi
  \expandafter\xdef\csname doseqphd\the\temp@count\endcsname{\first@}
  \expandafter\xdef\csname modephd\the\temp@count\endcsname{structure}
  \expandafter\xdef\csname filenamephd\the\temp@count\endcsname{#3}
  \expandafter\ifnum\csname doseqphd\the\temp@count\endcsname>\seq@count
     \message{<Ignoring `#2' in \noexpand\includePHDsec>}
     \advance\temp@count by -1
     \xdef\PHD@num{\the\temp@count}
  \fi
}
\newcommand{\includePHDtopo}[3][existing]{%
  \temp@count=\PHD@num
  \advance\temp@count by 1
  \xdef\PHD@num{\the\temp@count}
  \xdef\first@{#1} \xdef\temp@{existing}
  \ifx\first@\temp@ \else\xdef\first@{make new}\fi
  \expandafter\xdef\csname optionphd\the\temp@count\endcsname{\first@}
  \xdef\first@{#2 @} \expandafter\check@letter\first@
  \xdef\first@{#2}   \ifletter \get@name@number \fi
  \expandafter\xdef\csname doseqphd\the\temp@count\endcsname{\first@}
  \expandafter\xdef\csname modephd\the\temp@count\endcsname{topology}
  \expandafter\xdef\csname filenamephd\the\temp@count\endcsname{#3}
  \expandafter\ifnum\csname doseqphd\the\temp@count\endcsname>\seq@count
     \message{<Ignoring `#2' in \noexpand\includePHDtopo>}
     \advance\temp@count by -1
     \xdef\PHD@num{\the\temp@count}
  \fi
}
\def\appearance#1#2#3#4#5{%
   \xdef\first@{#1} \xdef\second@{#2}
   \xdef\temp@{PHDsec}
   \ifx\temp@\first@
     \xdef\temp@{alpha}
     \ifx\second@\temp@
      \def\bottop@Hsec{#3}
      \def\label@Hsec{#4}
      \def\text@Hsec{#5}
     \else
     \xdef\temp@{beta}
     \ifx\second@\temp@
      \def\bottop@Esec{#3}
      \def\label@Esec{#4}
      \def\text@Esec{#5}
     \fi\fi
   \else
   \xdef\temp@{PHDtopo}
   \ifx\temp@\first@
     \xdef\temp@{internal}
     \ifx\second@\temp@
      \def\bottop@itop{#3}
      \def\label@itop{#4}
      \def\text@itop{#5}
     \else
     \xdef\temp@{external}
     \ifx\second@\temp@
      \def\bottop@etop{#3}
      \def\label@etop{#4}
      \def\text@etop{#5}
     \else
     \xdef\temp@{TM}
     \ifx\second@\temp@
      \def\bottop@TMtop{#3}
      \def\label@TMtop{#4}
      \def\text@TMtop{#5}
     \fi\fi\fi
   \else
   \xdef\temp@{STRIDE}
   \ifx\temp@\first@
     \xdef\temp@{alpha}
     \ifx\second@\temp@
      \def\bottop@Hstride{#3}
      \def\label@Hstride{#4}
      \def\text@Hstride{#5}
     \else
     \xdef\temp@{3-10}
     \ifx\second@\temp@
      \def\bottop@Gstride{#3}
      \def\label@Gstride{#4}
      \def\text@Gstride{#5}
     \else
     \xdef\temp@{pi}
     \ifx\second@\temp@
      \def\bottop@Istride{#3}
      \def\label@Istride{#4}
      \def\text@Istride{#5}
     \else
     \xdef\temp@{beta}
     \ifx\second@\temp@
      \def\bottop@Estride{#3}
      \def\label@Estride{#4}
      \def\text@Estride{#5}
     \else
     \xdef\temp@{bridge}
     \ifx\second@\temp@
      \def\bottop@Bstride{#3}
      \def\label@Bstride{#4}
      \def\text@Bstride{#5}
     \else
     \xdef\temp@{turn}
     \ifx\second@\temp@
      \def\bottop@Tstride{#3}
      \def\label@Tstride{#4}
      \def\text@Tstride{#5}
     \fi\fi\fi\fi\fi\fi
   \else
   \xdef\temp@{DSSP}
   \ifx\temp@\first@
     \xdef\temp@{alpha}
     \ifx\second@\temp@
      \def\bottop@Hdssp{#3}
      \def\label@Hdssp{#4}
      \def\text@Hdssp{#5}
     \else
     \xdef\temp@{3-10}
     \ifx\second@\temp@
      \def\bottop@Gdssp{#3}
      \def\label@Gdssp{#4}
      \def\text@Gdssp{#5}
     \else
     \xdef\temp@{pi}
     \ifx\second@\temp@
      \def\bottop@Idssp{#3}
      \def\label@Idssp{#4}
      \def\text@Idssp{#5}
     \else
     \xdef\temp@{beta}
     \ifx\second@\temp@
      \def\bottop@Edssp{#3}
      \def\label@Edssp{#4}
      \def\text@Edssp{#5}
     \else
     \xdef\temp@{bridge}
     \ifx\second@\temp@
      \def\bottop@Bdssp{#3}
      \def\label@Bdssp{#4}
      \def\text@Bdssp{#5}
     \else
     \xdef\temp@{turn}
     \ifx\second@\temp@
      \def\bottop@Tdssp{#3}
      \def\label@Tdssp{#4}
      \def\text@Tdssp{#5}
     \else
     \xdef\temp@{bend}
     \ifx\second@\temp@
      \def\bottop@Sdssp{#3}
      \def\label@Sdssp{#4}
      \def\text@Sdssp{#5}
     \fi\fi\fi\fi\fi\fi\fi
   \else
   \xdef\temp@{HMMTOP}
   \ifx\temp@\first@
     \xdef\temp@{internal}
     \ifx\second@\temp@
      \def\bottop@i@HMMTOP{#3}
      \def\label@i@HMMTOP{#4}
      \def\text@i@HMMTOP{#5}
     \else
     \xdef\temp@{external}
     \ifx\second@\temp@
      \def\bottop@e@HMMTOP{#3}
      \def\label@e@HMMTOP{#4}
      \def\text@e@HMMTOP{#5}
     \else
     \xdef\temp@{TM}
     \ifx\second@\temp@
      \def\bottop@TM@HMMTOP{#3}
      \def\label@TM@HMMTOP{#4}
      \def\text@TM@HMMTOP{#5}
     \fi\fi\fi
   \fi\fi\fi\fi\fi
}

\def\showonDSSP#1{%
   \xdef\first@{#1,&,@} \xdef\second@{yes} \show@DSSP}
\def\hideonDSSP#1{%
   \xdef\first@{#1,&,@} \xdef\second@{no} \show@DSSP}

\def\showonSTRIDE#1{%
   \xdef\first@{#1,&,@} \xdef\second@{yes} \show@STRIDE}
\def\hideonSTRIDE#1{%
   \xdef\first@{#1,&,@} \xdef\second@{no} \show@STRIDE}

\def\showonPHDtopo#1{%
   \xdef\first@{#1,&,@} \xdef\second@{yes} \show@PHDtopo}
\def\hideonPHDtopo#1{%
   \xdef\first@{#1,&,@} \xdef\second@{no} \show@PHDtopo}

\def\showonPHDsec#1{%
   \xdef\first@{#1,&,@} \xdef\second@{yes} \show@PHDsec}
\def\hideonPHDsec#1{%
   \xdef\first@{#1,&,@} \xdef\second@{no} \show@PHDsec}

\def\showonHMMTOP#1{%
   \xdef\first@{#1,&,@} \xdef\second@{yes} \show@HMMTOP}
\def\hideonHMMTOP#1{%
   \xdef\first@{#1,&,@} \xdef\second@{no} \show@HMMTOP}

\def\codon#1#2{%
   \xdef\first@{#1}
   \xdef\second@{#2,&,@}
   \expandafter\get@triplet\second@}
\def\geneticcode#1{%
   \xdef\first@{#1}
   \xdef\temp@{standard}
   \ifx\first@\temp@
      \c@d@ns
   \else
  \input{#1.cod}
   \fi}
\newcommand{\backtranslabel}[2][tiny]{%
   \def\trans@size{\csname #1\endcsname}
   \xdef\first@{#2}
   \xdef\temp@{horizontal}
   \ifx\temp@\first@ \xdef\tr@nsstyle{0}\fi
   \xdef\temp@{zigzag}
   \ifx\temp@\first@ \xdef\tr@nsstyle{1}\fi
   \xdef\temp@{alternating}
   \ifx\temp@\first@ \xdef\tr@nsstyle{2}\fi
   \xdef\temp@{oblique}
   \ifx\temp@\first@ \xdef\tr@nsstyle{3}\fi
   \xdef\temp@{vertical}
   \ifx\temp@\first@ \xdef\tr@nsstyle{4}\fi
}
\newcommand{\backtranstext}[2][tiny]{%
   \def\transtext@size{\csname #1\endcsname}
   \xdef\first@{#2}
   \xdef\temp@{horizontal}
   \ifx\temp@\first@ \xdef\tr@nstextstyle{0}\fi
   \xdef\temp@{zigzag}
   \ifx\temp@\first@ \xdef\tr@nstextstyle{1}\fi
   \xdef\temp@{alternating}
   \ifx\temp@\first@ \xdef\tr@nstextstyle{2}\fi
   \xdef\temp@{oblique}
   \ifx\temp@\first@ \xdef\tr@nstextstyle{3}\fi
   \xdef\temp@{vertical}
   \ifx\temp@\first@ \xdef\tr@nstextstyle{4}\fi
}

\newcommand\exportconsensus[2][export.txt]{%
   \ifx\exp@rt\n@
      \xdef\first@{#2 @} \expandafter\check@letter\first@
      \xdef\first@{#2}   \ifletter \get@name@number \fi
      \xdef\exp@rt@num{\first@}
      \xdef\exp@rt{y}
      \immediate\openout\exp@rtfile = #1
   \fi
}

\def\setdomain#1#2{%
   \xdef\first@{#1}
   \xdef\temp@{consensus}
   \ifx\first@\temp@ \xdef\domain@seq{0}
   \else
      \xdef\first@{#1 @} \expandafter\check@letter\first@
      \xdef\first@{#1}   \ifletter \get@name@number \fi
      \xdef\domain@seq{\csname @rd\first@\endcsname}%
   \fi
   \xdef\list@{#2,&}
   \xdef\temp@{#2,,,:,,,,@} \expandafter\test@PDB\temp@
   \loop
        \xdef\list@{\list@ @}
        \expandafter\get@domainregions\list@
   \ifx\list@\ampers@nd\else\repeat
   \xdef\dom@in{y}
}

\def\decimal@IOO#1#2#3{#1#2\temp@#3}
\def\decimal@IO#1#2{#1\temp@#2}
\def\decimal@I#1{0\temp@#1}

\def\percentsimilarity#1#2{%
   \xdef\first@{#2@}\expandafter\check@letter\first@%
   \xdef\first@{#2}\xdef\second@@{#2}%
   \ifletter\get@name@number@table\xdef\second@@{\first@}\fi%
   \xdef\first@{#1@}\expandafter\check@letter\first@%
   \xdef\first@{#1}\xdef\first@@{#1}%
   \ifletter\get@name@number@table\xdef\first@@{\first@}\fi%
   \ifnum\first@@<\second@@%
      \loopcount=\csname simcount\first@@ @\second@@\endcsname%
      \temp@count=\csname poscount\first@@ @\second@@\endcsname%
   \else%
   \ifnum\first@@=\second@@ \loopcount=1 \temp@count=1%
   \else%
      \loopcount=\csname simcount\second@@ @\first@@\endcsname%
      \temp@count=\csname poscount\second@@ @\first@@\endcsname%
   \fi%
   \fi%
   \multiply\loopcount by 1000%
   \divide\loopcount by \temp@count%
   \xdef\first@{\the\loopcount}%
   \ifgerm@n\xdef\temp@{,}\else\xdef\temp@{.}\fi%
   \ifnum\first@=1000 100\temp@0%
   \else%
   \ifnum\first@>99 \expandafter\decimal@IOO\first@%
   \else%
   \ifnum\first@>9 \expandafter\decimal@IO\first@%
   \else%
   \ifnum\first@>0 \expandafter\decimal@I\first@%
   \else 0\temp@0%
   \fi%
   \fi%
   \fi%
   \fi%
}

\def\percentidentity#1#2{%
   \xdef\first@{#2@}\expandafter\check@letter\first@%
   \xdef\first@{#2}\xdef\second@@{#2}%
   \ifletter\get@name@number@table\xdef\second@@{\first@}\fi%
   \xdef\first@{#1@}\expandafter\check@letter\first@%
   \xdef\first@{#1}\xdef\first@@{#1}%
   \ifletter\get@name@number@table\xdef\first@@{\first@}\fi%
   \ifnum\first@@<\second@@%
      \loopcount=\csname identcount\first@@ @\second@@\endcsname%
      \temp@count=\csname poscount\first@@ @\second@@\endcsname%
   \else%
   \ifnum\first@@=\second@@ \loopcount=1 \temp@count=1%
   \else%
      \loopcount=\csname identcount\second@@ @\first@@\endcsname%
      \temp@count=\csname poscount\second@@ @\first@@\endcsname%
   \fi%
   \fi%
   \multiply\loopcount by 1000%
   \divide\loopcount by \temp@count%
   \xdef\first@{\the\loopcount}%
   \ifgerm@n\xdef\temp@{,}\else\xdef\temp@{.}\fi%
   \ifnum\first@=1000 100\temp@0%
   \else%
   \ifnum\first@>99 \expandafter\decimal@IOO\first@%
   \else%
   \ifnum\first@>9 \expandafter\decimal@IO\first@%
   \else%
   \ifnum\first@>0 \expandafter\decimal@I\first@%
   \else 0\temp@0%
   \fi%
   \fi%
   \fi%
   \fi%
}

\def\similaritytable{%
   \def\name@loop{%
      \advance\outerloopcount by 1
      \ifnum\outerloopcount>\seq@num\relax
      \else
      \immediate\write\exp@rtfile{&\string\multicolumn{1}{c}{\string\kern1ex\string\begin{rotopo}{90}\csname newseqname\the\outerloopcount\endcsname\string\end{rotopo}}}
      \name@loop\fi
   }
   \def\inner@loop{%
      \advance\innerloopcount by 1
      \ifnum\innerloopcount>\seq@num\relax
      \else
      \ifnum\innerloopcount=\outerloopcount\relax \immediate\write\exp@rtfile{& {---\hss}}\fi
      \ifnum\innerloopcount>\outerloopcount\relax \immediate\write\exp@rtfile{& \string\percentsimilarity{\the\outerloopcount}{\the\innerloopcount}}\fi
      \ifnum\innerloopcount<\outerloopcount\relax \immediate\write\exp@rtfile{& \string\percentidentity{\the\outerloopcount}{\the\innerloopcount}}\fi
      \inner@loop\fi
   }
   \def\outer@loop{%
      \advance\outerloopcount by 1
      \ifnum\outerloopcount>\seq@num\relax
      \else
      \immediate\write\exp@rtfile{\csname newseqname\the\outerloopcount\endcsname}
      \innerloopcount=0 \inner@loop \immediate\write\exp@rtfile{&\string\\}
      \outer@loop\fi
   }
   \xdef\temp@{l|}
   \outerloopcount=0
   \loop
      \advance\outerloopcount by 1
      \xdef\temp@{\temp@ r}
   \ifnum\outerloopcount<\seq@num\repeat
   \advance\outerloopcount by 1 \xdef\seq@num@plus{\the\outerloopcount}
   \advance\outerloopcount by 1 \xdef\seq@num@plus@plus{\the\outerloopcount}
   \ifnum\seq@num<3 \xdef\temp@@{$\approx$} \else
   \ifnum\seq@num<5 \xdef\temp@@{simil.}\ifgerm@n\def\temp@@{\string\"{A}hnl.}\fi\ifsp@nish\xdef\temp@@{simil.}\fi\else
   \xdef\temp@@{similarity}
      \ifgerm@n\ifnum\seq@num=5\def\temp@@{\string\"{A}hnlichk.}\else\def\temp@@{\string\"{A}hnlichkeit}\fi\fi\ifsp@nish\xdef\temp@@{similitud}\fi\fi
   \fi
   \xdef\temp@@@{identity}\ifgerm@n\def\temp@@@{Identit\string\"{a}t}\fi\ifsp@nish\xdef\temp@@@{identidad}\fi

   \immediate\openout\exp@rtfile = simtable.tmp
   \immediate\write\exp@rtfile{\string\begin{tabular}{\temp@ |r}}
   \immediate\write\exp@rtfile{\string\multicolumn{\seq@num@plus@plus}{c}{}\string\\[\name@@width]}
   \immediate\write\exp@rtfile{\string\multicolumn{1}{c}{}}
   \outerloopcount=0 \name@loop \immediate\write\exp@rtfile{&\string\\ \string\cline{2-\seq@num@plus}}
   \immediate\write\exp@rtfile{&\string\multicolumn{\seq@num}{|c|}{}&\string\\[-2ex]}
   \outerloopcount=0 \outer@loop
   \immediate\write\exp@rtfile{\string\cline{2-\seq@num@plus}}
   \immediate\write\exp@rtfile{\string\multicolumn{\seq@num@plus}{c}{}&}
   \immediate\write\exp@rtfile{\string\multicolumn{1}{r}{\string\kern1.5ex\string\begin{rotopo}{90}\kern1em\% \temp@@\string\end{rotopo}}\string\\[-2ex]}
   \immediate\write\exp@rtfile{\string\multicolumn{1}{c}{}&\string\multicolumn{\seq@num}{l}{\% \temp@@@}&\string\\}
   \immediate\write\exp@rtfile{\string\end{tabular}}
   \immediate\closeout\exp@rtfile

   \input{simtable.tmp}
}

\def\identitytable{\similaritytable}

%%%%%  Calculate consensus

\def\check@sim{%
 \xdef\first@{\csname res\the\loopcount\endcsname}
 \xdef\first@{\csname \prefix@ grp\first@\endcsname}
 \newrestrue
 \ifnum\first@<0 \newresfalse
 \else
 \innerloopcount=\loopcount
 \ifnum\loopcount=\cons@num \innerloopcount=\seq@count \fi
 \ifnum\innerloopcount<\seq@count
 \loop
    \advance\innerloopcount by 1
    \xdef\second@{\csname res\the\innerloopcount\endcsname}
    \expandafter\ifx\csname \prefix@ grp\second@\endcsname\first@
       \newresfalse \innerloopcount=\seq@count \fi
 \ifnum\innerloopcount<\seq@count \repeat
 \fi
 \fi

 \ifnewres
  \pos@sum=0
  \innerloopcount=0
  \loop
    \advance\innerloopcount by 1
    \xdef\second@{\csname res\the\innerloopcount\endcsname}
    \expandafter\ifx\csname \prefix@ grp\second@\endcsname\first@
       \advance\pos@sum by 1 \fi
  \ifnum\innerloopcount<\seq@count \repeat

  \multiply\pos@sum by \seq@percent
  \expandafter\xdef\csname pos\the\loopcount\endcsname{\the\pos@sum}
  \expandafter\ifnum\csname pos\the\loopcount\endcsname<\thresh@ld
  \else
    \expandafter\ifnum\csname pos\the\loopcount\endcsname>\m@x
      \xdef\m@x{\csname pos\the\loopcount\endcsname}
      \xdef\cons@seq{\the\loopcount} \xdef\match@case{\c@se}
      \xdef\simgroup@{\first@}
    \else
     \expandafter\ifnum\csname pos\the\loopcount\endcsname=\m@x
      \xdef\match@case{0}
     \fi
    \fi
  \fi
 \fi

 \ifnum\loopcount=\cons@num \loopcount=1 \fi
 \advance\loopcount by -1
 \ifnum\loopcount>0 \check@sim \fi}

\def\check@ident{%
 \xdef\first@{\csname res\the\loopcount\endcsname}
 \newrestrue \expandafter\check@char\first@
 \ifletter
   \innerloopcount=\loopcount
   \ifnum\loopcount=\cons@num \innerloopcount=\seq@count \fi
   \ifnum\innerloopcount<\seq@count
     \loop
       \advance\innerloopcount by 1
       \expandafter\ifx\csname res\the\innerloopcount\endcsname\first@
          \newresfalse \innerloopcount=\seq@count  \fi
     \ifnum\innerloopcount<\seq@count \repeat
   \fi
 \else
    \newresfalse
 \fi

 \ifnewres
  \pos@sum=0
  \innerloopcount=0
  \loop
    \advance\innerloopcount by 1
    \expandafter\ifx\csname res\the\innerloopcount\endcsname\first@
       \advance\pos@sum by 1 \fi
  \ifnum\innerloopcount<\seq@count \repeat

  \expandafter\xdef\csname pos\the\loopcount\endcsname{\the\pos@sum}
  \expandafter\ifnum\csname pos\the\loopcount\endcsname=\seq@count
    \xdef\cons@seq{\the\loopcount} \xdef\match@case{2} \loopcount=1
  \else
   \multiply\pos@sum by \seq@percent
   \expandafter\xdef\csname pos\the\loopcount\endcsname{\the\pos@sum}
   \expandafter\ifnum\csname pos\the\loopcount\endcsname<\thresh@ld
   \else
    \expandafter\ifnum\csname pos\the\loopcount\endcsname>\m@x
      \xdef\m@x{\csname pos\the\loopcount\endcsname}
      \expandafter\ifnum\csname pos\the\loopcount\endcsname<\all@thresh@ld
         \xdef\cons@seq{\the\loopcount} \xdef\match@case{1}
      \else
         \xdef\cons@seq{\the\loopcount} \xdef\match@case{2}
      \fi
    \else
     \expandafter\ifnum\csname pos\the\loopcount\endcsname=\m@x
      \xdef\match@case{0}
     \fi
    \fi
   \fi
  \fi
 \fi

 \ifnum\loopcount=\cons@num \loopcount=1 \fi
 \advance\loopcount by -1
 \ifnum\loopcount>0 \check@ident \fi}

\def\get@simchar{%
 \xdef\first@{\csname res\the\loopcount\endcsname}
 \newrestrue \expandafter\check@char\first@
 \ifletter
   \innerloopcount=\loopcount
   \ifnum\loopcount=\cons@num \innerloopcount=\seq@count \fi
   \ifnum\innerloopcount<\seq@count
     \loop
       \advance\innerloopcount by 1
       \expandafter\ifx\csname res\the\innerloopcount\endcsname\first@
          \newresfalse \innerloopcount=\seq@count  \fi
     \ifnum\innerloopcount<\seq@count \repeat
   \fi
 \else
    \newresfalse
 \fi

 \ifnewres
  \pos@sum=0
  \innerloopcount=0
  \loop
    \advance\innerloopcount by 1
    \expandafter\ifx\csname res\the\innerloopcount\endcsname\first@
       \xdef\second@{\csname res\the\innerloopcount\endcsname}
       \expandafter\ifx\csname \prefix@ grp\second@\endcsname\simgroup@
          \advance\pos@sum by 1 \fi
    \fi
  \ifnum\innerloopcount<\seq@count \repeat

  \expandafter\xdef\csname pos\the\loopcount\endcsname{\the\pos@sum}
  \expandafter\ifnum\csname pos\the\loopcount\endcsname>\m@x
      \xdef\m@x{\csname pos\the\loopcount\endcsname}
      \xdef\cons@seq{\the\loopcount}
  \fi
 \fi

 \ifnum\loopcount=\cons@num \loopcount=1 \fi
 \advance\loopcount by -1
 \ifnum\loopcount>0 \get@simchar \fi}

\def\unc@nserved{%
 \ifsimmode
    \ifnum\cons@num>0 \loopcount=\cons@num \else \loopcount=\seq@count \fi
    \xdef\match@case{0} \xdef\m@x{1} \check@sim
    \ifnum\match@case=0
       \loopcount=0
       \loop
          \advance\loopcount by 1
          \xdef\first@{noshade}
          \expandafter\ifx\csname hide@seq\the\loopcount\endcsname\first@
            \expandafter\ifx\csname res\the\loopcount\endcsname\d@t
             \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                \csname seq\the\loopcount\endcsname3\gap@char}
            \else
            \expandafter\ifx\csname res\the\loopcount\endcsname\questi@n
             \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                \csname seq\the\loopcount\endcsname3\st@p@char}
            \else
             \expandafter\ifx\csname res\the\loopcount\endcsname\equ@l
              \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                 \csname seq\the\loopcount\endcsname!\dom@char} \xdef\g@p{y}
             \else
             \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                \csname seq\the\loopcount\endcsname%
                3\csname res\the\loopcount\endcsname}
             \fi
             \fi
             \fi
          \else
           \xdef\first@{\csname res\the\loopcount\endcsname}
           \ifx\first@\equ@l
             \def\first@{\dom@char} \def\third@{9}
             \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
             \xdef\first@{;\first@}\fi
             \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
             \xdef\first@{=\first@}\fi
             \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
             \xdef\first@{,\first@}\fi
             \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                              \csname seq\the\loopcount\endcsname\third@\first@} \xdef\g@p{y}
           \else
             \ifx\first@\d@t
                 \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                      <\csname seq@start\the\loopcount\endcsname
                    \ifsh@wg@ps
                       \def\first@{\gap@char}\def\third@{7}
                    \else
                       \def\first@{{}} \def\third@{8}
                    \fi
                 \else
                    \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                        <\csname seq@len\the\loopcount\endcsname
                       \def\third@{7}\def\first@{\gap@char}
                    \else
                    \ifsh@wg@ps
                       \def\first@{\gap@char}\def\third@{7}
                    \else
                       \def\first@{{}} \def\third@{8}
                    \fi
                    \fi
                 \fi
                \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                \xdef\first@{;\first@}\fi
                \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                \xdef\first@{=\first@}\fi
                \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                \xdef\first@{,\first@}\fi
                \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                                 \csname seq\the\loopcount\endcsname\third@\first@}
             \else
             \ifx\first@\questi@n
                 \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                      <\csname seq@start\the\loopcount\endcsname
                    \def\first@{{}} \def\third@{8}
                 \else
                    \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                        <\csname seq@len\the\loopcount\endcsname
                       \def\third@{7}\def\first@{\st@p@char}
                    \else
                       \def\first@{{}} \def\third@{8}
                    \fi
                 \fi
                \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                \xdef\first@{;\first@}\fi
                \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                \xdef\first@{=\first@}\fi
                \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                \xdef\first@{,\first@}\fi
                \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                                 \csname seq\the\loopcount\endcsname\third@\first@}
             \else
               \ifnum\divref@=\loopcount\else
               \xdef\low@up{lower} \ifx\resn@m@tch\low@up \make@lower \else
               \xdef\low@up{upper} \ifx\resn@m@tch\low@up
               \else \xdef\first@{\resn@m@tch} \fi\fi\fi
               \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                  \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                  \xdef\first@{;\first@}\fi
               \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                  \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                  \xdef\first@{=\first@}\fi
               \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                  \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                  \xdef\first@{,\first@}\fi
               \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                  \csname seq\the\loopcount\endcsname3\first@}
             \fi
             \fi
           \fi
          \fi
       \ifnum\loopcount<\seq@count \repeat
       \xdef\low@up{lower} \ifx\n@m@tch\low@up \xdef\first@{{ }} \else
       \xdef\low@up{upper} \ifx\n@m@tch\low@up \xdef\first@{{ }}
       \else \xdef\first@{\n@m@tch} \fi\fi
       \expandafter\ifx\csname lower@seq0\endcsname\y@
          \expandafter\xdef\csname lower@seq0\endcsname{n}
          \xdef\first@{;\first@}\fi
       \expandafter\ifx\csname tint@seq0\endcsname\y@
          \expandafter\xdef\csname tint@seq0\endcsname{n}
          \xdef\first@{=\first@}\fi
       \expandafter\ifx\csname emph@seq0\endcsname\y@
          \expandafter\xdef\csname emph@seq0\endcsname{n}
          \xdef\first@{,\first@}\fi
       \ifx\g@p\y@
          \xdef\consensus{\consensus 8{}}
       \else
          \xdef\consensus{\consensus 4\first@}
          \expandafter\ifx\csname res\cons@num\endcsname\d@t
          \else\xdef\constopo{\constopo 0}\fi
       \fi
    \else
     \ifnum\cons@num>0
       \xdef\tmp@{\csname res\cons@num\endcsname}
     \else
       \xdef\m@x{0} \loopcount=\seq@count \get@simchar
       \xdef\tmp@{\csname res\cons@seq\endcsname}
     \fi
     \xdef\second@{\csname \prefix@ grp\tmp@\endcsname}
     \loopcount=0
     \loop
        \advance\loopcount by 1
        \xdef\first@{noshade}
        \expandafter\ifx\csname hide@seq\the\loopcount\endcsname\first@
             \xdef\first@{\csname res\the\loopcount\endcsname}
             \ifx\first@\d@t\def\first@{\gap@char}\fi
             \ifx\first@\questi@n\def\first@{\st@p@char}\fi
             \ifx\first@\equ@l\def\first@{\dom@char} \xdef\g@p{y} \fi
             \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                \xdef\first@{;\first@}\fi
             \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                \xdef\first@{=\first@}\fi
             \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                \xdef\first@{,\first@}\fi
             \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                \csname seq\the\loopcount\endcsname3\first@}
        \else
          \xdef\first@{\csname res\the\loopcount\endcsname}
          \xdef\last@{\csname res\the\loopcount\endcsname}
          \expandafter\ifnum\csname \prefix@ grp\last@\endcsname=\second@
              \xdef\third@{2}
              \ifnum\divref@=\loopcount\else
              \xdef\low@up{lower} \ifx\ressimm@tch\low@up \make@lower \else
              \xdef\low@up{upper} \ifx\ressimm@tch\low@up
              \else \xdef\first@{\ressimm@tch} \fi\fi\fi
          \else
            \ifx\first@\equ@l
              \def\first@{\dom@char} \def\third@{9}  \xdef\g@p{y}
            \else
              \ifx\first@\d@t
                 \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                      <\csname seq@start\the\loopcount\endcsname
                    \ifsh@wg@ps
                       \def\first@{\gap@char}\def\third@{7}
                    \else
                       \def\first@{{}} \def\third@{8}
                    \fi
                 \else
                    \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                         <\csname seq@len\the\loopcount\endcsname
                       \def\third@{7}\def\first@{\gap@char}
                    \else
                    \ifsh@wg@ps
                       \def\first@{\gap@char}\def\third@{7}
                    \else
                       \def\first@{{}} \def\third@{8}
                    \fi
                    \fi
                 \fi
              \else
              \ifx\first@\questi@n
                 \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                      <\csname seq@start\the\loopcount\endcsname
                       \def\first@{{}} \def\third@{8}
                 \else
                    \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                         <\csname seq@len\the\loopcount\endcsname
                       \def\third@{7}\def\first@{\st@p@char}
                    \else
                       \def\first@{{}} \def\third@{8}
                    \fi
                 \fi
              \else
                 \xdef\third@{3}
                 \ifnum\divref@=\loopcount\else
                 \xdef\low@up{lower} \ifx\resn@m@tch\low@up \make@lower \else
                 \xdef\low@up{upper} \ifx\resn@m@tch\low@up
                 \else \xdef\first@{\resn@m@tch} \fi\fi\fi
              \fi
              \fi
            \fi
          \fi
          \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                \xdef\first@{;\first@}\fi
          \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                \xdef\first@{=\first@}\fi
          \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                \xdef\first@{,\first@}\fi
          \expandafter\xdef\csname seq\the\loopcount\endcsname{%
              \csname seq\the\loopcount\endcsname\third@\first@}
        \fi
     \ifnum\loopcount<\seq@count \repeat
     \xdef\first@{\tmp@}
     \xdef\low@up{lower} \ifx\m@tch\low@up \make@lower \else
     \xdef\low@up{upper} \ifx\m@tch\low@up
     \else \xdef\first@{\m@tch} \fi\fi
     \expandafter\ifx\csname lower@seq0\endcsname\y@
                \expandafter\xdef\csname lower@seq0\endcsname{n}
                \xdef\first@{;\first@}\fi
     \expandafter\ifx\csname tint@seq0\endcsname\y@
                \expandafter\xdef\csname tint@seq0\endcsname{n}
                \xdef\first@{=\first@}\fi
     \expandafter\ifx\csname emph@seq0\endcsname\y@
                \expandafter\xdef\csname emph@seq0\endcsname{n}
                \xdef\first@{,\first@}\fi
     \ifx\g@p\y@
        \xdef\consensus{\consensus 8{}}
     \else
        \xdef\consensus{\consensus5\first@}
        \xdef\constopo{\constopo 1}
     \fi
    \fi
 \else
 \iffuncmode
    \loopcount=0
    \loop
       \advance\loopcount by 1
       \xdef\first@{\csname res\the\loopcount\endcsname}
       \ifx\first@\equ@l
          \def\first@{\dom@char} \def\third@{!}  \xdef\g@p{y}
          \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                   \xdef\first@{;\first@}\fi
          \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                   \xdef\first@{=\first@}\fi
          \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                   \xdef\first@{,\first@}\fi
          \expandafter\xdef\csname seq\the\loopcount\endcsname{%
             \csname seq\the\loopcount\endcsname\third@\first@}
       \else
       \ifx\first@\d@t
            \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                 <\csname seq@start\the\loopcount\endcsname
                    \ifsh@wg@ps
                       \def\first@{\gap@char}\def\third@{*}
                    \else
                       \def\first@{{}} \def\third@{/}
                    \fi
            \else
               \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                    <\csname seq@len\the\loopcount\endcsname
                  \def\first@{\gap@char}\def\third@{*}
               \else
                    \ifsh@wg@ps
                       \def\first@{\gap@char}\def\third@{*}
                    \else
                       \def\first@{{}} \def\third@{/}
                    \fi
               \fi
             \fi
          \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                   \xdef\first@{;\first@}\fi
          \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                   \xdef\first@{=\first@}\fi
          \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                   \xdef\first@{,\first@}\fi
          \expandafter\xdef\csname seq\the\loopcount\endcsname{%
             \csname seq\the\loopcount\endcsname\third@\first@}
       \else
       \ifx\first@\questi@n
            \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                 <\csname seq@start\the\loopcount\endcsname
                  \def\first@{{}} \def\third@{/}
            \else
               \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                    <\csname seq@len\the\loopcount\endcsname
                  \def\first@{\st@p@char}\def\third@{*}
               \else
                  \def\first@{{}} \def\third@{/}
               \fi
             \fi
          \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                   \xdef\first@{;\st@p@char}\fi
          \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                   \xdef\first@{=\st@p@char}\fi
          \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                   \xdef\first@{,\st@p@char}\fi
          \expandafter\xdef\csname seq\the\loopcount\endcsname{%
             \csname seq\the\loopcount\endcsname\third@\first@}
       \else
          \xdef\low@up{lower} \ifx\resn@m@tch\low@up \make@lower \else
          \xdef\low@up{upper} \ifx\resn@m@tch\low@up
          \else \xdef\first@{\resn@m@tch} \fi\fi
          \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                   \xdef\first@{;\first@}\fi
          \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                   \xdef\first@{=\first@}\fi
          \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                   \xdef\first@{,\first@}\fi
          \expandafter\xdef\csname seq\the\loopcount\endcsname{%
             \csname seq\the\loopcount\endcsname0\first@}
       \fi
       \fi
       \fi
    \ifnum\loopcount<\seq@count \repeat
 \else
    \loopcount=0
    \loop
        \advance\loopcount by 1
        \xdef\first@{noshade}
        \expandafter\ifx\csname hide@seq\the\loopcount\endcsname\first@
             \xdef\first@{\csname res\the\loopcount\endcsname}
             \ifx\first@\d@t\def\first@{\gap@char}\fi
             \ifx\first@\questi@n\def\first@{\st@p@char}\fi
             \ifx\first@\equ@l\def\first@{\dom@char}  \xdef\g@p{y} \fi
             \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                \xdef\first@{;\first@}\fi
             \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                \xdef\first@{=\first@}\fi
             \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                \xdef\first@{,\first@}\fi
             \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                \csname seq\the\loopcount\endcsname%
                3\first@}
        \else
         \xdef\first@{\csname res\the\loopcount\endcsname}
         \ifx\first@\equ@l
            \def\first@{\dom@char} \def\third@{9}  \xdef\g@p{y}
           \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                   \xdef\first@{;\first@}\fi
           \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                   \xdef\first@{=\first@}\fi
           \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                   \xdef\first@{,\first@}\fi
           \expandafter\xdef\csname seq\the\loopcount\endcsname{%
              \csname seq\the\loopcount\endcsname\third@\first@}
         \else
         \ifx\first@\d@t
            \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                 <\csname seq@start\the\loopcount\endcsname
                    \ifsh@wg@ps
                       \def\first@{\gap@char}\def\third@{7}
                    \else
                       \def\first@{{}} \def\third@{8}
                    \fi
            \else
               \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                    <\csname seq@len\the\loopcount\endcsname
                       \def\third@{7}\def\first@{\gap@char}
               \else
                    \ifsh@wg@ps
                       \def\first@{\gap@char}\def\third@{7}
                    \else
                       \def\first@{{}} \def\third@{8}
                    \fi
               \fi
            \fi
           \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                   \xdef\first@{;\first@}\fi
           \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                   \xdef\first@{=\first@}\fi
           \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                   \xdef\first@{,\first@}\fi
           \expandafter\xdef\csname seq\the\loopcount\endcsname{%
              \csname seq\the\loopcount\endcsname\third@\first@}
         \else
         \ifx\first@\questi@n
            \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                 <\csname seq@start\the\loopcount\endcsname
                       \def\first@{{}} \def\third@{8}
            \else
               \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                    <\csname seq@len\the\loopcount\endcsname
                       \def\third@{7}\def\first@{\st@p@char}
               \else
                       \def\first@{{}} \def\third@{8}
               \fi
            \fi
           \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                   \xdef\first@{;\first@}\fi
           \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                   \xdef\first@{=\first@}\fi
           \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                   \xdef\first@{,\first@}\fi
           \expandafter\xdef\csname seq\the\loopcount\endcsname{%
              \csname seq\the\loopcount\endcsname\third@\first@}
         \else
           \ifnum\divref@=\loopcount\else
           \xdef\low@up{lower} \ifx\resn@m@tch\low@up \make@lower \else
           \xdef\low@up{upper} \ifx\resn@m@tch\low@up
           \else \xdef\first@{\resn@m@tch} \fi\fi\fi
           \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                   \xdef\first@{;\first@}\fi
           \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                   \xdef\first@{=\first@}\fi
           \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                   \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                   \xdef\first@{,\first@}\fi
           \expandafter\xdef\csname seq\the\loopcount\endcsname{%
             \csname seq\the\loopcount\endcsname3\first@}
         \fi
         \fi
         \fi
        \fi
    \ifnum\loopcount<\seq@count \repeat
    \xdef\low@up{lower} \ifx\n@m@tch\low@up \xdef\first@{{ }} \else
    \xdef\low@up{upper} \ifx\n@m@tch\low@up \xdef\first@{{ }}
    \else \xdef\first@{\n@m@tch} \fi\fi
    \expandafter\ifx\csname lower@seq0\endcsname\y@
                \expandafter\xdef\csname lower@seq0\endcsname{n}
                \xdef\first@{;\first@}\fi
    \expandafter\ifx\csname tint@seq0\endcsname\y@
                \expandafter\xdef\csname tint@seq0\endcsname{n}
                \xdef\first@{=\first@}\fi
    \expandafter\ifx\csname emph@seq0\endcsname\y@
                \expandafter\xdef\csname emph@seq0\endcsname{n}
                \xdef\first@{,\first@}\fi
    \ifx\g@p\y@
       \xdef\consensus{\consensus 8{}}
    \else
       \xdef\consensus{\consensus 4\first@}
       \xdef\constopo{\constopo 0}
    \fi
 \fi\fi}

\def\c@nserved{%
 \xdef\tmp@{\csname res\cons@seq\endcsname}
 \loopcount=0
 \loop
    \advance\loopcount by 1
    \xdef\first@{noshade}
    \expandafter\ifx\csname hide@seq\the\loopcount\endcsname\first@
             \xdef\first@{\csname res\the\loopcount\endcsname}
             \ifx\first@\d@t\def\first@{\gap@char}\fi
             \ifx\first@\questi@n\def\first@{\st@p@char}\fi
             \ifx\first@\equ@l\def\first@{\dom@char} \xdef\g@p{y} \fi
             \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                \xdef\first@{;\first@}\fi
             \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                \xdef\first@{=\first@}\fi
             \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                \xdef\first@{,\first@}\fi
             \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                \csname seq\the\loopcount\endcsname%
                3\first@}
    \else
    \xdef\second@{\csname res\the\loopcount\endcsname}
    \ifx\tmp@\second@
       \xdef\third@{1}
    \else
       \xdef\third@{3}
       \ifsimmode
          \xdef\last@{\csname \prefix@ sim\tmp@\endcsname &@}
          \expandafter\get@count\last@
          \innerloopcount=0 \getsim@char
       \fi
    \fi
    \xdef\first@{\csname res\the\loopcount\endcsname}
    \ifcase\third@ \or
    \ifnum\divref@=\loopcount\else
    \xdef\low@up{lower} \ifx\resm@tch\low@up \make@lower \else
    \xdef\low@up{upper} \ifx\resm@tch\low@up
    \else \xdef\first@{\resm@tch} \fi\fi\fi
    \or
    \ifnum\divref@=\loopcount\else
    \xdef\low@up{lower} \ifx\ressimm@tch\low@up \make@lower \else
    \xdef\low@up{upper} \ifx\ressimm@tch\low@up
    \else \xdef\first@{\ressimm@tch} \fi\fi\fi
    \else
    \ifnum\divref@=\loopcount\else
    \xdef\low@up{lower} \ifx\resn@m@tch\low@up \make@lower \else
    \xdef\low@up{upper} \ifx\resn@m@tch\low@up
    \else \xdef\first@{\resn@m@tch} \fi\fi\fi
    \fi
    \ifx\first@\equ@l \def\first@{\dom@char} \def\third@{9}  \xdef\g@p{y} \fi
    \ifx\first@\d@t
            \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                 <\csname seq@start\the\loopcount\endcsname
    \ifsh@wg@ps
       \def\first@{\gap@char}\def\third@{7}
    \else
                       \def\first@{{}} \def\third@{8}
    \fi
            \else
               \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                    <\csname seq@len\the\loopcount\endcsname
       \def\third@{7}\def\first@{\gap@char}
               \else
                    \ifsh@wg@ps
                       \def\first@{\gap@char}\def\third@{7}
                    \else
                       \def\first@{{}} \def\third@{8}
                    \fi
               \fi
            \fi
    \fi
    \ifx\first@\questi@n
            \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                 <\csname seq@start\the\loopcount\endcsname
                      \def\first@{{}} \def\third@{8}
            \else
               \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                    <\csname seq@len\the\loopcount\endcsname
               \def\third@{7}\def\first@{\st@p@char}
               \else
                       \def\first@{{}} \def\third@{8}
               \fi
            \fi
    \fi
    \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                \xdef\first@{;\first@}\fi
    \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                \xdef\first@{=\first@}\fi
    \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                \xdef\first@{,\first@}\fi
    \expandafter\xdef\csname seq\the\loopcount\endcsname{%
       \csname seq\the\loopcount\endcsname\third@\first@}
    \fi
 \ifnum\loopcount<\seq@count \repeat
 \xdef\first@{\csname res\cons@seq\endcsname}
 \xdef\second@{lower} \ifx\m@tch\second@ \make@lower \else
 \xdef\second@{upper} \ifx\m@tch\second@
 \else \xdef\first@{\m@tch} \fi\fi
 \expandafter\ifx\csname lower@seq0\endcsname\y@
                \expandafter\xdef\csname lower@seq0\endcsname{n}
                \xdef\first@{;\first@}\fi
 \expandafter\ifx\csname tint@seq0\endcsname\y@
                \expandafter\xdef\csname tint@seq0\endcsname{n}
                \xdef\first@{=\first@}\fi
 \expandafter\ifx\csname emph@seq0\endcsname\y@
                \expandafter\xdef\csname emph@seq0\endcsname{n}
                \xdef\first@{,\first@}\fi
 \ifx\g@p\y@
    \xdef\consensus{\consensus 8{}}
 \else
    \xdef\consensus{\consensus 5\first@}
    \xdef\constopo{\constopo 2}
 \fi}

\def\allm@tch{%
 \xdef\tmp@{\csname res\cons@seq\endcsname}
 \loopcount=0
 \loop
    \advance\loopcount by 1
    \xdef\first@{noshade}
    \expandafter\ifx\csname hide@seq\the\loopcount\endcsname\first@
             \xdef\first@{\csname res\the\loopcount\endcsname}
             \ifx\first@\d@t\def\first@{\gap@char}\fi
             \ifx\first@\questi@n\def\first@{\st@p@char}\fi
             \ifx\first@\equ@l\def\first@{\dom@char} \xdef\g@p{y} \fi
             \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                \xdef\first@{;\first@}\fi
             \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                \xdef\first@{=\first@}\fi
             \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                \xdef\first@{,\first@}\fi
             \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                \csname seq\the\loopcount\endcsname%
                3\first@}
    \else
    \xdef\second@{\csname res\the\loopcount\endcsname}
    \ifx\tmp@\second@
       \ifall@shade \xdef\third@{0} \else \xdef\third@{1} \fi
    \else
       \xdef\third@{3}
       \ifsimmode
          \xdef\last@{\csname \prefix@ sim\tmp@\endcsname &@}
          \expandafter\get@count\last@
          \innerloopcount=0 \getsim@char
       \fi
    \fi
    \xdef\first@{\csname res\the\loopcount\endcsname}
    \ifcase\third@
    \ifnum\divref@=\loopcount\else
    \xdef\low@up{lower} \ifx\res@llm@tch\low@up \make@lower \else
    \xdef\low@up{upper} \ifx\res@llm@tch\low@up
    \else \xdef\first@{\res@llm@tch} \fi\fi\fi
    \or
    \ifnum\divref@=\loopcount\else
    \xdef\low@up{lower} \ifx\res@llm@tch\low@up \make@lower \else
    \xdef\low@up{upper} \ifx\res@llm@tch\low@up
    \else \xdef\first@{\res@llm@tch} \fi\fi\fi
    \or
    \ifnum\divref@=\loopcount\else
    \xdef\low@up{lower} \ifx\ressimm@tch\low@up \make@lower \else
    \xdef\low@up{upper} \ifx\ressimm@tch\low@up
    \else \xdef\first@{\ressimm@tch} \fi\fi\fi
    \else
    \ifnum\divref@=\loopcount\else
    \xdef\low@up{lower} \ifx\resn@m@tch\low@up \make@lower \else
    \xdef\low@up{upper} \ifx\resn@m@tch\low@up
    \else \xdef\first@{\resn@m@tch} \fi\fi\fi
    \fi
    \ifx\first@\equ@l \def\first@{\dom@char} \def\third@{9}  \xdef\g@p{y} \fi
    \ifx\first@\d@t
            \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                 <\csname seq@start\the\loopcount\endcsname
    \ifsh@wg@ps
       \def\first@{\gap@char}\def\third@{7}
    \else
                       \def\first@{{}} \def\third@{8}
    \fi
            \else
               \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                    <\csname seq@len\the\loopcount\endcsname
       \def\third@{7}\def\first@{\gap@char}
               \else
                    \ifsh@wg@ps
                       \def\first@{\gap@char}\def\third@{7}
                    \else
                       \def\first@{{}} \def\third@{8}
                    \fi
               \fi
            \fi
    \fi
    \ifx\first@\questi@n
            \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                 <\csname seq@start\the\loopcount\endcsname
                       \def\first@{{}} \def\third@{8}
            \else
               \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                    <\csname seq@len\the\loopcount\endcsname
                \def\third@{7}\def\first@{\st@p@char}
               \else
                       \def\first@{{}} \def\third@{8}
               \fi
            \fi
    \fi
    \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                \xdef\first@{;\first@}\fi
    \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                \xdef\first@{=\first@}\fi
    \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                \xdef\first@{,\first@}\fi
    \expandafter\xdef\csname seq\the\loopcount\endcsname{%
       \csname seq\the\loopcount\endcsname\third@\first@}
    \fi
 \ifnum\loopcount<\seq@count \repeat
 \xdef\first@{\csname res\cons@seq\endcsname}
 \xdef\second@{lower} \ifx\@llm@tch\second@ \make@lower \else
 \xdef\second@{upper} \ifx\@llm@tch\second@
 \else \xdef\first@{\@llm@tch} \fi\fi
 \expandafter\ifx\csname lower@seq0\endcsname\y@
                \expandafter\xdef\csname lower@seq0\endcsname{n}
                \xdef\first@{;\first@}\fi
 \expandafter\ifx\csname tint@seq0\endcsname\y@
                \expandafter\xdef\csname tint@seq0\endcsname{n}
                \xdef\first@{=\first@}\fi
 \expandafter\ifx\csname emph@seq0\endcsname\y@
                \expandafter\xdef\csname emph@seq0\endcsname{n}
                \xdef\first@{,\first@}\fi
 \ifx\g@p\y@
    \xdef\consensus{\consensus 8{}}
 \else
    \xdef\consensus{\consensus 6\first@}
    \xdef\constopo{\constopo 3}
 \fi}

\def\functi@nal{%
     \ifnum\cons@num>0
       \xdef\first@{\csname res\cons@num\endcsname}
     \else
       \xdef\first@{\csname res\cons@seq\endcsname}
     \fi
     \xdef\second@{\csname funcgrp\first@\endcsname}
     \loopcount=0
     \loop
        \advance\loopcount by 1
        \xdef\third@{noshade}
        \expandafter\ifx\csname hide@seq\the\loopcount\endcsname\third@
             \xdef\first@{\csname res\the\loopcount\endcsname}
             \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                \xdef\first@{;\first@}\fi
             \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                \xdef\first@{=\first@}\fi
             \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                \xdef\first@{,\first@}\fi
             \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                \csname seq\the\loopcount\endcsname%
                0\first@}
        \else
        \xdef\first@{\csname res\the\loopcount\endcsname}
         \ifx\first@\equ@l
            \def\first@{\dom@char} \def\third@{!} \xdef\g@p{y}
         \else
         \ifx\first@\d@t
            \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                 <\csname seq@start\the\loopcount\endcsname
                    \ifsh@wg@ps
                       \def\first@{\gap@char}\def\third@{*}
                    \else
                       \def\first@{{}} \def\third@{/}
                    \fi
            \else
               \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                    <\csname seq@len\the\loopcount\endcsname
                  \def\first@{\gap@char}\def\third@{*}
               \else
                    \ifsh@wg@ps
                       \def\first@{\gap@char}\def\third@{*}
                    \else
                       \def\first@{{}} \def\third@{/}
                    \fi
               \fi
            \fi
         \else
         \ifx\first@\questi@n
            \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                 <\csname seq@start\the\loopcount\endcsname
                    \def\first@{{}} \def\third@{/}
            \else
               \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                    <\csname seq@len\the\loopcount\endcsname
                    \def\first@{\st@p@char}\def\third@{*}
               \else
                    \def\first@{{}} \def\third@{/}
               \fi
            \fi
         \else
           \expandafter\ifnum\csname funcgrp\first@\endcsname=\second@
              \xdef\low@up{lower}
           \expandafter\ifx\csname funcm@tch\second@\endcsname\low@up
                       \make@lower \fi
              \xdef\third@{\second@}
           \else \xdef\third@{0}
              \xdef\low@up{lower} \ifx\resn@m@tch\low@up \make@lower \else
              \xdef\low@up{upper} \ifx\resn@m@tch\low@up
              \else \xdef\first@{\resn@m@tch} \fi\fi
         \fi
         \fi
         \fi
        \fi
        \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                \xdef\first@{;\first@}\fi
        \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                \xdef\first@{=\first@}\fi
        \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                \xdef\first@{,\first@}\fi
        \expandafter\xdef\csname seq\the\loopcount\endcsname{%
          \csname seq\the\loopcount\endcsname\third@\first@}
        \fi
     \ifnum\loopcount<\seq@count \repeat}

\def\all@funcshade{%
   \loopcount=0
   \loop
     \advance\loopcount by 1
     \xdef\first@{\csname res\the\loopcount\endcsname}
     \xdef\second@{\csname funcgrp\first@\endcsname}
     \ifnum\second@<0 \xdef\second@{0} \fi
     \ifx\first@\equ@l \def\first@{\dom@char} \def\second@{!}  \xdef\g@p{y} \fi
     \ifx\first@\d@t
            \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                 <\csname seq@start\the\loopcount\endcsname
                    \ifsh@wg@ps
                       \def\first@{\gap@char}\def\second@{*}
                    \else
                       \def\first@{{}} \def\second@{/}
                    \fi
            \else
               \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                    <\csname seq@len\the\loopcount\endcsname
                  \def\first@{\gap@char}\def\second@{*}
               \else
                    \ifsh@wg@ps
                       \def\first@{\gap@char}\def\second@{*}
                    \else
                       \def\first@{{}} \def\second@{/}
                    \fi
               \fi
            \fi
     \fi
     \ifx\first@\questi@n
            \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                 <\csname seq@start\the\loopcount\endcsname
                    \def\first@{{}} \def\second@{/}
            \else
               \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                    <\csname seq@len\the\loopcount\endcsname
                    \def\first@{\st@p@char}\def\second@{*}
               \else
                    \def\first@{{}} \def\second@{/}
               \fi
            \fi
     \fi
     \xdef\low@up{lower}
     \expandafter\ifx\csname funcm@tch\second@\endcsname\low@up
                 \make@lower \fi
     \xdef\third@{noshade}
     \expandafter\ifx\csname hide@seq\the\loopcount\endcsname\third@
             \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                \xdef\first@{;\first@}\fi
             \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                \xdef\first@{=\first@}\fi
             \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                \xdef\first@{,\first@}\fi
             \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                \csname seq\the\loopcount\endcsname%
                0\first@}
     \else
             \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                \xdef\first@{;\first@}\fi
             \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                \xdef\first@{=\first@}\fi
             \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                \xdef\first@{,\first@}\fi
             \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                \csname seq\the\loopcount\endcsname%
                \second@\first@}
     \fi
   \ifnum\loopcount<\seq@count \repeat}

\def\T@coffee@shade{%
   \loopcount=0
   \loop
     \advance\loopcount by 1
     \xdef\first@{\csname res\the\loopcount\endcsname}
     \xdef\second@{\csname TC@num\the\loopcount\endcsname}
     \ifx\first@\equ@l \def\first@{\dom@char} \def\second@{!}  \xdef\g@p{y} \fi
     \ifx\first@\d@t
            \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                 <\csname seq@start\the\loopcount\endcsname
                    \ifsh@wg@ps
                       \def\first@{\gap@char}\def\second@{*}
                    \else
                       \def\first@{{}} \def\second@{/}
                    \fi
            \else
               \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                    <\csname seq@len\the\loopcount\endcsname
                  \def\first@{\gap@char}\def\second@{*}
               \else
                    \ifsh@wg@ps
                       \def\first@{\gap@char}\def\second@{*}
                    \else
                       \def\first@{{}} \def\second@{/}
                    \fi
               \fi
            \fi
     \fi
     \ifx\first@\questi@n
            \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                 <\csname seq@start\the\loopcount\endcsname
                       \def\first@{{}} \def\second@{/}
            \else
               \expandafter\ifnum\csname res@count\the\loopcount\endcsname%
                    <\csname seq@len\the\loopcount\endcsname
                       \def\first@{\st@p@char}\def\second@{*}
               \else
                       \def\first@{{}} \def\second@{/}
               \fi
            \fi
     \fi
     \xdef\third@{noshade}
     \expandafter\ifx\csname hide@seq\the\loopcount\endcsname\third@
             \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                \xdef\first@{;\first@}\fi
             \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                \xdef\first@{=\first@}\fi
             \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                \xdef\first@{,\first@}\fi
             \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                \csname seq\the\loopcount\endcsname%
                *\first@}
     \else
             \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
                \xdef\first@{;\first@}\fi
             \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
                \xdef\first@{=\first@}\fi
             \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
                \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
                \xdef\first@{,\first@}\fi
             \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                \csname seq\the\loopcount\endcsname%
                \second@\first@}
     \fi
   \ifnum\loopcount<\seq@count \repeat
   \xdef\first@{\csname res0\endcsname}
   \expandafter\ifx\csname lower@seq0\endcsname\y@
                \expandafter\xdef\csname lower@seq0\endcsname{n}
                \xdef\first@{;\first@}\fi
   \expandafter\ifx\csname tint@seq0\endcsname\y@
                \expandafter\xdef\csname tint@seq0\endcsname{n}
                \xdef\first@{=\first@}\fi
   \expandafter\ifx\csname emph@seq0\endcsname\y@
                \expandafter\xdef\csname emph@seq0\endcsname{n}
                \xdef\first@{,\first@}\fi
   \xdef\second@{\csname TC@num0\endcsname}
   \ifx\g@p\y@
      \xdef\consensus{\consensus 8{}}
   \else
      \xdef\consensus{\consensus\second@\n@m@tch}
      \xdef\constopo{\constopo\second@}
   \fi
   }

\def\getregion@fromstack@first{%
      \expandafter\getregion@fromstack{\the\loopcount}
      \expandafter\ifx\csname start\the\loopcount\endcsname\ampers@nd
      \else
      \expandafter\ifnum\csname stop\the\loopcount\endcsname<\first@@
         \getregion@fromstack@first
      \else
         \expandafter\ifx\csname all\the\loopcount\endcsname\y@
            \innerloopcount=\csname style\the\loopcount\endcsname
         \fi
         \expandafter\xdef\csname shade@style\the\loopcount\endcsname{%
                          \csname style\the\loopcount\endcsname}
      \fi
      \fi
}

\def\calc@regshade{%
      \loopcount=-1 \innerloopcount=0
      \loop
         \advance\loopcount by 1
         \expandafter\xdef\csname shade@style\the\loopcount\endcsname{y}
         \ifnum\loopcount=0 \xdef\first@@{\the\cons@count}
         \else \xdef\first@@{\csname res@count\the\loopcount\endcsname} \fi
         \expandafter\ifx\csname start\the\loopcount\endcsname\ampers@nd
         \else
         \expandafter\ifnum\csname start\the\loopcount\endcsname>\first@@
         \else
            \expandafter\ifnum\csname stop\the\loopcount\endcsname<\first@@
               \getregion@fromstack@first
            \else
               \expandafter\ifx\csname all\the\loopcount\endcsname\y@
                  \innerloopcount=\csname style\the\loopcount\endcsname
               \fi
               \expandafter\xdef\csname shade@style\the\loopcount\endcsname{%
                                \csname style\the\loopcount\endcsname}
               \expandafter\ifnum\csname stop\the\loopcount\endcsname=\first@@
                  \expandafter\getregion@fromstack{\the\loopcount}
               \fi
            \fi
         \fi\fi
      \ifnum\loopcount<\seq@count \repeat
      \loopcount=0
      \expandafter\ifx\csname shade@style\the\loopcount\endcsname\y@
      \else
         \xdef\consensus{\consensus&\csname shade@style\the\loopcount\endcsname)}
      \fi
      \loop
         \advance\loopcount by 1
         \expandafter\ifx\csname shade@style\the\loopcount\endcsname\y@
            \ifnum\innerloopcount>0
               \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                                \csname seq\the\loopcount\endcsname%
                                &\the\innerloopcount)}
            \fi
         \else
             \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                              \csname seq\the\loopcount\endcsname%
                              &\csname shade@style\the\loopcount\endcsname)}
         \fi
      \ifnum\loopcount<\seq@count \repeat
}

\def\getregion@fromshadingstack@first{%
      \expandafter\getregion@fromshadingstack{\the\loopcount}
      \expandafter\ifx\csname shadingstart\the\loopcount\endcsname\ampers@nd
      \else
      \expandafter\ifnum\csname shadingstop\the\loopcount\endcsname<\first@@
         \getregion@fromshadingstack@first
      \fi
      \fi
}

\def\calc@shading{%
      \xdef\shading@style{&}
      \loopcount=-1
      \loop
         \advance\loopcount by 1
         \ifnum\loopcount=0 \xdef\first@@{\the\cons@count}
         \else \xdef\first@@{\csname res@count\the\loopcount\endcsname} \fi
         \expandafter\ifx\csname shadingstart\the\loopcount\endcsname\ampers@nd
         \else
         \expandafter\ifnum\csname shadingstart\the\loopcount\endcsname>\first@@
         \else
            \expandafter\ifnum\csname shadingstop\the\loopcount\endcsname<\first@@
               \getregion@fromshadingstack@first
            \else
               \xdef\shading@style{\csname shadingstyle\the\loopcount\endcsname}
               \expandafter\ifnum\csname shadingstop\the\loopcount\endcsname=\first@@
                  \expandafter\getregion@fromshadingstack{\the\loopcount}
               \fi
            \fi
         \fi\fi
      \ifnum\loopcount<\seq@count \repeat
      \loopcount=0
      \loop
         \advance\loopcount by 1
         \ifx\shading@style\ampers@nd
         \else
             \expandafter\xdef\csname seq\the\loopcount\endcsname{%
                              \csname seq\the\loopcount\endcsname�\shading@style)}
         \fi
      \ifnum\loopcount<\seq@count \repeat
}

\def\getregion@fromemphstack@first{%
      \expandafter\getregion@fromemphstack{\the\loopcount}
      \expandafter\ifx\csname emphstart\the\loopcount\endcsname\ampers@nd
      \else
      \expandafter\ifnum\csname emphstop\the\loopcount\endcsname<\first@@
         \getregion@fromemphstack@first
      \else
         \expandafter\ifx\csname emphall\the\loopcount\endcsname\y@
            \innerloopcount=1
         \fi
         \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{y}
      \fi
      \fi
}

\def\calc@regemph{%
      \loopcount=-1 \innerloopcount=0
      \loop
         \advance\loopcount by 1
         \ifnum\loopcount=0 \xdef\first@@{\the\cons@count}
         \else \xdef\first@@{\csname res@count\the\loopcount\endcsname} \fi
         \expandafter\ifx\csname emphstart\the\loopcount\endcsname\ampers@nd
         \else
         \expandafter\ifnum\csname emphstart\the\loopcount\endcsname>\first@@
         \else
            \expandafter\ifnum\csname emphstop\the\loopcount\endcsname<\first@@
              \getregion@fromemphstack@first
            \else
               \expandafter\ifx\csname emphall\the\loopcount\endcsname\y@
                  \innerloopcount=1
               \fi
               \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{y}
               \expandafter\ifnum\csname emphstop\the\loopcount\endcsname=\first@@
                  \expandafter\getregion@fromemphstack{\the\loopcount}
               \fi
            \fi
         \fi\fi
      \ifnum\loopcount<\seq@count \repeat
      \loopcount=0
      \expandafter\ifx\csname emph@seq\the\loopcount\endcsname\y@
         \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{y}
      \fi
      \ifnum\innerloopcount>0
         \loop
            \advance\loopcount by 1
            \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{y}
         \ifnum\loopcount<\seq@count \repeat
      \fi
}

\def\getregion@fromlowerstack@first{%
      \expandafter\getregion@fromlowerstack{\the\loopcount}
      \expandafter\ifx\csname lowerstart\the\loopcount\endcsname\ampers@nd
      \else
      \expandafter\ifnum\csname lowerstop\the\loopcount\endcsname<\first@@
         \getregion@fromlowerstack@first
      \else
         \expandafter\ifx\csname lowerall\the\loopcount\endcsname\y@
            \innerloopcount=1
         \fi
         \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{y}
      \fi
      \fi
}

\def\calc@reglower{%
      \loopcount=-1 \innerloopcount=0
      \loop
         \advance\loopcount by 1
         \ifnum\loopcount=0 \xdef\first@@{\the\cons@count}
         \else \xdef\first@@{\csname res@count\the\loopcount\endcsname} \fi
         \expandafter\ifx\csname lowerstart\the\loopcount\endcsname\ampers@nd
         \else
         \expandafter\ifnum\csname lowerstart\the\loopcount\endcsname>\first@@
         \else
            \expandafter\ifnum\csname lowerstop\the\loopcount\endcsname<\first@@
              \getregion@fromlowerstack@first
            \else
               \expandafter\ifx\csname lowerall\the\loopcount\endcsname\y@
                  \innerloopcount=1
               \fi
               \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{y}
               \expandafter\ifnum\csname lowerstop\the\loopcount\endcsname=\first@@
                  \expandafter\getregion@fromlowerstack{\the\loopcount}
               \fi
            \fi
         \fi\fi
      \ifnum\loopcount<\seq@count \repeat
      \loopcount=0
      \expandafter\ifx\csname lower@seq\the\loopcount\endcsname\y@
         \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{y}
      \fi
      \ifnum\innerloopcount>0
         \loop
            \advance\loopcount by 1
            \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{y}
         \ifnum\loopcount<\seq@count \repeat
      \fi
}

\def\getregion@fromtintstack@first{%
      \expandafter\getregion@fromtintstack{\the\loopcount}
      \expandafter\ifx\csname tintstart\the\loopcount\endcsname\ampers@nd
      \else
      \expandafter\ifnum\csname tintstop\the\loopcount\endcsname<\first@@
         \getregion@fromtintstack@first
      \else
         \expandafter\ifx\csname tintall\the\loopcount\endcsname\y@
            \innerloopcount=1
         \fi
         \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{y}
      \fi
      \fi
}

\def\calc@regtint{%
      \loopcount=-1 \innerloopcount=0
      \loop
         \advance\loopcount by 1
         \ifnum\loopcount=0 \xdef\first@@{\the\cons@count}
         \else \xdef\first@@{\csname res@count\the\loopcount\endcsname} \fi
         \expandafter\ifx\csname tintstart\the\loopcount\endcsname\ampers@nd
         \else
         \expandafter\ifnum\csname tintstart\the\loopcount\endcsname>\first@@
         \else
            \expandafter\ifnum\csname tintstop\the\loopcount\endcsname<\first@@
              \getregion@fromtintstack@first
            \else
               \expandafter\ifx\csname tintall\the\loopcount\endcsname\y@
                  \innerloopcount=1
               \fi
               \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{y}
               \expandafter\ifnum\csname tintstop\the\loopcount\endcsname=\first@@
                  \expandafter\getregion@fromtintstack{\the\loopcount}
               \fi
            \fi
         \fi\fi
      \ifnum\loopcount<\seq@count \repeat
      \loopcount=0
      \expandafter\ifx\csname tint@seq\the\loopcount\endcsname\y@
         \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{y}
      \fi
      \ifnum\innerloopcount>0
         \loop
            \advance\loopcount by 1
            \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{y}
         \ifnum\loopcount<\seq@count \repeat
      \fi
}

\def\getregion@fromframestack@first{%
      \expandafter\getregion@fromframestack{\the\loopcount}
      \expandafter\ifx\csname framestart\the\loopcount\endcsname\ampers@nd
      \else
      \expandafter\ifnum\csname framestop\the\loopcount\endcsname<\first@@
         \getregion@fromframestack@first
      \else
         \ifnum\frame@on=0
            \xdef\frame@on{1}
            \xdef\frame@{1}
            \expandafter\xdef\csname fr@style\the\loopcount\endcsname{%
                             \csname framestyle\the\loopcount\endcsname}
            \innerloopcount=\pos@count
            \advance\innerloopcount by -\frame@pos
            \xdef\styleframe{\styleframe&\the\innerloopcount;&;}
            \xdef\frame@pos{\the\pos@count}
         \fi
         \expandafter\ifnum\csname framestop\the\loopcount\endcsname=\first@@
            \expandafter\getregion@fromframestack{\the\loopcount}
            \ifnum\frame@on=1
               \xdef\frame@on{0}
               \innerloopcount=\pos@count \advance\innerloopcount by 1
               \advance\innerloopcount by -\frame@pos
               \xdef\styleframe{\styleframe&\the\innerloopcount;%
                                \csname fr@style\the\loopcount\endcsname;}
               \innerloopcount=\pos@count \advance\innerloopcount by 1
               \xdef\frame@pos{\the\innerloopcount}
            \fi
         \fi
         \ifnum\pos@count=\res@perline
            \ifnum\frame@on=1
               \innerloopcount=\pos@count
               \advance\innerloopcount by 1
               \advance\innerloopcount by -\frame@pos
               \xdef\styleframe{\styleframe&\the\innerloopcount;%
                                \csname fr@style\the\loopcount\endcsname;}
               \innerloopcount=\pos@count \advance\innerloopcount by 1
               \xdef\frame@pos{\the\innerloopcount}
            \fi
         \fi
         \expandafter\ifnum\csname res@count\the\loopcount\endcsname=\end@num\relax
            \ifnum\frame@on=1
               \innerloopcount=\pos@count
               \advance\innerloopcount by 1
               \advance\innerloopcount by -\frame@pos
               \xdef\styleframe{\styleframe&\the\innerloopcount;%
                                \csname fr@style\the\loopcount\endcsname;}
               \innerloopcount=\pos@count \advance\innerloopcount by 1
               \xdef\frame@pos{\the\innerloopcount}
            \fi
         \fi
      \fi
      \fi
}

\def\calc@frame{%
      \loopcount=-1 \innerloopcount=0
      \loop
         \advance\loopcount by 1
         \ifnum\loopcount=0 \xdef\first@@{\the\cons@count}
         \else \xdef\first@@{\csname res@count\the\loopcount\endcsname} \fi
         \expandafter\ifx\csname framestart\the\loopcount\endcsname\ampers@nd
         \else
         \expandafter\ifnum\csname framestart\the\loopcount\endcsname>\first@@
         \else
            \expandafter\ifnum\csname framestop\the\loopcount\endcsname<\first@@
              \getregion@fromframestack@first
            \else
               \ifnum\frame@on=0
                  \xdef\frame@on{1}
                  \xdef\frame@{1}
                  \expandafter\xdef\csname fr@style\the\loopcount\endcsname{%
                                   \csname framestyle\the\loopcount\endcsname}
                  \innerloopcount=\pos@count
                  \advance\innerloopcount by -\frame@pos
                  \xdef\styleframe{\styleframe&\the\innerloopcount;&;}
                  \xdef\frame@pos{\the\pos@count}
               \fi
               \expandafter\ifnum\csname framestop\the\loopcount\endcsname=\first@@
                  \expandafter\getregion@fromframestack{\the\loopcount}
                  \ifnum\frame@on=1
                     \xdef\frame@on{0}
                     \innerloopcount=\pos@count \advance\innerloopcount by 1
                     \advance\innerloopcount by -\frame@pos
                     \xdef\styleframe{\styleframe&\the\innerloopcount;%
                                      \csname fr@style\the\loopcount\endcsname;}
                     \innerloopcount=\pos@count \advance\innerloopcount by 1
                     \xdef\frame@pos{\the\innerloopcount}
                  \fi
               \fi
               \ifnum\pos@count=\res@perline
                  \ifnum\frame@on=1
                     \innerloopcount=\pos@count
                     \advance\innerloopcount by 1
                     \advance\innerloopcount by -\frame@pos
                     \xdef\styleframe{\styleframe&\the\innerloopcount;%
                                      \csname fr@style\the\loopcount\endcsname;}
                     \innerloopcount=\pos@count \advance\innerloopcount by 1
                     \xdef\frame@pos{\the\innerloopcount}
                  \fi
               \fi
               \expandafter\ifnum\csname res@count\the\loopcount\endcsname=\end@num\relax
                  \ifnum\frame@on=1
                     \innerloopcount=\pos@count
                     \advance\innerloopcount by 1
                     \advance\innerloopcount by -\frame@pos
                     \xdef\styleframe{\styleframe&\the\innerloopcount;%
                                      \csname fr@style\the\loopcount\endcsname;}
                     \innerloopcount=\pos@count \advance\innerloopcount by 1
                     \xdef\frame@pos{\the\innerloopcount}
                  \fi
               \fi
            \fi
         \fi\fi
      \ifnum\loopcount<\seq@count \repeat
}

\def\get@nextres#1#2:{%
    \xdef\first@{#1}
    \xdef\temp@{#2:}
    \ifx\first@\gap@char \expandafter\get@nextres\temp@
    \else
       \if\first@ @
          \xdef\temp@{}
       \else
          \xdef\temp@{+\first@}
          \expandafter\xdef\csname last@res\bottop@\endcsname{}
       \fi
    \fi}
\def\get@@nextres#1#2:{%
    \xdef\first@{#1}
    \xdef\temp@@{#2:}
    \ifx\first@\gap@char \expandafter\get@@nextres\temp@@
    \else
       \if\first@ @
          \xdef\temp@@{}
       \else
          \xdef\temp@@{+\first@}
          \expandafter\xdef\csname last@res\bottop@\endcsname{}
       \fi
    \fi}

\def\char@get#1#2@{\xdef\first@{#1} \xdef\tr@nsl@ted{#2@}}
\def\trans@now#1#2@{%
   \xdef\first@{#1}
   \xdef\tr@nsl@ted{#2@}
   \ifx\first@\ampers@nd
   \else
      \expandafter\check@char\first@
      \ifletter
         \xdef\triplet@{\triplet@\first@}
         \advance\triple@count by 1
         \ifnum\triple@count=1
            \xdef\out@{\out@{-}}
         \fi
         \ifnum\triple@count=3
            \expandafter\ifx\csname @\triplet@\endcsname\relax
            \expandafter\xdef\csname @\triplet@\endcsname{?} \fi
            \xdef\out@{\out@\csname @\triplet@\endcsname\out@@{-}}
            \triple@count=0
            \xdef\triplet@{}
            \xdef\out@@{}
         \fi
      \fi
      \if\first@ -
         \ifnum\triple@count<2
            \xdef\out@{\out@{-}}
         \else
            \xdef\out@@{\out@@{-}}
         \fi
      \fi
      \if\first@ +
         \expandafter\char@get\tr@nsl@ted
         \xdef\triplet@{\triplet@\first@}
         \advance\triple@count by 1
         \ifnum\triple@count=3
            \expandafter\ifx\csname @\triplet@\endcsname\relax
            \expandafter\xdef\csname @\triplet@\endcsname{?} \fi
            \xdef\out@{\out@\csname @\triplet@\endcsname\out@@}
            \triple@count=0
            \xdef\triplet@{}
            \xdef\out@@{}
         \fi
      \fi
      \if\first@ 2
         \loop
            \expandafter\char@get\tr@nsl@ted
            \ifx\first@\ampers@nd
               \lettertrue
               \xdef\tr@nsl@ted{&@}
            \else
               \expandafter\check@char\first@
            \fi
         \ifletter\else\xdef\out@{\out@{-}}\repeat
         \xdef\out@{\out@{-}}
      \fi
   \expandafter\trans@now\tr@nsl@ted
   \fi
}

\def\do@translation{%
   \xdef\triplet@{}
   \xdef\out@{}
   \xdef\out@@{}
   \xdef\tr@nsl@ted{\tr@nsl@ted &@}
   \triple@count=0
   \expandafter\trans@now\tr@nsl@ted
   \xdef\tr@nsl@ted{\out@}
}

\def\trans@pep#1#2@{%
   \xdef\first@{#1}
   \xdef\tr@nsl@ted{#2@}
   \ifx\first@\ampers@nd
   \else
      \expandafter\check@char\first@
  \ifletter
     \xdef\out@{\out@\csname rev@\first@\endcsname}
  \else
     \xdef\out@{\out@{-}{-}{-}}
  \fi
   \expandafter\trans@pep\tr@nsl@ted
   \fi
}

\def\rev@translation{%
   \xdef\out@{}
   \xdef\tr@nsl@ted{\tr@nsl@ted &@}
   \expandafter\trans@pep\tr@nsl@ted
   \xdef\tr@nsl@ted{\out@}
}

\def\sum@up{%
   \advance\innerloopcount by 1
   \xdef\second@@@{\csname res\the\innerloopcount\endcsname}
   \xdef\third@@@{\csname cons\first@@@\second@@@\endcsname}
   \advance\temp@count by \third@@@
   \ifnum\innerloopcount<\seq@count\sum@up\fi
}

\def\sum@up@cons{%
   \innerloopcount=\outerloopcount
   \xdef\first@@@{\csname res\the\outerloopcount\endcsname}
   \sum@up
   \advance\outerloopcount by 1\relax
   \ifnum\outerloopcount<\seq@count
      \sum@up@cons
   \else
      \innerloopcount=\seq@count
      \advance\innerloopcount by -1
      \multiply\innerloopcount by \seq@count
      \multiply\temp@count by 2
      \multiply\temp@count by \m@trixf@ctor
      \divide\temp@count by \innerloopcount

      \ifnum\temp@count>100 \temp@count=100 \fi
      \ifnum\temp@count<0   \temp@count=0 \fi
      \xdef\cons@val{\the\temp@count}
      \ifx\first@\equ@l \xdef\cons@val{N} \fi

      \ifx\T@coffee@bcons\y@
         \xdef\cons@val{\csname TC@num0\endcsname}
         \if\cons@val *
            \xdef\cons@val{99}
         \fi
      \fi
      \ifx\T@coffee@ccons\y@
         \xdef\cons@val{\csname TC@num0\endcsname}
         \if\cons@val *
            \xdef\cons@val{99}
         \fi
      \fi
   \fi
}

\def\collect@cons@res{%
   \xdef\temp@{\temp@\csname res\the\innerloopcount\endcsname}
   \advance\innerloopcount by 1
   \ifnum\innerloopcount>\seq@count\relax
      \outerloopcount=1\relax
      \temp@count=0\relax
      \sum@up@cons
   \else
      \collect@cons@res
   \fi
}

\def\sum@@up{%
   \advance\innerloopcount by 1
   \xdef\second@@@{\csname res\the\innerloopcount\endcsname}

   \ifx\first@@@\d@t
   \else
    \ifx\first@@@\questi@n
    \else
     \ifx\first@@@\equ@l
     \else
         \ifx\second@@@\d@t
         \else
          \ifx\second@@@\questi@n
          \else
           \ifx\second@@@\equ@l
           \else
               \xdef\third@@@{\csname poscount\the\outerloopcount @\the\innerloopcount\endcsname}
               \temp@@count=\third@@@
               \advance\temp@@count by 1
               \expandafter\xdef\csname poscount\the\outerloopcount @\the\innerloopcount\endcsname{\the\temp@@count}

               \xdef\third@@@{\csname simcount\the\outerloopcount @\the\innerloopcount\endcsname}
               \temp@@count=\third@@@
               \xdef\third@@@{\csname simpair\first@@@\second@@@\endcsname}
               \advance\temp@@count by \third@@@
               \expandafter\xdef\csname simcount\the\outerloopcount @\the\innerloopcount\endcsname{\the\temp@@count}

               \ifx\first@@@\second@@@
                  \xdef\third@@@{\csname identcount\the\outerloopcount @\the\innerloopcount\endcsname}
                  \temp@@count=\third@@@
                  \advance\temp@@count by 1
                  \expandafter\xdef\csname identcount\the\outerloopcount @\the\innerloopcount\endcsname{\the\temp@@count}
               \fi
           \fi
          \fi
         \fi
     \fi
    \fi
   \fi

   \ifnum\innerloopcount<\seq@count\sum@@up\fi
}

\def\sum@up@sim{%
   \innerloopcount=\outerloopcount
   \xdef\first@@@{\csname res\the\outerloopcount\endcsname}
   \sum@@up
   \advance\outerloopcount by 1\relax
   \ifnum\outerloopcount<\seq@count
      \sum@up@sim
   \fi
}

\def\collect@similarity{%
   \xdef\temp@{\temp@\csname res\the\innerloopcount\endcsname}
   \advance\innerloopcount by 1
   \ifnum\innerloopcount>\seq@count\relax
      \outerloopcount=1\relax
      \temp@count=0\relax
      \sum@up@sim
   \else
      \collect@similarity
   \fi
}

\def\sum@up@bits{%
   \ifx\first@@@\second@@@
      \ifx\first@@@\d@t
         \temp@count=0\relax
      \else
         \temp@count=100\relax
      \fi
   \else
      \temp@count=0
   \fi
   \multiply\temp@count by \last@
   \divide\temp@count by 100
   \expandafter\ifx\csname info@\subfamily@seq @\the\outerloopcount\endcsname\relax
      \expandafter\xdef\csname info@\subfamily@seq @\the\outerloopcount\endcsname{0}
   \fi
   \xdef\third@@@{\csname info@\subfamily@seq @\the\outerloopcount\endcsname}
   \advance\temp@count by \third@@@
   \expandafter\xdef\csname info@\subfamily@seq @\the\outerloopcount\endcsname{\the\temp@count}
}
\def\sum@up@info{%
   \ifnum\outerloopcount=\subfamily@seq \advance\outerloopcount by 1 \fi
   \ifnum\outerloopcount>\seq@count
   \else
      \xdef\first@@@{\csname res\the\outerloopcount\endcsname}
      \sum@up@bits
      \advance\outerloopcount by 1\relax
   \fi
   \ifnum\outerloopcount>\seq@count\else\sum@up@info\fi
}
\def\collect@info{%
   \outerloopcount=1\relax
   \temp@count=0\relax
   \xdef\second@@@{\csname res\subfamily@seq\endcsname}
   \sum@up@info
}

\def\calc@grouping{%
   \xdef\second@{\csname res@num\d@t\endcsname}
   \innerloopcount=\seq@count
   \advance\innerloopcount by -\second@
   \xdef\second@{\the\innerloopcount}
   \xdef\seventh@{0}
   \innerloopcount=0
   \outerloopcount=65
   \loop
      \xdef\first@@{\csname ch@r@\the\outerloopcount\endcsname}
      \xdef\first@{\csname res@num\first@@\endcsname}
      \ifnum\first@>0
         \temp@count=\csname log2@\first@\endcsname
         \advance\temp@count by -\csname log2@\second@\endcsname
         \advance\temp@count by \csname res@corr\first@@\endcsname
         \multiply\temp@count by -\first@
         \divide\temp@count by \second@
         \advance\innerloopcount by \temp@count\relax
         \temp@count=\second@              %%%
         \advance\temp@count by -\first@   %%%
         \advance\temp@count by \seventh@  %%%
         \xdef\seventh@{\the\temp@count}   %%%
      \fi
      \expandafter\xdef\csname res@num\first@@\endcsname{0}
      \advance\outerloopcount by 1
   \ifnum\outerloopcount>90\else\repeat
   \expandafter\xdef\csname res@num\d@t\endcsname{0}
   \if\seq@type P
      \temp@count=\csname log2@20\endcsname
      \ifnum\sig@max=100000 \xdef\sig@max{2321} \fi
   \else
      \temp@count=\csname log2@4\endcsname
      \ifnum\sig@max=100000 \xdef\sig@max{1000} \fi
   \fi
   \xdef\bit@max{\the\temp@count}
   \advance\temp@count by -\innerloopcount
   \multiply\temp@count by \second@
   \divide\temp@count by \seq@count
   \xdef\last@{\the\temp@count}
   \expandafter\xdef\csname bit@pos\the\loopcount\endcsname{\last@}
   \temp@count=\bit@total
   \advance\temp@count by \last@
   \xdef\bit@total{\the\temp@count}
   \collect@info
}
\def\do@grouping{%
   \ifnum\loopcount>\total@pos
   \else
      \triple@count=1
      \loop
         \xdef\first@{\csname seq\the\triple@count\endcsname}
         \expandafter\dis@get\first@
         \ifx\first@\ampers@nd
         \else
            \innerloopcount=\csname res@num\first@\endcsname
            \advance\innerloopcount by 1
            \expandafter\xdef\csname res@num\first@\endcsname{\the\innerloopcount}
         \fi
         \advance\triple@count by 1\relax
      \ifnum\triple@count>\seq@count
         \calc@grouping
         \advance\loopcount by 1
         \do@grouping
      \else
      \repeat
   \fi
}
\def\total@frequency@correction{%
   \innerloopcount=0
   \outerloopcount=65
   \loop
      \xdef\first@@{\csname ch@r@\the\outerloopcount\endcsname}
      \xdef\first@{\csname res@corr\first@@\endcsname}
      \advance\innerloopcount by \first@\relax
      \advance\outerloopcount by 1
   \ifnum\outerloopcount>90\else\repeat
   \xdef\res@num@total{\the\innerloopcount}
   \outerloopcount=65
   \loop
      \xdef\first@@{\csname ch@r@\the\outerloopcount\endcsname}
      \xdef\first@{\csname res@corr\first@@\endcsname}
      \innerloopcount=\first@\relax
      \ifnum\innerloopcount>0
         \multiply\innerloopcount by 1000\relax
         \divide\innerloopcount by \res@num@total\relax
         \innerloopcount=\csname log2@\the\innerloopcount\endcsname
         \advance\innerloopcount by -5644\relax
         \multiply\innerloopcount by -1\relax
      \fi
      \expandafter\xdef\csname res@corr\first@@\endcsname{\the\innerloopcount}
      \ifnum\the\innerloopcount>\corr@max \xdef\corr@max{\the\innerloopcount}\fi
      \advance\outerloopcount by 1
   \ifnum\outerloopcount>90\else\repeat
}
\def\calc@total@frequency{%
   \ifnum\loopcount>\total@pos
   \else
      \triple@count=1
      \loop
         \xdef\first@{\csname seq\the\triple@count\endcsname}
         \expandafter\tot@get\first@
         \ifx\first@\ampers@nd
         \else
            \innerloopcount=\csname res@corr\first@\endcsname
            \advance\innerloopcount by 1
            \expandafter\xdef\csname res@corr\first@\endcsname{\the\innerloopcount}
         \fi
         \advance\triple@count by 1\relax
      \ifnum\triple@count>\seq@count
         \advance\loopcount by 1
         \calc@total@frequency
      \else
      \repeat
   \fi
}
\def\prep@logo{%
    \if\seq@type P
     \ifx\do@freq@correction\y@
       \xdef\do@freq@correction{n}
       \loopcount=1
       \loop
          \expandafter\xdef\csname seq\the\loopcount\endcsname{\csname sequence\the\loopcount\endcsname &@}
          \advance\loopcount by 1
       \ifnum\loopcount>\seq@count\else\repeat
       \xdef\corr@max{0}
       \loopcount=1
       \calc@total@frequency
       \total@frequency@correction
     \fi
    \fi
}
\def\define@subfamilies{%
  \xdef\first@{\csname group@num1\endcsname}
  \advance\loopcount by -1
  \xdef\last@{\the\loopcount}
  \outerloopcount=\bit@total
  \divide\outerloopcount by \last@
  \xdef\bit@mean{\the\outerloopcount}
  \multiply\outerloopcount by \subfamily@threshold\relax
  \divide\outerloopcount by 100\relax
  \xdef\sub@threshold{\the\outerloopcount}
  \ifnum\first@=0
    \clear@res@nums{1}
    \clear@res@nums{2}
    \immediate\write\featurefile{TeXshade subfamily logo data file for \alignfilename}
    \immediate\write\featurefile{--}
    \immediate\write\featurefile{Average information content [1000*bits per position]: \bit@mean}
    \immediate\write\featurefile{Subfamily threshold setting [percent]: \subfamily@threshold}
    \immediate\write\featurefile{=> \bit@mean\space * 0.\subfamily@threshold\space = \sub@threshold\space [1000*bits per position]}
    \immediate\write\featurefile{}
    \expandafter\xdef\csname subfamily@num\subfamily@seq\endcsname{2}
    \immediate\write\featurefile{Automatic subfamily assignment around sequence no. \subfamily@seq:}
    \immediate\write\featurefile{[sequence pair: average shared information *1000, subfamily number]}
    \temp@count=1
    \outerloopcount=1
    \loop
       \ifnum\outerloopcount=\subfamily@seq \advance\outerloopcount by 1 \fi
       \ifnum\outerloopcount>\seq@count
       \else
          \xdef\first@{\csname info@\subfamily@seq @\the\outerloopcount\endcsname}
          \loopcount=\first@\relax
          \divide\loopcount by \last@\relax
          \ifnum\loopcount>\sub@threshold
             \expandafter\xdef\csname subfamily@num\the\outerloopcount\endcsname{2}
             \advance\temp@count by 1\relax
          \else
             \expandafter\xdef\csname subfamily@num\the\outerloopcount\endcsname{1}
          \fi
          \xdef\first@@{\csname subfamily@num\the\outerloopcount\endcsname}
          \immediate\write\featurefile{\subfamily@seq-\the\outerloopcount:\space\the\loopcount,\space subfamily: \first@@}
          \advance\outerloopcount by 1
       \fi
    \ifnum\outerloopcount>\seq@count\else\repeat
    \immediate\write\featurefile{}
    \immediate\write\featurefile{//}
    \ifnum\temp@count>0
       \expandafter\xdef\csname group@num2\endcsname{\the\temp@count}
    \else
       \message{<No subfamilies found (check threshold) - hiding subfamily logo>}
       \show@sublogofalse
       \immediate\write\featurefile{<No subfamilies found (check threshold) - hiding subfamily logo>}
    \fi
    \loopcount=\seq@count
    \advance\loopcount by -\temp@count
    \ifnum\loopcount>0
       \expandafter\xdef\csname group@num1\endcsname{\the\loopcount}
    \else
       \message{<No subfamilies found (check threshold) - hiding subfamily logo>}
       \immediate\write\featurefile{<No subfamilies found (check threshold) - hiding subfamily logo>}
       \show@sublogofalse
    \fi
  \else
    \immediate\write\featurefile{TeXshade subfamily logo data file for \alignfilename}
    \immediate\write\featurefile{--}
    \immediate\write\featurefile{Average information content [1000*bits per position]: \bit@mean}
    \immediate\write\featurefile{Subfamily threshold setting [percent]: \subfamily@threshold}
    \immediate\write\featurefile{=> \bit@mean\space * 0.\subfamily@threshold\space = \sub@threshold\space [1000*bits per position]}
    \immediate\write\featurefile{}
    \immediate\write\featurefile{User defined subfamily: \sub@family@setting}
    \immediate\write\featurefile{}
    \immediate\write\featurefile{//}
  \fi
}
\def\prep@sublogo{%
    \message{<Calculating subfamily logo...>}
    \immediate\openout\featurefile = sublogo.txt
    \if\seq@type P
     \ifx\do@freq@correction\y@
       \xdef\do@freq@correction{n}
       \loopcount=1
       \loop
          \xdef\first@{\csname @rd\the\loopcount\endcsname} %%%
          \expandafter\xdef\csname seq\the\loopcount\endcsname{\csname sequence\first@\endcsname &@}
          \advance\loopcount by 1
       \ifnum\loopcount>\seq@count\else\repeat
       \xdef\corr@max{0}
       \loopcount=1
       \calc@total@frequency
       \total@frequency@correction
     \fi
    \fi
    \loopcount=1
    \loop
          \xdef\first@{\csname @rd\the\loopcount\endcsname} %%%
          \expandafter\xdef\csname seq\the\loopcount\endcsname{\csname sequence\first@\endcsname &@}
       \advance\loopcount by 1
    \ifnum\loopcount>\seq@count\else\repeat
    \loopcount=1
    \do@grouping
    \define@subfamilies
    \ifshow@sublogo
       \loopcount=1
       \loop
          \xdef\first@{\csname @rd\the\loopcount\endcsname} %%%
          \expandafter\xdef\csname seq\the\loopcount\endcsname{\csname sequence\first@\endcsname &@}
          \advance\loopcount by 1
       \ifnum\loopcount>\seq@count\else\repeat
       \xdef\first@{\csname group@num1\endcsname}
       \xdef\first@@{\csname log2@\first@\endcsname}
       \xdef\second@{\csname group@num2\endcsname}
       \xdef\second@@{\csname log2@\second@\endcsname}
       \loopcount=\first@
       \advance\loopcount by \second@
       \xdef\third@{\the\loopcount}
       \xdef\third@@{\csname log2@\third@\endcsname}
       \loopcount=\first@@
       \advance\loopcount by -\third@@
       \multiply\loopcount by \first@
       \divide\loopcount by \third@
       \xdef\first@@@{\the\loopcount}
       \loopcount=\second@@
       \advance\loopcount by -\third@@
       \multiply\loopcount by \second@
       \divide\loopcount by \third@
       \xdef\second@@@{\the\loopcount}
       \loopcount=\bit@max
       \advance\loopcount by \first@@@
       \advance\loopcount by \second@@@
       \xdef\group@correction{\the\loopcount}
       \loopcount=1 \total@count=0
       \do@sublogo
       \immediate\closeout\featurefile
       \openin\sublogofile = sublogo.txt\relax
       \read@header
    \else
       \immediate\closeout\featurefile
    \fi
}
\def\read@header{%
   \read\sublogofile to \first@\relax
   \xdef\first@{\expandafter\string\first@}
   \ifx\first@\par@ \read@header
   \else
      \xdef\first@{\first@ @}
      \expandafter\seq@get\first@
      \ifx\first@\he@derend
      \else\read@header
      \fi
   \fi
}
\def\read@sublogo{%
   \xdef\stack@sublogo{}%
   \loopcount=1 %
   \loop%
      \ifeof\sublogofile%
         \advance\loopcount by \res@perline%
      \else%
         \read\sublogofile to \first@\relax%
         \xdef\first@{\expandafter\string\first@}%
         \ifx\first@\par@%
            \advance\loopcount by \res@perline%
         \else
            \xdef\first@{\first@ @}%
            \expandafter\sublogo@get\first@%
            \xdef\stack@sublogo{\stack@sublogo\first@}%
            \advance\loopcount by 1%
         \fi%
      \fi%
   \ifnum\loopcount=\res@perline\else\repeat%
}
\def\calc@sublogo{%
   \xdef\seventh@{\csname res@num.2\endcsname}
   \xdef\first@{\csname group@num2\endcsname}
   \innerloopcount=\first@
   \advance\innerloopcount by -\seventh@
   \xdef\seventh@{\the\innerloopcount}
   \xdef\eighth@{\csname res@num.1\endcsname}
   \xdef\first@{\csname group@num1\endcsname}
   \innerloopcount=\first@
   \advance\innerloopcount by -\eighth@
   \xdef\eighth@{\the\innerloopcount}
   \xdef\nineth@{n}
   \xdef\pos@max{0}
   \xdef\pos@min{0}
   \outerloopcount=65
   \loop
      \xdef\first@@{\csname ch@r@\the\outerloopcount\endcsname}
      \xdef\first@{\csname res@num\first@@ 1\endcsname} \xdef\temp@{\first@}
      \temp@count=\first@
      \ifnum\seventh@>0 \multiply\temp@count by \seventh@ \fi
      \xdef\first@{\the\temp@count}
      \xdef\second@{\csname res@num\first@@ 2\endcsname}
      \temp@count=\temp@
      \advance\temp@count by \second@\relax
      \ifnum\temp@count>0
         \temp@count=\second@
         \ifnum\eighth@>0 \multiply\temp@count by \eighth@ \fi
         \advance\temp@count by -\first@
         \xdef\last@{\csname bit@pos\the\loopcount\endcsname}
         \multiply\temp@count by \last@
         \ifnum\seventh@>0 \divide\temp@count by \seventh@ \fi
         \ifnum\eighth@>0 \divide\temp@count by \eighth@ \fi
         \multiply\temp@count by \bit@max
         \divide\temp@count by \group@correction
         \ifx\hide@negatives\y@
            \ifnum\temp@count>0 \else \temp@count=1 \fi%
         \else
            \ifnum\temp@count=0 \temp@count=1 \fi%
         \fi
         \expandafter\xdef\csname res@val\first@@\endcsname{\the\temp@count}
         \expandafter\xdef\csname res@num\first@@ 1\endcsname{0}
         \expandafter\xdef\csname res@num\first@@ 2\endcsname{0}
         \xdef\nineth@{y}
      \else
         \expandafter\xdef\csname res@val\first@@\endcsname{0}
         \expandafter\xdef\csname res@num\first@@ 1\endcsname{0}
         \expandafter\xdef\csname res@num\first@@ 2\endcsname{0}
      \fi
      \ifnum\temp@count>\pos@max \xdef\pos@max{\the\temp@count}\fi
      \ifnum\temp@count<\pos@min \xdef\pos@min{\the\temp@count}\fi
      \advance\outerloopcount by 1
   \ifnum\outerloopcount>90\else\repeat
   \expandafter\xdef\csname res@val\d@t\endcsname{0}
   \expandafter\xdef\csname res@num\d@t 1\endcsname{0}
   \expandafter\xdef\csname res@num\d@t 2\endcsname{0}
   \temp@count=\pos@min\relax
   \multiply\temp@count by -1\relax
   \xdef\pos@min{\the\temp@count}
   \ifnum\pos@min>\pos@max \xdef\pos@max{\pos@min}\fi
   \temp@count=\pos@max
   \multiply\temp@count by 100 \relax
   \divide\temp@count by \bit@max \relax
   \xdef\sublogo@num{\sublogo@num\the\temp@count,}
   \ifnum\pos@max<\sig@max \xdef\sublogo@sig{\sublogo@sig n} \else  \xdef\sublogo@sig{\sublogo@sig y} \fi
   \ifx\nineth@\y@
      \xdef\tmpstack{&:&,}
      \outerloopcount=65
      \loop
         \xdef\first@@{\csname ch@r@\the\outerloopcount\endcsname}
         \xdef\second@@{\csname res@val\first@@\endcsname}
         \ifnum\second@@=0
         \else
            \xdef\third@{\tmpstack @} \xdef\tmpstack{}
            \sort@logostack
         \fi
         \advance\outerloopcount by 1
      \ifnum\outerloopcount>90
         \immediate\write\featurefile{\expandafter\string\tmpstack&:&,}
      \else\repeat
   \else
      \immediate\write\featurefile{\expandafter\string O:0,&:&,}
   \fi
}
\def\do@sublogo{%
   \ifnum\loopcount>\total@pos
   \xdef\sublogo@sig{\sublogo@sig &@}
   \else
      \triple@count=1
      \loop
         \xdef\first@{\csname seq\the\triple@count\endcsname}
         \expandafter\dis@get\first@
         \ifnum\triple@count=\start@seq
            \ifx\first@\d@t\else \advance\total@count by 1\relax\fi
         \fi
         \ifnum\loopcount<\start@number
         \else
         \ifnum\total@count>\end@num
         \else
            \ifx\first@\ampers@nd
            \else
               \xdef\second@{\csname subfamily@num\the\triple@count\endcsname}
               \innerloopcount=\csname res@num\first@\second@\endcsname
               \advance\innerloopcount by 1
               \expandafter\xdef\csname res@num\first@\second@\endcsname{\the\innerloopcount}
            \fi
         \fi
         \fi
         \advance\triple@count by 1\relax
      \ifnum\triple@count>\seq@count
         \ifnum\loopcount<\start@number
         \else
            \ifnum\total@count>\end@num
            \else
               \calc@sublogo
            \fi
         \fi
         \advance\loopcount by 1
         \do@sublogo
      \else
      \repeat
   \fi
}
\def\calc@logo{%
   \xdef\second@{\csname res@num\d@t\endcsname}
   \innerloopcount=\seq@count
   \advance\innerloopcount by -\second@
   \xdef\second@{\the\innerloopcount}
   \xdef\seventh@{0}
   \innerloopcount=0
   \outerloopcount=65
   \loop
      \xdef\first@@{\csname ch@r@\the\outerloopcount\endcsname}
      \xdef\first@{\csname res@num\first@@\endcsname}
      \ifnum\first@>0
         \temp@count=\csname log2@\first@\endcsname
         \advance\temp@count by -\csname log2@\second@\endcsname
         \advance\temp@count by \csname res@corr\first@@\endcsname     %%%% correct for background freq.
         \multiply\temp@count by -\first@
         \divide\temp@count by \second@
         \advance\innerloopcount by \temp@count\relax
      \fi
      \advance\outerloopcount by 1
   \ifnum\outerloopcount>90\else\repeat
   \if\seq@type P
      \temp@count=\csname log2@20\endcsname
   \else
      \temp@count=\csname log2@4\endcsname
   \fi
   \advance\temp@count by -\innerloopcount
   \multiply\temp@count by \second@
   \divide\temp@count by \seq@count
   \xdef\last@{\the\temp@count}
   \xdef\nineth@{n}
   \outerloopcount=65
   \loop
      \xdef\first@@{\csname ch@r@\the\outerloopcount\endcsname}
      \xdef\first@{\csname res@num\first@@\endcsname}
      \ifnum\first@>0
         \temp@count=\last@
         \multiply\temp@count by \first@\relax
         \divide\temp@count by \second@\relax
         \ifnum\temp@count=0 %
            \temp@count=1 %
         \fi%
         \expandafter\xdef\csname res@val\first@@\endcsname{\the\temp@count}
         \expandafter\xdef\csname res@num\first@@\endcsname{0}
         \xdef\nineth@{y}
      \else
         \expandafter\xdef\csname res@val\first@@\endcsname{0}
      \fi
      \advance\outerloopcount by 1
   \ifnum\outerloopcount>90\else\repeat
   \expandafter\xdef\csname res@val\d@t\endcsname{0}
   \expandafter\xdef\csname res@num\d@t\endcsname{0}
   \ifx\nineth@\y@
      \xdef\tmpstack{&:&,}
      \outerloopcount=65
      \loop
         \xdef\first@@{\csname ch@r@\the\outerloopcount\endcsname}
         \xdef\second@@{\csname res@val\first@@\endcsname}
         \ifnum\second@@>0
            \xdef\third@{\tmpstack @} \xdef\tmpstack{}
            \sort@logostack
         \fi
         \advance\outerloopcount by 1
      \ifnum\outerloopcount>90
         \xdef\stack@sequencelogo{\stack@sequencelogo\tmpstack&:&,}
      \else\repeat
   \else
      \xdef\stack@sequencelogo{\stack@sequencelogo O:0,&:&,}
   \fi
}
\def\get@fromlogostack#1:#2,#3@{%
   \xdef\first@{#1} \xdef\second@{#2} \xdef\third@{#3}
}
\def\sort@logostack{%
   \expandafter\get@fromlogostack\third@
   \ifx\first@\ampers@nd
      \xdef\tmpstack{\tmpstack\first@@:\second@@,}
   \else
   \ifnum\second@@<0
      \ifnum\second@>0
         \xdef\tmpstack{\tmpstack\first@@:\second@@,\first@:\second@,\third@}
      \else
         \temp@count=\second@@\relax \multiply\temp@count by -1\relax
         \triple@count=\second@\relax \multiply\triple@count by -1\relax
         \ifnum\temp@count<\triple@count
            \xdef\tmpstack{\tmpstack\first@@:\second@@,\first@:\second@,\third@}
         \else
            \xdef\tmpstack{\tmpstack\first@:\second@,}
            \xdef\third@@{\third@ .}
            \ifx\third@@\d@t
               \xdef\third@{&:&,@}
            \else
               \xdef\third@{\third@ @}
            \fi
            \sort@logostack
         \fi
      \fi
   \else
      \ifnum\second@@<\second@
         \xdef\tmpstack{\tmpstack\first@@:\second@@,\first@:\second@,\third@}
      \else
         \xdef\tmpstack{\tmpstack\first@:\second@,}
         \xdef\third@@{\third@ .}
         \ifx\third@@\d@t
            \xdef\third@{&:&,@}
         \else
            \xdef\third@{\third@ @}
         \fi
         \sort@logostack
      \fi
   \fi
   \fi
}

\def\calc@feature{%
      \loopcount=-1 \innerloopcount=0
      \loop
         \advance\loopcount by 1
         \ifnum\loopcount=0 \xdef\first@@{\the\cons@count}
         \else \xdef\first@@{\csname res@count\the\loopcount\endcsname} \fi
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
         \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>\first@@
         \else
            \expandafter\ifnum\csname stop\bottop@\the\loopcount\endcsname<\first@@
               \expandafter\getregion@fromfstack{\the\loopcount}
            \else
               \innerloopcount=\loopcount
               \expandafter\ifnum\csname featureon\bottop@\endcsname=0
                  \expandafter\xdef\csname featureon\bottop@\endcsname{1}
                  \expandafter\xdef\csname feature@\bottop@\endcsname{1}
                  \expandafter\xdef\csname ftext\bottop@\the\loopcount\endcsname{%
                                   \csname text\bottop@\the\loopcount\endcsname}
                  \expandafter\xdef\csname fstyle\bottop@\the\loopcount\endcsname{%
                                   \csname style\bottop@\the\loopcount\endcsname}
                  \innerloopcount=\pos@count
                  \advance\innerloopcount by -\csname featurepos\bottop@\endcsname
                  \expandafter\xdef\csname textfeature\bottop@\endcsname{%
                                   \csname textfeature\bottop@\endcsname%
                                   &\the\innerloopcount;{};}
                  \expandafter\xdef\csname stylefeature\bottop@\endcsname{%
                                   \csname stylefeature\bottop@\endcsname%
                                   &\the\innerloopcount;&;}
                  \expandafter\xdef\csname featurepos\bottop@\endcsname{\the\pos@count}
                  \xdef\temp@@@{n}
                  \xdef\fourth@{}
                  \xdef\temp@{\csname ftext\bottop@\the\loopcount\endcsname}
                  \xdef\temp@{\temp@[,]:[,][]&}\expandafter\graph@opt@color\temp@
                  \ifx\fourth@\tr@ns \xdef\temp@@@{y} \fi
                  \xdef\fourth@{}
                  \xdef\temp@{\csname fstyle\bottop@\the\loopcount\endcsname}
                  \xdef\temp@{\temp@[,]:[,][]&}\expandafter\graph@opt@color\temp@
                  \ifx\fourth@\tr@ns \xdef\temp@@@{y} \fi
                  \ifx\temp@@@\y@
                    \ifnum\loopcount=0
                     \message{<No translations of the consensus sequence>}
                     \expandafter\xdef\csname ftext\bottop@\the\loopcount\endcsname{%
                                  No consensus translations!}
                     \expandafter\xdef\csname fstyle\bottop@\the\loopcount\endcsname{%
                                          ///}
                    \else
                     \if\seq@type P
                        \expandafter\xdef\csname collect@res\bottop@\endcsname{yes}
                        \expandafter\xdef\csname tr@nsseq\bottop@\endcsname{\the\loopcount}
                        \expandafter\xdef\csname tr@nslate\bottop@\endcsname{%
                        \csname res\the\loopcount\endcsname}
                     \else
                        \expandafter\xdef\csname collect@res\bottop@\endcsname{yes}
                        \expandafter\xdef\csname tr@nsseq\bottop@\endcsname{\the\loopcount}
                        \expandafter\ifx\csname res\the\loopcount\endcsname\gap@char
                           \expandafter\xdef\csname triple@count\bottop@\endcsname{0}
                           \expandafter\xdef\csname tr@nslate\bottop@\endcsname{-}
                        \else
                           \expandafter\xdef\csname triple@count\bottop@\endcsname{1}
                           \expandafter\xdef\csname tr@nslate\bottop@\endcsname{%
                           \csname res\the\loopcount\endcsname}
                           \expandafter\xdef\csname last@@res\bottop@\endcsname{%
                           \csname res\the\loopcount\endcsname}
                        \fi
                     \fi
                    \fi
                  \fi
                  \xdef\temp@{plot}
                  \ifx\temp@\fourth@
                    \ifnum\loopcount=0
                     \message{<No bar graphs/scales with the consensus sequence>}
                     \expandafter\xdef\csname ftext\bottop@\the\loopcount\endcsname{}
                     \expandafter\xdef\csname fstyle\bottop@\the\loopcount\endcsname{%
                                          ///}
                    \else
                     \expandafter\xdef\csname collect@val\bottop@\endcsname{yes}
                     \expandafter\xdef\csname v@lseq\bottop@\endcsname{\the\loopcount}
                     \expandafter\xdef\csname ffourth@\bottop@\endcsname{\ffourth@}
                     \xdef\temp@{\ffourth@\csname res\the\loopcount\endcsname}
                     \expandafter\xdef\csname v@l\bottop@\endcsname{\csname \temp@\endcsname}
                    \fi
                  \fi
                  \xdef\temp@{cons}
                  \ifx\temp@\fourth@
                     \expandafter\xdef\csname collect@cons@graph\bottop@\endcsname{yes}
                     \expandafter\xdef\csname v@lseq\bottop@\endcsname{\the\loopcount}
                     \expandafter\xdef\csname ffourth@\bottop@\endcsname{\ffourth@}
                     \innerloopcount=1
                     \collect@cons@res
                     \expandafter\xdef\csname v@l\bottop@\endcsname{\cons@val}
                  \fi
               \else
                  \ifnum\pos@count=1\relax
                     \xdef\temp@{\csname fstyle\bottop@\the\loopcount\endcsname @}
                     \expandafter\getstyle@right\temp@
                     \xdef\temp@@@{n}
                     \xdef\fourth@{}
                     \xdef\temp@{\csname ftext\bottop@\the\loopcount\endcsname}
                     \xdef\temp@{\temp@[,]:[,][]&}\expandafter\graph@opt@color\temp@
                     \ifx\fourth@\tr@ns \xdef\temp@@@{y} \fi
                     \xdef\fourth@{}
                     \xdef\temp@{\csname fstyle\bottop@\the\loopcount\endcsname}
                     \xdef\temp@{\temp@[,]:[,][]&}\expandafter\graph@opt@color\temp@
                     \ifx\fourth@\tr@ns \xdef\temp@@@{y} \fi
                     \ifx\temp@@@\y@
                        \if\seq@type P
                           \expandafter\xdef\csname tr@nslate\bottop@\endcsname{%
                           \csname res\the\loopcount\endcsname}
                        \else
                           \expandafter\ifnum\csname triple@count\bottop@\endcsname=2
                              \expandafter\ifx\csname res\the\loopcount\endcsname\gap@char
                              \else
                                 \expandafter\xdef\csname tr@nslate\bottop@\endcsname{%
                                 +\csname last@res\bottop@\endcsname%
                                 \csname tr@nslate\bottop@\endcsname}
                              \fi
                           \fi
                           \expandafter\ifnum\csname triple@count\bottop@\endcsname=1
                              \expandafter\xdef\csname last@res\bottop@\endcsname{%
                              \csname last@@res\bottop@\endcsname}
                              \expandafter\ifx\csname res\the\loopcount\endcsname\gap@char
                                 \expandafter\xdef\csname tr@nslate\bottop@\endcsname{%
                                  +\csname last@res\bottop@\endcsname%
                                  \csname tr@nslate\bottop@\endcsname}
                              \fi
                           \fi
                        \fi
                     \fi
                     \xdef\temp@{plot}
                     \ifx\temp@\fourth@
                        \expandafter\ifx\csname res\the\loopcount\endcsname\gap@char
                           \expandafter\xdef\csname v@l\bottop@\endcsname{N}
                        \else
                           \xdef\temp@{\ffourth@\csname res\the\loopcount\endcsname}
                           \expandafter\xdef\csname v@l\bottop@\endcsname{%
                           \csname \temp@\endcsname}
                        \fi
                     \fi
                     \xdef\temp@{cons}
                     \ifx\temp@\fourth@
                        \innerloopcount=1
                        \collect@cons@res
                        \expandafter\xdef\csname v@l\bottop@\endcsname{\cons@val}
                     \fi
                  \fi
               \fi
               \expandafter\ifnum\csname stop\bottop@\the\loopcount\endcsname=\first@@
                  \expandafter\getregion@fromfstack{\the\loopcount}
                  \xdef\temp@@@{n}
                  \xdef\fourth@{}
                  \xdef\temp@{\csname ftext\bottop@\the\loopcount\endcsname}
                  \xdef\temp@{\temp@[,]:[,][]&}\expandafter\graph@opt@color\temp@
                  \ifx\fourth@\tr@ns
                     \ifx\f@color\comm@
                        \xdef\f@color{} \else \xdef\f@color{[\f@color]}
                     \fi
                     \xdef\tr@nsl@ted{\csname tr@nslate\bottop@\endcsname}
                     \if\seq@type N \do@translation \else \rev@translation \fi
                     \xdef\temp@{translate:\tr@nsl@ted\f@color}
                     \xdef\temp@@@{y}
                  \else
                     \xdef\temp@{\csname ftext\bottop@\the\loopcount\endcsname}
                  \fi
                  \xdef\fourth@{}
                  \xdef\temp@@{\csname fstyle\bottop@\the\loopcount\endcsname}
                  \xdef\temp@@{\temp@@[,]:[,][]&}\expandafter\graph@opt@color\temp@@
                  \ifx\fourth@\tr@ns
                     \ifx\f@color\comm@
                         \xdef\f@color{} \else \xdef\f@color{[\f@color]}
                     \fi
                     \xdef\tr@nsl@ted{\csname tr@nslate\bottop@\endcsname}
                     \if\seq@type N \do@translation \else \rev@translation \fi
                     \xdef\temp@@{translate:\tr@nsl@ted\f@color}
                     \xdef\temp@@@{y}
                  \else
                     \xdef\temp@@{plot}
                     \ifx\temp@@\fourth@
                        \xdef\temp@@{plot\f@color[\fffourth@]:\csname v@l\bottop@\endcsname[\ff@color]}
                        \expandafter\xdef\csname collect@val\bottop@\endcsname{no}
                        \expandafter\xdef\csname v@l\bottop@\endcsname{}
                     \else
                     \xdef\temp@@{cons}
                     \ifx\temp@@\fourth@
                        \xdef\temp@@{plot\f@color[\fffourth@]:\csname v@l\bottop@\endcsname[\ff@color]}
                        \expandafter\xdef\csname collect@cons@graph\bottop@\endcsname{no}
                        \expandafter\xdef\csname v@l\bottop@\endcsname{}
                     \else
                        \xdef\temp@@{\csname fstyle\bottop@\the\loopcount\endcsname}
                     \fi
                     \fi
                  \fi
                  \ifx\temp@@@\y@
                     \expandafter\xdef\csname collect@res\bottop@\endcsname{no}
                     \expandafter\xdef\csname tr@nslate\bottop@\endcsname{}
                  \fi
                  \expandafter\ifnum\csname featureon\bottop@\endcsname=1
                     \expandafter\xdef\csname featureon\bottop@\endcsname{0}
                     \innerloopcount=\pos@count \advance\innerloopcount by 1
                     \advance\innerloopcount by -\csname featurepos\bottop@\endcsname
                     \expandafter\xdef\csname textfeature\bottop@\endcsname{%
                                      \csname textfeature\bottop@\endcsname%
                                      &\the\innerloopcount;\temp@;}
                     \expandafter\xdef\csname stylefeature\bottop@\endcsname{%
                                      \csname stylefeature\bottop@\endcsname%
                                      &\the\innerloopcount;\temp@@;}
                     \innerloopcount=\pos@count \advance\innerloopcount by 1
                     \expandafter\xdef\csname %
                     featurepos\bottop@\endcsname{\the\innerloopcount}
                  \fi
               \fi
               \ifnum\pos@count=\res@perline
                  \expandafter\ifnum\csname featureon\bottop@\endcsname=1
                     \innerloopcount=\pos@count
                     \advance\innerloopcount by 1
                     \advance\innerloopcount by -\csname featurepos\bottop@\endcsname
                     \xdef\temp@{\csname fstyle\bottop@\the\loopcount\endcsname @}
                     \expandafter\getstyle@left\temp@
                     \xdef\temp@@@{n}
                     \xdef\fourth@{}
                     \xdef\temp@{\csname ftext\bottop@\the\loopcount\endcsname}
                     \xdef\temp@{\temp@[,]:[,][]&}\expandafter\graph@opt@color\temp@
                     \ifx\fourth@\tr@ns
                        \ifx\f@color\comm@
                           \xdef\f@color{} \else \xdef\f@color{[\f@color]}
                        \fi
                        \expandafter\ifnum\csname triple@count\bottop@\endcsname=2
                           \if\seq@type N
                              \xdef\temp@{\csname sequence\the\loopcount\endcsname:}
                              \expandafter\get@nextres\temp@
                              \xdef\tr@nsl@ted{\csname tr@nslate\bottop@\endcsname\temp@}
                              \do@translation
                              \xdef\temp@@@{2}
                           \else
                              \xdef\tr@nsl@ted{\csname tr@nslate\bottop@\endcsname}
                              \rev@translation
                             \xdef\temp@@@{}
                           \fi
                           \xdef\temp@{translate:\tr@nsl@ted\f@color}
                        \else
                           \xdef\tr@nsl@ted{\csname tr@nslate\bottop@\endcsname}
                           \if\seq@type N \do@translation \else \rev@translation \fi
                           \xdef\temp@{translate:\tr@nsl@ted\f@color}
                           \xdef\temp@@@{}
                        \fi
                     \else \xdef\temp@{\csname ftext\bottop@\the\loopcount\endcsname}
                     \fi
                     \xdef\fourth@{}
                     \xdef\temp@@{\csname fstyle\bottop@\the\loopcount\endcsname}
                     \xdef\temp@@{\temp@@[,]:[,][]&}\expandafter\graph@opt@color\temp@@
                     \ifx\fourth@\tr@ns
                        \ifx\f@color\comm@
                           \xdef\f@color{} \else \xdef\f@color{[\f@color]}
                        \fi
                        \expandafter\ifnum\csname triple@count\bottop@\endcsname=2
                           \if\seq@type N
                              \xdef\temp@@{\csname sequence\the\loopcount\endcsname:}
                              \expandafter\get@@nextres\temp@@
                              \xdef\tr@nsl@ted{\csname tr@nslate\bottop@\endcsname\temp@@}
                              \do@translation
                              \xdef\temp@@@{2}
                           \else
                              \xdef\tr@nsl@ted{\csname tr@nslate\bottop@\endcsname}
                              \rev@translation
                              \xdef\temp@@@{}
                           \fi
                           \xdef\temp@@{translate:\tr@nsl@ted\f@color}
                        \else
                           \xdef\tr@nsl@ted{\csname tr@nslate\bottop@\endcsname}
                           \if\seq@type N \do@translation \else \rev@translation \fi
                           \xdef\temp@@{translate:\tr@nsl@ted\f@color}
                           \xdef\temp@@@{}
                        \fi
                     \else
                        \xdef\temp@@{plot}
                        \ifx\temp@@\fourth@
                          \xdef\temp@@{plot\f@color[\fffourth@]:\csname v@l\bottop@\endcsname[\ff@color]}
                        \else
                        \xdef\temp@@{cons}
                        \ifx\temp@@\fourth@
                           \xdef\temp@@{plot\f@color[\fffourth@]:\csname v@l\bottop@\endcsname[\ff@color]}
                        \else
                           \xdef\temp@@{\style@@}
                        \fi
                        \fi
                     \fi
                     \ifx\temp@@@\n@
                     \else
                        \expandafter\xdef\csname tr@nslate\bottop@\endcsname{\temp@@@}
                     \fi
                     \expandafter\xdef\csname textfeature\bottop@\endcsname{%
                                      \csname textfeature\bottop@\endcsname%
                                      &\the\innerloopcount;\temp@;}
                     \expandafter\xdef\csname stylefeature\bottop@\endcsname{%
                                      \csname stylefeature\bottop@\endcsname%
                                      &\the\innerloopcount;\temp@@;}
                     \innerloopcount=\pos@count \advance\innerloopcount by 1
                     \expandafter\xdef\csname %
                     featurepos\bottop@\endcsname{\the\innerloopcount}
                  \fi
               \fi
            \fi
         \fi
         \fi
      \ifnum\loopcount<\seq@count \repeat
}

\def\add@to@rule@tens{%
    \advance\innerloopcount by \ruler@step\relax
    \ifnum\innerloopcount=0
          \ifx\allow@zero\n@ \innerloopcount=\ruler@step \fi
    \fi
    \expandafter\ifnum\csname res@count\rule@num\endcsname>\innerloopcount \add@to@rule@tens
    \else
       \xdef\rule@tens{\the\innerloopcount}
    \fi
}

\def\c@nsensus{%
 \ifnum\pos@count>\res@perline
    \else
    \loopcount=0
    \ifx\g@p\n@
       \global\advance\cons@count by 1\relax
    \fi
    \ifnum\cons@count=0\relax
       \ifx\allow@zero\n@ \global\advance\cons@count by 1 \fi
    \fi
    \ifT@coffee
            \xdef\TC@line{\csname T@coffee0\endcsname}
            \expandafter\TC@get\TC@line
    \fi
    \expandafter\xdef\csname res@count0\endcsname{\the\cons@count}
    \loop
         \advance\loopcount by 1
         \ifT@coffee
            \xdef\TC@line{\csname T@coffee\the\loopcount\endcsname}
            \expandafter\TC@get\TC@line
            \xdef\TC@first@{\csname TC@num\the\loopcount\endcsname}
         \fi
         \xdef\seq@line{\csname sequence\the\loopcount\endcsname}
         \expandafter\residue@get\seq@line
         \xdef\first@{\csname res\the\loopcount\endcsname}
         \innerloopcount=\csname res@num\first@\endcsname
         \advance\innerloopcount by 1
         \expandafter\xdef\csname res@num\first@\endcsname{\the\innerloopcount}
         \expandafter\check@char\first@
         \ifx\dom@in\y@ %%%%%%%%%%%*****
                \xdef\temp@{\csname dom@num\the\loopcount\endcsname}
                \expandafter\get@dom@count\temp@
                \expandafter\xdef\csname dom@num\the\loopcount\endcsname{\temp@}
         \fi            %%%%%%%%%%%*****
         \ifletter
             \ifx\dom@in\y@
             \else
                \res@count=\csname res@count\the\loopcount\endcsname
                \advance\res@count by 1
                \ifnum\res@count=0\relax
                   \ifx\allow@zero\n@ \advance\res@count by 1 \fi
             \fi
             \fi
             \expandafter\xdef\csname res@count\the\loopcount\endcsname{\the\res@count}
             \ifnum\loopcount=\exp@rt@num \xdef\sixth@{\the\res@count}\xdef\seventh@{y}\fi
             \ifnum\loopcount=\rule@num\relax
              \expandafter\ifnum\csname res@count\rule@num\endcsname>\rule@tens
                 \innerloopcount=\rule@tens \add@to@rule@tens
              \fi
              \expandafter\ifnum\csname res@count\rule@num\endcsname=\rule@tens
                \expandafter\ifx\csname alt@ruler\rule@tens\endcsname\relax
                   \xdef\temp@{\rule@tens}
                \else
                   \xdef\temp@{\csname alt@ruler\rule@tens\endcsname}
                \fi
                \xdef\ruler@{\ruler@ !<\temp@>}
              \else
                \xdef\ruler@{\ruler@ -}
              \fi
              \xdef\temp@{\csname res@count\rule@num\endcsname}
              \expandafter\ifx\csname alt@ruler\temp@\endcsname\relax
              \else
                \expandafter\xdef\csname alt@ruler\temp@\endcsname{\temp@}
              \fi
             \fi
             \ifx\collect@valtop\yes
             \ifnum\v@lseqtop=\loopcount
                \xdef\v@ltop{\v@ltop,\csname \ffourth@top\first@\endcsname}
             \fi\fi
             \ifx\collect@valttop\yes
             \ifnum\v@lseqttop=\loopcount
                \xdef\v@lttop{\v@lttop,\csname \ffourth@ttop\first@\endcsname}
             \fi\fi
             \ifx\collect@valtttop\yes
             \ifnum\v@lseqtttop=\loopcount
                \xdef\v@ltttop{\v@ltttop,\csname \ffourth@tttop\first@\endcsname}
             \fi\fi
             \ifx\collect@valttttop\yes
             \ifnum\v@lseqttttop=\loopcount
                \xdef\v@lttttop{\v@lttttop,\csname \ffourth@ttttop\first@\endcsname}
             \fi\fi
             \ifx\collect@valbottom\yes
             \ifnum\v@lseqbottom=\loopcount
                \xdef\v@lbottom{\v@lbottom,\csname \ffourth@bottom\first@\endcsname}
             \fi\fi
             \ifx\collect@valbbottom\yes
             \ifnum\v@lseqbbottom=\loopcount
                \xdef\v@lbbottom{\v@lbbottom,\csname \ffourth@bbottom\first@\endcsname}
             \fi\fi
             \ifx\collect@valbbbottom\yes
             \ifnum\v@lseqbbbottom=\loopcount
                \xdef\v@lbbbottom{\v@lbbbottom,\csname \ffourth@bbbottom\first@\endcsname}
             \fi\fi
             \ifx\collect@valbbbbottom\yes
             \ifnum\v@lseqbbbbottom=\loopcount
                \xdef\v@lbbbbottom{\v@lbbbbottom,\csname \ffourth@bbbbottom\first@\endcsname}
             \fi\fi
             \ifx\collect@restop\yes
             \ifnum\tr@nsseqtop=\loopcount
                \xdef\last@restop{\last@@restop}
                \xdef\last@@restop{\first@}
                \xdef\tr@nslatetop{\tr@nslatetop\first@}
                \innerloopcount=\triple@counttop
                \advance\innerloopcount by 1
                \ifnum\innerloopcount>3 \innerloopcount=1 \fi
                \xdef\triple@counttop{\the\innerloopcount}
             \fi\fi
             \ifx\collect@resttop\yes
             \ifnum\tr@nsseqttop=\loopcount
                \xdef\last@resttop{\last@@resttop}
                \xdef\last@@resttop{\first@}
                \xdef\tr@nslatettop{\tr@nslatettop\first@}
                \innerloopcount=\triple@countttop
                \advance\innerloopcount by 1
                \ifnum\innerloopcount>3 \innerloopcount=1 \fi
                \xdef\triple@countttop{\the\innerloopcount}
             \fi\fi
             \ifx\collect@restttop\yes
             \ifnum\tr@nsseqtttop=\loopcount
                \xdef\last@restttop{\last@@restttop}
                \last@@restttop{\first@}
                \xdef\tr@nslatetttop{\tr@nslatetttop\first@}
                \innerloopcount=\triple@counttttop
                \advance\innerloopcount by 1
                \ifnum\innerloopcount>3 \innerloopcount=1 \fi
                \xdef\triple@counttttop{\the\innerloopcount}
             \fi\fi
             \ifx\collect@resttttop\yes
             \ifnum\tr@nsseqttttop=\loopcount
                \xdef\last@resttttop{\last@@resttttop}
                \xdef\last@@resttttop{\first@}
                \xdef\tr@nslatettttop{\tr@nslatettttop\first@}
                \innerloopcount=\triple@countttttop
                \advance\innerloopcount by 1
                \ifnum\innerloopcount>3 \innerloopcount=1 \fi
                \xdef\triple@countttttop{\the\innerloopcount}
             \fi\fi
             \ifx\collect@resbottom\yes
             \ifnum\tr@nsseqbottom=\loopcount
                 \xdef\last@resbottom{\last@@resbottom}
                 \xdef\last@@resbottom{\first@}
                 \xdef\tr@nslatebottom{\tr@nslatebottom\first@}
                 \innerloopcount=\triple@countbottom
                 \advance\innerloopcount by 1
                 \ifnum\innerloopcount>3 \innerloopcount=1 \fi
                 \xdef\triple@countbottom{\the\innerloopcount}
             \fi\fi
             \ifx\collect@resbbottom\yes
             \ifnum\tr@nsseqbbottom=\loopcount
                 \xdef\last@resbbottom{\last@@resbbottom}
                 \xdef\last@@resbbottom{\first@}
                 \xdef\tr@nslatebbottom{\tr@nslatebbottom\first@}
                 \innerloopcount=\triple@countbbottom
                 \advance\innerloopcount by 1
                 \ifnum\innerloopcount>3 \innerloopcount=1 \fi
                 \xdef\triple@countbbottom{\the\innerloopcount}
             \fi\fi
             \ifx\collect@resbbbottom\yes
             \ifnum\tr@nsseqbbbottom=\loopcount
                 \xdef\last@resbbbottom{\last@@resbbbottom}
                 \xdef\last@@resbbbottom{\first@}
                 \xdef\tr@nslatebbbottom{\tr@nslatebbbottom\first@}
                 \innerloopcount=\triple@countbbbottom
                 \advance\innerloopcount by 1
                 \ifnum\innerloopcount>3 \innerloopcount=1 \fi
                 \xdef\triple@countbbbottom{\the\innerloopcount}
             \fi\fi
             \ifx\collect@resbbbbottom\yes
             \ifnum\tr@nsseqbbbbottom=\loopcount
                 \xdef\last@resbbbbottom{\last@@resbbbbottom}
                 \xdef\last@@resbbbbottom{\first@}
                 \xdef\tr@nslatebbbbottom{\tr@nslatebbbbottom\first@}
                 \innerloopcount=\triple@countbbbbottom
                 \advance\innerloopcount by 1
                 \ifnum\innerloopcount>3 \innerloopcount=1 \fi
                 \xdef\triple@countbbbbottom{\the\innerloopcount}
             \fi\fi
          \innerloopcount=\csname mol@weight\the\loopcount\endcsname
          \advance\innerloopcount by \csname \prefix@ mw\first@\endcsname
          \expandafter\xdef\csname mol@weight\the\loopcount\endcsname{%
                           \the\innerloopcount}
          \innerloopcount=\csname ch@rge\the\loopcount\endcsname
          \advance\innerloopcount by \csname pepcharge\first@\endcsname
          \expandafter\xdef\csname ch@rge\the\loopcount\endcsname{%
                           \the\innerloopcount}
         \else
          \ifnum\loopcount=\rule@num \xdef\ruler@{\ruler@ -} \fi
          \ifx\collect@valtop\yes
          \ifnum\v@lseqtop=\loopcount
             \xdef\v@ltop{\v@ltop,N}
          \fi\fi
          \ifx\collect@valttop\yes
          \ifnum\v@lseqttop=\loopcount
             \xdef\v@lttop{\v@lttop,N}
          \fi\fi
          \ifx\collect@valtttop\yes
          \ifnum\v@lseqtttop=\loopcount
             \xdef\v@ltttop{\v@ltttop,N}
          \fi\fi
          \ifx\collect@valttttop\yes
          \ifnum\v@lseqttttop=\loopcount
             \xdef\v@lttttop{\v@lttttop,N}
          \fi\fi
          \ifx\collect@valbottom\yes
          \ifnum\v@lseqbottom=\loopcount
             \xdef\v@lbottom{\v@lbottom,N}
          \fi\fi
          \ifx\collect@valbbottom\yes
          \ifnum\v@lseqbbottom=\loopcount
             \xdef\v@lbbottom{\v@lbbottom,N}
          \fi\fi
          \ifx\collect@valbbbottom\yes
          \ifnum\v@lseqbbbottom=\loopcount
             \xdef\v@lbbbottom{\v@lbbbottom,N}
          \fi\fi
          \ifx\collect@valbbbbottom\yes
          \ifnum\v@lseqbbbbottom=\loopcount
             \xdef\v@lbbbbottom{\v@lbbbbottom,N}
          \fi\fi
          \ifx\collect@restop\yes
          \ifnum\tr@nsseqtop=\loopcount
              \xdef\tr@nslatetop{\tr@nslatetop -}
          \fi\fi
          \ifx\collect@resttop\yes
          \ifnum\tr@nsseqttop=\loopcount
              \xdef\tr@nslatettop{\tr@nslatettop -}
          \fi\fi
          \ifx\collect@restttop\yes
          \ifnum\tr@nsseqtttop=\loopcount
              \xdef\tr@nslatetttop{\tr@nslatetttop -}
          \fi\fi
          \ifx\collect@resttttop\yes
          \ifnum\tr@nsseqttttop=\loopcount
              \xdef\tr@nslatettttop{\tr@nslatettttop -}
          \fi\fi
          \ifx\collect@resbottom\yes
          \ifnum\tr@nsseqbottom=\loopcount
              \xdef\tr@nslatebottom{\tr@nslatebottom -}
          \fi\fi
          \ifx\collect@resbbottom\yes
          \ifnum\tr@nsseqbbottom=\loopcount
              \xdef\tr@nslatebbottom{\tr@nslatebbottom -}
          \fi\fi
          \ifx\collect@resbbbottom\yes
          \ifnum\tr@nsseqbbbottom=\loopcount
              \xdef\tr@nslatebbbottom{\tr@nslatebbbottom -}
          \fi\fi
          \ifx\collect@resbbbbottom\yes
          \ifnum\tr@nsseqbbbbottom=\loopcount
              \xdef\tr@nslatebbbbottom{\tr@nslatebbbbottom -}
          \fi\fi
         \fi
    \ifnum\loopcount<\seq@count \repeat
         \ifx\collect@cons@graphtop\yes
                \outerloopcount=1\relax
                \temp@count=0\relax
                \sum@up@cons
                \xdef\v@ltop{\v@ltop,\cons@val}
         \fi
         \ifx\collect@cons@graphttop\yes
                \outerloopcount=1\relax
                \temp@count=0\relax
                \sum@up@cons
                \xdef\v@lttop{\v@lttop,\cons@val}
         \fi
         \ifx\collect@cons@graphtttop\yes
                \outerloopcount=1\relax
                \temp@count=0\relax
                \sum@up@cons
                \xdef\v@ltttop{\v@ltttop,\cons@val}
         \fi
         \ifx\collect@cons@graphttttop\yes
                \outerloopcount=1\relax
                \temp@count=0\relax
                \sum@up@cons
                \xdef\v@lttttop{\v@lttttop,\cons@val}
         \fi
         \ifx\collect@cons@graphbottom\yes
                \outerloopcount=1\relax
                \temp@count=0\relax
                \sum@up@cons
                \xdef\v@lbottom{\v@lbottom,\cons@val}
         \fi
         \ifx\collect@cons@graphbbottom\yes
                \outerloopcount=1\relax
                \temp@count=0\relax
                \sum@up@cons
                \xdef\v@lbbottom{\v@lbbottom,\cons@val}
         \fi
         \ifx\collect@cons@graphbbbottom\yes
                \outerloopcount=1\relax
                \temp@count=0\relax
                \sum@up@cons
                \xdef\v@lbbbottom{\v@lbbbottom,\cons@val}
         \fi
         \ifx\collect@cons@graphbbbbottom\yes
                \outerloopcount=1\relax
                \temp@count=0\relax
                \sum@up@cons
                \xdef\v@lbbbbottom{\v@lbbbbottom,\cons@val}
         \fi
         \ifx\collect@cons@colors\y@
                \outerloopcount=1\relax
                \temp@count=0\relax
                \sum@up@cons
                \outerloopcount=\cons@val
                \advance\outerloopcount by 4
                \divide\outerloopcount by 5
                \multiply\outerloopcount by 5
                \ifnum\outerloopcount<5\relax\outerloopcount=5\fi
                \xdef\c@nscol{\c@nscol\the\outerloopcount,}
         \fi
         \ifx\exp@rt\y@
             \ifx\seventh@\y@
                \outerloopcount=1\relax
                \temp@count=0\relax
                \sum@up@cons
                \outerloopcount=\cons@val
                \advance\outerloopcount by 4
                \divide\outerloopcount by 5
                \multiply\outerloopcount by 5
                \ifnum\outerloopcount<5\relax\outerloopcount=5\fi
                \xdef\seventh@{n}
                \immediate\write\exp@rtfile{\string color col\the\outerloopcount, resi \sixth@}
             \fi
         \fi

    \xdef\g@p{n}
    \ifregionalshadenow \calc@regshade \fi
    \ifregionaltintnow  \calc@regtint  \fi
    \ifregionalemphnow  \calc@regemph  \fi
    \ifregionallowernow \calc@reglower \fi
    \ifframenow         \calc@frame    \fi
    \ifshadingnow\iffuncmode\else\ifT@coffee\else   \calc@shading \fi\fi\fi
    \iftopfeaturenow       \xdef\bottop@{top}       \calc@feature \fi
    \ifttopfeaturenow      \xdef\bottop@{ttop}      \calc@feature \fi
    \iftttopfeaturenow     \xdef\bottop@{tttop}     \calc@feature \fi
    \ifttttopfeaturenow    \xdef\bottop@{ttttop}    \calc@feature \fi
    \ifbottomfeaturenow    \xdef\bottop@{bottom}    \calc@feature \fi
    \ifbbottomfeaturenow   \xdef\bottop@{bbottom}   \calc@feature \fi
    \ifbbbottomfeaturenow  \xdef\bottop@{bbbottom}  \calc@feature \fi
    \ifbbbbottomfeaturenow \xdef\bottop@{bbbbottom} \calc@feature \fi
    \ifnum\seq@count>1 \innerloopcount=1 \collect@similarity \fi
    \advance\pos@count by 1
     \ifshow@logo         \calc@logo     \fi
     \ifall@fshade \all@funcshade
     \else
      \ifT@coffee \T@coffee@shade
      \else
       \ifnum\cons@num>0 \loopcount=\cons@num \else \loopcount=\seq@count \fi
       \xdef\match@case{0} \xdef\m@x{1}
       \iffuncmode
          \xdef\prfx{\prefix@} \xdef\prefix@{func} \xdef\c@se{3} \check@sim
          \xdef\prefix@{\prfx}
       \else \xdef\c@se{1} \check@ident \fi
       \ifcase\match@case \unc@nserved \or \c@nserved \or \allm@tch \else \functi@nal \fi
      \fi
     \fi
     \ifnum\rule@num=0
         \ifx\g@p\y@
           \xdef\ruler@{\ruler@ -}
         \else
           \ifnum\cons@count=\rule@tens
              \expandafter\ifx\csname alt@ruler\rule@tens\endcsname\relax
                 \xdef\temp@{\rule@tens}
              \else
                 \xdef\temp@{\csname alt@ruler\rule@tens\endcsname}
              \fi
              \xdef\ruler@{\ruler@ !<\temp@>}
              \innerloopcount=\rule@tens \advance\innerloopcount by \ruler@step\relax
              \ifnum\innerloopcount=0
                 \ifx\allow@zero\n@ \innerloopcount=\ruler@step \fi
              \fi
              \xdef\rule@tens{\the\innerloopcount}
           \else
              \xdef\ruler@{\ruler@ -}
           \fi
           \expandafter\ifx\csname alt@ruler\the\cons@count\endcsname\relax
           \else
             \expandafter\xdef\csname alt@ruler\the\cons@count\endcsname{\the\cons@count}
           \fi
         \fi
     \fi
    \expandafter\ifnum\csname res@count\start@seq\endcsname<\end@num\relax
      \c@nsensus
    \else
      \global\stop@true
      \loopcount=\pos@count \advance\loopcount by -1 \relax
      \res@perline=\loopcount
      \iftopfeature       \xdef\bottop@{top}       \calc@feature \fi
      \ifttopfeature      \xdef\bottop@{ttop}      \calc@feature \fi
      \iftttopfeature     \xdef\bottop@{tttop}     \calc@feature \fi
      \ifttttopfeature    \xdef\bottop@{ttttop}    \calc@feature \fi
      \ifbottomfeature    \xdef\bottop@{bottom}    \calc@feature \fi
      \ifbbottomfeature   \xdef\bottop@{bbottom}   \calc@feature \fi
      \ifbbbottomfeature  \xdef\bottop@{bbbottom}  \calc@feature \fi
      \ifbbbbottomfeature \xdef\bottop@{bbbbottom} \calc@feature \fi
      \pos@count=0
    \fi
 \fi}

\def\prep@reexp@rtfile{
   \loopcount=0
   \loop
      \advance\loopcount by 5
      \immediate\write\exp@rtfile{\string set_color col\the\loopcount, \csname\c@nsc@l\the\loopcount\endcsname}
   \ifnum\loopcount>95\else\repeat
}

\def\c@unt{%
       \advance\loopcount by 1
       \ifT@coffee
          \xdef\seq@line{\csname T@coffee\the\loopcount\endcsname}
          \expandafter\TC@get\seq@line
       \fi
       \xdef\seq@line{\csname sequence\the\loopcount\endcsname}
       \expandafter\residue@get\seq@line
       \xdef\first@{\csname res\the\loopcount\endcsname}
       \expandafter\check@char\first@
       \ifletter
           \res@count=\csname res@count\the\loopcount\endcsname
           \advance\res@count by 1
           \ifnum\res@count=0
              \ifx\allow@zero\n@ \advance\res@count by 1 \fi
           \fi
           \ifx\dom@in\y@
              \xdef\temp@{\csname dom@num\the\loopcount\endcsname}
              \expandafter\get@dom@count\temp@
              \expandafter\xdef\csname dom@num\the\loopcount\endcsname{\temp@}
           \fi %%%%%%%%%%%*****
           \expandafter\xdef\csname res@count\the\loopcount\endcsname{\the\res@count}
           \ifnum\rule@num=\loopcount
              \temp@count=\csname res@count\the\loopcount\endcsname
              \advance\temp@count by \ruler@step
              \divide\temp@count by \ruler@step
              \multiply\temp@count by \ruler@step
              \xdef\rule@tens{\the\temp@count}
           \fi
       \fi
       \ifnum\loopcount<\seq@count \c@unt\fi}
\def\count@first{%
    \advance\end@count by 1
    \ifnum\end@count<\start@number
       \loopcount=0
       \ifT@coffee
          \xdef\seq@line{\csname T@coffee\the\loopcount\endcsname}
          \expandafter\TC@get\seq@line
       \fi
       \c@unt
       \count@first
    \fi}
\def\findc@nsensus{%
 \loopcount=0
 \loop
 \advance\loopcount by 1
    \expandafter\xdef\csname sequence\the\loopcount\endcsname{%
                     \csname sequence\the\loopcount\endcsname @}
 \ifnum\loopcount<\seq@count \repeat
 \end@count=0 \count@first \end@count=0 \xdef\start@number{0}
 \topfeaturenowfalse     \bottomfeaturenowfalse
 \ttopfeaturenowfalse    \bbottomfeaturenowfalse
 \tttopfeaturenowfalse   \bbbottomfeaturenowfalse
 \ttttopfeaturenowfalse  \bbbbottomfeaturenowfalse
 \innerloopcount=\cons@count
 \advance\innerloopcount by \res@perline \advance\innerloopcount by 1
 \loopcount=0
    \ifregionalshade
         \expandafter\ifx\csname start\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\the\loopcount\endcsname>%
            \innerloopcount
            \else
                  \regionalshadenowtrue
            \fi
         \fi
    \fi
    \ifregionaltint
         \expandafter\ifx\csname tintstart\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname tintstart\the\loopcount\endcsname>%
            \innerloopcount
            \else
                  \regionaltintnowtrue
            \fi
         \fi
    \fi
    \ifregionalemph
         \expandafter\ifx\csname emphstart\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname emphstart\the\loopcount\endcsname>%
            \innerloopcount
            \else
                  \regionalemphnowtrue
            \fi
         \fi
    \fi
    \ifregionallower
         \expandafter\ifx\csname lowerstart\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname lowerstart\the\loopcount\endcsname>%
            \innerloopcount
            \else
                  \regionallowernowtrue
            \fi
         \fi
    \fi
    \ifframe@
         \expandafter\ifx\csname framestart\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname framestart\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \framenowtrue
            \fi
         \fi
    \fi
    \ifshading@
         \expandafter\ifx\csname shadingstart\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname shadingstart\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \shadingnowtrue
            \fi
         \fi
    \fi
    \iftopfeature
       \xdef\bottop@{top}
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \topfeaturenowtrue
            \fi
         \fi
    \fi
    \ifttopfeature
       \xdef\bottop@{ttop}
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \ttopfeaturenowtrue
            \fi
         \fi
    \fi
    \iftttopfeature
       \xdef\bottop@{tttop}
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \tttopfeaturenowtrue
            \fi
         \fi
    \fi
    \ifttttopfeature
       \xdef\bottop@{ttttop}
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \ttttopfeaturenowtrue
            \fi
         \fi
    \fi
    \ifbottomfeature
       \xdef\bottop@{bottom}
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \bottomfeaturenowtrue
            \fi
         \fi
    \fi
    \ifbbottomfeature
       \xdef\bottop@{bbottom}
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \bbottomfeaturenowtrue
            \fi
         \fi
    \fi
    \ifbbbottomfeature
       \xdef\bottop@{bbbottom}
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \bbbottomfeaturenowtrue
            \fi
         \fi
    \fi
    \ifbbbbottomfeature
       \xdef\bottop@{bbbbottom}
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \bbbbottomfeaturenowtrue
            \fi
         \fi
    \fi
\loop
 \advance\loopcount by 1
    \ifnumbers@left
       \innerloopcount=\csname seq@len\the\loopcount\endcsname\relax
       \expandafter\ifnum\csname res@count\the\loopcount\endcsname=%
                   \innerloopcount
          \res@count=\innerloopcount
       \else
          \res@count=\csname res@count\the\loopcount\endcsname
          \advance\res@count by 1
          \ifnum\res@count=0
             \ifx\allow@zero\n@ \advance\res@count by 1 \fi
          \fi
       \fi
       \ifx\dom@in\y@
            \xdef\temp@{\csname dom@num\the\loopcount\endcsname}
            \expandafter\get@dom@count\temp@
            \expandafter\xdef\csname dom@num\the\loopcount\endcsname{\the\res@count,\temp@}
       \fi         %%%%%%%%%%*****
       \expandafter\xdef\csname res@count\the\loopcount\endcsname{\the\res@count}
       \ifnames@right
          \expandafter\xdef\csname seq\the\loopcount\endcsname{%
              \csname res@count\the\loopcount\endcsname)}
       \else
          \expandafter\xdef\csname seq\the\loopcount\endcsname{%
              <\csname newseqname\the\loopcount\endcsname>
              \csname res@count\the\loopcount\endcsname)}
       \fi
       \ifx\dom@in\y@
       \else
          \expandafter\ifnum\csname res@count\the\loopcount\endcsname=%
                      \innerloopcount
          \else
             \res@count=\csname res@count\the\loopcount\endcsname
             \advance\res@count by -1
             \ifnum\res@count=0
                \ifx\allow@zero\n@ \advance\res@count by -1 \fi
             \fi
         \expandafter\xdef\csname res@count\the\loopcount\endcsname{\the\res@count}
          \fi
       \fi
    \else
       \ifnames@right
          \expandafter\xdef\csname seq\the\loopcount\endcsname{}
       \else
          \expandafter\xdef\csname seq\the\loopcount\endcsname{%
              <\csname newseqname\the\loopcount\endcsname>}
       \fi
    \fi
    \ifx\dom@in\y@
         \xdef\temp@{\csname dom@num@break\the\loopcount\endcsname}
         \expandafter\get@dom@count\temp@
         \expandafter\xdef\csname dom@num@break\the\loopcount\endcsname{\temp@}
         \innerloopcount=\res@count
    \else
         \innerloopcount=\csname res@count\the\loopcount\endcsname
         \advance\innerloopcount by \res@perline
    \fi
    \advance\innerloopcount by 1
    \ifregionalshade
         \expandafter\ifx\csname start\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \regionalshadenowtrue
            \fi
         \fi
    \fi
    \ifregionaltint
         \expandafter\ifx\csname tintstart\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname tintstart\the\loopcount\endcsname>%
            \innerloopcount
            \else
                  \regionaltintnowtrue
            \fi
         \fi
    \fi
    \ifregionalemph
         \expandafter\ifx\csname emphstart\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname emphstart\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \regionalemphnowtrue
            \fi
         \fi
    \fi
    \ifregionallower
         \expandafter\ifx\csname lowerstart\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname lowerstart\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \regionallowernowtrue
            \fi
         \fi
    \fi
    \ifframe@
         \expandafter\ifx\csname framestart\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname framestart\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \framenowtrue
            \fi
         \fi
    \fi
    \ifshading@
         \expandafter\ifx\csname shadingstart\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname shadingstart\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \shadingnowtrue
            \fi
         \fi
    \fi
    \iftopfeature
       \xdef\bottop@{top}
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \topfeaturenowtrue
            \fi
         \fi
    \fi
    \ifttopfeature
       \xdef\bottop@{ttop}
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \ttopfeaturenowtrue
            \fi
         \fi
    \fi
    \iftttopfeature
       \xdef\bottop@{tttop}
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \tttopfeaturenowtrue
            \fi
         \fi
    \fi
    \ifttttopfeature
       \xdef\bottop@{ttttop}
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \ttttopfeaturenowtrue
            \fi
         \fi
    \fi
    \ifbottomfeature
       \xdef\bottop@{bottom}
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \bottomfeaturenowtrue
            \fi
         \fi
    \fi
    \ifbbottomfeature
       \xdef\bottop@{bbottom}
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \bbottomfeaturenowtrue
            \fi
         \fi
    \fi
    \ifbbbottomfeature
       \xdef\bottop@{bbbottom}
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \bbbottomfeaturenowtrue
            \fi
         \fi
    \fi
    \ifbbbbottomfeature
       \xdef\bottop@{bbbbottom}
         \expandafter\ifx\csname start\bottop@\the\loopcount\endcsname\ampers@nd
         \else
            \expandafter\ifnum\csname start\bottop@\the\loopcount\endcsname>%
            \innerloopcount
            \else
               \bbbbottomfeaturenowtrue
            \fi
         \fi
    \fi
\ifnum\loopcount<\seq@count \repeat
 \c@nsensus}

%%%%%  Output routines

\def\white@box{%
   \bgroup
   \fboxsep-0.5pt\fboxrule0.5pt
   \fcolorbox{Black}{White}{\box@hstrut\box@wstrut}\egroup}
\def\box@rule{\vrule depth\box@depth height\box@height width\box@width}
\def\box@hstrut{\vrule depth\box@depth height\box@height width 0pt}
\def\box@wstrut{\vrule depth 0pt height 0pt width\box@width}
\def\do@legend{%
      \baselineskip=1.2\baselineskip
      \xdef\first@{White}
      \fontfamily{\legend@family}%
      \fontseries{\legend@series}%
      \fontshape{\legend@shape}%
      \ifT@coffee
         \noindent%
         \ifnames@\ifnames@right\else\hbox to \name@width{\hss}\fi\fi%
         \ifnumbers@\ifnumbers@left\hbox to \number@width{\hss}\fi\fi%
     \hbox to \hspace@legend{\hss}%
         \def\res@@style{\csname no@style\endcsname}%
         \def\temp@{X}\xdef\low@up{lower}%
         \expandafter\ifx\csname n@m@tch\the\loopcount\endcsname\low@up%
         \def\temp@{x}\fi%
         \ifhidechar\xdef\temp@{}\fi%
         \textcolor{TC0}{\box@rule}%
         \kern-\box@width\textcolor{Black}{\hbox to \box@width{%
               \legend@size{\res@@style{\hss\temp@\hss}}}}%
         \kern2ex\textcolor{\legend@fg}{%
         \ifgerm@n\kern2ex\legend@size{schlecht}%
         \else\ifsp@nish\kern2ex\legend@size{mala}%
         \else\kern2ex\legend@size{bad}\fi\fi}
         \newline\hbox{}%
         \noindent%
         \ifnames@\ifnames@right\else\hbox to \name@width{\hss}\fi\fi%
         \ifnumbers@\ifnumbers@left\hbox to \number@width{\hss}\fi\fi%
     \hbox to \hspace@legend{\hss}%
         \textcolor{TC1}{\box@rule}%
         \kern-\box@width\textcolor{Black}{\hbox to \box@width{%
               \legend@size{\res@@style{\hss\temp@\hss}}}}%
         \kern2ex\textcolor{\legend@fg}{\legend@size{}}
         \newline\hbox{}%
         \noindent%
         \ifnames@\ifnames@right\else\hbox to \name@width{\hss}\fi\fi%
         \ifnumbers@\ifnumbers@left\hbox to \number@width{\hss}\fi\fi%
     \hbox to \hspace@legend{\hss}%
         \textcolor{TC2}{\box@rule}%
         \kern-\box@width\textcolor{Black}{\hbox to \box@width{%
               \legend@size{\res@@style{\hss\temp@\hss}}}}%
         \kern2ex\textcolor{\legend@fg}{\legend@size{}}
         \newline\hbox{}%
         \noindent%
         \ifnames@\ifnames@right\else\hbox to \name@width{\hss}\fi\fi%
         \ifnumbers@\ifnumbers@left\hbox to \number@width{\hss}\fi\fi%
     \hbox to \hspace@legend{\hss}%
         \textcolor{TC3}{\box@rule}%
         \kern-\box@width\textcolor{Black}{\hbox to \box@width{%
               \legend@size{\res@@style{\hss\temp@\hss}}}}%
         \kern2ex\textcolor{\legend@fg}{\legend@size{}}
         \newline\hbox{}%
         \noindent%
         \ifnames@\ifnames@right\else\hbox to \name@width{\hss}\fi\fi%
         \ifnumbers@\ifnumbers@left\hbox to \number@width{\hss}\fi\fi%
     \hbox to \hspace@legend{\hss}%
         \textcolor{TC4}{\box@rule}%
         \kern-\box@width\textcolor{Black}{\hbox to \box@width{%
               \legend@size{\res@@style{\hss\temp@\hss}}}}%
         \kern2ex\textcolor{\legend@fg}{%
         \ifgerm@n\kern2ex\legend@size{Grad der}%
         \else\ifsp@nish\kern2ex\legend@size{conservaci\'on}%
         \else\kern2ex\legend@size{level of}\fi\fi}
         \newline\hbox{}%
         \noindent%
         \ifnames@\ifnames@right\else\hbox to \name@width{\hss}\fi\fi%
         \ifnumbers@\ifnumbers@left\hbox to \number@width{\hss}\fi\fi%
     \hbox to \hspace@legend{\hss}%
         \textcolor{TC5}{\box@rule}%
         \kern-\box@width\textcolor{Black}{\hbox to \box@width{%
               \legend@size{\res@@style{\hss\temp@\hss}}}}%
         \kern2ex\textcolor{\legend@fg}{%
         \ifgerm@n\kern2ex\legend@size{Konservierung}%
         \else\ifsp@nish\kern2ex\legend@size{}%
         \else\kern2ex\legend@size{conservation}\fi\fi}
         \newline\hbox{}%
         \noindent%
         \ifnames@\ifnames@right\else\hbox to \name@width{\hss}\fi\fi%
         \ifnumbers@\ifnumbers@left\hbox to \number@width{\hss}\fi\fi%
     \hbox to \hspace@legend{\hss}%
         \textcolor{TC6}{\box@rule}%
         \kern-\box@width\textcolor{Black}{\hbox to \box@width{%
               \legend@size{\res@@style{\hss\temp@\hss}}}}%
         \kern2ex\textcolor{\legend@fg}{\legend@size{}}
         \newline\hbox{}%
         \noindent%
         \ifnames@\ifnames@right\else\hbox to \name@width{\hss}\fi\fi%
         \ifnumbers@\ifnumbers@left\hbox to \number@width{\hss}\fi\fi%
     \hbox to \hspace@legend{\hss}%
         \textcolor{TC7}{\box@rule}%
         \kern-\box@width\textcolor{Black}{\hbox to \box@width{%
               \legend@size{\res@@style{\hss\temp@\hss}}}}%
         \kern2ex\textcolor{\legend@fg}{\legend@size{}}
         \newline\hbox{}%
         \noindent%
         \ifnames@\ifnames@right\else\hbox to \name@width{\hss}\fi\fi%
         \ifnumbers@\ifnumbers@left\hbox to \number@width{\hss}\fi\fi%
     \hbox to \hspace@legend{\hss}%
         \textcolor{TC8}{\box@rule}%
         \kern-\box@width\textcolor{Black}{\hbox to \box@width{%
               \legend@size{\res@@style{\hss\temp@\hss}}}}%
         \kern2ex\textcolor{\legend@fg}{\legend@size{}}
         \newline\hbox{}%
         \noindent%
         \ifnames@\ifnames@right\else\hbox to \name@width{\hss}\fi\fi%
         \ifnumbers@\ifnumbers@left\hbox to \number@width{\hss}\fi\fi%
     \hbox to \hspace@legend{\hss}%
         \textcolor{TC9}{\box@rule}%
         \kern-\box@width\textcolor{Black}{\hbox to \box@width{%
               \legend@size{\res@@style{\hss\temp@\hss}}}}%
         \kern2ex\textcolor{\legend@fg}{%
         \ifgerm@n\kern2ex\legend@size{gut}%
         \else\ifsp@nish\kern2ex\legend@size{buena}%
         \else\kern2ex\legend@size{good}\fi\fi}
         \newline\hbox{}%
      \else
      \iffuncmode
        \ifnum\fgroup@num>0
         \loopcount=0
         \loop
         \advance\loopcount by 1
         \xdef\third@{\csname fg@color\the\loopcount\endcsname}%
         \noindent%
         \ifnames@\ifnames@right\else\hbox to \name@width{\hss}\fi\fi%
         \ifnumbers@\ifnumbers@left\hbox to \number@width{\hss}\fi\fi%
 \hbox to \hspace@legend{\hss}%
         \ifx\third@\first@\white@box\else\textcolor{\third@}{\box@rule}\fi%
         \xdef\third@{\csname fg@textcolor\the\loopcount\endcsname}%
         \def\res@@style{\csname func@style\the\loopcount\endcsname}%
         \def\temp@{X}\xdef\low@up{lower}%
         \expandafter\ifx\csname funcm@tch\the\loopcount\endcsname\low@up%
         \def\temp@{x}\fi%
         \ifhidechar\xdef\temp@{}\fi%
         \kern-\box@width\textcolor{\third@}{\hbox to \box@width{%
               \legend@size{\res@@style{\hss\temp@\hss}}}}%
         \kern2ex\textcolor{\legend@fg}{%
         \legend@size{\csname fgroup@name\the\loopcount\endcsname}}
         \newline\hbox{}%
         \ifnum\loopcount<\fgroup@num \repeat
        \fi
      \else
         \noindent
         \ifnames@\ifnames@right\else\hbox to \name@width{\hss}\fi\fi%
         \ifnumbers@\ifnumbers@left \hbox to \number@width{\hss}\fi\fi%
 \hbox to \hspace@legend{\hss}%
         \ifx\Nomatch\first@\white@box\else\textcolor{\Nomatch}{\box@rule}\fi%
         \def\res@@style{\csname no@style\endcsname}%
         \def\temp@{X}\xdef\low@up{lower}\ifx\resn@m@tch\low@up\def\temp@{x}\fi%
         \ifhidechar\xdef\temp@{}\fi%
         \kern-\box@width\textcolor{\TextNomatch}{\hbox to \box@width{%
               \legend@size{\res@@style{\hss\temp@\hss}}}}%
         \textcolor{\legend@fg}{%
         \ifgerm@n\kern2ex\legend@size{nicht konserviert}%
         \else\ifsp@nish\kern2ex\legend@size{no conservado}%
         \else\kern2ex\legend@size{non conserved}\fi\fi}
         \newline\hbox{}\noindent%
         \ifsimmode%
         \ifnames@\ifnames@right\else\hbox to \name@width{\hss}\fi\fi
         \ifnumbers@\ifnumbers@left \hbox to \number@width{\hss}\fi\fi
 \hbox to \hspace@legend{\hss}%
         \ifx\Similar\first@\white@box\else\textcolor{\Similar}{\box@rule}\fi
         \def\res@@style{\csname sim@style\endcsname}%
         \def\temp@{X}\xdef\low@up{lower}\ifx\ressimm@tch\low@up\def\temp@{x}\fi%
         \ifhidechar\xdef\temp@{}\fi%
         \kern-\box@width\textcolor{\TextSimilar}{\hbox to \box@width{%
               \legend@size{\res@@style{\hss\temp@\hss}}}}%
         \textcolor{\legend@fg}{%
         \ifgerm@n\kern2ex\legend@size{\"ahnlich}%
         \else\ifsp@nish\kern2ex\legend@size{similar}%
         \else\kern2ex\legend@size{similar}\fi\fi}
         \newline\hbox{}\noindent%
         \fi%
         \ifnames@\ifnames@right\else\hbox to \name@width{\hss}\fi\fi
         \ifnumbers@\ifnumbers@left \hbox to \number@width{\hss}\fi\fi
 \hbox to \hspace@legend{\hss}%
         \ifx\Identical\first@\white@box\else\textcolor{\Identical}{\box@rule}\fi
         \def\res@@style{\csname id@style\endcsname}%
         \def\temp@{X}\xdef\low@up{lower}\ifx\resm@tch\low@up\def\temp@{x}\fi%
         \ifhidechar\xdef\temp@{}\fi%
         \kern-\box@width\textcolor{\TextIdentical}{\hbox to \box@width{%
               \legend@size{\res@@style{\hss\temp@\hss}}}}%
         \textcolor{\legend@fg}{%
         \ifgerm@n\kern2ex\legend@size{$\ge$\,\thresh@ld\% konserviert}%
         \else\ifsp@nish\kern2ex\legend@size{$\ge$\,\thresh@ld\% conservado}%
         \else\kern2ex\legend@size{$\ge$\,\thresh@ld\% conserved}\fi\fi}
         \newline\hbox{}\noindent%
         \ifall@shade%
         \ifnames@\ifnames@right\else\hbox to \name@width{\hss}\fi\fi
         \ifnumbers@\ifnumbers@left \hbox to \number@width{\hss}\fi\fi
 \hbox to \hspace@legend{\hss}%
         \ifx\Allmatch\first@\white@box\else\textcolor{\Allmatch}{\box@rule}\fi
         \def\res@@style{\csname all@style\endcsname}%
         \def\temp@{X}\xdef\low@up{lower}\ifx\res@llm@tch\low@up\def\temp@{x}\fi%
         \ifhidechar\xdef\temp@{}\fi%
         \kern-\box@width\textcolor{\TextAllmatch}{\hbox to \box@width{%
               \legend@size{\res@@style{\hss\temp@\hss}}}}%
         \ifnum\all@thresh@ld=100
         \textcolor{\legend@fg}{%
         \ifgerm@n\kern2ex\legend@size{alle identisch}%
         \else\ifsp@nish\kern2ex\legend@size{todos id\'enticos}%
         \else\kern2ex\legend@size{all match}\fi\fi}
         \else
         \textcolor{\legend@fg}{%
         \ifgerm@n\kern2ex\legend@size{$\ge$\,\all@thresh@ld\% konserviert}%
         \else\ifsp@nish\kern2ex\legend@size{$\ge$\,\all@thresh@ld\% conservado}%
         \else\kern2ex\legend@size{$\ge$\,\all@thresh@ld\% conserved}\fi\fi}
         \fi
         \newline\hbox{}\noindent
         \fi
      \fi
      \fi
}
\def\put@name<#1>#2@{%
   \ifnames@%
   \expandafter\ifx\csname hide@name\the\loopcount\endcsname\yes%
      \xdef\temp@{}\else\xdef\temp@{#1}\fi%
   \expandafter\ifx\csname name@col\the\loopcount\endcsname\yes%
           \def\second@{\names@fg}%
      \else\def\second@{\csname name@col\the\loopcount\endcsname}\fi%
   \fontfamily{\namestext@family}%
   \fontseries{\namestext@series}%
   \fontshape{\namestext@shape}%
   \selectfont%
   \textcolor{\second@}{%
   \hbox to \name@width{\@kern\namestext@size{\temp@}\hss}}\fi%
   \xdef\first@{#2@}%
}
\def\put@number#1)#2@{%
   \ifnumbers@%
   \expandafter\ifx\csname hide@number\the\loopcount\endcsname\yes%
      \xdef\temp@{}\else\xdef\temp@{#1}\fi%
   \expandafter\ifx\csname number@col\the\loopcount\endcsname\yes%
           \def\second@{\numbering@fg}%
      \else\def\second@{\csname number@col\the\loopcount\endcsname}\fi%
   \fontfamily{\numbertext@family}%
   \fontseries{\numbertext@series}%
   \fontshape{\numbertext@shape}%
   \selectfont%
   \textcolor{\second@}{%
   \hbox to \number@width{\hss\numbertext@size{\temp@}\@kern}}\fi%
   \xdef\first@{#2@}%
}
\def\special@shading#1)#2#3#4@{%
   \xdef\second@{@\second@#1}%
   \xdef\third@{\second@}%
   \xdef\first@{#4@}%
   \xdef\second@{#3}%
   \xdef\last@{#2}%
    \def\res@@style{\csname relax\endcsname}%
}
\def\special@shade#1)#2#3#4@{%
   \xdef\second@{\second@#1}%
   \xdef\boxc@l@r{\csname bgseqregion\second@\endcsname}%
   \xdef\textc@l@r{\csname fgseqregion\second@\endcsname}%
   \xdef\first@{#4@}%
   \xdef\second@{#3}%
    \def\res@@style{\csname relax\endcsname}%
}
\def\get@second@#1#2@{\xdef\second@{#1}\xdef\first@{#2@}}
\def\next@char#1#2#3@{%
   \xdef\first@{#3@}%
   \xdef\second@{#2}%
   \xdef\last@{#1}%
   \xdef\temp@@{}%
   \xdef\third@{}%
   \ifx\last@\p@r@gr@ph\expandafter\special@shading\first@\fi%
   \ifx\last@\ampers@nd\def\last@{0}\expandafter\special@shade\first@%
   \else%
   \ifT@coffee%
         \xdef\boxc@l@r{\csname fg@color#1\endcsname}%
         \xdef\textc@l@r{\csname fg@textcolor#1\endcsname}%
         \def\res@@style{\csname func@style#1\endcsname}%
         \if\last@ *\def\last@{0}\fi
         \if\last@ /\def\last@{10}\fi
         \if\last@ !\def\last@{11}\fi
   \else%
   \iffuncmode%
         \xdef\boxc@l@r{\csname fg@color#1\endcsname}%
         \xdef\textc@l@r{\csname fg@textcolor#1\endcsname}%
         \def\res@@style{\csname func@style#1\endcsname}%
         \if\last@ *\def\last@{0}\fi
         \if\last@ /\def\last@{10}\fi
         \if\last@ !\def\last@{11}\fi
   \else%
   \ifcase\last@\xdef\boxc@l@r{\csname Allmatch\third@\endcsname}%
             \xdef\textc@l@r{\csname TextAllmatch\third@\endcsname}%
             \def\res@@style{\all@style}%
         \or\xdef\boxc@l@r{\csname Identical\third@\endcsname}%
            \xdef\textc@l@r{\csname TextIdentical\third@\endcsname}%
             \def\res@@style{\id@style}%
         \or\xdef\boxc@l@r{\csname Similar\third@\endcsname}%
            \xdef\textc@l@r{\csname TextSimilar\third@\endcsname}%
             \def\res@@style{\sim@style}%
         \or\xdef\boxc@l@r{\csname Nomatch\third@\endcsname}%
            \xdef\textc@l@r{\csname TextNomatch\third@\endcsname}%
             \def\res@@style{\no@style}%
         \or\xdef\boxc@l@r{\csname ConsNomatch\third@\endcsname}%
            \xdef\textc@l@r{\csname ConsTextNomatch\third@\endcsname}%
             \def\res@@style{\csname relax\endcsname}%
         \or\xdef\boxc@l@r{\csname ConsMatch\third@\endcsname}%
            \xdef\textc@l@r{\csnam ConsTextMatch\third@\endcsname}%
             \def\res@@style{\csname relax\endcsname}%
         \or\xdef\boxc@l@r{\csname ConsAllmatch\third@\endcsname}%
            \xdef\textc@l@r{\csname ConsTextAllmatch\third@\endcsname}%
             \def\res@@style{\csname relax\endcsname}%
         \or\xdef\boxc@l@r{\csname gap@bg\third@\endcsname}%
            \xdef\textc@l@r{\csname gap@fg\third@\endcsname}%
             \def\res@@style{\csname relax\endcsname}%
         \or\xdef\boxc@l@r{White}\xdef\textc@l@r{White}%
             \def\res@@style{\csname relax\endcsname}%
         \else\xdef\boxc@l@r{\csname domgap@bg\endcsname}%
              \xdef\textc@l@r{\csname domgap@fg\endcsname}%
             \def\res@@style{\csname relax\endcsname}%
   \fi\fi\fi\fi%
   \ifx\second@\comm@%
         \def\temp@{\res@style}%
         \expandafter\get@second@\first@%
   \else%
         \def\temp@{\csname relax\endcsname}%
   \fi%
   \ifx\second@\equ@l%
         \xdef\temp@@{\light@}%
         \expandafter\get@second@\first@%
   \fi%
   \ifx\second@\semic@n%
         \expandafter\get@second@\first@%
         \xdef\first@@{\first@}%
         \xdef\first@{\second@}%
         \make@lower%
         \xdef\second@{\first@}%
         \xdef\first@{\first@@}%
   \fi%
   \textcolor{\temp@@\boxc@l@r}{\box@rule}%
   \ifhidechar%
      \ifx\second@\o@%
         \def\second@{\gap@rule}%
         \hbox to -\box@width{\hss\textcolor{\temp@@\textc@l@r}%
                             {\residues@size{\res@@style{\temp@{\second@}}}}\hss}%
                              \kern\box@width%
      \fi%
   \else%
   \ifx\second@\o@\def\second@{\gap@rule}\fi%
   \hbox to -\box@width{\hss\textcolor{\temp@@\textc@l@r}%
                       {\residues@size{\res@@style{\temp@{\second@}}}}\hss}%
                        \kern\box@width\fi%
}
\def\put@char{%
   \ifnum\innerloopcount>\res@perline
   \else
      \expandafter\next@char\first@
      \advance\innerloopcount by 1
      \put@char%
   \fi}
\def\next@cons#1#2#3@{%
   \xdef\last@{#1}%
   \xdef\third@{}%
   \ifx\last@\p@r@gr@ph\expandafter\special@shading\first@\fi%
   \ifx\last@\ampers@nd\def\last@{0}\expandafter\special@shade\first@%
   \else%
   \ifx\collect@cons@colors\y@%
      \if\last@ *%
         \xdef\boxc@l@r{\gap@bg}\xdef\textc@l@r{\gap@bg}%
      \else%
      \if\last@ !%
         \xdef\boxc@l@r{\domgap@bg}\xdef\textc@l@r{\domgap@bg}%
      \else%
      \if\last@ /%
         \xdef\boxc@l@r{White}\xdef\textc@l@r{White}%
      \else%
      \expandafter\get@item\first@@@%
      \xdef\first@@@{\first@}%
      \ifx\box@scale\y@%
         \xdef\boxc@l@r{\c@nssc@le\fourth@}%
      \else%
         \xdef\first@{T-Coffee}%
         \ifx\first@\c@nssc@le%
            \xdef\boxc@l@r{TC\last@}%
         \else
            \xdef\boxc@l@r{\c@nssc@le}%
         \fi%
      \fi%
      \ifx\text@scale\y@%
         \xdef\textc@l@r{\c@nsc@l\fourth@}%
      \else%
         \xdef\first@{T-Coffee}%
         \ifx\first@\c@nsc@l%
            \xdef\textc@l@r{TC\last@}%
         \else
            \xdef\textc@l@r{\c@nsc@l}%
         \fi%
      \fi\fi\fi\fi%
      \def\res@@style{\csname relax\endcsname}%
   \else%
   \ifT@coffee%
      \if\last@ *%
         \xdef\boxc@l@r{\gap@bg}\xdef\textc@l@r{\gap@bg}%
      \else%
         \if\last@ !%
            \xdef\boxc@l@r{\domgap@bg}\xdef\textc@l@r{\domgap@bg}%
         \else%
            \if\last@ /%
               \xdef\boxc@l@r{White}\xdef\textc@l@r{White}%
            \else%
               \xdef\boxc@l@r{White}\xdef\textc@l@r{TC\last@}%
               \def\res@@style{\csname relax\endcsname}%
            \fi
         \fi%
      \fi%
   \else%
   \ifcase#1\xdef\boxc@l@r{\csname Allmatch\third@\endcsname}%
            \xdef\textc@l@r{\csname TextAllmatch\third@\endcsname}%
             \def\res@@style{\all@style}%
         \or\xdef\boxc@l@r{\csname Identical\third@\endcsname}%
            \xdef\textc@l@r{\csname TextIdentical\third@\endcsname}%
             \def\res@@style{\id@style}%
         \or\xdef\boxc@l@r{\csname Similar\third@\endcsname}%
            \xdef\textc@l@r{\csname TextSimilar\third@\endcsname}%
             \def\res@@style{\sim@style}%
         \or\xdef\boxc@l@r{\csname Nomatch\third@\endcsname}%
            \xdef\textc@l@r{\csname TextNomatch\third@\endcsname}%
             \def\res@@style{\no@style}%
         \or\xdef\boxc@l@r{\ConsNomatch}\xdef\textc@l@r{\ConsTextNomatch}%
             \def\res@@style{\csname relax\endcsname}%
         \or\xdef\boxc@l@r{\ConsMatch}\xdef\textc@l@r{\ConsTextMatch}%
             \def\res@@style{\csname relax\endcsname}%
         \or\xdef\boxc@l@r{\ConsAllmatch}\xdef\textc@l@r{\ConsTextAllmatch}%
             \def\res@@style{\csname relax\endcsname}%
         \or\xdef\boxc@l@r{\gap@bg}\xdef\textc@l@r{\gap@fg}%
             \def\res@@style{\csname relax\endcsname}%
         \or\xdef\boxc@l@r{White}\xdef\textc@l@r{White}%
             \def\res@@style{\csname relax\endcsname}%
         \else\xdef\boxc@l@r{\domgap@bg}\xdef\textc@l@r{\domgap@fg}%
             \def\res@@style{\csname relax\endcsname}%
   \fi\fi\fi\fi%
   \xdef\first@{#3@}%
   \xdef\second@{#2}%
   \ifx\second@\comm@%
         \def\temp@{\res@style}%
         \expandafter\get@second@\first@%
   \else%
         \def\temp@{\csname relax\endcsname}%
   \fi%
   \ifx\second@\semic@n%
         \expandafter\get@second@\first@%
         \xdef\first@@{\first@}%
         \xdef\first@{\second@}%
         \make@lower%
         \xdef\second@{\first@}%
         \xdef\first@{\first@@}%
   \fi%
   \textcolor{\boxc@l@r}{\box@rule}%
   \ifhidechar%
      \ifx\second@\o@%
         \def\second@{\gap@rule}%
         \hbox to -\box@width{\hss\textcolor{\textc@l@r}%
                             {\residues@size{\res@@style{\temp@{\second@}}}}\hss}%
                              \kern\box@width%
      \fi%
   \else%
   \ifx\second@\o@\def\second@{\gap@rule}\fi%
   \hbox to -\box@width{\hss\textcolor{\textc@l@r}%
                       {\residues@size{\res@@style{\temp@{\second@}}}}\hss}%
                        \kern\box@width\fi%
}
\def\put@cons{%
   \ifnum\innerloopcount>\res@perline
   \else
      \expandafter\next@cons\first@
      \advance\innerloopcount by 1
      \put@cons%
   \fi}
\def\put@line{%
   \ifnames@right\else\def\@kern{\kern0em}\expandafter\put@name\first@\fi
   \ifnumbers@left\def\@kern{\kern1em}\expandafter\put@number\first@\fi
   \fontfamily{\residues@family}%
   \fontseries{\residues@series}%
   \fontshape{\residues@shape}%
   \selectfont%
   \ifx\cons@now\y@%
      \innerloopcount=1\relax\put@cons%
   \else
      \innerloopcount=1\relax\put@char%
   \fi
   \ifnumbers@right\def\@kern{\kern0em}\expandafter\put@number\first@\fi
   \ifnames@right\def\@kern{\kern1em}\expandafter\put@name\first@\fi
   \newline\hbox{}%
}

\def\set@consensus{%
      \ifnames@right
        \ifnumbers@left
          \ifnumbers@right
           \xdef\consensus{)\consensus)<\cons@name>}%
          \else
           \xdef\consensus{)\consensus<\cons@name>}%
          \fi
        \else
           \xdef\consensus{\consensus)<\cons@name>}%
        \fi
      \else
        \ifnumbers@left
          \ifnumbers@right
           \xdef\consensus{<\cons@name>)\consensus)}%
          \else
           \xdef\consensus{<\cons@name>)\consensus}%
          \fi
        \else
           \xdef\consensus{<\cons@name>\consensus)}%
        \fi
      \fi}

\def\get@rulenum<#1>#2@{%
   \xdef\first@{#2@}%
   \xdef\fill@char{#1[,]&}%
   \expandafter\opt@color\fill@char%
   \ifx\f@color\comm@\xdef\f@color{\ruler@fg}\fi%
   \ifcase\rule@top
     \ifnum\ruler@rot=0 %
      \xdef\temp@{tt}%
      \ifx\ruler@family\temp@%
         \def\third@{\bottomruler@size\ensuremath{\,\stackrel{\mathtt{\fourth@}}{\textcolor{\ruler@fg}{.}}}}%
      \else
      \xdef\temp@{sf}%
      \ifx\ruler@family\temp@%
         \def\third@{\bottomruler@size\ensuremath{\,\stackrel{\mathsf{\fourth@}}{\textcolor{\ruler@fg}{.}}}}%
      \else
      \xdef\temp@{rm}%
      \ifx\ruler@family\temp@%
         \def\third@{\bottomruler@size\ensuremath{\,\stackrel{\mathrm{\fourth@}}{\textcolor{\ruler@fg}{.}}}}%
      \fi\fi\fi
     \else
      \xdef\temp@{tt}%
      \ifx\ruler@family\temp@%
         \def\third@{\tt\bottomruler@size\,\,\,\,%
           \begin{rotopo}{90}\hbox to \ruler@width{\,\textcolor{\ruler@fg}{\ensuremath{\cdot}}\,\fourth@\hss}\end{rotopo}}%
      \else
      \xdef\temp@{sf}%
      \ifx\ruler@family\temp@%
         \def\third@{\sf\bottomruler@size\,\,\,\,%
           \begin{rotopo}{90}\hbox to \ruler@width{\,\textcolor{\ruler@fg}{\ensuremath{\cdot}}\,\fourth@\hss}\end{rotopo}}%
      \else
      \xdef\temp@{rm}%
      \ifx\ruler@family\temp@%
         \def\third@{\rm\bottomruler@size\,\,\,\,%
           \begin{rotopo}{90}\hbox to \ruler@width{\,\textcolor{\ruler@fg}{\ensuremath{\cdot}}\,\fourth@\hss}\end{rotopo}}%
      \fi\fi\fi
     \fi
   \else
     \ifnum\ruler@rot=0 %
      \xdef\temp@{tt}%
      \ifx\ruler@family\temp@%
         \def\third@{\bottomruler@size\ensuremath{\,\stackrel{\textcolor{\ruler@fg}{.}}{\mathtt{\fourth@}}}}%
      \else
      \xdef\temp@{sf}%
      \ifx\ruler@family\temp@%
         \def\third@{\bottomruler@size\ensuremath{\,\stackrel{\textcolor{\ruler@fg}{.}}{\mathsf{\fourth@}}}}%
      \else
      \xdef\temp@{rm}%
      \ifx\ruler@family\temp@%
         \def\third@{\bottomruler@size\ensuremath{\,\stackrel{\textcolor{\ruler@fg}{.}}{\mathrm{\fourth@}}}}%
      \fi\fi\fi
     \else
      \xdef\temp@{tt}%
      \ifx\ruler@family\temp@%
         \def\third@{\tt\bottomruler@size\,\,\,\,%
           \begin{rotopo}{90}\hbox to \ruler@width{\hss\fourth@\,\textcolor{\ruler@fg}{\ensuremath{\cdot}}}\end{rotopo}}%
      \else
      \xdef\temp@{sf}%
      \ifx\ruler@family\temp@%
         \def\third@{\sf\bottomruler@size\,\,\,\,%
           \begin{rotopo}{90}\hbox to \ruler@width{\hss\fourth@\,\textcolor{\ruler@fg}{\ensuremath{\cdot}}}\end{rotopo}}%
      \else
      \xdef\temp@{rm}%
      \ifx\ruler@family\temp@%
         \def\third@{\rm\bottomruler@size\,\,\,\,%
           \begin{rotopo}{90}\hbox to \ruler@width{\hss\fourth@\,\textcolor{\ruler@fg}{\ensuremath{\cdot}}}\end{rotopo}}%
      \fi\fi\fi
     \fi
   \fi}

\def\next@rulechar#1#2@{%
   \xdef\third@{#1}%
   \xdef\first@{#2@}%
   \xdef\second@{!}%
   \ifx\third@\second@ \expandafter\get@rulenum\first@%
   \else \xdef\third@{}\xdef\f@color{Black}\fi
   \textcolor{\f@color}{\hbox to \box@width{\hss\third@\hss}}%
   }

\def\put@rulechar{%
   \ifnum\innerloopcount>\res@perline
   \else
      \expandafter\next@rulechar\first@
      \advance\innerloopcount by 1
      \put@rulechar%
   \fi}

\def\put@ruler{%
   \ifnames@right%
        \ifnumbers@left%
          \ifnumbers@right%
            \xdef\ruler@{)\ruler@)<>}%
          \else%
            \xdef\ruler@{)\ruler@<>}%
          \fi%
        \else%
            \xdef\ruler@{\ruler@)<>}%
        \fi%
   \else%
        \ifnumbers@left%
          \ifnumbers@right%
            \xdef\ruler@{<>)\ruler@)}%
          \else%
            \xdef\ruler@{<>)\ruler@}%
          \fi%
        \else%
            \xdef\ruler@{<>\ruler@)}%
        \fi%
   \fi%
   \xdef\first@{\ruler@ @}%
   \ifnum\rule@top=1%
      \vspace{\ruler@sp@ce}%
      \vspace{-\baselineskip}%
      \newline\hbox{}%
   \fi%
   \ifnames@right\else\def\@kern{\kern0em}\expandafter\put@name\first@\fi%
   \ifnumbers@left\def\@kern{\kern1em}\expandafter\put@number\first@\fi%
   \vspace{-0.25\baselineskip}%
   \ifnum\rule@top=0%
      \vspace{\ruler@sp@ce}%
   \fi%
   \fontfamily{\ruler@family}%
   \fontseries{m}%
   \fontshape{n}%
   \selectfont%
   \innerloopcount=1\relax\put@rulechar%
   \newline\hbox{}%
}
\def\get@firstfill#1#2&{\xdef\second@@{#1}\xdef\fill@char{#2&}}
\def\get@firstv@l#1,#2&{\xdef\second@@{#1}\xdef\fill@char{#2&}}
\def\get@tripletfill#1#2#3#4&{%
   \multiply\temp@count by -1%
   \def\second@@{#1}\def\second@@@{#2}\def\second@@@@{#3}\def\fill@char{#4&}}
\def\putfeature@style#1{%
   \residues@size%
   \setbox1=\hbox{\ensuremath{\overrightarrow{\hbox{}}}}%
   \arrow@height=\ht1%
   \arrow@width=\wd1%
   \xdef\second@@{#1}%
   \xdef\last@{\second@@::&}\expandafter\test@fill\last@%
   \xdef\last@{empty}%
   \ifx\second@@\last@%
      \hbox to \second@\box@width{\hss}%
   \else%
    \xdef\last@{translate}%
    \ifx\second@@\last@%
     \fontfamily{\featurestyles@family}%
     \fontseries{\featurestyles@series}%
     \fontshape{\featurestyles@shape}%
     \selectfont%
     \xdef\fill@char{\fill@char &}%
     \if\seq@type N%
        \loop%
            \expandafter\get@firstfill\fill@char%
            \if\second@@ -\def\second@@{\hss}\fi%
            \hbox to \box@width{\hss\textcolor{\f@color}{\featurestyles@size{\second@@}}\hss}%
        \ifx\fill@char\ampers@nd\else\repeat%
     \else%
     \temp@count=1%
     \loop%
      \expandafter\get@tripletfill\fill@char%
      \if\second@@ -\ifnum\tr@nsstyle>0\hbox to \box@width{\hss}\fi%
      \else%
        \ifcase\tr@nsstyle%
           \hbox{\trans@size\textcolor{\f@color}%
                {\hss\second@@\second@@@\second@@@@\,\hss}}%
        \or%
           \ifnum\temp@count=1%
              \vbox{\trans@size%
              \hbox to \box@width{\textcolor{\f@color}{\second@@\hss}}%
              \hbox to \box@width{\textcolor{\f@color}{\hss\second@@@\hss}}%
              \hbox to \box@width{\textcolor{\f@color}{\hss\second@@@@}}}%
           \else%
              \vbox{\trans@size%
              \hbox to \box@width{\textcolor{\f@color}{\hss\second@@@@}}%
              \hbox to \box@width{\textcolor{\f@color}{\hss\second@@@\hss}}%
              \hbox to \box@width{\textcolor{\f@color}{\second@@\hss}}}%
           \fi%
        \or%
           \ifnum\temp@count=1%
              \vbox{\trans@size%
              \hbox to \box@width{\textcolor{\f@color}%
                                 {\hss\second@@\second@@@\second@@@@\hss}}%
              \hbox to \box@width{\textcolor{\f@color}{\hss}}}%
           \else%
              \vbox{\trans@size%
              \hbox to \box@width{\textcolor{\f@color}{\hss}}%
              \hbox to \box@width{\textcolor{\f@color}%
                                 {\hss\second@@\second@@@\second@@@@\hss}}}%
           \fi%
        \or%
           \vbox{\trans@size%
           \hbox to \box@width{\textcolor{\f@color}{\second@@\hss}}%
           \hbox to \box@width{\textcolor{\f@color}{\hss\second@@@\hss}}%
           \hbox to \box@width{\textcolor{\f@color}{\hss\second@@@@}}}%
        \or%
           \vbox{\trans@size%
           \hbox to \box@width{\textcolor{\f@color}{\hss\second@@\hss}}%
           \hbox to \box@width{\textcolor{\f@color}{\hss\second@@@\hss}}%
           \hbox to \box@width{\textcolor{\f@color}{\hss\second@@@@\hss}}}%
        \fi%
      \fi%
     \ifx\fill@char\ampers@nd\else\repeat%
     \fi%
    \else%
     \xdef\last@{brace}%
     \ifx\second@@\last@%
      \xdef\last@{top}%
      \textcolor{\f@color}{%
      \ifx\bottop@\last@%
         \ensuremath{\overbrace{\hbox to \second@\box@width{\hss%
             \rule[0.2\arrow@height]{0pt}{0pt}\hss}}}%
      \else%
      \xdef\last@{ttop}%
      \ifx\bottop@\last@%
         \ensuremath{\overbrace{\hbox to \second@\box@width{\hss%
             \rule[0.2\arrow@height]{0pt}{0pt}\hss}}}%
      \else%
      \xdef\last@{tttop}%
      \ifx\bottop@\last@%
         \ensuremath{\overbrace{\hbox to \second@\box@width{\hss%
             \rule[0.2\arrow@height]{0pt}{0pt}\hss}}}%
      \else%
      \xdef\last@{ttttop}%
      \ifx\bottop@\last@%
         \ensuremath{\overbrace{\hbox to \second@\box@width{\hss%
             \rule[0.2\arrow@height]{0pt}{0pt}\hss}}}%
      \else%
         \raisebox{1.75\arrow@height}{\ensuremath{\underbrace{\hbox to %
             \second@\box@width{}}}}%
      \fi\fi\fi\fi}%
     \else%
      \xdef\last@{fill}%
      \ifx\second@@\last@%
       \fontfamily{\featurestyles@family}%
       \fontseries{\featurestyles@series}%
       \fontshape{\featurestyles@shape}%
       \selectfont%
       \ifx\bottop@\temp@\xdef\last@{0.35}\else\xdef\last@{0}\fi%
       \kern0.15\box@width%
       \loopcount=0\relax%
       \loop%
         \advance\loopcount by 1\relax%
         \raisebox{\last@\arrow@height}{%
            \hbox to \box@width{\hss{\textcolor{\f@color}{\featurestyles@size\fill@char}}\hss}}%
       \ifnum\loopcount<\second@ \repeat%
      \else%
      \xdef\last@{bar}%
      \ifx\second@@\last@%
       \setlength\arrow@width{\pm@shift\box@height}%
       \setlength\arrow@width{\b@r@stretch\arrow@width}%
       \ifx\fill@char\N@%
          \raisebox{\pm@shift\box@height}{\vrule width\box@width}%
       \else%
          \kern-0.6\box@width%
          \ifx\frame@color\back@color%
          \else%
             \setlength\arrow@height{\box@height}%
             \advance\arrow@height by -\pm@shift\box@height%
             \setlength\arrow@height{\b@r@stretch\arrow@height}%
             \raisebox{\arrow@width}{%
                \hbox to \box@width{\hss{\textcolor{\back@color}{\vrule depth\arrow@width%
                height\arrow@height width\box@width}}\hss}}%
             \kern-\box@width%
          \fi%
          \setlength\arrow@height{\fill@char\box@height}%
          \setlength\arrow@height{\b@r@stretch\arrow@height}%
          \divide\arrow@height by 100\relax%
          \ifdim\arrow@height<0pt%
             \arrow@height=-\arrow@height%
             \raisebox{\arrow@width}{%
                \hbox to \box@width{\hss{\textcolor{\frame@color}{\vrule depth\arrow@height width0.8\box@width}}\hss}}%
          \else%
             \raisebox{\arrow@width}{%
                \hbox to \box@width{\hss{\textcolor{\frame@color}{\vrule height\arrow@height width0.8\box@width}}\hss}}\fi%
          \kern-\box@width%
          \raisebox{\arrow@width}{\textcolor{Black}{\vrule height0.25pt depth0.25pt width\box@width}}%
       \fi%
      \else%
      \xdef\last@{color}%
      \ifx\second@@\last@%
       \setlength\arrow@height{\fill@char\box@height}%
       \setlength\arrow@height{\sc@le@stretch\arrow@height}%
       \divide\arrow@height by 100\relax%
       \raisebox{0.2\box@height}{%
         \hbox to \box@width{\hss{\textcolor{\f@color}{\vrule height\arrow@height width\box@width}}\hss}}%
      \else%
      \xdef\last@{plotcolor}%
      \ifx\second@@\last@%
        \xdef\fill@char{\fill@char,&}%
        \loop%
            \expandafter\get@firstv@l\fill@char%
            \ifx\second@@\N@\hbox to \box@width{\hss}%
            \else
              \loopcount=\second@@%
              \ifx\T@coffee@ccons\y@%
              \else%
                 \advance\loopcount by -\pm@shift%
                 \advance\loopcount by 4%
                 \divide\loopcount by 5%
                 \multiply\loopcount by 5%
                 \ifnum\loopcount>100\loopcount=100\fi%
                 \ifnum\loopcount<5\loopcount=5\fi%
              \fi%
              \setlength\arrow@height{50\box@height}%
              \divide\arrow@height by 100\relax%
              \setlength\arrow@height{\sc@le@stretch\arrow@height}%
              \raisebox{0.2\box@height}{%
                 \hbox to \box@width{\hss{\textcolor{\f@color\the\loopcount}{\vrule height\arrow@height width\box@width}}\hss}}%
            \fi
        \ifx\fill@char\ampers@nd\else\repeat%
      \else%
      \xdef\last@{plotbar}%
      \ifx\second@@\last@%
        \xdef\fill@char{\fill@char,&}%
        \ifnum\pm@shift>0%
           \setlength\arrow@width{0pt}%
        \else
           \setlength\arrow@width{-\pm@shift\box@height}%
           \divide\arrow@width by 100%
           \setlength\arrow@width{\b@r@stretch\arrow@width}%
        \fi%
        \loop%
            \expandafter\get@firstv@l\fill@char%
            \ifx\second@@\N@\hbox to \box@width{\hss}%
            \else\relax%
               \ifx\frame@color\back@color%
               \else%
                  \setlength\arrow@height{\b@r@stretch\box@height}%
                  \hbox to \box@width{\hss{\textcolor{\back@color}%
                      {\vrule height\arrow@height width\box@width}}\hss}%
                  \kern-\box@width%
               \fi%
               \ifx\T@coffee@bcons\y@%
                  \ifnum\second@@=99 \xdef\second@@{0}\fi%
               \fi
               \setlength\arrow@height{\second@@\box@height}%
               \ifx\T@coffee@bcons\y@%
                  \setlength\arrow@height{11\arrow@height}%
               \fi
               \divide\arrow@height by 100\relax%
               \setlength\arrow@height{\b@r@stretch\arrow@height}%
               \ifdim\arrow@height<0pt%
                  \arrow@height=-\arrow@height%
                  \raisebox{\arrow@width}{%
                     \hbox to \box@width{\hss{\textcolor{\frame@color}%
                        {\vrule depth\arrow@height width0.8\box@width}}\hss}}%
               \else%
                  \raisebox{\arrow@width}{%
                     \hbox to \box@width{\hss{\textcolor{\frame@color}%
                        {\vrule height\arrow@height width0.8\box@width}}\hss}}\fi%
               \kern-\box@width%
               \raisebox{\arrow@width}{\textcolor{Black}%
                        {\vrule height0.25pt depth0.25pt width\box@width}}%
            \fi
        \ifx\fill@char\ampers@nd\else\repeat%
      \else%
      \xdef\last@{helix}%
      \ifx\second@@\last@%
       \fontfamily{cmr}%
       \fontseries{m}%
       \fontshape{it}%
       \selectfont%
       \ifx\bottop@\temp@\xdef\last@{0.35}\else\xdef\last@{0}\fi%
       \kern0.15\box@width%
       \setbox1=\hbox{\ensuremath{\helixhook}\kern-1.13exo\kern-1.02ex}%
       \arrow@width=\second@\box@width%
       \divide\arrow@width by \wd1%
       \arrow@width=2\wd1%
       \loop%
         \textcolor{\f@color}{\raisebox{-0.25ex}{\ensuremath{\helixhook}}%
                              \kern-1.13ex\raisebox{0.3ex}{o}}\kern-1.02ex%
         \advance\arrow@width by \wd1\relax%
       \ifdim\arrow@width<\second@\box@width \repeat%
       \textcolor{\f@color}{\raisebox{-0.25ex}{\ensuremath{\helixhook}}}%
      \else%
      \xdef\last@{box}%
      \ifx\second@@\last@%
         \fontfamily{\featurestyles@family}%
         \fontseries{\featurestyles@series}%
         \fontshape{\featurestyles@shape}%
         \selectfont%
         \kern-\second@\box@width%
         \bgroup%
             \textcolor{\back@color}{%
                \vrule width\second@\box@width height\box@height depth\box@depth}%
             \kern-\second@\box@width%
             \fboxsep-\rule@@thick\fboxrule\rule@@thick%
             \textcolor{\frame@color}{%
                \fbox{\makebox[\second@\box@width]%
                     {\vrule\@height\box@height\@depth\box@depth \@width\z@}}}%
         \egroup%
         \setbox1=\hbox{\residues@size{\fill@char}}%
         \temp@count=\wd1 \xdef\wd@{\the\temp@count}%
         \width@tmp=\second@\box@width%
         \temp@count=\width@tmp%
         \xdef\sb@{\the\temp@count}%
         \ifnum\wd@>\sb@ \xdef\fill@char{}\fi%
         \hbox to -\second@\box@width{\hss\textcolor{\f@color}%
                       {\residues@size{\fill@char}}\hss}%
     \else%
      \expandafter\get@shape\second@@%
      \xdef\last@{arrow}%
      \ifx\second@@\last@%
        \kern-0.75\box@width%
        \ifx\bottop@\temp@ \xdef\last@{0.35}\else\xdef\last@{-0.55}\fi%
        \textcolor{\f@color}{%
        \raisebox{\last@\arrow@height}{%
         \if\first@@ ,%
            \rule{0.1\arrow@height}{\arrow@height}\kern-0.35\arrow@height%
         \else%
            \if\first@@ |%
               \rule{0.1\arrow@height}{2\arrow@height}\kern-0.35\arrow@height%
            \else%
               \if\first@@ `\xdef\first@@{'}\fi%
               \if\first@@ '%
                  \rule[\arrow@height]%
                     {0.1\arrow@height}{\arrow@height}\kern-0.35\arrow@height%
               \else%
                  \if\first@@ -%
                     \rule{0pt}{0pt}\kern-0.35\arrow@height%
                  \fi%
               \fi%
            \fi%
         \fi%
         \if\third@@ v%
            \if\first@@ v%
               \ensuremath{\overleftarrow{\hbox to %
               \second@\box@width{\rule[0.4\arrow@height]{0pt}{0pt}\hss}}}%
               \kern-\arrow@width%
               \ensuremath{\overrightarrow{\hbox%
                          {\rule[0.4\arrow@height]{0pt}{0pt}\hss}}}%
            \else%
               \ensuremath{\overrightarrow{\hbox to %
               \second@\box@width{\rule[0.4\arrow@height]{0pt}{0pt}\hss}}}%
            \fi%
         \else%
            \if\first@@ v%
               \ensuremath{\overleftarrow{\hbox to %
                   \second@\box@width{\rule[0.4\arrow@height]{0pt}{0pt}\hss}}}%
            \else
               \kern0.35\arrow@height%
               \rule[0.9\arrow@height]{\second@\box@width}{0.1\arrow@height}%
               \kern0.35\arrow@height%
            \fi
            \if\third@@ ,%
               \kern-0.4\arrow@height\rule{0.1\arrow@height}{\arrow@height}%
            \else%
               \if\third@@ |%
                  \kern-0.4\arrow@height\rule{0.1\arrow@height}{2\arrow@height}%
               \else%
                  \if\third@@ `\xdef\third@@{'}\fi%
                  \if\third@@ '%
                     \kern-0.4\arrow@height%
                     \rule[\arrow@height]{0.1\arrow@height}{\arrow@height}%
                  \fi%
               \fi%
            \fi%
         \fi}}%
      \else%
       \xdef\last@{doublearrow}%
       \ifx\second@@\last@%
          \setbox1=\hbox{\ensuremath{\Rightarrow}}%
          \arrow@height=\ht1%
          \arrow@width=\wd1%
          \setbox1=\hbox to \second@\box@width{}%
          \width@tmp=\wd1%
          \kern-0.75\box@width%
        \xdef\temp@{top}%
        \ifx\bottop@\temp@ \xdef\last@{0.25}%
        \else%
           \xdef\temp@{ttop}%
           \ifx\bottop@\temp@ \xdef\last@{0.25}%
           \else%
             \xdef\temp@{tttop}%
             \ifx\bottop@\temp@ \xdef\last@{0.25}%
             \else%
               \xdef\temp@{ttttop}%
               \ifx\bottop@\temp@ \xdef\last@{0.25}%
               \else%
                 \xdef\last@{-0.25}\fi\fi\fi\fi%
        \textcolor{\f@color}{%
        \raisebox{\last@\arrow@height}{%
         \if\first@@ ,%
            \rule[-0.5\arrow@height]{0.1\arrow@height}{1.5\arrow@height}%
            \kern-0.1\arrow@height%
         \else%
            \if\first@@ |%
               \rule[-0.5\arrow@height]{0.1\arrow@height}{2.25\arrow@height}%
               \kern-0.1\arrow@height%
            \else%
               \if\first@@ `\xdef\first@@{'}\fi%
               \if\first@@ '%
                  \rule[0.4\arrow@height]%
                     {0.1\arrow@height}{1.5\arrow@height}%
                  \kern-0.1\arrow@height%
               \else%
                  \if\first@@ <%
                     \ensuremath{\Leftarrow}\kern-0.5\arrow@width%
                     \advance\width@tmp by -0.5\arrow@width
                  \else
                     \rule{0pt}{0pt}%
                  \fi%
               \fi%
            \fi%
         \fi%
         \if\third@@ >%
            \advance\width@tmp by -0.5\arrow@width%
            \rule[0.37\arrow@height]{\width@tmp}{0.1\arrow@height}%
            \kern-\width@tmp%
            \rule[0.9\arrow@height]{\width@tmp}{0.1\arrow@height}%
            \kern-0.5\arrow@width\ensuremath{\Rightarrow}%
         \else%
            \rule[0.37\arrow@height]{\width@tmp}{0.1\arrow@height}%
            \kern-\width@tmp%
            \rule[0.9\arrow@height]{\width@tmp}{0.1\arrow@height}%
            \if\third@@ ,%
               \kern-0.05\arrow@height%
               \rule[-0.5\arrow@height]{0.1\arrow@height}{1.5\arrow@height}%
            \else%
               \if\third@@ |%
                  \kern-0.05\arrow@height%
                  \rule[-0.5\arrow@height]{0.1\arrow@height}{2.25\arrow@height}%
               \else%
                  \if\third@@ `\xdef\third@@{'}\fi%
                  \if\third@@ '%
                     \kern-0.05\arrow@height%
                     \rule[0.4\arrow@height]{0.1\arrow@height}{1.5\arrow@height}%
                  \fi%
               \fi%
            \fi%
         \fi}}%
       \else
        \loopcount=0\relax%
        \width@tmp=\arrow@height%
        \temp@@length=\rule@@thick%
        \advance\width@tmp by -0.5\temp@@length%
        \if\first@@ o\xdef\first@@{O}\fi%
        \if\third@@ o\xdef\third@@{O}\fi%
        \textcolor{\f@color}{%
         \if\first@@ ,%
         \rule{\temp@@length}{\arrow@height}\kern-\temp@@length%
         \else%
            \if\first@@ |%
               \rule{\temp@@length}{2\arrow@height}\kern-\temp@@length%
            \else%
              \if\first@@ O%
                \raisebox{0.06ex}{\ensuremath{\bullet}}\kern-0.55ex%
                \rule[\width@tmp]{0.65ex}{\temp@@length}%
              \else%
               \if\first@@ <%
                 \raisebox{0.06ex}{\ensuremath{\blacktriangleleft}}\kern-0.35ex%
               \else
                \if\first@@ `\xdef\first@@{'}\fi%
                \if\first@@ '%
                  \advance\width@tmp by 0.5\temp@@length%
                  \rule[\width@tmp]{\temp@@length}{\arrow@height}\kern-\temp@@length%
                  \advance\width@tmp by -0.5\temp@@length%
                \fi%
               \fi%
              \fi%
            \fi%
         \fi%
         \loopcount=\second@%
         \if\first@@ <\advance\loopcount by -1\relax\ifnum\loopcount<0 \loopcount=0\fi\fi%
         \if\third@@ >\advance\loopcount by -1\relax\ifnum\loopcount<0 \loopcount=0\fi\fi%
         \if\first@@ O\advance\loopcount by -1\relax\ifnum\loopcount<0 \loopcount=0\fi\fi%
         \if\third@@ O\advance\loopcount by -1\relax\ifnum\loopcount<0 \loopcount=0\fi\fi%
         \xdef\second@{\the\loopcount}%
         \rule[\width@tmp]{\second@\box@width}{\temp@@length}%
         \setbox1=\hbox{\residues@size{\fill@char}}%
         \kern-\second@\box@width%
         \hbox to \second@\box@width{\textcolor{\backtext@color}{\hss\rule[\width@tmp]{1.2\wd1}{\temp@@length}\hss}}%
         \kern-\second@\box@width%
         \hbox to \second@\box@width{\textcolor{\frame@color}{\residues@size{\hss\fill@char\hss}}}%
         \if\third@@ ,%
         \kern-\temp@@length\rule{\temp@@length}{\arrow@height}%
         \else%
            \if\third@@ |%
               \kern-\temp@@length\rule{\temp@@length}{2\arrow@height}%
            \else%
              \if\third@@ O%
                \rule[\width@tmp]{0.65ex}{\temp@@length}%
                \kern-0.55ex\raisebox{0.06ex}{\ensuremath{\bullet}}%
              \else%
               \if\third@@ >%
                \kern-0.35ex\raisebox{0.06ex}{\ensuremath{\blacktriangleright}}%
               \else
                \if\third@@ `\xdef\third@@{'}\fi%
                \if\third@@ '%
                  \advance\width@tmp by 0.5\temp@@length%
                  \kern-\temp@@length\rule[\width@tmp]{\temp@@length}{\arrow@height}%
                \fi%
               \fi%
              \fi%
            \fi
         \fi}%
       \fi
      \fi
      \fi
      \fi
      \fi
     \fi
     \fi
     \fi
    \fi
   \fi
   \fi
   \fi
}
\def\next@featuretext&#1;#2;#3@{%
   \xdef\first@{#3@}%
   \xdef\last@{fill:#2:&}\expandafter\test@fill\last@%
   \ifx\f@color\comm@\xdef\f@color{Black}\fi%
   \fontfamily{\featuretext@family}%
   \fontseries{\featuretext@series}%
   \fontshape{\featuretext@shape}%
   \selectfont%
   \xdef\last@{translate}%
   \ifx\last@\second@@%
     \xdef\fill@char{\fill@char &}%
     \if\seq@type N
  \loop%
  \expandafter\get@firstfill\fill@char%
  \if\second@@ -\def\second@@{\hss}\fi%
      \hbox to \box@width{\hss\textcolor{\f@color}{%
                      \featuretext@size{\strut\second@@}}\hss}%
  \ifx\fill@char\ampers@nd\else\repeat%
 \else
   \hbox to #1\box@width{\hss%
    \temp@count=1%
    \loop%
      \expandafter\get@tripletfill\fill@char%
      \if\second@@ -\ifnum\tr@nstextstyle>0\hbox to \box@width{\hss}\fi%
  \else%
   \ifcase\tr@nstextstyle%
     \hbox{\transtext@size\textcolor{\f@color}%
      {\hss\second@@\second@@@\second@@@@\,\hss}}%
   \or%
     \ifnum\temp@count=1%
        \vbox{\transtext@size%
          \hbox to \box@width{\textcolor{\f@color}{\second@@\hss}}%
          \hbox to \box@width{\textcolor{\f@color}{\hss\second@@@\hss}}%
          \hbox to \box@width{\textcolor{\f@color}{\hss\second@@@@}}}%
     \else%
        \vbox{\transtext@size%
          \hbox to \box@width{\textcolor{\f@color}{\hss\second@@@@}}%
          \hbox to \box@width{\textcolor{\f@color}{\hss\second@@@\hss}}%
          \hbox to \box@width{\textcolor{\f@color}{\second@@\hss}}}%
     \fi%
   \or%
     \ifnum\temp@count=1%
        \vbox{\transtext@size%
          \hbox to \box@width{\textcolor{\f@color}%
                             {\hss\second@@\second@@@\second@@@@\hss}}%
          \hbox to \box@width{\textcolor{\f@color}{\hss}}}%
     \else%
        \vbox{\transtext@size%
          \hbox to \box@width{\textcolor{\f@color}{\hss}}%
          \hbox to \box@width{\textcolor{\f@color}%
                             {\hss\second@@\second@@@\second@@@@\hss}}}%
     \fi%
   \or%
        \vbox{\transtext@size%
          \hbox to \box@width{\textcolor{\f@color}{\second@@\hss}}%
          \hbox to \box@width{\textcolor{\f@color}{\hss\second@@@\hss}}%
          \hbox to \box@width{\textcolor{\f@color}{\hss\second@@@@}}}%
   \or%
        \vbox{\transtext@size%
          \hbox to \box@width{\textcolor{\f@color}{\hss\second@@\hss}}%
          \hbox to \box@width{\textcolor{\f@color}{\hss\second@@@\hss}}%
          \hbox to \box@width{\textcolor{\f@color}{\hss\second@@@@\hss}}}%
   \fi%
  \fi%
    \ifx\fill@char\ampers@nd\else\repeat%
   \hss}
 \fi%
   \else%
      \textcolor{\f@color}{%
      \hbox to #1\box@width{\hss\featuretext@size{\strut\fourth@}\hss}}%
   \fi%
   \advance\loopcount by -#1%
}
\def\put@featuretext{%
   \if\first@ @%
   \else
      \expandafter\next@featuretext\first@%
      \put@featuretext%
   \fi}
\def\next@featurestyle&#1;#2;#3@{%
   \xdef\first@{#2}%
   \xdef\second@{#1}%
   \ifx\first@\ampers@nd \hbox to \second@\box@width{\hss}%
   \else%
   \hbox to \second@\box@width%
           {\hss\expandafter\putfeature@style{\first@}\hss}\fi%
   \xdef\first@{#3@}%
   \advance\loopcount by -\second@%
}
\def\put@featurestyle{%
   \if\first@ @%
   \else
      \expandafter\next@featurestyle\first@%
      \put@featurestyle%
   \fi
}
\def\put@feature{%
   \vspace{-\baselineskip}%
   \newline\hbox{}%
   \xdef\temp@{ttttop}%
   \ifx\temp@\bottop@%
      \ifnames@right\else\ifnames@%
      \fontfamily{\ftext@family}\fontseries{\ftext@series}\fontshape{\ftext@shape}%
      \selectfont%
      \textcolor{\csname ftext@fg@\bottop@\endcsname}{\hbox to \name@width{\ftext@size\csname featuretextn@me\bottop@\endcsname\hss}}\fi\fi%
      \ifnumbers@left\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
      \xdef\first@{\csname textfeature\bottop@\endcsname @}%
      \loopcount=\res@perline%
      \put@featuretext%
      \ifnumbers@right\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
      \ifnames@right\ifnames@%
      \fontfamily{\ftext@family}\fontseries{\ftext@series}\fontshape{\ftext@shape}%
      \selectfont%
      \kern1em\hbox to \loopcount\box@width{\hss}%
      \textcolor{\csname ftext@fg@\bottop@\endcsname}{\hbox to \name@width{\ftext@size\csname featuretextn@me\bottop@\endcsname\hss}}\fi\fi%
   \else%
   \xdef\temp@{tttop}%
   \ifx\temp@\bottop@%
      \ifnames@right\else\ifnames@%
      \fontfamily{\ftext@family}\fontseries{\ftext@series}\fontshape{\ftext@shape}%
      \selectfont%
      \textcolor{\csname ftext@fg@\bottop@\endcsname}{\hbox to \name@width{\ftext@size\csname featuretextn@me\bottop@\endcsname\hss}}\fi\fi%
      \ifnumbers@left\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
      \xdef\first@{\csname textfeature\bottop@\endcsname @}%
      \loopcount=\res@perline%
      \put@featuretext%
      \ifnumbers@right\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
      \ifnames@right\ifnames@%
      \fontfamily{\ftext@family}\fontseries{\ftext@series}\fontshape{\ftext@shape}%
      \selectfont%
      \kern1em\hbox to \loopcount\box@width{\hss}%
      \textcolor{\csname ftext@fg@\bottop@\endcsname}{\hbox to \name@width{\ftext@size\csname featuretextn@me\bottop@\endcsname\hss}}\fi\fi%
   \else%
   \xdef\temp@{ttop}%
   \ifx\temp@\bottop@%
      \ifnames@right\else\ifnames@%
      \fontfamily{\ftext@family}\fontseries{\ftext@series}\fontshape{\ftext@shape}%
      \selectfont%
      \textcolor{\csname ftext@fg@\bottop@\endcsname}{\hbox to \name@width{\ftext@size\csname featuretextn@me\bottop@\endcsname\hss}}\fi\fi%
      \ifnumbers@left\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
      \xdef\first@{\csname textfeature\bottop@\endcsname @}%
      \loopcount=\res@perline%
      \put@featuretext%
      \ifnumbers@right\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
      \ifnames@right\ifnames@%
      \fontfamily{\ftext@family}\fontseries{\ftext@series}\fontshape{\ftext@shape}%
      \selectfont%
      \kern1em\hbox to \loopcount\box@width{\hss}%
      \textcolor{\csname ftext@fg@\bottop@\endcsname}{\hbox to \name@width{\ftext@size\csname featuretextn@me\bottop@\endcsname\hss}}\fi\fi%
   \else%
      \xdef\temp@{top}%
      \ifx\temp@\bottop@%
         \ifnames@right\else\ifnames@%
         \fontfamily{\ftext@family}\fontseries{\ftext@series}\fontshape{\ftext@shape}%
         \selectfont%
         \textcolor{\csname ftext@fg@\bottop@\endcsname}{\hbox to \name@width{\ftext@size\csname featuretextn@me\bottop@\endcsname\hss}}\fi\fi%
         \ifnumbers@left\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
         \xdef\first@{\csname textfeature\bottop@\endcsname @}%
         \loopcount=\res@perline%
         \put@featuretext%
         \ifnumbers@right\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
         \ifnames@right\ifnames@%
         \fontfamily{\ftext@family}\fontseries{\ftext@series}\fontshape{\ftext@shape}%
         \selectfont%
         \kern1em\hbox to \loopcount\box@width{\hss}%
         \textcolor{\csname ftext@fg@\bottop@\endcsname}{\hbox to \name@width{\ftext@size\csname featuretextn@me\bottop@\endcsname\hss}}\fi\fi%
      \else
         \ifnames@right\else\ifnames@%
         \fontfamily{\fstyles@family}\fontseries{\fstyles@series}\fontshape{\fstyles@shape}%
         \selectfont%
         \textcolor{\csname fstyles@fg@\bottop@\endcsname}{\hbox to \name@width{\fstyles@size\csname featurestylesn@me\bottop@\endcsname\hss}}\fi\fi%
         \ifnumbers@left\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
         \xdef\first@{\csname stylefeature\bottop@\endcsname @}%
         \loopcount=\res@perline%
         \put@featurestyle%
         \ifnumbers@right\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
         \ifnames@right\ifnames@%
         \fontfamily{\fstyles@family}\fontseries{\fstyles@series}\fontshape{\fstyles@shape}%
         \selectfont%
         \kern1em\hbox to \loopcount\box@width{\hss}%
         \textcolor{\csname fstyles@fg@\bottop@\endcsname}{\hbox to \name@width{\fstyles@size\csname featurestylesn@me\bottop@\endcsname\hss}}\fi\fi%
   \fi\fi\fi\fi%
   \newline\hbox{}%
   \ifx\temp@\bottop@%
      \ifnames@right\else\ifnames@%
      \fontfamily{\fstyles@family}\fontseries{\fstyles@series}\fontshape{\fstyles@shape}%
      \selectfont%
      \textcolor{\csname fstyles@fg@\bottop@\endcsname}{\hbox to \name@width{\fstyles@size\csname featurestylesn@me\bottop@\endcsname\hss}}\fi\fi%
      \ifnumbers@left\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
      \xdef\first@{\csname stylefeature\bottop@\endcsname @}%
      \loopcount=\res@perline%
      \put@featurestyle%
      \ifnumbers@right\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
      \ifnames@right\ifnames@%
      \fontfamily{\fstyles@family}\fontseries{\fstyles@series}\fontshape{\fstyles@shape}%
      \selectfont%
      \kern1em\hbox to \loopcount\box@width{\hss}%
      \textcolor{\csname fstyles@fg@\bottop@\endcsname}{\hbox to \name@width{\fstyles@size\csname featurestylesn@me\bottop@\endcsname\hss}}\fi\fi%
   \else%
      \xdef\temp@{ttop}%
      \ifx\temp@\bottop@%
         \ifnames@right\else\ifnames@%
         \fontfamily{\fstyles@family}\fontseries{\fstyles@series}\fontshape{\fstyles@shape}%
         \selectfont%
         \textcolor{\csname fstyles@fg@\bottop@\endcsname}{\hbox to \name@width{\fstyles@size\csname featurestylesn@me\bottop@\endcsname\hss}}\fi\fi%
         \ifnumbers@left\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
         \xdef\first@{\csname stylefeature\bottop@\endcsname @}%
         \loopcount=\res@perline%
         \put@featurestyle%
         \ifnumbers@right\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
         \ifnames@right\ifnames@%
         \fontfamily{\fstyles@family}\fontseries{\fstyles@series}\fontshape{\fstyles@shape}%
         \selectfont%
         \kern1em\hbox to \loopcount\box@width{\hss}%
         \textcolor{\csname fstyles@fg@\bottop@\endcsname}{\hbox to \name@width{\fstyles@size\csname featurestylesn@me\bottop@\endcsname\hss}}\fi\fi%
      \else
      \xdef\temp@{tttop}%
      \ifx\temp@\bottop@%
         \ifnames@right\else\ifnames@%
         \fontfamily{\fstyles@family}\fontseries{\fstyles@series}\fontshape{\fstyles@shape}%
         \selectfont%
         \textcolor{\csname fstyles@fg@\bottop@\endcsname}{\hbox to \name@width{\fstyles@size\csname featurestylesn@me\bottop@\endcsname\hss}}\fi\fi%
         \ifnumbers@left\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
         \xdef\first@{\csname stylefeature\bottop@\endcsname @}%
         \loopcount=\res@perline%
         \put@featurestyle%
         \ifnumbers@right\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
         \ifnames@right\ifnames@%
         \fontfamily{\fstyles@family}\fontseries{\fstyles@series}\fontshape{\fstyles@shape}%
         \selectfont%
         \kern1em\hbox to \loopcount\box@width{\hss}%
         \textcolor{\csname fstyles@fg@\bottop@\endcsname}{\hbox to \name@width{\fstyles@size\csname featurestylesn@me\bottop@\endcsname\hss}}\fi\fi%
      \else
      \xdef\temp@{ttttop}%
      \ifx\temp@\bottop@%
         \ifnames@right\else\ifnames@%
         \fontfamily{\fstyles@family}\fontseries{\fstyles@series}\fontshape{\fstyles@shape}%
         \selectfont%
         \textcolor{\csname fstyles@fg@\bottop@\endcsname}{\hbox to \name@width{\fstyles@size\csname featurestylesn@me\bottop@\endcsname\hss}}\fi\fi%
         \ifnumbers@left\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
         \xdef\first@{\csname stylefeature\bottop@\endcsname @}%
         \loopcount=\res@perline%
         \put@featurestyle%
         \ifnumbers@right\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
         \ifnames@right\ifnames@%
         \fontfamily{\fstyles@family}\fontseries{\fstyles@series}\fontshape{\fstyles@shape}%
         \selectfont%
         \kern1em\hbox to \loopcount\box@width{\hss}%
         \textcolor{\csname fstyles@fg@\bottop@\endcsname}{\hbox to \name@width{\fstyles@size\csname featurestylesn@me\bottop@\endcsname\hss}}\fi\fi%
      \else
         \ifnames@right\else\ifnames@%
         \fontfamily{\ftext@family}\fontseries{\ftext@series}\fontshape{\ftext@shape}%
         \selectfont%
         \textcolor{\csname ftext@fg@\bottop@\endcsname}{\hbox to \name@width{\ftext@size\csname featuretextn@me\bottop@\endcsname\hss}}\fi\fi%
         \ifnumbers@left\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
         \xdef\first@{\csname textfeature\bottop@\endcsname @}%
         \xdef\first@{\csname textfeature\bottop@\endcsname @}%
         \loopcount=\res@perline%
         \put@featuretext%
         \ifnumbers@right\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
         \ifnames@right\ifnames@%
         \fontfamily{\ftext@family}\fontseries{\ftext@series}\fontshape{\ftext@shape}%
         \selectfont%
         \kern1em\hbox to \loopcount\box@width{\hss}%
         \textcolor{\csname ftext@fg@\bottop@\endcsname}{\hbox to \name@width{\ftext@size\csname featuretextn@me\bottop@\endcsname\hss}}\fi\fi%
   \fi\fi\fi\fi%
   \newline\hbox{}%
}
\def\put@@@frame#1{%
   \xdef\last@{#1[,]&}\expandafter\opt@color\last@%
   \xdef\second@@{\fourth@}%
   \ifx\f@color\comm@%
      \xdef\third@@{0.2\box@width}%
   \else%
      \xdef\third@@{\f@color}%
   \fi%
   \setlength\arrow@width{\temp@@length}%
   \advance\arrow@width by -\third@@%
   \textcolor{\second@@}{%
      \rule{\second@\box@width}{\third@@}%
      \kern-\second@\box@width%
      \rule{\third@@}{\arrow@width}%
      \kern-\third@@%
      \rule[\arrow@width]{\second@\box@width}{\third@@}%
      \kern-\third@@%
      \rule{\third@@}{\arrow@width}}%
}
\def\next@frame&#1;#2;#3@{%
   \xdef\first@{#2}%
   \xdef\second@{#1}%
   \ifx\first@\ampers@nd \hbox to \second@\box@width{\hss}%
   \else%
      \expandafter\put@@@frame{\first@}%
   \fi%
   \xdef\first@{#3@}%
}
\def\put@@frame{%
   \if\first@ @%
   \else
      \expandafter\next@frame\first@%
      \put@@frame%
   \fi%
}
\def\put@frame{%
   \ifx\hide@seqs\n@%
   \ifshow@cons\ifnum\cons@top=1 \vspace{-\baselineskip}\fi\fi%
   \temp@count=\seq@count%
   \ifx\hide@seqs\y@
      \advance\temp@count by -1
   \else
   \loopcount=1%
   \xdef\first@{true}%
   \loop%
      \expandafter\ifx\csname hide@seq\the\loopcount\endcsname\first@%
         \advance\temp@count by -1\fi%
      \advance\loopcount by 1%
   \ifnum\loopcount>\seq@count\else\repeat%
   \fi
   \ifnum\temp@count>0%
   \setlength\temp@@length{\box@height}%
   \advance\temp@@length by \box@depth%
   \setlength\arrow@height{0.5\temp@@length}%
   \setlength\temp@@length{\temp@count\temp@@length}%
   \advance\temp@@length by \arrow@height%
   \setlength\arrow@width{\sep@space}%
   \setlength\arrow@width{\seq@gap@num\arrow@width}%
   \advance\temp@@length by \arrow@width%
   \vspace{\arrow@height}%
   \vspace{-\temp@@length}%
   \vspace{-\baselineskip}%
   \newline\hbox{}%
   \ifnames@right\else\ifnames@\hbox to \name@width{\hss}\fi\fi%
   \ifnumbers@left\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
   \xdef\first@{\styleframe @}%
   \put@@frame%
   \vspace{-\arrow@height}%
   \ifshow@cons\ifnum\cons@top=1 \vspace{\baselineskip}\fi\fi%
   \newline\hbox{}%
   \fi%
   \fi%
}
\def\decimal@A#1#2@{%
   \def\decimal@AB##1##2@{\xdef\temp@{##1.##2}}%
   \xdef\temp@@{#1}%
   \xdef\temp@{#2@}%
   \expandafter\decimal@AB\temp@%
   \xdef\temp@{\temp@@\temp@}%
}
\def\decimal@B#1#2@{\xdef\temp@{#1.#2}}
\def\decimal@C#1#2@{\xdef\temp@{0.#1#2}}
\def\decimal@D#1#2@{\xdef\temp@{0.0#1#2}}
\def\decimal@E#1#2@{\xdef\temp@{0.00#1#2}}
\def\correct@CGSO{%
   \setlength\temp@@length{0.12\logo@height}%
   \multiply\temp@@length by \third@ %
   \if\seq@type P %
      \divide\temp@@length by 4322 %
   \else%
      \divide\temp@@length by 4000 %
   \fi%
   \loopcount=\third@%
   \multiply\loopcount by 94 %
   \divide\loopcount by 100 %
   \xdef\third@{\the\loopcount}%
}
\def\correct@Q{%
   \setlength\temp@@length{0.063\logo@height}%
   \multiply\temp@@length by \third@%
   \if\seq@type P %
      \divide\temp@@length by 4322 %
   \else%
      \divide\temp@@length by 4000 %
   \fi%
   \multiply\temp@@length by 10 %
   \loopcount=\third@%
   \multiply\loopcount by 83 %
   \divide\loopcount by 100 %
   \xdef\third@{\the\loopcount}%
}
\def\correct@JUV{%
   \setlength\temp@@length{0.12\logo@height}%
   \multiply\temp@@length by \third@ %
   \if\seq@type P %
      \divide\temp@@length by 4322 %
   \else%
      \divide\temp@@length by 4000 %
   \fi%
   \loopcount=\third@%
   \multiply\loopcount by 97 %
   \divide\loopcount by 100 %
   \xdef\third@{\the\loopcount}%
}
\def\next@logo#1:#2,#3@{%
   \xdef\first@{#1}\xdef\second@{#2}\xdef\last@{#3}%
   \ifx\first@\ampers@nd%
     \ifx\clear@logo\n@%
     \ifx\hide@sig\n@%
      \expandafter\firstchar@get\sublogo@sig%
      \xdef\sublogo@sig{\third@}%
      \ifx\first@\y@%
         \loopcount=\temp@count%
         \ifnum\loopcount<0 \loopcount=0\fi%
         \xdef\fourth@{\the\loopcount @}%
         \ifnum\loopcount>9999 \expandafter\decimal@A\fourth@ \else%
         \ifnum\loopcount>999  \expandafter\decimal@B\fourth@ \else%
         \ifnum\loopcount>99   \expandafter\decimal@C\fourth@ \else%
         \ifnum\loopcount>9    \expandafter\decimal@D\fourth@ \else%
                               \expandafter\decimal@E\fourth@%
         \fi\fi\fi\fi%
         \raisebox{\temp@\logo@height}{%
         \hbox to \box@width{\textcolor{\sig@color}{\hss\residues@size{\sig@char}\hss}}}%
         \kern-\box@width%
      \fi%
     \fi%
     \fi%
     \temp@count=0%
     \kern\box@width%
     \advance\outerloopcount by 1 %
   \else%
    \ifnum#2=1%
      \temp@count=0%
    \else%
      \if\seq@type N%
         \loopcount=\second@%
         \multiply\loopcount by 2%
         \xdef\second@{\the\loopcount}%
      \fi%
      \xdef\third@{\second@}%
      \if\first@ C\correct@CGSO \else%
      \if\first@ G\correct@CGSO \else%
      \if\first@ S\correct@CGSO \else%
      \if\first@ O\correct@CGSO \else%
      \if\first@ Q\correct@Q    \else%
      \if\first@ J\correct@JUV  \else%
      \if\first@ U\correct@JUV  \else%
      \if\first@ V\correct@JUV  \else%
                  \setlength\temp@@length{0pt}%
      \fi\fi\fi\fi\fi\fi\fi\fi%
      \loopcount=\third@
      \multiply\loopcount by \logo@stretch@IOOO%
      \ifnum\loopcount>0 %
         \divide\loopcount by 1000 \xdef\fl@g{}%
         \xdef\tint@{}%
      \else%
         \divide\loopcount by -1000 \xdef\fl@g{-}%
         \xdef\tint@{\sublogo@tint}%
      \fi%
      \ifnum\loopcount=0\relax\loopcount=1\relax\fi
      \xdef\third@{\the\loopcount @}%
      \ifnum\loopcount>9999 \expandafter\decimal@A\third@ \else%
      \ifnum\loopcount>999  \expandafter\decimal@B\third@ \else%
      \ifnum\loopcount>99   \expandafter\decimal@C\third@ \else%
      \ifnum\loopcount>9    \expandafter\decimal@D\third@ \else%
                            \expandafter\decimal@E\third@%
      \fi\fi\fi\fi%
      \xdef\third@{\fl@g\temp@}%
      \ifnum\temp@count<0 %
         \ifnum\second@<0 \else\temp@count=0 \fi%
      \fi%
      \ifnum\temp@count>0 %
         \loopcount=\temp@count \xdef\fl@g{}%
      \else
         \loopcount=-\temp@count \xdef\fl@g{-}%
      \fi%
      \xdef\fourth@{\the\loopcount @}%
      \ifnum\loopcount>9999 \expandafter\decimal@A\fourth@ \else%
      \ifnum\loopcount>999  \expandafter\decimal@B\fourth@ \else%
      \ifnum\loopcount>99   \expandafter\decimal@C\fourth@ \else%
      \ifnum\loopcount>9    \expandafter\decimal@D\fourth@ \else%
                             \expandafter\decimal@E\fourth@%
      \fi\fi\fi\fi%
      \xdef\fourth@{\fl@g\temp@}%
      \if\first@ W%
         \hbox to \box@width{\hss%
         \raisebox{\temp@@length}{\raisebox{\fourth@\logo@height}{\scalebox{\char@stretch@W}[\third@]%
         {\hbox to \box@width{\textcolor{\tint@\csname logo@col\first@\endcsname}{\hss\residues@size{W}\hss}}}}}\hss}%
         \kern-\box@width%
      \else%
         \hbox to \box@width{\hss%
         \raisebox{\temp@@length}{\raisebox{\fourth@\logo@height}{\scalebox{\char@stretch}[\third@]%
         {\hbox to \box@width{\textcolor{\tint@\csname logo@col\first@\endcsname}{\hss\residues@size{\first@}\hss}}}}}\hss}%
         \kern-\box@width%
      \fi%
      \advance\temp@count by \second@%
    \fi%
   \fi%
   \xdef\temp@{\last@.}%
   \ifx\temp@\d@t%
   \else%
      \xdef\last@{#3@}%
      \ifnum\outerloopcount>\res@perline%
      \else
         \expandafter\next@logo\last@%
      \fi%
   \fi%
}

\def\put@logo{%
   \ifx\clear@logo\y@%
   \ifnum\logo@top=1 %
      \vspace{-0.5\baselineskip}%
   \else
      \vspace{-0.75\baselineskip}%
   \fi%
   \else%
   \ifnum\sublogo@top=1 %
      \vspace{-0.5\baselineskip}%
   \else
      \vspace{-0.75\baselineskip}%
   \fi%
   \fi%
   \newline\hbox{}%
   \ifnames@right%
   \else%
      \fontfamily{\namestext@family}\fontseries{\namestext@series}\fontshape{\namestext@shape}%
      \selectfont%
      \ifnames@
         \textcolor{\names@fg}{%
            \raisebox{2\logo@height}{\hbox to \name@width{\namestext@size{\logo@name}\hss}}%
            \ifx\clear@logo\n@
            \ifx\hide@negatives\n@%
               \kern-\name@width\raisebox{-3\logo@height}{\hbox to \name@width{\namestext@size{\sublogo@name@neg}\hss}}%
            \fi%
            \fi}%
      \fi%
   \fi%
   \ifnumbers@left\ifnumbers@\hbox to \number@width{\hss}\fi\fi%
   \fontfamily{cmss}\fontseries{m}\fontshape{n}\selectfont%
   \ifx\show@logoscale\n@%
      \if\seq@type P%
         \ifnum\corr@max>600\relax%
            \rule[5.4\logo@height]{0pt}{0pt}%
         \else%
            \rule[4.4\logo@height]{0pt}{0pt}%
         \fi%
      \else%
         \rule[4.0688\logo@height]{0pt}{0pt}%
      \fi%
   \else%
   \xdef\first@{right}%
   \ifx\show@logoscale\first@%
   \else%
      \textcolor{\logo@scalecol}{%
      \kern-0.7\box@width%
      \rule[-0.05\logo@height]{0.4\box@width}{0.1\box@width}\kern-0.4\box@width%
      \rule[2\logo@height]{0.4\box@width}{0.1\box@width}\kern-0.4\box@width%
      \rule[4\logo@height]{0.4\box@width}{0.1\box@width}%
      \if\seq@type P%
         \kern-0.4\box@width%
         \rule[1\logo@height]{0.4\box@width}{0.1\box@width}\kern-0.4\box@width%
         \rule[3\logo@height]{0.4\box@width}{0.1\box@width}%
         \ifnum\corr@max>600\relax%
            \kern-0.4\box@width\rule[5\logo@height]{0.4\box@width}{0.1\box@width}\fi%
         \setbox1=\hbox{\bottomruler@size 2}%
         \kern-1.2\box@width%
         \ifdim\logo@height>1.25\ht1 \relax%
            \raisebox{-0.5\ht1}{\raisebox{1\logo@height}{\hbox to 0.6\box@width{\bottomruler@size\hss 1}}}%
            \kern-0.6\box@width%
            \raisebox{-0.5\ht1}{\raisebox{3\logo@height}{\hbox to 0.6\box@width{\bottomruler@size\hss 3}}}%
            \kern-0.6\box@width%
            \ifnum\corr@max>600\relax%
               \raisebox{-0.5\ht1}{\raisebox{5\logo@height}{\hbox to 0.6\box@width{\bottomruler@size\hss 5}}}%
               \kern-0.6\box@width%
            \fi
         \fi
         \raisebox{-0.5\ht1}{\raisebox{2\logo@height}{\hbox to 0.6\box@width{\bottomruler@size\hss 2}}}%
         \kern-0.6\box@width%
         \raisebox{-0.5\ht1}{\raisebox{4\logo@height}{\hbox to 0.6\box@width{\bottomruler@size\hss 4}}}%
         \kern0.6\box@width%
         \ifnum\corr@max>600\relax%
            \rule[5.4\logo@height]{0pt}{0pt}%
         \else
            \rule[4.4\logo@height]{0pt}{0pt}%
         \fi
      \else%
         \setbox1=\hbox{\bottomruler@size 2}%
         \kern-1.2\box@width%
         \raisebox{-0.5\ht1}{\raisebox{2\logo@height}{\hbox to 0.6\box@width{\bottomruler@size\hss 1}}}%
         \kern-0.6\box@width%
         \raisebox{-0.5\ht1}{\raisebox{4\logo@height}{\hbox to 0.6\box@width{\bottomruler@size\hss 2}}}%
         \kern0.6\box@width%
         \rule[4.0688\logo@height]{0pt}{0pt}%
      \fi%
      \kern-0.1\box@width%
      \ifnum\corr@max>600\relax%
         \rule{0.1\box@width}{5\logo@height}%
      \else%
         \rule{0.1\box@width}{4\logo@height}%
      \fi%
      \ifx\clear@logo\n@%
      \ifx\hide@negatives\n@%
      \kern-0.4\box@width%
      \rule[-2\logo@height]{0.4\box@width}{0.1\box@width}\kern-0.4\box@width%
      \rule[-4\logo@height]{0.4\box@width}{0.1\box@width}%
      \if\seq@type P%
         \kern-0.4\box@width%
         \rule[-\logo@height]{0.4\box@width}{0.1\box@width}\kern-0.4\box@width%
         \rule[-3\logo@height]{0.4\box@width}{0.1\box@width}%
         \ifnum\corr@max>600\relax%
            \kern-0.4\box@width\rule[-5\logo@height]{0.4\box@width}{0.1\box@width}\fi%
         \setbox1=\hbox{\bottomruler@size 2}%
         \kern-1.2\box@width%
         \ifdim\logo@height>1.25\ht1 \relax%
            \raisebox{-0.5\ht1}{\raisebox{-\logo@height}{\hbox to 0.6\box@width{\bottomruler@size\hss -1}}}%
            \kern-0.6\box@width%
            \raisebox{-0.5\ht1}{\raisebox{-3\logo@height}{\hbox to 0.6\box@width{\bottomruler@size\hss -3}}}%
            \kern-0.6\box@width%
            \ifnum\corr@max>600\relax%
               \raisebox{-0.5\ht1}{\raisebox{-5\logo@height}{\hbox to 0.6\box@width{\bottomruler@size\hss -5}}}%
               \kern-0.6\box@width%
            \fi
         \fi
         \raisebox{-0.5\ht1}{\raisebox{-2\logo@height}{\hbox to 0.6\box@width{\bottomruler@size\hss -2}}}%
         \kern-0.6\box@width%
         \raisebox{-0.5\ht1}{\raisebox{-4\logo@height}{\hbox to 0.6\box@width{\bottomruler@size\hss -4}}}%
         \kern0.6\box@width%
         \ifnum\corr@max>600\relax%
            \rule[-5.4\logo@height]{0pt}{0pt}%
         \else
            \rule[-4.4\logo@height]{0pt}{0pt}%
         \fi
      \else%
         \setbox1=\hbox{\bottomruler@size 2}%
         \kern-1.2\box@width%
         \raisebox{-0.5\ht1}{\raisebox{-2\logo@height}{\hbox to 0.6\box@width{\bottomruler@size\hss -1}}}%
         \kern-0.6\box@width%
         \raisebox{-0.5\ht1}{\raisebox{-4\logo@height}{\hbox to 0.6\box@width{\bottomruler@size\hss -2}}}%
         \kern0.6\box@width%
         \rule[-4.0688\logo@height]{0pt}{0pt}%
      \fi%
      \kern-0.1\box@width%
      \ifnum\corr@max>600\relax%
         \rule[-5\logo@height]{0.1\box@width}{5\logo@height}%
      \else%
         \rule[-4\logo@height]{0.1\box@width}{4\logo@height}%
      \fi%
      \fi%
      \fi
      \kern0.3\box@width}%
   \fi%
   \fi%
   \temp@count=0%
   \outerloopcount=1 \expandafter\next@logo\last@%
   \ifx\clear@logo\n@%
      \ifx\hide@negatives\n@%
         \textcolor{\logo@scalecol}{%
         \kern-\res@perline\box@width\rule[-0.03\box@width]{\res@perline\box@width}{0.06\box@width}}%
      \fi%
   \fi%
   \def\@kern{\kern1em}%
   \ifx\show@logoscale\n@%
   \else%
   \xdef\first@{left}%
   \ifx\show@logoscale\first@%
   \kern0.1\box@width%
   \else%
      \def\@kern{\kern2em}%
      \textcolor{\logo@scalecol}{%
      \kern0.3\box@width%
      \rule[-0.05\logo@height]{0.4\box@width}{0.1\box@width}\kern-0.4\box@width%
      \rule[2\logo@height]{0.4\box@width}{0.1\box@width}\kern-0.4\box@width%
      \rule[4\logo@height]{0.4\box@width}{0.1\box@width}%
      \if\seq@type P%
         \kern-0.4\box@width%
         \rule[1\logo@height]{0.4\box@width}{0.1\box@width}\kern-0.4\box@width%
         \rule[3\logo@height]{0.4\box@width}{0.1\box@width}%
         \ifnum\corr@max>600\relax%
            \kern-0.4\box@width\rule[5\logo@height]{0.4\box@width}{0.1\box@width}\fi%
         \setbox1=\hbox{\bottomruler@size 2}%
         \kern0.2\box@width%
         \ifdim\logo@height>1.25\ht1 \relax%
            \raisebox{-0.5\ht1}{\raisebox{1\logo@height}{\hbox to 0.6\box@width{\bottomruler@size 1 \hss}}}%
            \kern-0.6\box@width%
            \raisebox{-0.5\ht1}{\raisebox{3\logo@height}{\hbox to 0.6\box@width{\bottomruler@size 3 \hss}}}%
            \kern-0.6\box@width%
            \ifnum\corr@max>600\relax%
               \raisebox{-0.5\ht1}{\raisebox{5\logo@height}{\hbox to 0.6\box@width{\bottomruler@size 5 \hss}}}%
               \kern-0.6\box@width%
            \fi
         \fi
         \raisebox{-0.5\ht1}{\raisebox{2\logo@height}{\hbox to 0.6\box@width{\bottomruler@size 2 \hss}}}%
         \kern-0.6\box@width%
         \raisebox{-0.5\ht1}{\raisebox{4\logo@height}{\hbox to 0.6\box@width{\bottomruler@size 4 \hss}}}%
         \kern-0.8\box@width%
         \ifnum\corr@max>600\relax%
            \rule[5.4\logo@height]{0pt}{0pt}%
         \else
            \rule[4.4\logo@height]{0pt}{0pt}%
         \fi
      \else%
         \setbox1=\hbox{\bottomruler@size 2}%
         \kern0.2\box@width%
         \raisebox{-0.5\ht1}{\raisebox{2\logo@height}{\hbox to 0.6\box@width{\bottomruler@size 1 \hss}}}%
         \kern-0.6\box@width%
         \raisebox{-0.5\ht1}{\raisebox{4\logo@height}{\hbox to 0.6\box@width{\bottomruler@size 2 \hss}}}%
         \kern-0.8\box@width%
         \rule[4.0688\logo@height]{0pt}{0pt}%
      \fi%
      \kern-0.4\box@width%
      \ifnum\corr@max>600\relax%
         \rule{0.1\box@width}{5\logo@height}%
      \else%
         \rule{0.1\box@width}{4\logo@height}%
      \fi%
      \ifx\clear@logo\n@%
      \ifx\hide@negatives\n@%
      \kern-0.1\box@width%
      \rule[-2\logo@height]{0.4\box@width}{0.1\box@width}\kern-0.4\box@width%
      \rule[-4\logo@height]{0.4\box@width}{0.1\box@width}%
      \if\seq@type P%
         \kern-0.4\box@width%
         \rule[-\logo@height]{0.4\box@width}{0.1\box@width}\kern-0.4\box@width%
         \rule[-3\logo@height]{0.4\box@width}{0.1\box@width}%
         \ifnum\corr@max>600\relax%
            \kern-0.4\box@width\rule[-5\logo@height]{0.4\box@width}{0.1\box@width}\fi%
         \setbox1=\hbox{\bottomruler@size 2}%
         \kern0.2\box@width%
         \ifdim\logo@height>1.25\ht1 \relax%
            \raisebox{-0.5\ht1}{\raisebox{-\logo@height}{\hbox to 0.6\box@width{\bottomruler@size -1 \hss}}}%
            \kern-0.6\box@width%
            \raisebox{-0.5\ht1}{\raisebox{-3\logo@height}{\hbox to 0.6\box@width{\bottomruler@size -3 \hss}}}%
            \kern-0.6\box@width%
            \ifnum\corr@max>600\relax%
               \raisebox{-0.5\ht1}{\raisebox{-5\logo@height}{\hbox to 0.6\box@width{\bottomruler@size -5 \hss}}}%
               \kern-0.6\box@width%
            \fi
         \fi
         \raisebox{-0.5\ht1}{\raisebox{-2\logo@height}{\hbox to 0.6\box@width{\bottomruler@size -2 \hss}}}%
         \kern-0.6\box@width%
         \raisebox{-0.5\ht1}{\raisebox{-4\logo@height}{\hbox to 0.6\box@width{\bottomruler@size -4 \hss}}}%
         \kern-0.8\box@width%
         \ifnum\corr@max>600\relax%
            \rule[-5.4\logo@height]{0pt}{0pt}%
         \else
            \rule[-4.4\logo@height]{0pt}{0pt}%
         \fi
      \else%
         \setbox1=\hbox{\bottomruler@size 2}%
         \kern0.2\box@width%
         \raisebox{-0.5\ht1}{\raisebox{-2\logo@height}{\hbox to 0.6\box@width{\bottomruler@size -1 \hss}}}%
         \kern-0.6\box@width%
         \raisebox{-0.5\ht1}{\raisebox{-4\logo@height}{\hbox to 0.6\box@width{\bottomruler@size -2 \hss}}}%
         \kern-0.8\box@width%
         \rule[-4.0688\logo@height]{0pt}{0pt}%
      \fi%
      \kern-0.4\box@width%
      \ifnum\corr@max>600\relax%
         \rule[-5\logo@height]{0.1\box@width}{5\logo@height}%
      \else%
         \rule[-4\logo@height]{0.1\box@width}{4\logo@height}%
      \fi%
      \fi%
      \fi%
      \kern-0.3\box@width}%
   \fi%
   \fi%
   \ifnumbers@right\ifnumbers@\hbox to \number@width{\hss}\def\@kern{\kern1em}\fi\fi%
   \ifnames@right%
      \fontfamily{\namestext@family}\fontseries{\namestext@series}\fontshape{\namestext@shape}%
      \selectfont%
      \ifnames@
         \textcolor{\names@fg}{%
            \raisebox{2\logo@height}{\hbox to \name@width{\namestext@size{\@kern\logo@name}\hss}}%
            \ifx\clear@logo\n@
            \ifx\hide@negatives\n@%
               \kern-\name@width\raisebox{-3\logo@height}{\hbox to \name@width{\namestext@size{\@kern\sublogo@name@neg}\hss}}%
            \fi%
            \fi}%
      \fi%
   \fi%
   \ifx\clear@logo\y@\xdef\stack@sequencelogo{}%
   \else%
      \ifx\hide@negatives\n@ \newline\hbox{}\fi%
   \fi%
   \newline\hbox{}%
}

\def\set@lines{%
   \pos@count=1
   \xdef\frame@pos{1}\xdef\bar@pos{0}%
   \xdef\featurepostop{1}    \xdef\featureposbottom{1}%
   \xdef\featureposttop{1}   \xdef\featureposbbottom{1}%
   \xdef\featurepostttop{1}  \xdef\featureposbbbottom{1}%
   \xdef\featureposttttop{1} \xdef\featureposbbbbottom{1}%
   \findc@nsensus%
   \noindent%
   \ifnum\feature@ttttop=1
      \ifnum\featureonttttop=0 \xdef\feature@ttttop{0} \fi
      \xdef\bottop@{ttttop}%
      \put@feature%
      \vspace{\tttt@sp@ce}%
      \vspace{-\baselineskip}%
      \newline\hbox{}%
   \else
      \iffix@\ifttttopfeature \vspace{\tttt@sp@ce}\newline\hbox{}\newline\hbox{}\fi\fi
   \fi
   \ifnum\feature@tttop=1
      \ifnum\featureontttop=0 \xdef\feature@tttop{0} \fi
      \xdef\bottop@{tttop}%
      \put@feature%
      \vspace{\ttt@sp@ce}%
      \vspace{-\baselineskip}%
      \newline\hbox{}%
   \else
      \iffix@\iftttopfeature \vspace{\ttt@sp@ce}\newline\hbox{}\newline\hbox{}\fi\fi
   \fi
   \ifnum\feature@ttop=1
      \ifnum\featureonttop=0 \xdef\feature@ttop{0} \fi
      \xdef\bottop@{ttop}%
      \put@feature%
      \vspace{\tt@sp@ce}%
      \vspace{-\baselineskip}%
      \newline\hbox{}%
   \else
      \iffix@\ifttopfeature \vspace{\tt@sp@ce}\newline\hbox{}\newline\hbox{}\fi\fi
   \fi
   \ifnum\feature@top=1
      \ifnum\featureontop=0 \xdef\feature@top{0} \fi
      \xdef\bottop@{top}%
      \put@feature%
      \vspace{\t@sp@ce}%
      \vspace{-\baselineskip}%
      \newline\hbox{}%
   \else
      \iffix@\iftopfeature \vspace{\t@sp@ce}\newline\hbox{}\newline\hbox{}\fi\fi
   \fi
   \ifnum\rule@num<0 \else \ifnum\rule@top=0 \loopcount=0 \put@ruler \fi\fi
   \ifshow@logo\ifnum\logo@top=0
      \xdef\last@{\stack@sequencelogo @}%
      \ifx\logo@name@user\ampers@nd\xdef\logo@name{logo}\else\xdef\logo@name{\logo@name@user}\fi
      \xdef\clear@logo{y}%
      \put@logo%
      \xdef\clear@logo{n}%
   \fi\fi
   \ifshow@sublogo\ifnum\sublogo@top=0
      \read@sublogo%
      \xdef\last@{\stack@sublogo @}%
      \ifx\sublogo@name@user\ampers@nd\xdef\logo@name{subfamily}\else\xdef\logo@name{\sublogo@name@user}\fi
      \put@logo%
   \fi\fi
   \set@consensus
   \ifshow@cons\ifnum\cons@top=0
      \xdef\cons@now{y}%
      \xdef\first@{\consensus @}%
      \xdef\first@@@{\c@nscol @}%
      \loopcount=0\relax%
      \put@line%
      \xdef\c@nscol{}%
      \xdef\cons@now{no}%
   \fi\fi
   \ifx\hide@seqs\n@%
   \loopcount=0 %
   \loop
     \advance\loopcount by 1 %
     \xdef\second@{\csname hide@seq\the\loopcount\endcsname}%
     \xdef\first@{noshade}\nosh@defalse%
     \ifx\second@\first@ \nosh@detrue \xdef\second@{false}\fi
     \xdef\first@{false}%
     \ifx\second@\first@
       \ifnames@right
         \ifnumbers@right
            \expandafter\xdef\csname seq\the\loopcount\endcsname{%
               \csname seq\the\loopcount\endcsname%
               \csname res@count\the\loopcount\endcsname)%
               <\csname newseqname\the\loopcount\endcsname>}%
         \else
            \expandafter\xdef\csname seq\the\loopcount\endcsname{%
               \csname seq\the\loopcount\endcsname%
               <\csname newseqname\the\loopcount\endcsname>}%
         \fi
        \else
         \ifnumbers@right
            \expandafter\xdef\csname seq\the\loopcount\endcsname{%
               \csname seq\the\loopcount\endcsname%
               \csname res@count\the\loopcount\endcsname)}%
         \fi
       \fi
       \xdef\first@{\csname seq\the\loopcount\endcsname @}%
       \expandafter\ifx\csname seq@gap\the\loopcount\endcsname\yes%
       \ifnum\finger@linenum=0\seq@skip%
       \else%
           \ifnum\loopcount<\seq@count\seq@skip\fi%
       \fi%
     \fi%
     \put@line%
     \fi%
   \ifnum\loopcount<\seq@count\repeat%
   \fi%
   \ifshow@cons\ifnum\cons@top=1 %
      \xdef\cons@now{y}%
      \xdef\first@{\consensus @}%
      \xdef\first@@@{\c@nscol @}%
      \loopcount=0\relax%
      \put@line%
      \xdef\c@nscol{}%
      \xdef\cons@now{no}%
   \fi\fi%
   \ifnum\frame@=1 %
      \ifnum\frame@on=0 \xdef\frame@{0}\fi%
      \put@frame%
   \fi%
   \ifshow@logo\ifnum\logo@top=1 %
      \xdef\last@{\stack@sequencelogo @}%
      \ifx\logo@name@user\ampers@nd\xdef\logo@name{logo}\else\xdef\logo@name{\logo@name@user}\fi
      \xdef\clear@logo{y}%
      \put@logo%
      \xdef\clear@logo{n}%
   \fi\fi%
   \ifshow@sublogo\ifnum\sublogo@top=1
      \read@sublogo%
      \xdef\last@{\stack@sublogo @}
      \ifx\sublogo@name@user\ampers@nd\xdef\logo@name{subfamily}\else\xdef\logo@name{\sublogo@name@user}\fi
      \put@logo%
   \fi\fi%
   \ifnum\rule@num<0 %
   \else%
      \ifnum\rule@top=1 %
         \loopcount=0\relax%
         \ifnum\ruler@rot=0 %
         \else \vspace{\ruler@width}\vspace{-1.75\baselineskip}\newline\hbox{}%
         \fi
         \put@ruler%
         \ifnum\ruler@rot=0 \vspace{0.25\baselineskip}\fi%
      \fi%
   \fi%
   \ifnum\feature@bottom=1 %
      \ifnum\featureonbottom=0 \xdef\feature@bottom{0}\fi%
      \xdef\bottop@{bottom}%
      \vspace{\b@sp@ce}%
      \if\bottom@stretch y%
         \vspace{-\box@height}%
         \vspace{\b@r@stretch\box@height}%
      \fi%
      \put@feature%
   \else
      \iffix@
      \if\bottom@stretch y%
         \vspace{-\box@height}%
         \vspace{\b@r@stretch\box@height}%
      \fi%
      \ifbottomfeature%
         \vspace{\b@sp@ce}\newline\hbox{}\newline\hbox{}%
      \fi%
      \fi%
   \fi%
   \ifnum\feature@bbottom=1 %
      \ifnum\featureonbbottom=0 \xdef\feature@bbottom{0}\fi%
      \xdef\bottop@{bbottom}%
      \vspace{\bb@sp@ce}%
      \if\bbottom@stretch y%
         \vspace{-\box@height}%
         \vspace{\b@r@stretch\box@height}%
      \fi%
      \put@feature%
   \else
      \iffix@
      \if\bbottom@stretch y%
         \vspace{-\box@height}%
         \vspace{\b@r@stretch\box@height}%
      \fi%
      \ifbbottomfeature
         \vspace{\bb@sp@ce}\newline\hbox{}\newline\hbox{}%
      \fi
      \fi
   \fi
   \ifnum\feature@bbbottom=1 %
      \ifnum\featureonbbbottom=0 \xdef\feature@bbbottom{0}\fi%
      \xdef\bottop@{bbbottom}%
      \vspace{\bbb@sp@ce}%
      \if\bbbottom@stretch y%
         \vspace{-\box@height}%
         \vspace{\b@r@stretch\box@height}%
      \fi%
      \put@feature%
   \else
      \iffix@
      \if\bbbottom@stretch y%
         \vspace{-\box@height}%
         \vspace{\b@r@stretch\box@height}%
      \fi%
      \ifbbbottomfeature
         \vspace{\bbb@sp@ce}\newline\hbox{}\newline\hbox{}%
      \fi
      \fi
   \fi
   \ifnum\feature@bbbbottom=1 %
      \ifnum\featureonbbbbottom=0 \xdef\feature@bbbbottom{0}\fi%
      \xdef\bottop@{bbbbottom}%
      \vspace{\bbbb@sp@ce}%
      \if\bbbbottom@stretch y%
         \vspace{-\box@height}%
         \vspace{\b@r@stretch\box@height}%
      \fi%
      \put@feature%
   \else
      \iffix@
      \if\bbbbottom@stretch y%
         \vspace{-\box@height}%
         \vspace{\b@r@stretch\box@height}%
      \fi%
      \ifbbbbottomfeature
         \vspace{\bbbb@sp@ce}\newline\hbox{}\newline\hbox{}%
      \fi
      \fi
   \fi
   \xdef\consensus{} \xdef\ruler@{}
   \xdef\styleframe{}
   \xdef\textfeaturetop{}     \xdef\textfeaturebottom{}
   \xdef\textfeaturettop{}    \xdef\textfeaturebbottom{}
   \xdef\textfeaturetttop{}   \xdef\textfeaturebbbottom{}
   \xdef\textfeaturettttop{}  \xdef\textfeaturebbbbottom{}
   \xdef\stylefeaturetop{}    \xdef\stylefeaturebottom{}
   \xdef\stylefeaturettop{}   \xdef\stylefeaturebbottom{}
   \xdef\stylefeaturetttop{}  \xdef\stylefeaturebbbottom{}
   \xdef\stylefeaturettttop{} \xdef\stylefeaturebbbbottom{}
   \loopcount=0
   \loop
         \advance\loopcount by 1
         \xdef\seq@line{\csname sequence\the\loopcount\endcsname}
         \expandafter\remove@fromseq\seq@line
   \ifnum\loopcount<\seq@count \repeat}

\def\block@output{%
   \expandafter\ifnum\csname res@count\start@seq\endcsname<\end@num\relax
     \message{.}
     \ifx\out@put\y@
        \vbox{\set@lines}\par
        \block@skip
     \else
        \pos@count=1
        \findc@nsensus
        \loopcount=0
        \loop
           \advance\loopcount by 1\relax
           \xdef\seq@line{\csname sequence\the\loopcount\endcsname}
           \expandafter\remove@fromseq\seq@line
           \ifT@coffee
              \xdef\TC@cons{\csname TC0\endcsname}
              \expandafter\remove@fromTC\TC@cons
           \fi
        \ifnum\loopcount<\seq@count \repeat
     \fi
     \ifstop@
     \else
        \advance\seq@pointer by -\res@perline
        \ifnum\seq@pointer>\res@perline \block@output \fi
     \fi
   \fi}

%%%%% Basic input routines

\def\savedseqlength#1#2#3{%
   \expandafter\xdef\csname savelength#1seq#2\endcsname{#3}}

\def\set@savedseqlength{%
   \loopcount=0
   \loop
      \advance\loopcount by 1
      \expandafter\ifx%
         \csname savelength\@lign@count seq\the\loopcount\endcsname\relax
      \else
         \expandafter\xdef\csname seq@len\the\loopcount\endcsname{%
            \csname savelength\@lign@count seq\the\loopcount\endcsname}
      \fi
   \ifnum\loopcount<\seq@count\repeat
}

\def\save@lengths{%
   \loopcount=0
   \loop
       \advance\loopcount by 1\relax
       \immediate\write\@auxout{%
       \string\savedseqlength{\@lign@count}{\the\loopcount}%
           {\csname res@count\the\loopcount\endcsname}}
   \ifnum\loopcount<\seq@count \repeat
}

\def\do@cleanup{%
   \expandafter\firstchar@get\third@
   \expandafter\check@char\first@
   \ifletter
      \xdef\second@{\second@\first@}
   \else
      \ifnumber
         \ifx\first@\gre@ter
    \xdef\second@{\second@{$>$}}
 \else
         \ifx\first@\sm@ller
    \xdef\second@{\second@{$<$}}
 \else
         \xdef\second@{\second@\first@}
 \fi\fi
      \else
         \ifnum\code@num=6
            \xdef\second@{\second@\#}
 \else
         \ifnum\code@num=14
            \xdef\second@{\second@\%}
 \else
            \xdef\second@{\second@\noexpand\string\first@}
 \fi\fi
      \fi
   \fi
   \ifx\third@\@t \else \do@cleanup \fi
}

\def\cleanup@name{%
   \xdef\third@{\csname seqname\the\loopcount\endcsname @}
   \xdef\second@{}
   \do@cleanup
   \expandafter\xdef\csname newseqname\the\loopcount\endcsname{\second@}
}

\def\clear@seq{%
    \loopcount=0
    \loop
       \advance\loopcount by 1
       \expandafter\def\csname sequence\the\loopcount\endcsname{}
    \ifnum\loopcount<\seq@count \repeat
    \xdef\consensus{}
    \xdef\constopo{}
    \xdef\frame@on{0}
    \xdef\textfeaturetop{}       \xdef\featureontop{0}
    \xdef\textfeaturettop{}      \xdef\featureonttop{0}
    \xdef\textfeaturetttop{}     \xdef\featureontttop{0}
    \xdef\textfeaturettttop{}    \xdef\featureonttttop{0}
    \xdef\textfeaturebottom{}    \xdef\featureonbottom{0}
    \xdef\textfeaturebbottom{}   \xdef\featureonbbottom{0}
    \xdef\textfeaturebbbottom{}  \xdef\featureonbbbottom{0}
    \xdef\textfeaturebbbbottom{} \xdef\featureonbbbbottom{0}
    \xdef\styleframe{}
    \xdef\stylefeaturetop{}
    \xdef\stylefeaturettop{}
    \xdef\stylefeaturetttop{}
    \xdef\stylefeaturettttop{}
    \xdef\stylefeaturebottom{}
    \xdef\stylefeaturebbottom{}
    \xdef\stylefeaturebbbottom{}
    \xdef\stylefeaturebbbbottom{}}
\def\guess@protein{\seqtype{P}\message{<Seqtype guess: protein>}}
\def\guess@DNA{\seqtype{N}\message{<Seqtype guess: nucleotide>}}
\def\allmatch@out{%
    \xdef\leave@in{n}
    \loopcount=1
    \xdef\seq@line{\csname seq\the\loopcount\endcsname}
    \expandafter\res@get\seq@line
    \expandafter\xdef\csname seq\the\loopcount\endcsname{\seq@line}
    \ifnum\loopcount=\start@seq\relax
       \expandafter\check@char\first@
       \ifletter
          \advance\temp@@count by 1
          \ifnum\temp@@count=\end@num\relax
             \advance\temp@count by 1
             \xdef\second@{\the\temp@count}
             \advance\temp@count by -1
          \fi
       \fi
    \fi
    \ifx\first@\ampers@nd
       \ifx\domain@active\y@
          \xdef\stack@dom{\stack@dom\the\temp@count;}
       \fi
       \xdef\stack@dom{\stack@dom &;&;@}
    \else
       \xdef\first@@{\first@}
       \advance\temp@count by 1
       \loop
          \advance\loopcount by 1
          \xdef\seq@line{\csname seq\the\loopcount\endcsname}
          \expandafter\res@get\seq@line
          \expandafter\xdef\csname seq\the\loopcount\endcsname{\seq@line}
          \ifx\first@@\first@\else\xdef\leave@in{y}\fi
          \ifnum\loopcount=\start@seq\relax
             \expandafter\check@char\first@
             \ifletter
                \advance\temp@@count by 1
                \ifnum\temp@@count=\end@num\relax \xdef\second@{\the\temp@count}\fi
             \fi
          \fi
       \ifnum\loopcount<\seq@count\repeat
       \ifx\leave@in\y@
          \ifx\domain@active\n@
             \ifnum\start@seq=0
                \xdef\domain@active{y}
                \xdef\stack@dom{\stack@dom\the\temp@count;}
             \else
                \ifnum\temp@@count<\start@num\relax
                \else
                   \ifnum\temp@@count>\end@num\relax
                   \else
                      \xdef\domain@active{y}
                      \xdef\stack@dom{\stack@dom\the\temp@count;}
                   \fi
                \fi
             \fi
          \else
             \ifnum\start@seq>0
                \ifnum\temp@@count<\end@num\relax
                \else
                   \xdef\domain@active{n}
                   \xdef\stack@dom{\stack@dom\second@;}
                \fi
             \fi
          \fi
       \else
          \ifx\domain@active\y@
             \xdef\domain@active{n}
             \advance\temp@count by -1
             \xdef\stack@dom{\stack@dom\the\temp@count;}
             \advance\temp@count by 1
          \fi
       \fi
       \allmatch@out
    \fi
}
\def\domain@count{%
    \xdef\@ddg@p{n}
    \loopcount=0
    \ifT@coffee
       \xdef\seq@line{\csname T@cof\the\loopcount\endcsname}
       \expandafter\res@get\seq@line
       \expandafter\xdef\csname TC@num\the\loopcount\endcsname{\first@}
       \expandafter\xdef\csname T@cof\the\loopcount\endcsname{\seq@line}
    \fi
    \loop
       \advance\loopcount by 1
       \xdef\seq@line{\csname seq\the\loopcount\endcsname}
       \expandafter\res@get\seq@line
       \expandafter\xdef\csname res\the\loopcount\endcsname{\first@}
       \expandafter\xdef\csname seq\the\loopcount\endcsname{\seq@line}
       \ifT@coffee
          \xdef\seq@line{\csname T@cof\the\loopcount\endcsname}
          \expandafter\res@get\seq@line
          \expandafter\xdef\csname TC@num\the\loopcount\endcsname{\first@}
          \expandafter\xdef\csname T@cof\the\loopcount\endcsname{\seq@line}
       \fi
    \ifnum\loopcount<\seq@count\repeat
    \ifx\first@\ampers@nd
    \else
     \ifnum\next@domain@num>-99999\relax
         \ifnum\domain@seq=0
             \temp@count=\csname dom@count0\endcsname
             \advance\temp@count by 1
             \expandafter\xdef\csname dom@count0\endcsname{\the\temp@count}
         \fi
         \loopcount=0
         \loop
           \advance\loopcount by 1
            \xdef\first@{\csname res\the\loopcount\endcsname}
            \expandafter\check@char\first@
            \ifletter
               \temp@count=\csname dom@count\the\loopcount\endcsname
               \advance\temp@count by 1
               \expandafter\xdef\csname dom@count\the\loopcount\endcsname{\the\temp@count}
               \if\seq@type A \relax
                  \temp@count=\char@num
                  \ifnum\temp@count>96 \advance\temp@count by -32 \fi
                  \ifnum\temp@count=69 \guess@protein
                  \else
                  \ifnum\temp@count=70 \guess@protein
                  \else
                  \ifnum\temp@count=73 \guess@protein
                  \else
                  \ifnum\temp@count=76 \guess@protein
                  \else
                  \ifnum\temp@count=80 \guess@protein
                  \else
                  \ifnum\temp@count=81 \guess@protein
                  \fi\fi\fi\fi\fi\fi
               \fi
            \else
               \ifx\d@m@in\y@
                  \ifnum\loopcount=\domain@seq \xdef\@ddg@p{y} \fi
               \fi
            \fi
         \ifnum\loopcount<\seq@count\repeat
         \ifx\@ddg@p\y@
           \ifx\g@p\n@
            \loopcount=0
            \loop
            \advance\loopcount by 1
               \ifT@coffee
                  \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{%
                                   \csname T@coffee\the\loopcount\endcsname \csname TC@num\the\loopcount\endcsname}
               \fi
               \expandafter\xdef\csname sequence\the\loopcount\endcsname{%
                                \csname sequence\the\loopcount\endcsname \csname res\the\loopcount\endcsname}
               \expandafter\xdef\csname dom@num\the\loopcount\endcsname{%
                                \csname dom@num\the\loopcount\endcsname \csname dom@count\the\loopcount\endcsname,}
            \ifnum\loopcount<\seq@count\repeat
            \advance\total@count by 1
            \advance\outerloopcount by 1 \ifnum\outerloopcount=\res@perline \outerloopcount=0 \fi
           \fi
         \fi
         \expandafter\ifnum\csname dom@count\domain@seq\endcsname=\next@domain@num
            \xdef\d@m@in{y}
            \advance\total@count by 1
            \advance\outerloopcount by 1 \ifnum\outerloopcount=\res@perline \outerloopcount=0 \fi
            \loopcount=0
            \ifx\g@p\y@
               \ifT@coffee
                  \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{%
                                   \csname T@coffee\the\loopcount\endcsname \csname TC@num\the\loopcount\endcsname}
               \fi
            \fi
            \ifT@coffee
               \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{%
                                \csname T@coffee\the\loopcount\endcsname \csname TC@num\the\loopcount\endcsname}
            \fi
            \loop
               \advance\loopcount by 1
               \ifx\g@p\y@
                  \ifT@coffee
                     \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{%
                                      \csname T@coffee\the\loopcount\endcsname \csname TC@num\the\loopcount\endcsname}
                  \fi
                  \expandafter\xdef\csname sequence\the\loopcount\endcsname{%
                                   \csname sequence\the\loopcount\endcsname\equ@l}
                  \expandafter\xdef\csname dom@num\the\loopcount\endcsname{%
                                   \csname dom@num\the\loopcount\endcsname \csname dom@count\the\loopcount\endcsname,}
                  \ifnum\outerloopcount=0
                     \expandafter\xdef\csname dom@num@break\the\loopcount\endcsname{%
                                      \csname dom@num@break\the\loopcount\endcsname \csname dom@count\the\loopcount\endcsname,}
                  \fi
               \fi
               \ifT@coffee
                  \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{%
                                   \csname T@coffee\the\loopcount\endcsname \csname TC@num\the\loopcount\endcsname}
               \fi
               \expandafter\xdef\csname sequence\the\loopcount\endcsname{%
                                \csname sequence\the\loopcount\endcsname \csname res\the\loopcount\endcsname}
               \expandafter\xdef\csname dom@num\the\loopcount\endcsname{%
                                \csname dom@num\the\loopcount\endcsname \csname dom@count\the\loopcount\endcsname,}
               \ifnum\outerloopcount=0
                  \expandafter\xdef\csname dom@num@break\the\loopcount\endcsname{%
                                   \csname dom@num@break\the\loopcount\endcsname \csname dom@count\the\loopcount\endcsname,}
               \fi
            \ifnum\loopcount<\seq@count\repeat
            \ifx\@ddg@p\n@
               \expandafter\get@item\domain@num@list
               \xdef\domain@num@list{\first@}
            \fi
            \ifx\fourth@\ampers@nd \xdef\next@domain@num{-99999}
            \else
               \loopcount=\next@domain@num
               \advance\loopcount by 1
               \ifnum\loopcount=\fourth@
                  \xdef\g@p{n}
               \else
                  \xdef\g@p{y}
                     \advance\total@count by 1
                     \advance\outerloopcount by 1
                     \ifnum\outerloopcount=\res@perline
                        \outerloopcount=0
                        \loopcount=0
                        \loop
                           \advance\loopcount by 1
                           \expandafter\xdef\csname dom@num@break\the\loopcount\endcsname{%
                                            \csname dom@num@break\the\loopcount\endcsname \csname dom@count\the\loopcount\endcsname,}
                        \ifnum\loopcount<\seq@count\repeat
                     \fi
               \fi
               \xdef\next@domain@num{\fourth@} \xdef\end@num{\fourth@}
            \fi
         \fi
         \domain@count
     \fi
    \fi
}
\def\residue@count{%
    \expandafter\res@get\seq@line
    \if\first@\ampers@nd
    \else
         \advance\total@count by 1
         \advance\innerloopcount by 1
         \ifstart@ \advance\res@count by 1 \fi
         \ifnum\start@seq=0
            \advance\end@count by 1
%%%%%%%%%%
            \ifnum\end@count=\start@num\relax
               \xdef\start@number{\the\innerloopcount}
               \start@true \res@count=1
            \fi
%%%%%%%%%%
         \else
            \expandafter\check@char\first@
            \ifletter
               \advance\end@count by 1
               \if\seq@type A \relax
                  \temp@count=\char@num
                  \ifnum\temp@count>96 \advance\temp@count by -32 \fi
                  \ifnum\temp@count=69 \guess@protein
                  \else
                  \ifnum\temp@count=70 \guess@protein
                  \else
                  \ifnum\temp@count=73 \guess@protein
                  \else
                  \ifnum\temp@count=76 \guess@protein
                  \else
                  \ifnum\temp@count=80 \guess@protein
                  \else
                  \ifnum\temp@count=81 \guess@protein
                  \fi\fi\fi\fi\fi\fi
               \fi
            \fi
            \ifnum\end@count=\start@num\relax
               \xdef\start@number{\the\innerloopcount}
               \start@true \res@count=1
            \fi
      \fi
    \residue@count
    \fi}
\def\clean@seq{%
    \expandafter\res@get\seq@line
    \if\first@\ampers@nd \xdef\seq@line{\seq@@line}
    \else
       \expandafter\check@char\first@
       \ifnum\char@num>64
          \ifnum\char@num>96 \make@upper \fi
          \xdef\seq@@line{\seq@@line\first@}
       \else
       \ifnum\char@num=46
          \xdef\seq@@line{\seq@@line\d@t}
       \else
       \ifnum\char@num=45
          \xdef\seq@@line{\seq@@line\d@t}
       \else
       \ifnum\char@num=42
          \xdef\seq@@line{\seq@@line\questi@n}
       \fi
       \fi
       \fi
       \fi
       \clean@seq
    \fi}
\def\read@loop{%
    \read\alignfile to \inline
    \xdef\last@{\expandafter\string\inline}
    \ifx\last@\par@
      \else
         \xdef\inline{\inline @}
         \expandafter\seq@get\inline
         \ifstop@
         \else
         \innerloopcount=\csname @rd\the\loopcount\endcsname\relax
         \expandafter\ifx\csname seq@name\the\loopcount\endcsname\first@
             \xdef\seq@@line{} \xdef\seq@line{\seq@line &@} \clean@seq
             \expandafter\xdef\csname sequence\the\innerloopcount\endcsname{%
                  \csname sequence\the\innerloopcount\endcsname\seq@line}
             \advance\loopcount by 1
             \ifnum\loopcount>\seq@count
                \loopcount=1
             \fi
         \fi
         \fi
       \fi
    \ifeof\alignfile
     \ifx\all@out\y@
       \xdef\domain@seq{0}
       \loopcount=0
       \loop
          \advance\loopcount by 1
          \expandafter\xdef\csname seq\the\loopcount\endcsname{\csname sequence\the\loopcount\endcsname &@}
       \ifnum\loopcount<\seq@count\repeat
       \xdef\domain@active{n}
       \xdef\stack@dom{}
       \temp@count=0
       \temp@@count=0
       \allmatch@out
       \xdef\dom@in{y}
     \fi
     \ifx\dom@in\y@
       \loopcount=0
       \ifT@coffee
          \xdef\temp@{\csname T@coffee\the\loopcount\endcsname}
          \expandafter\get@temp\temp@
          \expandafter\xdef\csname T@cof\the\loopcount\endcsname{\temp@ &@}
          \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{}
       \fi
       \expandafter\xdef\csname dom@count\the\loopcount\endcsname{0}
       \loop
          \advance\loopcount by 1
          \ifT@coffee
             \xdef\temp@{\csname T@coffee\the\loopcount\endcsname}
             \expandafter\get@temp\temp@
             \expandafter\xdef\csname T@cof\the\loopcount\endcsname{\temp@ &@}
             \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{}
          \fi
          \expandafter\xdef\csname seq\the\loopcount\endcsname{\csname sequence\the\loopcount\endcsname &@}
          \expandafter\xdef\csname sequence\the\loopcount\endcsname{}
          \expandafter\xdef\csname dom@num\the\loopcount\endcsname{}
          \expandafter\xdef\csname dom@num@break\the\loopcount\endcsname{}
          \expandafter\xdef\csname dom@count\the\loopcount\endcsname{\csname res@count\the\loopcount\endcsname}
       \ifnum\loopcount<\seq@count\repeat
       \xdef\domain@num@list{}
       \xdef\last@{\stack@dom}
       \get@domain
       \xdef\domain@num@list{\domain@num@list &,@}
       \expandafter\get@item\domain@num@list
       \xdef\next@domain@num{\fourth@} \xdef\domain@num@list{\first@}
       \xdef\d@m@in{n}
       \domain@count
       \loopcount=0
       \ifT@coffee
          \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{\csname T@coffee\the\loopcount\endcsname @}
       \fi
       \loop
          \advance\loopcount by 1
          \ifT@coffee
             \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{\csname T@coffee\the\loopcount\endcsname @}
          \fi
          \expandafter\xdef\csname dom@num\the\loopcount\endcsname{\csname dom@num\the\loopcount\endcsname @}
          \expandafter\xdef\csname dom@num@break\the\loopcount\endcsname{%
                           \csname dom@num@break\the\loopcount\endcsname \csname dom@count\the\loopcount\endcsname,@}
       \ifnum\loopcount<\seq@count\repeat
       \if\seq@type A \guess@DNA \fi
       \advance\seq@pointer by \total@count\relax
       \xdef\total@pos{\the\total@count}

     \else

       \ifnum\start@seq=0
          \xdef\seq@line{\csname sequence1\endcsname &@}
       \else
          \xdef\seq@line{\csname sequence\start@seq\endcsname &@}
       \fi
       \res@count=0
       \innerloopcount=0
       \residue@count
       \if\seq@type A \guess@DNA \fi
       \advance\seq@pointer by \res@count\relax
       \xdef\total@pos{\the\total@count}
       \ifx\end@num\n@\xdef\end@num{\the\end@count}\fi
       \total@count=\end@count\relax
       \xdef\first@{\csname res@count\start@seq\endcsname}
       \advance\total@count by \first@\relax
       \xdef\first@{\the\total@count}
       \ifnum\end@num>\total@count\xdef\end@num{\the\total@count}\fi
     \fi
     \ifshow@sublogo \prep@sublogo \fi
     \ifshow@logo  \prep@logo  \fi
     \ifx\label@motif\y@  \prep@motif \fi
     \ifnum\seq@pointer>\res@perline \block@output \fi
    \else \read@loop
    \fi}
\def\read@fasta{%
    \read\alignfile to \inline
    \xdef\last@{\expandafter\string\inline}
    \ifx\last@\par@
      \else
         \xdef\seq@line{\inline}
         \xdef\inline{\inline @}
 \expandafter\firstchar@get\inline
         \ifstop@
         \else
 \ifx\first@\gre@ter
    \advance\loopcount by 1\relax
    \expandafter\seq@get\third@
    \xdef\seq@name{\first@}
    \xdef\second@{\first@ &}
    \ifx\second@\ampers@nd \xdef\seq@name{seq\the\loopcount}\fi
    \innerloopcount=\csname @rd\the\loopcount\endcsname\relax
 \else
    \expandafter\ifx\csname seq@name\the\loopcount\endcsname\seq@name
              \xdef\seq@@line{} \xdef\seq@line{\seq@line &@} \clean@seq
              \expandafter\xdef\csname sequence\the\innerloopcount\endcsname{%
                  \csname sequence\the\innerloopcount\endcsname\seq@line}
            \fi
 \fi
         \fi
       \fi
    \ifeof\alignfile
     \ifx\all@out\y@
       \xdef\domain@seq{0}
       \loopcount=0
       \loop
          \advance\loopcount by 1
          \expandafter\xdef\csname seq\the\loopcount\endcsname{\csname sequence\the\loopcount\endcsname &@}
       \ifnum\loopcount<\seq@count\repeat
       \xdef\domain@active{n}
       \xdef\stack@dom{}
       \temp@count=0
       \temp@@count=0
       \allmatch@out
       \xdef\dom@in{y}
     \fi
     \ifx\dom@in\y@
       \loopcount=0
       \ifT@coffee
          \xdef\temp@{\csname T@coffee\the\loopcount\endcsname}
          \expandafter\get@temp\temp@
          \expandafter\xdef\csname T@cof\the\loopcount\endcsname{\temp@ &@}
          \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{}
       \fi
       \expandafter\xdef\csname dom@count\the\loopcount\endcsname{0}
       \loop
          \advance\loopcount by 1
          \ifT@coffee
             \xdef\temp@{\csname T@coffee\the\loopcount\endcsname}
             \expandafter\get@temp\temp@
             \expandafter\xdef\csname T@cof\the\loopcount\endcsname{\temp@ &@}
             \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{}
          \fi
          \expandafter\xdef\csname seq\the\loopcount\endcsname{\csname sequence\the\loopcount\endcsname &@}
          \expandafter\xdef\csname sequence\the\loopcount\endcsname{}
          \expandafter\xdef\csname dom@num\the\loopcount\endcsname{}
          \expandafter\xdef\csname dom@num@break\the\loopcount\endcsname{}
          \expandafter\xdef\csname dom@count\the\loopcount\endcsname{\csname res@count\the\loopcount\endcsname}
       \ifnum\loopcount<\seq@count\repeat
       \xdef\domain@num@list{}
       \xdef\last@{\stack@dom}
       \get@domain
       \xdef\domain@num@list{\domain@num@list &,@}
       \expandafter\get@item\domain@num@list
       \xdef\next@domain@num{\fourth@} \xdef\domain@num@list{\first@}
       \xdef\d@m@in{n}
       \domain@count
       \loopcount=0
       \ifT@coffee
          \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{\csname T@coffee\the\loopcount\endcsname @}
       \fi
       \loop
          \advance\loopcount by 1
          \ifT@coffee
             \expandafter\xdef\csname T@coffee\the\loopcount\endcsname{\csname T@coffee\the\loopcount\endcsname @}
          \fi
          \expandafter\xdef\csname dom@num\the\loopcount\endcsname{\csname dom@num\the\loopcount\endcsname @}
          \expandafter\xdef\csname dom@num@break\the\loopcount\endcsname{%
                           \csname dom@num@break\the\loopcount\endcsname \csname dom@count\the\loopcount\endcsname,@}
       \ifnum\loopcount<\seq@count\repeat
       \if\seq@type A \guess@DNA \fi
       \advance\seq@pointer by \total@count\relax
       \xdef\total@pos{\the\total@count}

     \else

       \ifnum\start@seq=0
          \xdef\seq@line{\csname sequence1\endcsname &@}
       \else
          \xdef\seq@line{\csname sequence\start@seq\endcsname &@}
       \fi
       \res@count=0
       \innerloopcount=0
       \residue@count
       \if\seq@type A \guess@DNA \fi
       \advance\seq@pointer by \res@count
       \xdef\total@pos{\the\total@count}
       \ifx\end@num\n@\xdef\end@num{\the\end@count}\fi
       \total@count=\end@count\relax
       \xdef\first@{\csname res@count\start@seq\endcsname}
       \advance\total@count by \first@\relax
       \xdef\first@{\the\total@count}
       \ifnum\end@num>\total@count\xdef\end@num{\the\total@count}\fi
     \fi
     \ifshow@sublogo \prep@sublogo \fi
     \ifshow@logo  \prep@logo  \fi
     \ifx\label@motif\y@  \prep@motif \fi
     \ifnum\seq@pointer>\res@perline \block@output \fi
    \else
       \read@fasta
    \fi}
\def\read@lines{%
    \openin\alignfile = \alignfilename
    \clear@seq
    \ifnum\start@seq>0
       \xdef\start@seq{\csname @rd\start@seq\endcsname} \fi
    \loopcount=\start@num
    \advance\loopcount by -\csname res@count\start@seq\endcsname\relax
    \expandafter\ifnum\csname res@count\start@seq\endcsname<\start@num\relax
       \xdef\start@num{\the\loopcount}
    \else \start@true \fi
    \res@count=0 \seq@pointer=0 \end@count=0 \total@count=0
    \xdef\start@number{0}
    \ifx\exp@rt\y@ \prep@reexp@rtfile \fi
    \ifx\f@st@\y@
       \loopcount=0
       \read@fasta
    \else
       \loopcount=1
       \read@loop
    \fi
    \ifnum\seq@pointer>0
       \ifstop@
       \else
          \res@count=\res@perline
          \res@perline=\seq@pointer
          \block@output
       \fi
    \fi
    \ifshow@sublogo \closein\sublogofile \fi
    \ifx\exp@rt\y@ \closeout\exp@rtfile \fi
    \closein\alignfile
    \message{)}
}

%%%%%  Read alignment, decide whether MSF or ALN, interpret

\def\readalignfile#1{%
 \def\alignfilename{#1}
 \xdef\first@{byhand}
 \ifx\alignfilename\first@
 \else
 \openin\alignfile = #1
 \ifeof\alignfile
    \PackageError{TeXshade}
    {File `#1' not found}
    {\MessageBreak
     The alignment file you specified is missing or you have \MessageBreak
     misspelled it. \MessageBreak\MessageBreak
     Stop here, otherwise you're likely getting in trouble. \MessageBreak
     Type X <return> to quit. \MessageBreak
}
 \else
    \message{(\alignfilename :}
    \xdef\seq@type{A} \xdef\he@der{no} \xdef\f@st@{no}
    \xdef\first@line{y}
    \seq@count=0 \loopcount=0 \innerloopcount=0 \temp@count=0
    \loop
       \read\alignfile to \inline
       \xdef\test@{\expandafter\string\inline}
       \ifx\test@\par@ \innerloopcount=0
       \else
          \xdef\msfline{\inline & & & & @}
          \expandafter\inf@@get\msfline
          \ifx\first@\@msf \expandafter\type@get\msfline \fi
          \ifx\second@\@msf   \expandafter\type@get\msfline \fi
          \ifx\third@\@msf \expandafter\type@get\msfline \fi
          \ifx\first@\n@me \advance\loopcount by 1\relax
             \expandafter\xdef\csname seqname\the\loopcount\endcsname{\second@}
             \expandafter\xdef\csname seq@len\the\loopcount\endcsname{\fourth@}
          \fi
          \ifx\first@\he@derend
             \ifnum\loopcount>0 \xdef\he@der{yes} \fi
       \fi
       \xdef\alnline{\inline @}
       \expandafter\check@letter\alnline
       \ifletter
          \expandafter\seq@get\alnline
          \advance\innerloopcount by 1\relax
          \seq@count=\innerloopcount
          \expandafter\xdef\csname newseqname\the\seq@count\endcsname{\first@}
   \else
     \expandafter\firstchar@get\alnline
     \ifx\first@\gre@ter
        \ifx\first@line\y@ \xdef\f@st@{y}\fi
                \expandafter\seq@get\third@
                \advance\temp@count by 1\relax
        \xdef\second@{\first@ &}
        \ifx\second@\ampers@nd \xdef\first@{seq\the\temp@count}\fi
                \expandafter\xdef\csname seq@name\the\temp@count\endcsname{\first@}
             \fi
          \fi
       \fi
      \xdef\first@line{n}
    \ifeof\alignfile \else\repeat
    \closein\alignfile
    \xdef\first@{no}
    \ifx\he@der\first@
      \loopcount=0
      \ifx\f@st@\y@
        \seq@count=\temp@count \loopcount=0
        \loop
          \advance\loopcount by 1
          \expandafter\xdef\csname seqname\the\loopcount\endcsname{%
                              \csname seq@name\the\loopcount\endcsname}
          \expandafter\xdef\csname newseqname\the\loopcount\endcsname{%
                              \csname seq@name\the\loopcount\endcsname}
          \expandafter\xdef\csname seq@len\the\loopcount\endcsname{99999999}
        \ifnum\loopcount<\seq@count \repeat
      \else
        \loop
          \advance\loopcount by 1
          \expandafter\xdef\csname seqname\the\loopcount\endcsname{%
                              \csname newseqname\the\loopcount\endcsname}
          \expandafter\xdef\csname seq@len\the\loopcount\endcsname{99999999}
        \ifnum\loopcount<\seq@count \repeat
      \fi
    \else
       \seq@count=\loopcount \loopcount=0 \box@width=0pt
       \loop
          \advance\loopcount by 1
          \expandafter\xdef\csname newseqname\the\loopcount\endcsname{%
                              \csname seqname\the\loopcount\endcsname}
       \ifnum\loopcount<\seq@count \repeat
    \fi
    \set@savedseqlength
    \loopcount=0 \xdef\seq@order{}
    \expandafter\xdef\csname stack@dom\endcsname{&;&;&;&;@}
    \expandafter\xdef\csname stack@reg\the\loopcount\endcsname{&;&;&;&;@}
    \expandafter\xdef\csname stack@tintreg\the\loopcount\endcsname{&;&;&;@}
    \expandafter\xdef\csname stack@emphreg\the\loopcount\endcsname{&;&;&;@}
    \expandafter\xdef\csname stack@lowerreg\the\loopcount\endcsname{&;&;&;@}
    \expandafter\xdef\csname stack@framereg\the\loopcount\endcsname{&;&;&;@}
    \expandafter\xdef\csname stack@shadingreg\the\loopcount\endcsname{&;&;&;@}
    \expandafter\xdef\csname stack@top\the\loopcount\endcsname{&;&;&;&;@}
    \expandafter\xdef\csname stack@ttop\the\loopcount\endcsname{&;&;&;&;@}
    \expandafter\xdef\csname stack@tttop\the\loopcount\endcsname{&;&;&;&;@}
    \expandafter\xdef\csname stack@ttttop\the\loopcount\endcsname{&;&;&;&;@}
    \expandafter\xdef\csname stack@bottom\the\loopcount\endcsname{&;&;&;&;@}
    \expandafter\xdef\csname stack@bbottom\the\loopcount\endcsname{&;&;&;&;@}
    \expandafter\xdef\csname stack@bbbottom\the\loopcount\endcsname{&;&;&;&;@}
    \expandafter\xdef\csname stack@bbbbottom\the\loopcount\endcsname{&;&;&;&;@}
    \expandafter\xdef\csname seq@start\the\loopcount\endcsname{1}
    \expandafter\xdef\csname name@col\the\loopcount\endcsname{yes}
    \expandafter\xdef\csname number@col\the\loopcount\endcsname{yes}
    \loop
       \advance\loopcount by 1
       \expandafter\xdef\csname @rd\the\loopcount\endcsname{\the\loopcount}
       \expandafter\xdef\csname res@count\the\loopcount\endcsname{0}
       \cleanup@name
       \expandafter\xdef\csname tint@seq\the\loopcount\endcsname{n}
       \expandafter\xdef\csname emph@seq\the\loopcount\endcsname{n}
       \expandafter\xdef\csname lower@seq\the\loopcount\endcsname{n}
       \expandafter\xdef\csname hide@seq\the\loopcount\endcsname{false}
       \expandafter\xdef\csname hide@@@seq\the\loopcount\endcsname{false}
       \expandafter\xdef\csname hide@name\the\loopcount\endcsname{no}
       \expandafter\xdef\csname name@col\the\loopcount\endcsname{yes}
       \expandafter\xdef\csname hide@number\the\loopcount\endcsname{no}
       \expandafter\xdef\csname number@col\the\loopcount\endcsname{yes}
       \expandafter\xdef\csname stack@reg\the\loopcount\endcsname{&;&;&;&;@}
       \expandafter\xdef\csname stack@tintreg\the\loopcount\endcsname{&;&;&;@}
       \expandafter\xdef\csname stack@emphreg\the\loopcount\endcsname{&;&;&;@}
       \expandafter\xdef\csname stack@lowerreg\the\loopcount\endcsname{&;&;&;@}
       \expandafter\xdef\csname stack@framereg\the\loopcount\endcsname{&;&;&;@}
       \expandafter\xdef\csname stack@shadingreg\the\loopcount\endcsname{&;&;&;@}
       \expandafter\xdef\csname stack@top\the\loopcount\endcsname{&;&;&;&;@}
       \expandafter\xdef\csname stack@ttop\the\loopcount\endcsname{&;&;&;&;@}
       \expandafter\xdef\csname stack@tttop\the\loopcount\endcsname{&;&;&;&;@}
       \expandafter\xdef\csname stack@ttttop\the\loopcount\endcsname{&;&;&;&;@}
       \expandafter\xdef\csname stack@bottom\the\loopcount\endcsname{&;&;&;&;@}
       \expandafter\xdef\csname stack@bbottom\the\loopcount\endcsname{&;&;&;&;@}
       \expandafter\xdef\csname stack@bbbottom\the\loopcount\endcsname{&;&;&;&;@}
       \expandafter\xdef\csname stack@bbbbottom\the\loopcount\endcsname{&;&;&;&;@}
       \expandafter\xdef\csname seq@gap\the\loopcount\endcsname{no}
       \expandafter\xdef\csname seq@start\the\loopcount\endcsname{1}
       \expandafter\xdef\csname mol@weight\the\loopcount\endcsname{0}
       \expandafter\xdef\csname ch@rge\the\loopcount\endcsname{0}
       \ifnum\loopcount=1 \xdef\seq@order{\the\loopcount}
       \else              \xdef\seq@order{\seq@order,\the\loopcount}\fi
    \ifnum\loopcount<\seq@count \repeat
    \xdef\seq@order{\seq@order,@}
 \killseq@count=\seq@count
 \seq@percent=100
 \ifnum\seq@count>0 \divide\seq@percent by \seq@count \fi
 \fi
 \fi
}

%%%%%  TeXshade

\def\calc@widths{%
   \fontfamily{cmss}\fontseries{m}\fontshape{n}
   \selectfont
   \setbox1=\hbox{\residues@size{A}}\logo@height=\ht1
   \setlength\logo@height{\logo@stretch\logo@height}
   \fontfamily{\residues@family}
   \fontseries{\residues@series}
   \fontshape{\residues@shape}
   \selectfont
   \setbox1=\hbox{\residues@size{W}}\box@width=1.15\wd1
   \global\setlength\box@width{\char@stretch\box@width}
   \box@height=1.2\ht1
   \setbox1=\hbox{\residues@size{g}}\box@depth=1.1\dp1
   \global\setlength\box@height{\line@stretch\box@height}
   \global\setlength\box@depth{\line@stretch\box@depth}
   \baselineskip=\box@height \advance\baselineskip by \box@depth
   \lineskip=0pt
   \ifshow@cons\setbox1=\hbox{\cons@name}\name@width=\wd1\else\name@width=0pt\fi
   \loopcount=0
   \expandafter\getregion@fromstack{\the\loopcount}
   \expandafter\getregion@fromtintstack{\the\loopcount}
   \expandafter\getregion@fromemphstack{\the\loopcount}
   \expandafter\getregion@fromlowerstack{\the\loopcount}
   \expandafter\getregion@fromframestack{\the\loopcount}
   \expandafter\getregion@fromshadingstack{\the\loopcount}
   \xdef\bottop@{top}       \expandafter\getregion@fromfstack{\the\loopcount}
   \xdef\bottop@{ttop}      \expandafter\getregion@fromfstack{\the\loopcount}
   \xdef\bottop@{tttop}     \expandafter\getregion@fromfstack{\the\loopcount}
   \xdef\bottop@{ttttop}    \expandafter\getregion@fromfstack{\the\loopcount}
   \xdef\bottop@{bottom}    \expandafter\getregion@fromfstack{\the\loopcount}
   \xdef\bottop@{bbottom}   \expandafter\getregion@fromfstack{\the\loopcount}
   \xdef\bottop@{bbbottom}  \expandafter\getregion@fromfstack{\the\loopcount}
   \xdef\bottop@{bbbbottom} \expandafter\getregion@fromfstack{\the\loopcount}
   \fontfamily{\namestext@family}
   \fontseries{\namestext@series}
   \fontshape{\namestext@shape}
   \selectfont
   \ifshow@logo
      \ifx\logo@name@user\ampers@nd
         \setbox1=\hbox{\namestext@size logo\kern1em}
      \else
         \setbox1=\hbox{\namestext@size\logo@name@user\kern1em}
      \fi
      \ifnum\wd1>\name@width \name@width=\wd1 \fi
   \fi
   \ifshow@sublogo
      \ifx\sublogo@name@user\ampers@nd
         \setbox1=\hbox{\namestext@size family\kern1em}
      \else
         \setbox1=\hbox{\namestext@size\sublogo@name@user\kern1em}
      \fi
      \ifnum\wd1>\name@width \name@width=\wd1 \fi
      \ifx\hide@negatives\n@
         \setbox1=\hbox{\namestext@size\sublogo@name@neg\kern1em}
      \fi
      \ifnum\wd1>\name@width \name@width=\wd1 \fi
   \fi
   \loopcount=1
   \loop
       \setbox1=\hbox{\namestext@size\csname newseqname\the\loopcount\endcsname}
       \ifnum\wd1>\name@width \name@width=\wd1 \fi
       \ifnum\ht1>\box@height
          \box@height=1.1\ht1
          \global\setlength\box@height{\line@stretch\box@height}
          \baselineskip=\box@height \advance\baselineskip by \box@depth
       \fi
       \ifnum\dp1>\box@depth
          \box@depth=1.1\dp1
          \global\setlength\box@depth{\line@stretch\box@depth}
          \baselineskip=\box@height \advance\baselineskip by \box@depth
       \fi
       \expandafter\getregion@fromstack{\the\loopcount}
       \expandafter\getregion@fromtintstack{\the\loopcount}
       \expandafter\getregion@fromemphstack{\the\loopcount}
       \expandafter\getregion@fromlowerstack{\the\loopcount}
       \expandafter\getregion@fromframestack{\the\loopcount}
       \expandafter\getregion@fromshadingstack{\the\loopcount}
       \xdef\bottop@{top}       \expandafter\getregion@fromfstack{\the\loopcount}
       \xdef\bottop@{ttop}      \expandafter\getregion@fromfstack{\the\loopcount}
       \xdef\bottop@{tttop}     \expandafter\getregion@fromfstack{\the\loopcount}
       \xdef\bottop@{ttttop}    \expandafter\getregion@fromfstack{\the\loopcount}
       \xdef\bottop@{bottom}    \expandafter\getregion@fromfstack{\the\loopcount}
       \xdef\bottop@{bbottom}   \expandafter\getregion@fromfstack{\the\loopcount}
       \xdef\bottop@{bbbottom}  \expandafter\getregion@fromfstack{\the\loopcount}
       \xdef\bottop@{bbbbottom} \expandafter\getregion@fromfstack{\the\loopcount}
       \innerloopcount = \csname seq@len\the\loopcount\endcsname
       \advance\innerloopcount by \csname seq@start\the\loopcount\endcsname
       \advance\innerloopcount by -1
       \expandafter\xdef\csname seq@len\the\loopcount\endcsname{\the\innerloopcount}
       \advance\loopcount by 1
   \ifnum\loopcount>\seq@count \else \repeat
   \advance\name@width by -2em
   \global\xdef\name@@width{\the\name@width}
   \advance\name@width by 3em
   \fontfamily{\numbertext@family}
   \fontseries{\numbertext@series}
   \fontshape{\numbertext@shape}
   \selectfont
   \setbox1=\hbox{\bottomruler@size\num@width\,-}
   \xdef\ruler@width{\the\wd1}
   \setbox1=\hbox{\numbertext@size\num@width}
   \number@width=\wd1
   \advance\number@width by 1em
   \loopcount=\linewidth
   \ifnames@   \advance\loopcount by -\name@width \fi
   \width@tmp=1.6\box@width
   \ifnumbers@
      \ifnumbers@left
         \advance\loopcount by -\number@width
      \else
         \xdef\first@{left}
         \ifx\show@logoscale\first@
            \advance\loopcount by -\width@tmp
         \fi
      \fi
      \ifnumbers@right
         \advance\loopcount by -\number@width
      \else
         \xdef\first@{right}
         \ifx\show@logoscale\first@
            \advance\loopcount by -\width@tmp
         \fi
      \fi
   \else
      \xdef\first@{left}
      \ifx\show@logoscale\first@
         \advance\loopcount by -\width@tmp
      \fi
      \xdef\first@{right}
      \ifx\show@logoscale\first@
         \advance\loopcount by -\width@tmp
      \fi
      \xdef\first@{leftright}
      \ifx\show@logoscale\first@
         \advance\loopcount by -\width@tmp
         \advance\loopcount by -\width@tmp
      \fi
   \fi
   \divide\loopcount by \box@width
   \divide\loopcount by 5 \multiply\loopcount by 5
   \ifrpl@fix\else
   \ifnum\res@perline>\loopcount \res@perline=\loopcount\fi\fi
   \ifnum\finger@linenum>0
      \width@tmp=\linewidth
      \ifnames@   \advance\width@tmp by -\name@width \fi
      \ifnumbers@ \advance\width@tmp by -\number@width \fi
      \divide\width@tmp by \finger@linenum
      \global\setlength\box@width{\width@tmp}
   \fi
   \center@fill=\linewidth
   \ifnames@   \advance\center@fill by -\name@width \fi
   \ifnumbers@ \advance\center@fill by -\number@width \fi
   \width@tmp=\box@width \multiply\width@tmp by \res@perline
   \advance\center@fill by -\width@tmp
   \ifx\out@put\y@\leftskip\c@factor\center@fill\fi
   \ifx\logo@colors@set\n@
     \if\seq@type N
      \clearlogocolors[Yellow]
      \logocolor{G}{Black}
      \logocolor{A}{Green}
      \logocolor{TU}{Red}
      \logocolor{C}{Blue}
     \else
      \clearlogocolors
      \logocolor{DE}{Red}
      \logocolor{CM}{Yellow}
      \logocolor{KR}{Blue}
      \logocolor{ST}{Orange}
      \logocolor{FY}{MidnightBlue}
      \logocolor{NQ}{Cyan}
      \logocolor{G}{LightGray}
      \logocolor{LVI}{Green}
      \logocolor{A}{DarkGray}
      \logocolor{W}{CarnationPink}
      \logocolor{H}{CornflowerBlue}
      \logocolor{P}{Apricot}
      \logocolor{BZ}{LightMagenta}
     \fi
   \fi
}

\def\multiple@dssp{%
   \advance\loopcount by 1
   \include@DSSP
   \ifnum\loopcount<\dssp@num\multiple@dssp\fi}

\def\multiple@stride{%
   \advance\loopcount by 1
   \include@stride
   \ifnum\loopcount<\stride@num\multiple@stride\fi}

\def\multiple@PHD{%
   \advance\loopcount by 1
   \include@PHD
   \ifnum\loopcount<\PHD@num\multiple@PHD\fi}

\def\multiple@HMMTOP{%
   \advance\loopcount by 1
   \include@HMMTOP
   \ifnum\loopcount<\HMMTOP@num\multiple@HMMTOP\fi}

\newenvironment{texshade}[2][&]%
  {\standarddefinitions
   \c@d@ns
   \xdef\first@{#1}\ifx\first@\ampers@nd\else\input{#1}\fi
   \readalignfile{#2}
   }%
  {\ifnum\seq@count>0
      \loopcount=0
      \ifnum\loopcount<\dssp@num \multiple@dssp\fi
      \loopcount=0
      \ifnum\loopcount<\stride@num \multiple@stride\fi
      \loopcount=0
      \ifnum\loopcount<\PHD@num \multiple@PHD\fi
      \loopcount=0
      \ifnum\loopcount<\HMMTOP@num \multiple@HMMTOP\fi
      \loopcount=1 \kill@seqnow
      \reorder@seqs\seq@order \seq@count=\killseq@count
      \global\xdef\seq@num{\the\seq@count}
      \clear@sim@count
      \ifnum\csname res@count\start@seq\endcsname<0
       \ifnum\start@num>0
         \loopcount=\start@num
         \advance\loopcount by -1
         \xdef\start@num{\the\loopcount}
       \fi
      \fi
      \ifnum\rule@num>0
         \loopcount=\csname res@count\rule@num\endcsname
         \divide\loopcount by \ruler@step
         \multiply\loopcount by \ruler@step
         \ifnum\loopcount<0
            \ifnum\ruler@step<3
               \advance\loopcount by \ruler@step
            \fi
         \else
            \advance\loopcount by \ruler@step
         \fi
         \xdef\rule@tens{\the\loopcount}
      \else
         \loopcount=\cons@count
         \divide\loopcount by \ruler@step
         \multiply\loopcount by \ruler@step
         \ifnum\loopcount<0
            \ifnum\ruler@step<3
               \advance\loopcount by \ruler@step
            \fi
         \else
            \advance\loopcount by \ruler@step
         \fi
         \xdef\rule@tens{\the\loopcount}
      \fi
      \xdef\first@{top}
      \ifx\cap@pos\first@
         \xdef\@captype{figure}
         \ifx\c@pshort\n@
           \caption{\c@p}
         \else
           \caption[\c@pshort]{\c@p}
         \fi
      \fi
      \bgroup
         \ifx\out@put\y@\bigskip\fi
         \iffuncmode \show@consfalse \fi
         \ifall@fshade \iffuncmode \else \all@fshadefalse \fi\fi
         \ifnum\finger@linenum>0
             \show@consfalse
             \hidechartrue
             \message{<Fingerprinting---please wait>}
         \fi
         \calc@widths
         \read@lines
     \save@lengths
         \iflegend@
            \vspace{\vspace@legend}
            \setbox1=\vbox{\do@legend}
            \vbox{\do@legend}\par
            \ifnum\ht1<-\vspace@legend
            \vspace{-\ht1}\vspace{-\vspace@legend}
            \fi
         \fi
      \egroup
      \xdef\first@{bottom}
      \ifx\cap@pos\first@
         \vspace{-\baselineskip}
         \xdef\@captype{figure}
         \ifx\c@pshort\n@
           \caption{\c@p}
         \else
           \caption[\c@pshort]{\c@p}
         \fi
      \fi
   \fi}

\def\standarddefinitions{%
\xdef\prfx{pep}\clear@groups\clear@sims
\xdef\prfx{DNA}\clear@groups\clear@sims
\clearfuncgroups
\clear@simpairs
\shadingcolors{blues}
\shadingcolors{reds}
\shadingcolors{greens}
\shadingcolors{grays}
\shadingcolors{black}
\loopcount=\@lign@count
\advance\loopcount by 1\relax
\xdef\@lign@count{\the\loopcount}
\start@true \xdef\start@num{1} \xdef\start@seq{0}
\stop@false \xdef\end@num{n} \xdef\seq@regions{0}
\cons@count=0
\expandafter\xdef\csname res@count0\endcsname{0}
\xdef\allow@zero{n} \xdef\c@ns@shift{0}
\regionalshadefalse\regionalemphfalse\regionallowerfalse\regionaltintfalse
\frame@false\shading@false
\xdef\ruler@rot{0}
\topfeaturefalse    \bottomfeaturefalse
\ttopfeaturefalse   \bbottomfeaturefalse
\tttopfeaturefalse  \bbbottomfeaturefalse
\ttttopfeaturefalse \bbbbottomfeaturefalse
\all@fshadefalse\hidecharfalse
\xdef\finger@linenum{0}
\xdef\hide@seqs{n}
\xdef\dssp@num{0} \xdef\stride@num{0} \xdef\PHD@num{0} \xdef\HMMTOP@num{0}
\xdef\bottop@{top}      \expandafter\xdef\csname feature@\bottop@\endcsname{0}
\xdef\bottop@{ttop}     \expandafter\xdef\csname feature@\bottop@\endcsname{0}
\xdef\bottop@{tttop}    \expandafter\xdef\csname feature@\bottop@\endcsname{0}
\xdef\bottop@{ttttop}   \expandafter\xdef\csname feature@\bottop@\endcsname{0}
\xdef\bottop@{bottom}   \expandafter\xdef\csname feature@\bottop@\endcsname{0}
\xdef\bottop@{bbottom}  \expandafter\xdef\csname feature@\bottop@\endcsname{0}
\xdef\bottop@{bbbottom} \expandafter\xdef\csname feature@\bottop@\endcsname{0}
\xdef\bottop@{bbbbottom}\expandafter\xdef\csname feature@\bottop@\endcsname{0}
\xdef\frame@{0}
\xdef\show@Hdssp{no} \xdef\show@Gdssp{no} \xdef\show@Idssp{no}
\xdef\show@Edssp{no} \xdef\show@Bdssp{no} \xdef\show@Tdssp{no}
\xdef\show@Sdssp{no}
\xdef\show@Hstride{no} \xdef\show@Gstride{no} \xdef\show@Istride{no}
\xdef\show@Estride{no} \xdef\show@Bstride{no} \xdef\show@Tstride{no}
\xdef\show@itop{no} \xdef\show@etop{no} \xdef\show@TMtop{no}
\xdef\show@i@HMMTOP{no} \xdef\show@e@HMMTOP{no} \xdef\show@TM@HMMTOP{no}
\xdef\show@Hsec{no} \xdef\show@Esec{no}
\xdef\collect@restop{no}     \xdef\collect@resttop{no}
\xdef\collect@restttop{no}   \xdef\collect@resttttop{no}
\xdef\collect@resbottom{no}  \xdef\collect@resbbottom{no}
\xdef\collect@resbbbottom{no}\xdef\collect@resbbbbottom{no}
\xdef\tr@nslatetop{}         \xdef\tr@nslatettop{}
\xdef\tr@nslatetttop{}       \xdef\tr@nslatettttop{}
\xdef\tr@nslatebottom{}      \xdef\tr@nslatebbottom{}
\xdef\tr@nslatebbbottom{}    \xdef\tr@nslatebbbbottom{}
\xdef\tr@nsseqtop{0}         \xdef\tr@nsseqttop{0}
\xdef\tr@nsseqtttop{0}       \xdef\tr@nsseqttttop{0}
\xdef\tr@nsseqbottom{0}      \xdef\tr@nsseqbbottom{0}
\xdef\tr@nsseqbbbottom{0}    \xdef\tr@nsseqbbbbottom{0}
\xdef\triple@counttop{0}     \xdef\triple@countttop{0}
\xdef\triple@counttttop{0}   \xdef\triple@countttttop{0}
\xdef\triple@countbottom{0}  \xdef\triple@countbbottom{0}
\xdef\triple@countbbbottom{0}\xdef\triple@countbbbbottom{0}
\xdef\last@@restop{}         \xdef\last@@resttop{}
\xdef\last@@restttop{}       \xdef\last@@resttttop{}
\xdef\last@@resbottom{}      \xdef\last@@resbbottom{}
\xdef\last@@resbbbottom{}    \xdef\last@@resbbbbottom{}
\xdef\out@put{y}             \xdef\m@p{no}
\xdef\t@sp@ce{0mm}           \xdef\tt@sp@ce{0mm}
\xdef\ttt@sp@ce{0mm}         \xdef\tttt@sp@ce{0mm}
\xdef\b@sp@ce{0mm}           \xdef\bb@sp@ce{0mm}
\xdef\bbb@sp@ce{0mm}         \xdef\bbbb@sp@ce{0mm}
\xdef\ruler@sp@ce{0mm}
\xdef\seq@gap@num{0}
\xdef\h@ndalign{no}         \xdef\sep@space{0pt}
\xdef\c@pshort{n}
\xdef\bottom@stretch{n}     \xdef\bbottom@stretch{n}
\xdef\bbbottom@stretch{n}   \xdef\bbbbottom@stretch{n}
\xdef\c@nscol{}             \xdef\c@nssc@le{ColdHot}
\xdef\collect@cons@colors{no} \xdef\cons@now{no}
\xdef\res@numA{0}         \xdef\res@numB{0}
\xdef\res@numC{0}         \xdef\res@numD{0}
\xdef\res@numE{0}         \xdef\res@numF{0}
\xdef\res@numG{0}         \xdef\res@numH{0}
\xdef\res@numI{0}         \xdef\res@numJ{0}
\xdef\res@numK{0}         \xdef\res@numL{0}
\xdef\res@numM{0}         \xdef\res@numN{0}
\xdef\res@numO{0}         \xdef\res@numP{0}
\xdef\res@numQ{0}         \xdef\res@numR{0}
\xdef\res@numS{0}         \xdef\res@numT{0}
\xdef\res@numU{0}         \xdef\res@numV{0}
\xdef\res@numW{0}         \xdef\res@numX{0}
\xdef\res@numY{0}         \xdef\res@numZ{0}
\expandafter\xdef\csname res@num\questi@n\endcsname{0}
\expandafter\xdef\csname res@num\d@t\endcsname{0}
\expandafter\xdef\csname res@num\equ@l\endcsname{0}
\xdef\res@corrA{0}        \xdef\res@corrB{0}
\xdef\res@corrC{0}        \xdef\res@corrD{0}
\xdef\res@corrE{0}        \xdef\res@corrF{0}
\xdef\res@corrG{0}        \xdef\res@corrH{0}
\xdef\res@corrI{0}        \xdef\res@corrJ{0}
\xdef\res@corrK{0}        \xdef\res@corrL{0}
\xdef\res@corrM{0}        \xdef\res@corrN{0}
\xdef\res@corrO{0}        \xdef\res@corrP{0}
\xdef\res@corrQ{0}        \xdef\res@corrR{0}
\xdef\res@corrS{0}        \xdef\res@corrT{0}
\xdef\res@corrU{0}        \xdef\res@corrV{0}
\xdef\res@corrW{0}        \xdef\res@corrX{0}
\xdef\res@corrY{0}        \xdef\res@corrZ{0}
\expandafter\xdef\csname res@corr\questi@n\endcsname{0}
\expandafter\xdef\csname res@corr\d@t\endcsname{0}
\expandafter\xdef\csname res@corr\equ@l\endcsname{0}
\xdef\corr@max{0}         \xdef\do@freq@correction{n}
\xdef\res@total{0}
\xdef\stack@sequencelogo{} \xdef\bit@total{0}
\clearlogocolors \xdef\logo@colors@set{n}
\show@sublogofalse    \xdef\stack@sublogo{}
\xdef\clear@logo{n}       \xdef\subfamily@threshold{50}
\xdef\subfamily@seq{1}    \xdef\sig@max{100000}
\xdef\sublogo@num{}       \xdef\sublogo@sig{}
\xdef\subfamily@count{0}  \xdef\sublogo@name@neg{}
\xdef\logo@name@user{&}   \xdef\sublogo@name@user{&}
\expandafter\xdef\csname group@num1\endcsname{0}
\expandafter\xdef\csname group@num2\endcsname{0}
\xdef\exp@rt@num{0}       \xdef\exp@rt{n}
\xdef\divref@{0}
\xdef\all@thresh@ld{100}  \all@shadefalse
\hidefeaturenames         \hidefeaturestylenames
\xdef\T@coffee@ccons{n}   \xdef\T@coffee@bcons{n}
\xdef\dom@in{no}          \xdef\label@motif{no}
\xdef\motif@num{0}        \xdef\all@out{n}
\hfuzz9999pt

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%                                                                      %%%%%
%%%%%   Default parameter settings for the  LaTeX  ``TeXshade''  package   %%%%%
%%%%%                                                                      %%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%                                                                      %%%%%
%%%%%   Under any circumstances:                                           %%%%%
%%%%%                                                                      %%%%%
%%%%%                   DO NOT CHANGE ANY SETTINGS HERE !!!                %%%%%
%%%%%                                                                      %%%%%
%%%%%   Please define your personal parameter file!  Store your new file   %%%%%
%%%%%   together with this style-file in the same directory and load the   %%%%%
%%%%%   file by naming it as an optional parameter in the `texshade' en-   %%%%%
%%%%%   vironment. The file `texshade.def' can be used as a template for   %%%%%
%%%%%   the new creation. See the manual for further help.                 %%%%%
%%%%%                                                                      %%%%%
%%%%%                              THANK YOU !!!                           %%%%%
%%%%%                                                                      %%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\shadingmode{identical}             %  Shade identical residues only
\shadingcolors{blues}               %  Select the blue color scheme for shading
\constoallseqs                      %  Calculate consensus considering all seqs
\threshold{50}                      %  Consensus threshold percentage is 50
\residuesperline{999}               %  As many residues as possible per line
\numberingwidth{9999}               %  Assign space for 4 digit numbering
\charstretch{1}                     %  Do not stretch character width
\linestretch{1}                     %  Do not stretch lines vertically
\gapchar{.}                         %  . is printed in sequence gaps
\gaprule{0.3pt}                     %  If a rule is printed in gaps use 0.3 pt
\gapcolors{Black}{White}            %  Gap symbols appear `Black on White'
\domaingaprule{1pt}                 %  If a rule is set between domains use 1 pt
\domaingapcolors{Red}{White}        %  Domain separation line appears `Red on White'
\numberingcolor{Black}              %  Numbering color is `Black'
\shownumbering{right}               %  Show sequence numbering on the left
\namescolor{Black}                  %  Names' color is `Black'
\featurenamescolor{Black}           %  Feature names' color is `Black'
\featurestylenamescolor{Black}      %  Feature names' color is `Black'
\shownames{left}                    %  Show sequence names on the right
\consensuscolors{Black}{White}      %  All consensus symbols/letters
                {Black}{White}      %  appear `Black on White'
                {Black}{White}      %
\showconsensus{bottom}              %  Show consensus line at bottom with
\hidesequencelogo                   %  Do not show a sequence logo as consensus
\showlogoscale{leftright}           %  Show vertical scale bar if logo is on
\logostretch{1}                     %  Do not stretch sequence logo vertically
\hidesubfamilylogo                  %  Do not show a subfamily logo
\subfamilythreshold{50}             %  Set subfamily threshold to 50%
\shownegatives                      %  Show negative values in subfamily logo
\showrelevance[Black]{*}            %  Label relevant subfamily deviations
\defconsensus{{}}{*}{!}             %  Blank =no match; * =match; ! =all match
\showleadinggaps                    %  Show gap symbols before sequence start
\rulercolor{Black}                  %  Ruler's color is `Black'
\hideruler                          %  Do not show the ruler
\rulersteps{10}                     %  Ruler ticks every 10 residues
\legendcolor{Black}                 %  Legend text color is `Black'
\hidelegend                         %  Do not show the legend
\alignment{center}                  %  Center alignment on page
\medsepline                         %  Medium height if separation line is on
\medblockskip                       %  Medium skip between sequence blocks
\flexblockspace                     %  Use optimized space between blocks
\featurerule{0.5ex}                 %  Set feature rule thickness to 1/2 ex
\bargraphstretch{1}                 %  Do not stretch bars in feature graphs
\colorscalestretch{1}               %  Do not stretch color scales in features
\backtranstext{horizontal}          %  Horizontal triplets in feature texts
\backtranslabel{alternating}        %  Alternating triplets in feature styles
\setfamily{residues}{tt}            %  Use typewriter family for residues
\setseries{residues}{md}            %  Use normal series for residues
\setshape {residues}{up}            %  Use upright shape for residues
\setsize  {residues}{normalsize}    %  Use normal size for residues
\setfamily{numbering}{tt}           %  Use typewriter family for numbering
\setseries{numbering}{md}           %  Use normal series for numbering
\setshape {numbering}{up}           %  Use upright shape for numbering
\setsize  {numbering}{normalsize}   %  Use normal size for numbering
\setfamily{names}{tt}               %  Use typewriter family for names
\setseries{names}{md}               %  Use normal series for names
\setshape {names}{up}               %  Use upright shape for names
\setsize  {names}{normalsize}       %  Use normal size for names
\setfamily{featurenames}{tt}        %  Use typewriter family for feature names
\setseries{featurenames}{md}        %  Use normal series for feature names
\setshape {featurenames}{up}        %  Use upright shape for feature names
\setsize  {featurenames}{normalsize}%  Use normal size for feature  names
\setfamily{featurestylenames}{tt}   %  Use typewriter family for feature style names
\setseries{featurestylenames}{md}   %  Use normal series for feature style names
\setshape {featurestylenames}{up}   %  Use upright shape for feature style names
\setsize  {featurestylenames}{normalsize}%  Use normal size for feature style names
\setfamily{features}{rm}            %  Use roman family for feature texts
\setseries{features}{md}            %  Use normal series for feature texts
\setshape {features}{it}            %  Use italics shape for feature texts
\setsize  {features}{normalsize}    %  Use normal size for feature texts
\setfamily{featurestyles}{tt}       %  Use typewriter family for feature styles
\setseries{featurestyles}{md}       %  Use normal series for feature styles
\setshape {featurestyles}{up}       %  Use upright shape for feature styles
\setsize {featurestyles}{normalsize}%  Use normal size for feature styles
\setfamily{legend}{tt}              %  Use typewriter family for legend texts
\setseries{legend}{md}              %  Use normal series for legend texts
\setshape {legend}{up}              %  Use upright shape for legend texts
\setsize  {legend}{normalsize}      %  Use normal size for legend texts
\setfamily{ruler}{sf}               %  Use sans serif font for ruler numbers
\tintdefault{medium}                %  Use medium tint intensity
\emphdefault{it}                    %  Use italics to emphasize regions
\showonPHDsec{alpha,beta}           %  Show helices and strands (PHD input)
\showonPHDtopo{internal,external,TM}%  Show int., ext. and TM's (PHD input)
\showonHMMTOP{TM}                   %  Show TM's (not int/ext on HMMTOP input)
\showonSTRIDE{alpha,3-10,pi,beta}   %  Show helices and strands (STRIDE input)
\showonDSSP{alpha,3-10,pi,beta}     %  Show helices and strands (DSSP input)
\secondcolumnDSSP                   %  Use numbering from 2. column in DSSP
\appearance{PHDtopo}{internal}      % \
           {bottom}{'-'}            %  \
           {int.\ \Alphacount}      %   |
\appearance{PHDtopo}{external}      %   |
           {top}{,-,}               %   |
           {ext.\ \Alphacount}      %   |
\appearance{PHDtopo}{TM}{top}       %   |
     {box[LightGray]:TM\numcount}{} %   |
\appearance{HMMTOP}{internal}       %   |
           {bottom}{'-'}            %   |
           {int.\ \Alphacount}      %   |
\appearance{HMMTOP}{external}       %   |
           {top}{,-,}               %   |
           {ext.\ \Alphacount}      %   |
\appearance{HMMTOP}{TM}{top}        %   |
           {helix}{TM\numcount}     %   |
\appearance{PHDsec}{alpha}{top}     %   |
          {box:$\alpha$\numcount}{} %   |
\appearance{PHDsec}{beta}{top}      %   |
          {-->}{$\beta$\numcount}   %   |
\appearance{STRIDE}{alpha}{top}     %   |
          {box:$\alpha$\numcount}{} %   |    Definitions for the appearance of
\appearance{STRIDE}{3-10}{top}      %    \
           {fill:$\circ$}{3$_{10}$} %     >  secondary structures included from|
\appearance{STRIDE}{pi}             %    /
           {top}{---}{$\pi$}        %   |    PHD-, STRIDE-, or DSSP-files.
\appearance{STRIDE}{beta}{top}      %   |
          {-->}{$\beta$\numcount}   %   |
\appearance{STRIDE}{bridge}         %   |
           {top}{fill:$\uparrow$}{} %   |
\appearance{STRIDE}{turn}           %   |
           {top}{,-,}{turn}         %   |
\appearance{DSSP}{alpha}{top}       %   |
          {box:$\alpha$\numcount}{} %   |
\appearance{DSSP}{3-10}{top}        %   |
           {fill:$\circ$}{3$_{10}$} %   |
\appearance{DSSP}{pi}               %   |
           {top}{---}{$\pi$}        %   |
\appearance{DSSP}{beta}{top}        %   |
          {-->}{$\beta$\numcount}   %   |
\appearance{DSSP}{bridge}           %   |
           {top}{fill:$\uparrow$}{} %   |
\appearance{DSSP}{turn}             %   |
           {top}{,-,}{turn}         %   |
\appearance{DSSP}{bend}{top}        %  /
           {fill:$\diamond$}{}      % /

\pepgroups{FYW,ILVM,RK,DE,GA,ST,NQ} %  Amino acid grouping due to similarity

\pepsims{F}{YW}                     %  Y and W are similar to F
\pepsims{Y}{WF}                     %  W and F are similar to Y
\pepsims{W}{YF}                     %  Y and F are similar to W

\pepsims{I}{LVM}                    %  L, V and M are similar to I
\pepsims{L}{VMI}                    %  V, M and I are similar to L
\pepsims{V}{MIL}                    %  M, I and L are similar to V

\pepsims{R}{KH}                     %  K and H are similar to R
\pepsims{K}{HR}                     %  H and R are similar to K
\pepsims{H}{RK}                     %  R and K are similar to H

\pepsims{A}{GS}                     %  G and S are similar to A
\pepsims{G}{A}                      %  A (but not S) is similar to G

\pepsims{S}{TA}                     %  T and A are similar to S
\pepsims{T}{S}                      %  S (but not A) is similar to T

\pepsims{D}{EN}                     %  E and N (but not Q) are similar to D
\pepsims{E}{DQ}                     %  D and Q (but not N) are similar to E
\pepsims{N}{QD}                     %  Q and D (but not E) are similar to N
\pepsims{Q}{NE}                     %  N and E (but not D) are similar to Q

\DNAgroups{GAR,CTY}                 %  Nucleotide grouping due to similarity

\DNAsims{A}{GR}                     %  G and R are similar to A
\DNAsims{G}{AR}                     %  A and R are similar to G
\DNAsims{R}{AG}                     %  A and G are similar to R

\DNAsims{C}{TY}                     %  T and Y are similar to C
\DNAsims{T}{CY}                     %  C and Y are similar to T
\DNAsims{Y}{CT}                     %  C and T are similar to Y

}
\catcode`\@=12
\endinput
%%
%% End of file `texshade.sty'.