(This was originally asked on math.stackexchange, but didn't get any responses. I figured it might be worthwhile to move it here and try again.)
This paper gives a proof that the underlying topological spaces of affine schemes are precisely the spectral spaces (compact, T0, sober, and the compact open subsets are closed under finite intersection and generate the topology; equivalently, they are the inverse limits of families of finite T0 spaces).
Instead of starting with a bare topological space, suppose we have a locally ringed space. If it is an affine scheme, then the underlying space is spectral, the supports of sections generate the topology, every restriction map of the structure sheaf to a distinguished open set is a localization of rings, etc.
Does anyone know whether we can impose restrictions (such as the ones I have just listed, and probably together with others) to guarantee that a given locally ringed space is actually an affine scheme?
This poster asked something similar - whether locally ringed spaces had been classified in some way. This is not exactly what I'm looking for, but it would be interesting to know in any case.