An adaptive reference point approach to efficiently search large chemical databases