Moltemplate: a tool for coarse-grained modeling of complex biological matter and soft condensed matter physics