Creating a building seismic profile requires in most of the times a SDoF model. For a bridge, it's necessary to have 6 DoF comprise of:
- 3 x translations
- 3 x rotations in 3D
If you don't have that many directions, the longitudinal axis should be used therefore the calculation you've posted above should match your needs