The invention provides novel compounds having the general formula I:wherein R1, RB1, RB2, n, p, q, the A ring and the B ring are as described herein, pharmaceutical compositions including the compounds, and methods of using the compounds.本發明提供具有通式I之新穎化合物:其中R1、RB1、RB2、n、p、q、A環及B環係如本文描述,包括該等化合物之醫藥組合物,及使用該等化合物之方法。