Catalyzes the formation of glutamine from glutamate and ammonia (PubMed:16495669, PubMed:15388964). In vitro, can also use hydroxylamine, methylamine and ethylamine, with 32%, 7% and 1% activity compared to ammonia, respectively (PubMed:15388964). ATP + L-glutamate + NH4(+) = ADP + H(+) + L-glutamine + phosphate Binds 2 Mg(2+) or Mn(2+) ions per subunit, however the activity with Mg(2+) is about 10-fold higher than with Mn(2+). When cellular nitrogen levels are high, the C-terminal adenylyl transferase (AT) of GlnE inhibits GlnA by covalent transfer of an adenylyl group from ATP to Tyr-397. Conversely, when nitrogen levels are low, the N-terminal adenylyl removase (AR) of GlnE activates GlnA by removing the adenylyl group by phosphorolysis. The fully adenylated enzyme complex is inactive (Probable). Optimum pH is 8.0 (in the presence 30 mM Mg(2+)) and 7.5 (in the presence of 3 mM Mn(2+)). Oligomer of 12 subunits arranged in the form of two hexagons. Belongs to the glutamine synthetase family.