DynNet: Physics-based neural architecture design for linear and nonlinear structural response modeling and prediction