[graph-tool] Energy optimization from scipy-optimize on a sub-graph