An efficient and scalable top-down method for predicting structures of microbial communities