Templated self-assembly of patchy particles