From zeolite nets to sp(3) carbon allotropes: a topology-based multiscale theoretical study.