"Finding backbone substructures that match an arbitrary query structural motif, composed of multiple disjoint segments, is a problem of growing relevance in structure prediction and protein design" -- Gevorg Grigoryan.
Gevorg's lab built a tool called Method of Accelerated Search for Tertiary Ensemble Representatives MASTER, which is essentially a partial distance search engine for the Protein Data Bank.
I took on building a PyMol module and a server API component as a weekend project to allow his lab at first but then others to be able to use his _MASTER_ search database for building proteins.