ass="n">chain</span><span class="p">)</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="n">chain_sel</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>

    <span class="c1"># define atom selector, if given</span>
    <span class="k">if</span> <span class="n">atom</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
        <span class="n">atom_sel</span> <span class="o">=</span> <span class="s2