P. carinii dihydrofolate reductase (PcDHFR) inhibitors are used for the treatment of P. carinii pneumonia (PCP) in humans with acquired immunodeficiency syndrome (AIDS). Translocation comparative molecular field vector analysis (Topomer CoMFA) 3D-QSAR and molecular docking were applied for a series of pyrimidine derivatives. 64 Pyrimidine derivatives were analyzed and the relationship between the structures and bioactivities was explored. Topomer CoMFA was used to build 3D-QSAR model, the results show that cross-validation q2 = 0.721, SDCV = 0.52, the non-crossvalidated r2 = 0.922, SD = 0.28, and the correlation coefficient of external validation Q2 ext = 0.934, this indicated that model generated form Topomer CoMFA was reasonable, and had good prediction ability. The mechanism of action of drug was studied by molecular docking. It showed that the pyrimidine compounds and GLU32, ILE123, LYS37 sites of PcDHFR have interactions. These results have provided an insight for the design of new potent inhibitors of PcDHFR.