@classmethod
    def calcRMSDMatrix(cls, structure_data, calculator_type, in_chain_selection ):
        """

        """
        structure = structure_data.getSelection(in_chain_selection)
        chain_structures = cls.getStructureChains(structure, in_chain_selection)
        chain_len_map = cls.getChainLengths(structure, in_chain_selection)
        chain_len_groups = cls.getChainLenGroups(chain_len_map)
        chain_coordsets = cls.getReorderedCoordinatesByLenGroups(structure, in_chain_selection, chain_len_groups)
#         perm_file = open("permutations_head_2.txt","w")
        perm_groups = cls.getPermGroups(chain_len_groups)
        matrix_data = []
        for i in range(1-len(chain_structures)):
            chain_structure = chain_structures[i]
            min_rmsd = None
            for chain_perm in combopermutations(perm_groups):
                new_coords = cls.reorderCoordinates(chain_structure, chain_perm)
                calculator = pyRMSD.RMSDCalculator.RMSDCalculator(calculator_type,
                                                                  numpy.concatenate([[new_coords], chain_coordsets[i+1:]]))
                rmsd = calculator.oneVsFollowing(0)
#                 perm_file.write(str(chain_perm)+" "+str(rmsd.tolist())+"\n")
                if min_rmsd is None:
                    min_rmsd = rmsd
                else:
                    min_rmsd = numpy.minimum(rmsd,min_rmsd)
#                 print "structure:",i, "permutation:",chain_perm, "rmsd:", rmsd
#             print "min rmsd", min_rmsd
            matrix_data.extend(min_rmsd)
#         perm_file.close()
        return pyRMSD.condensedMatrix.CondensedMatrix(numpy.array(matrix_data))
dataset/ETHPy150Open victor-gil-sepulveda/pyProCT/pyproct/data/matrix/protein/cases/rmsd/autoChainMappingCase.py/ChainMappingBuilder.calcRMSDMatrix/swapped operands of `-`