Modular architecture of nucleotide-binding pockets