本發明係有關於一種如式(I)所示之喹啉化合物: 其中,A、B、D、E、F、G、R1 、R2 、R3 、X、Y、n、p、及q係如說明書中所定義。此外,本發明更關於一種以式(I)化合物治療病毒性感染之方法。Quinoline compounds of formula (I):in which A, B, D, E, F, G, R1 , R2 , R3 , X, Y, n, p, and q are defined herein. Also disclosed is a method for treating a viral infection with a compound of formula (I).