A Ring-Based Chemical Structural Query System: Use of a Novel Ring-Complexity Heuristic.