Generalized Many-Body Expansion: A Fragment-Based Method For Modeling Large Systems