A multi-layer energy-based fragment method for excited states and nonadiabatic dynamics.