\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{for} \PYG{n}{residue} \PYG{o+ow}{in} \PYG{n}{chain}\PYG{o}{.}\PYG{n}{get\PYGZus{}list}\PYG{p}{():}
\PYG{g+gp}{... }   \PYG{n}{residue\PYGZus{}id} \PYG{o}{=} \PYG{n}{residue}\PYG{o}{.}\PYG{n}{get\PYGZus{}id}\PYG{p}{()}
\PYG{g+gp}{... }   \PYG{n}{hetfield} \PYG{o}{=} \PYG{n}{residue\PYGZus{}id}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}
\PYG{g+gp}{... }   \PYG{k}{if} \PYG{n}{hetfield}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{==}\PYG{l+s+s2}{\PYGZdq{}H\PYGZdq{}}\PYG{p}{:}
\PYG{g+gp}{... }       \PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{residue\PYGZus{}id}\PYG{p}{)}
\PYG{g+gp}{...}
\end{Verbatim}
