Find a connected network of minima and transition states between min1 and min2
Parameters :  min1, min2 : Mimumum() objects
pot : potential object
mindist : callable
database : pele Database object
niter : int, optional
verbosity : int
merge_minima : bool
max_dist_merge : float
local_connect_params : dict
fresh_connect : bool
longest_first : bool
conf_checks : list of callables


See also
Notes
The algorithm is iterative, with each iteration composed of
4) fall off either side of the transition states to find the two minima associated with that candidate
5) add the transition states and associated minima to the known network
Of the above, steps 1 and 2 and 3 are the most involved. 2, 3, 4 are wrapped into a separate class called LocalConnect. See this class and the NEB and FindTransitionState classes for detailed descriptions of these procedures.
An important note is that the NEB is used only to get a guess for the transition state. Thus we only want to put enough time and energy into the NEB routine to get the guess close enough that FindTransitionState can refine it to the correct transition state. FindTransitionState is very fast if the initial guess is good, but can be very slow otherwise.
Choose a pair:
Here I will describe step 1), the algorithm to find a pair of known minima to try to connect. This choice will keep in mind that the ultimate goal is to connect min1 and min2.
In addition to the input parameter “graph”, we keep a second graph “Gdist” (now wrapped in a separate class _DistanceGraph) which also has minima as the vertices. Gdist has an edge between every pair of nodes. The edge weight between vertices u and v is
 if u and v are connected by transition states:
 weight(u, v) = 0.
 elif we have already tried local_connect on (u,v):
 weight(u, v) = Infinity
 else:
 weight(u, v) = dist(u, v)**2
This edge weight is set to Infinity to ensure we don’t repeat LocalConnect runs over and over again. The minimum weight path between min1 and min2 in Gdist gives a good guess for the best way to try connect min1 and min2. So the algorithm to find a pair of know minima (trial1, trial2) to try to connect is
path = Gdist.minimum_weight_path(min1, min2) trial1, trial2 = minima pair in path with lowest nonzero edge weight. (note: if parameter longest_first is True) then the edgepair with the largest edge weight will be selected)
Methods
connect()  the main loop of the algorithm 
getDist(min1, min2)  get the distance between min1 and min2. 
mergeMinima(min1, min2)  merge two minimum objects 
returnPath()  return information about the path 
success() 