span class="n">n_samples</span><span class="p">:</span>
            <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span>
                <span class="s2">&quot;The given number of excludes does not match the given &quot;</span>
                <span class="s2">&quot;number of systems.&quot;</span>
            <span class="p">)</span>

        <span class="c1"># Determine the atom indices that are displaced</span>
        <span class="n">indices</span> <span class="o">=</sp