pele.mindist.optimize_permutations

pele.mindist.optimize_permutations(X1, X2, permlist=None, user_algorithm=None, recalculate_distance=<function _cartesian_distance at 0x37f2938>, box_lengths=None, **kwargs)[source]

return the best alignment of the structures X1 and X2 after optimizing permutations

Parameters :

X1, X2 :

the structures to align. X1 will be left unchanged.

permlist : a list of lists

A list of lists of atoms which are interchangable. e.g. for a 50/50 binary mixture:

permlist = [range(1,natoms/2), range(natoms/2,natoms)]

user_algoriithm : None or callable

you can optionally pass which algorithm to use to optimize the permutations the structures

gen_cost_matrix : None or callable

user function to generate the cost matrix

recalculate_distance : callable

function to compute the distance of the optimized coords. If None is passed then the distance is not recalculated and the returned distance is unreliable.

reshape : boolean

shall coordinate reshaping be performed.

box_lengths : float array

array of floats giving the box lengths for periodic boundary conditions. Set to None for no periodic boundary conditions.

Returns :

dist : float

the minimum distance

X1, X2new:

the optimized coordinates

See also

find_best_permutation
use this function to find the optimized permutation without changing the coordinates.

Previous topic

pele.mindist.findrotation_kearsley

Next topic

pele.mindist.find_best_permutation