We have studied room-temperature neutron and X-ray crystal structures of the triosephosphate isomerase Glu97Gln variant in complex with the inhibitor 2-phosphoglycolate (PGA) that mimics a reaction intermediate. The results clearly show that Glu-167 is protonated and hydrogen bonded to the carboxylate group of the inhibitor. The other carboxylate atom of PGA forms a hydrogen bond to Lys-13, but in this case the location of the hydrogen atom is less clear. The best fit to the data is obtained for a mixture with the proton 70% on Lys-13 and 30% on PGA. We have tried different ways to model this structure with quantum refinement, i.e. crystallographic refinement, in which the empirical restraints (normally used to supplement the experimental data and ensure that the structure makes chemical sense) are replaced by more accurate quantum mechanical (QM) calculations. With a typical QM system, involving models of PGA, Asn-11, Lys-13, Glu-167 and His-95, significant difference densities are observed in the electron-density maps, owing to the large negative charge of the system coming from the phosphate group of PGA). These can be improved by performing the QM calculations in a continuum solvent with a high dielectric constant or by using a point-charge model of the surroundings. Another way is to use a larger QM system, involving all groups that form hydrogen bonds to the phosphate group. Alternatively, a smaller QM system can be used, excluding the phosphate group (which gives a neutral QM system), but the results are then still improved by performing the QM calculations in a continuum solvent.