           <span class="n">r</span><span class="p">[</span><span class="s2">&quot;i&quot;</span><span class="p">],</span> <span class="n">chain_sel</span><span class="p">,</span> <span class="n">state_mapping</span><span class="p">[</span><span class="n">sec_struct</span><span class="p">]</span>
            <span class="p">)</span>
            <span class="n">cmds</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">cmd</span><span class="p">)</span>

    <span 