A DNA-templated synthesis of encoded small molecules by DNA self-assembly.