\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{class} \PYG{n+nc}{GlySelect}\PYG{p}{(}\PYG{n}{Select}\PYG{p}{):}
\PYG{g+gp}{... }    \PYG{k}{def} \PYG{n+nf}{accept\PYGZus{}residue}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{residue}\PYG{p}{):}
\PYG{g+gp}{... }        \PYG{k}{if} \PYG{n}{residue}\PYG{o}{.}\PYG{n}{get\PYGZus{}name}\PYG{p}{()}\PYG{o}{==}\PYG{l+s+s2}{\PYGZdq{}GLY\PYGZdq{}}\PYG{p}{:}
\PYG{g+gp}{... }            \PYG{k}{return} \PYG{n+nb+bp}{True}
\PYG{g+gp}{... }        \PYG{k}{else}\PYG{p}{:}
\PYG{g+gp}{... }            \PYG{k}{return} \PYG{n+nb+bp}{False}
\PYG{g+gp}{...}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{io} \PYG{o}{=} \PYG{n}{PDBIO}\PYG{p}{()}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{io}\PYG{o}{.}\PYG{n}{set\PYGZus{}structure}\PYG{p}{(}\PYG{n}{s}\PYG{p}{)}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{io}\PYG{o}{.}\PYG{n}{save}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}gly\PYGZus{}only.pdb\PYGZdq{}}\PYG{p}{,} \PYG{n}{GlySelect}\PYG{p}{())}
\end{Verbatim}
