Electrospray ionization is a gentle method for sample delivery, routinely used in gas-phase studies of proteins. It is crucial for structural investigations that the protein structure is preserved, and a good understanding of how structure is affected by the transition to the gas phase is needed for the tuning of experiments to meet that requirement. Small amounts of residual solvent have been shown to protect the protein, but temperature is important too, although it is not well understood how the latter affects structural details. Using molecular dynamics we have simulated four sparingly hydrated globular proteins (Trp-cage; Ctf, a C-terminal fragment of a bacterial ribosomal protein; ubiquitin; and lysozyme) in vacuum starting at temperatures ranging from 225 K to 425 K. For three of the proteins, our simulations show that a water layer corresponding to 3 A preserves the protein structure in vacuum, up to starting temperatures of 425 K. Only Ctf shows minor secondary structural changes at lower starting temperatures. The structural conservation stems mainly from interactions with the surrounding water. Temperature scales in simulations are not directly translatable into experiments, but the wide temperature range in which we find the proteins to be stable is reassuring for the success of future single particle imaging experiments. The water molecules aggregate in clusters and form patterns on the protein surface, maintaining a reproducible hydrogen bonding network. The simulations were performed mainly using OPLS-AA/L, with cross checks using AMBER03 and GROMOS96 53a6. Only minor differences between the results from the three different force fields were observed.