def get_distance_matrix(pdb_path):
parser = PDBParser()
structure = parser.get_structure('structure', pdb_path).get_list()[0]
residue_positions = get_residue_positions(structure)
pdb_dist_mat = scipy.spatial.distance.squareform(scipy.spatial.distance.pdist(residue_positions, 'euclidean'))
pdb_dist_mat[numpy.isnan(pdb_dist_mat)] = float('inf')
return pdb_dist_mat
评论列表
文章目录