Patent ID: 8624040

Claim:
A compound of formula (I): or a pharmaceutically acceptable salt thereof; wherein: p is 1, q is 1; or p is 0, q is 2; G is —R 3 , —V 1 —R 3 , —V 1 -L 1 -R 3 , -L 1 -V 2 —R 3 , -L 1 -R 3 , or -L 1 -V 2 -L 2 -R 3 ; L 1 and L 2 are each independently unsubstituted or substituted C 1-3 alkylene, where one carbon atom may be replaced with —CR A ═CR A —; V 1 is —C(O)—, —C(S)—, —C(O)—N(R 4a )—, —C(O)—O—, or —S(O) 2 —; V 2 is —C(O)—, —C(S)—, —N(R 4a )—, —C(O)—N(R 4a )—, —N(R 4a )—C(O)—, —SO 2 —N(R 4a )—, —N(R 4a )—SO 2 —, —C(O)—O—, —O—C(O)—, —O—, —S—, —S(O)—, —S(O) 2 —, —N(R 4a )—C(O)—N(R 4a )—, —N(R 4a )—C(O)—O—, —O—C(O)—N(R 4a )—, or —N(R 4a )—SO 2 —N(R 4a )—; R 3 is unsubstituted or substituted C 1-6 aliphatic, unsubstituted or substituted 3-10-membered cycloaliphatic, unsubstituted or substituted 4-10-membered heterocyclyl having 1-4 heteroatoms independently selected from nitrogen, oxygen, and sulfur, unsubstituted or substituted 6-10-membered aryl, or unsubstituted or substituted 5-10-membered heteroaryl having 1-5 heteroatoms independently selected from nitrogen, oxygen, and sulfur; each occurrence of R A is independently hydrogen, halo, or unsubstituted or substituted C 1-4 aliphatic; each occurrence of R 4a is independently hydrogen, or unsubstituted or substituted C 1-4 aliphatic; R 1 is hydrogen, halo, —CN, C 1-3 alkyl, C 1-3 haloalkyl, —O—C 1-3 alkyl, —O—C 1-3 haloalkyl, —NHC(O)C 1-3 alkyl, —NHC(O)NHC 1-3 alkyl, or NHS(O) 2 C 1-3 alkyl; ring A is optionally further substituted with n occurrences of R 2 ; each occurrence of R 2 is independently halo, C 1-4 aliphatic, —CN, —OR B , —SR C , —N(R B ) 2 , —NR B C(O)R B , —NR B C(O)N(R B ) 2 , —NR B CO 2 R C , —CO 2 R B , —C(O)R B , —C(O)N(R B ) 2 , —OC(O)N(R B ) 2 , —S(O) 2 R C , —SO 2 N(R B ) 2 , —S(O)R C , —NR B SO 2 N(R B ) 2 , —NR B SO 2 R C , or a C 1-4 aliphatic substituted with R D , halo, —CN, —OR B , —SR C , —N(R B ) 2 , —NR B C(O)R B , —NR B C(O) N (R B ) 2 , —NR B CO 2 R C , —CO 2 R B , —C(O)R B , —C(O)N(R B ) 2 , —OC(O)N(R B ) 2 , —S(O) 2 R C , —SO 2 N(R B ) 2 , —S(O)R C , —NR B SO 2 N(R B ) 2 , or —NR B SO 2 R C ; or two R 2 are taken together to form a 3-6 membered cycloaliphatic ring; each occurrence of R B is independently H or C 1-4 aliphatic; or two R B on the same nitrogen atom taken together with the nitrogen atom form a 5-8 membered aromatic or non-aromatic ring having in addition to the nitrogen atom 0-2 ring heteroatoms selected from N, O and S; each occurrence of R C is independently C 1-4 aliphatic; each occurrence of R D is independently 6-10-membered aryl, or 5-10-membered heteroaryl having 1-5 heteroatoms independently selected from nitrogen, oxygen, or sulfur; and n is 0-4.