Skip to content

Instantly share code, notes, and snippets.

import math
import pybel
def sqr_dist(a, b):
ac = a.coords
bc = b.coords
return (ac[0]-bc[0])**2 + (ac[1]-bc[1])**2 + (ac[2]-bc[2])**2
# Definitions taken from
# http://baoilleach.blogspot.com/2007/07/pybel-hack-that-sd-file.html