  We present a comprehensive photochemistry model for exploration of the
chemical composition of terrestrial exoplanet atmospheres. The photochemistry
model is designed from the ground up to have the capacity to treat all types of
terrestrial planet atmospheres, ranging from oxidizing through reducing, which
makes the code suitable for applications for the wide range of anticipated
terrestrial exoplanet compositions. The one-dimensional chemical transport
model treats up to 800 chemical reactions, photochemical processes, dry and wet
deposition, surface emission and thermal escape of O, H, C, N and S bearing
species, as well as formation and deposition of elemental sulfur and sulfuric
acid aerosols. We validate the model by computing the atmospheric composition
of current Earth and Mars and find agreement with observations of major trace
gases in Earth's and Mars' atmospheres. We simulate several plausible
atmospheric scenarios of terrestrial exoplanets, and choose three benchmark
cases for atmospheres from reducing to oxidizing. The most interesting finding
is that atomic hydrogen is always a more abundant reactive radical than the
hydroxyl radical in anoxic atmospheres. Whether atomic hydrogen is the most
important removal path for a molecule of interest also depends on the relevant
reaction rates. We also find that volcanic carbon compounds (i.e., CH4 and CO2)
are chemically long-lived and tend to be well mixed in both reducing and
oxidizing atmospheres, and their dry deposition velocities to the surface
control the atmospheric oxidation states. Furthermore, we revisit whether
photochemically produced oxygen can cause false positives for detecting
oxygenic photosynthesis, and find that in 1-bar CO2-rich atmospheres oxygen and
ozone may build up to levels that have been previously considered unique
signatures of life, if there is no surface emission of reducing gases...
