A wavefunction has been derived for the oxalic acid dihydrate molecule using accurate low-temperature X-ray electron-density structure-factor data. The electron density from this constrained theoretical wavefunction is compared to those of unconstrained theoretical wavefunctions. Fitted electron densities around hydrogen atoms show signi®cant deviation compared to Hartree±Fock calculations. In particular, hydrogen bonding appears enhanced in the crystal over theoretical predictions, while the density usually attributed to lone-pair electrons of the oxalic acid oxygen atoms is decreased. The constrained ®tting procedure improves the overall agreement of the calculated structure factors even for structure factors that were not used as input to the ®tting procedure. The pictures obtained from the constrained ®tting procedure are insensitive to random errors introduced into the data. Similarly, the ®tting procedure is able to reproduce features that arise from more accurate theoretical calculations. However, we are unable to ®t our wavefunction to within the experimentally quoted error bounds without allowing an unreasonably large change in the energy of the constrained wavefunction. Large Hartree±Fock and density functional theory (DFT) cluster calculations involving up to 86 atoms in size also do not show signi®cantly improved agreement with the experimentally observed structure factors. Derived properties from the constrained wavefunction fragments, such as the kinetic energy, electrostatic potential and the electron localization function, are also presented. In general, there are no dif®culties in extracting experimental wavefunctions and the associated derived properties from elastic X-ray scattering data for crystal fragments of the order of 20 atoms.