Generalized energy‐based fragmentation approach for modeling condensed phase systems