lass="sd">    cmds : list</span>
<span class="sd">        List of generated pymol commands (written to output_file)</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">cmds</span> <span class="o">=</span> <span class="p">[]</span>

    <span class="c1"># define chain selector if chain is given</span>
    <span class="k">if</span> <span class="n">chain</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
        <span class="