In our investigation involving rats with gastric ulcers, we observed noteworthy inhibitory effects on gastric acid enzyme activity, specifically H+/K+ATPase, by Ag@Py-ST-NO2 and Ag@Py-ST-Br nanocomposites, demonstrating reductions of 25 and 34%, respectively, compared to untreated ulcers. The gene discussed is ATP12A; the disease is gastric ulcer.