Topology-based protein structure comparison using a pattern discovery technique