Two effects, not one
An earthquake moves the ground and with it every structure a pipe is attached to. Two different loadings result. The first is inertia: the mass of the line – pipe, contents, insulation, valves – resists the movement and loads pipe and supports with forces across and along the axis.
The second is overlooked more often: if a line is attached to two structures or at different levels, its supports do not move alike. This relative movement is imposed on the line like a thermal displacement – and at transitions between buildings it can be the larger of the two effects. It is commonly referred to as seismic anchor movement.