Gravar-mail: A partition function algorithm for interacting nucleic acid strands