to algorithmically parse a molecule (represented by an</span>
<span class="sd">    instance of pymatgen.analysis.graphs.MoleculeGraph) and determine arbitrary</span>
<span class="sd">    functional groups.</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">molecule</span><span class="p">,</span> <span class="n">optimize</span><span class="o">=</span>