support white and black lists for getMolFragsWithQuery