Gravar-mail: Modeling population heterogeneity from microbial communities to immune response in cells