Catalyzes the hydrolytic deamination of guanine, producing xanthine and ammonia. Also has 7,8-dihydropterin deaminase activity, which plays a role in synthesis of the red eye pigment aurodrosopterin. guanine + H(+) + H2O = NH4(+) + xanthine Strongly inhibited by p-chloromercuribenzoate (PCMB). Potassium cyanide (KCN) strongly inhibits activity towards 7,8-dihydropterin but has almost no effect on activity towards guanine. Pterin inhibits activity towards guanine but has little effect on activity towards 7,8-dihydropterin. Optimum pH is 7.5. Optimum temperature is 40 degrees Celsius. Purine metabolism; guanine degradation; xanthine from guanine: step 1/1. Peak dihydropterin deaminase activity is observed in late pupae and newly eclosed adults, which correlates with the time of eye pigment formation. Belongs to the metallo-dependent hydrolases superfamily. ATZ/TRZ family.