pyRMSD is a small Python package that aims to offer an integrative and efficient way of performing RMSD calculations of large sets of structures. It is specially tuned to do fast collective RMSD calculations, as pairwise RMSD matrices.
N = len(elements)
newmatrix = CondensedMatrix([1.]((N_(N-1)/2)))
for i in range(len(elements)-1):
e_i = elements[i]
for j in range(i+1,len(elements)):
e_j = elements[j]
new_matrix[i, j] = old_matrix[e_i, e_j]
return new_matrix
Probably because of the data returning policy, the condensed matrix can be modified but the returned array is not.
This does not work:
N = len(elements) newmatrix = CondensedMatrix([1.]((N_(N-1)/2))) for i in range(len(elements)-1): e_i = elements[i] for j in range(i+1,len(elements)): e_j = elements[j] new_matrix[i, j] = old_matrix[e_i, e_j] return new_matrix
Probably because of the data returning policy, the condensed matrix can be modified but the returned array is not.