A compound of Formula, or a pharmaceutically acceptable salt thereof, wherein R 1 is selected from H, NH 2, or from C 1-6 alkyl, C 1-6 heteroalkyl, C 3-6 cycloalkyl, 3-6-membered heterocycloalkyl, phenyl, 5-6-membered heteroaryl each of which is optionally substituted with 1, 2, or 3 R; R 2, R 3 are independently selected from H, halogen, OH, NH 2, or from C 1-3 alkyl optionally substituted with 1, 2, or 3 R; X is selected from NH, O, S; when X is selected from O or S, R 4 is selected from H or from C 1-6 alkyl optionally substituted with 1, 2, or 3 R; when X is selected from NH, R 4 is selected from H, C 1-6 alkyl, or from C 1-6 alkyl-S(=O) 2 -, -C 1-6 alkyl-S(=O) 2 OH optionally substituted with 1, 2, or 3 R; or, R 5 is selected from H, halogen, OH, NH 2, CN, COOH, or from C 1-6 alkyl, C 1-6 alkyl-S(=O)-, C 1-6 alkyl-S(=O) 2 -, C 1-6 alkoxy, C 1-6 alkylthio each of which is optionally substituted with 1, 2, or 3 R; n is selected from 0, 1, 2 or 3; a ring A is selected from phenyl, naphthyl, 5-6-membered heteroaryl; L 1 is selected from a single bond, -C(=O)-,-O-,-NH-, -C(=O)O-, -C(=O)NH-,-S(=O) 2 -,-S(=O)-,- 1-3 -; L 2 is selected from a single bond, - 1-3 -, -C(=O)-, -O-, -S-, -NH-, -C(=O)O-, -C(=O)NH-,-S(=O) 2 -,-S(=O)-; L 3 is selected from - -, -C(=O)-; L 4 is selected from a single bond, - 1-3 -; R is selected from H, F, Cl, Br, I, OH, CN, NH 2, COOH, C(=O)NH 2, or from C 1-6 alkyl, C 1-6 heteroalkyl each of which is optionally substituted with 1, 2, or 3 R'; R' is selected from F, Cl, Br, I, OH, CN, NH 2, COOH, Me, Et, CF 3, CHF 2, CH 2 F, NHCH 3, N(CH 3) 2; "hetero-" refers to a heteroatom or a heteroatomic group, and is selected from -C(=O)NH-,-NH-, -C(=NH)-,-S(=O) 2 NH-,-S(=O) NH-,-O-,-S-, =O, =S,-O-N=, -C(=O)O-, -C(=O)-, -C(=S)-,-S(=O)-,-S(=O) 2 - and -NHC(=O)NH-; in any one of the cases defined above, the number of the heteroatoms or heteroatomic groups is independently selected from 1, 2 or 3. R 1 is selected from H, NH 2, or from C 1-6 alkyl, C 1-6 heteroalkyl, C 3-6 cycloalkyl, 3-6-membered heterocycloalkyl, phenyl, 5-6-membered heteroaryl each of which is optionally substituted with 1, 2, or 3 R; R 2, R 3 are independently selected from H, halogen, OH, NH 2, or from C 1-3 alkyl optionally substituted with 1, 2, or 3 R; X is selected from NH, O, S; when X is selected from O or S, R 4 is selected from H or from C 1-6 alkyl optionally substituted with 1, 2, or 3 R; when X is selected from NH, R 4 is selected from H, C 1-6 alkyl, or from C 1-6 alkyl-S(=O) 2 -, -C 1-6 alkyl-S(=O) 2 OH optionally substituted with 1, 2, or 3 R; or, R 5 is selected from H, halogen, OH, NH 2, CN, COOH, or from C 1-6 alkyl, C 1-6 alkyl-S(=O)-, C 1-6 alkyl-S(=O) 2 -, C 1-6 alkoxy, C 1-6 alkylthio each of which is optionally substituted with 1, 2, or 3 R; n is selected from 0, 1, 2 or 3; a ring A is selected from phenyl, naphthyl, 5-6-membered heteroaryl; L 1 is selected from a single bond, -C(=O)-,-O-,-NH-, -C(=O)O-, -C(=O)NH-,-S(=O) 2 -,-S(=O)-,- 1-3 -; L 2 is selected from a single bond, - 1-3 -, -C(=O)-, -O-, -S-, -NH-, -C(=O)O-, -C(=O)NH-,-S(=O) 2 -,-S(=O)-; L 3 is selected from - -, -C(=O)-; L 4 is selected from a single bond, - 1-3 -; R is selected from H, F, Cl, Br, I, OH, CN, NH 2, COOH, C(=O)NH 2, or from C 1-6 alkyl, C 1-6 heteroalkyl each of which is optionally substituted with 1, 2, or 3 R'; R' is selected from F, Cl, Br, I, OH, CN, NH 2, COOH, Me, Et, CF 3, CHF 2, CH 2 F, NHCH 3, N(CH 3) 2; "hetero-" refers to a heteroatom or a heteroatomic group, and is selected from -C(=O)NH-,-NH-, -C(=NH)-,-S(=O) 2 NH-,-S(=O) NH-,-O-,-S-, =O, =S,-O-N=, -C(=O)O-, -C(=O)-, -C(=S)-,-S(=O)-,-S(=O) 2 - and -NHC(=O)NH-; in any one of the cases defined above, the number of the heteroatoms or heteroatomic groups is independently selected from 1, 2 or 3.