(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](http://www.ams.org/journals/tran/1969-142-00/S0002-9947-1969-0251026-X/S0002-9947-1969-0251026-X.pdf) gives a proof that the underlying topological spaces of affine schemes are precisely the [spectral spaces](http://en.wikipedia.org/wiki/Spectral_space) (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](https://mathoverflow.net/questions/13616/a-book-on-locally-ringed-spaces) 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.



Which local ringed spaces are schemes?
I think the easiest condition is the fact that the natural morphism
$$
(X, \mathcal O\_X) \to \operatorname{Spec}(\mathcal O\_X(X))
$$
is an isomorphism.


