Biomimetic synthesis and patterning of silver nanoparticles