My bash script writes an another bash script using printf.
printf \"#!/bin/bash HOME=${server} file=gromacs* file_name=\\$(basename \"\\${file}\") date=\\$(date
Try this
date=\$(date +\"%%m_%%d_%%Y\")"