Gravar-mail: Free energy considerations for nucleic acids with dangling ends near a surface: a coarse grained approach