$\def\bbC{\mathbb{C}} \def\sO{\mathcal{O}} \def\hom{\operatorname{Hom}} \def\rs{\mathsf{RS}} \def\lrs{\mathsf{LRS}} \def\swf{\mathsf{SWF}} \def\k{\operatorname{K}} \def\ent{\mathrm{ent}} \def\spec{\operatorname{Spec}}$A smooth (resp., complex) manifold is naturally a locally ringed space with the sheaf of real-valued smooth (resp., complex-valued holomorphic) functions. Let $\mathbb{K}=\mathbb{R}$ (resp., let $\mathbb{K}=\mathbb{C}$). A smooth (resp., holomorphic) map between smooth (resp., complex) manifolds is the same as a locally ringed space morphism between them and over $\spec\mathbb{K}$. Nonetheless, I think that counterexamples may arise if we drop the locality and/or the $\mathbb{K}$-linearity condition. My sole question is:
Can you give a morphism of ringed spaces between smooth (resp., complex) manifolds that does not come from a smooth (resp., complex) map?
I will explain my thoughts on this topic to learn what a counterexample might look like.
Let $k$ be a field. Define a space with $k$-valued functions, or simply, a space with functions to be a pair $(X,\sO_X)$, where $X$ is a topological space and $\sO_X$ is a subsheaf of $k$-algebras of the sheaf of $k$-valued functions on $X$. A morphism of spaces with functions $(X,\sO_X)\to(Y,\sO_Y)$ is a continuous map $f:X\to Y$ such that $g\circ f|_{f^{-1}(V)}\in\sO_{X}(f^{-1}(V))$ for all $g\in\sO_Y(V)$ and $V\subset Y$ open. We denote $\swf_k$ to the category of spaces with $k$-valued functions with the morphisms of s.w.f.
Given a ring $R$, define a $R$-ringed space to be a pair $(X,\sO_X)$, where $X$ is a space and $\sO_X$ is a sheaf of $R$-algebras. A morphism of $R$-ringed spaces $(X,\sO_X)\to(Y,\sO_Y)$ is a continuous map $F:X\to Y$ together with a morphism $\sO_Y\to f_*\sO_X$ of sheaves of $R$-algebras over $Y$ (equivalently, a morphism $f^{-1}\sO_Y\to\sO_X$ of sheaves of $R$-algebras over $X$). We denote $R$-$\rs$ to the category of $R$-ringed spaces with the morphisms of $R$-ringed spaces, and we denote $R$-$\lrs$ to the non-wide, non-full subcategory of $R$-$\rs$ of the $R$-ringed spaces that are locally ringed, along with the morphisms of $R$-ringed spaces that are local. In particular, $\rs=\mathbb{Z}\text{-}\rs$, $\lrs=\mathbb{Z}\text{-}\lrs$. (By the Spec-global sections adjunction, the category $R$-$\lrs$ is just $\lrs$ over $\operatorname{Spec} R$.)
If $X$ and $Y$ are spaces with $k$-valued functions that happen to be locally ringed, then we have $$ \label{1}\tag{1} \hom_{k\text{-}\lrs}(X,Y) =\hom_{k\text{-}\rs}(X,Y) =\hom_{\swf_k}(X,Y). $$ (See Prop. 3.8 of The Classical-Schematic Equivalence.)
This makes me wonder: what about $\hom_{\rs}(X,Y)$? Is it equal to the previous hom-sets?
The answer is no, in general. Let's give a counterexample.
Let $a\in\bbC$, $r\in(0,+\infty]$. For a holomorphic function $f:B(a,r)\subset\bbC\to\bbC$, where $B(a,r)=\{z\in\bbC:|z-a|<r\}$, we define a new holomorphic function $\k_{a,r}f:B(a,r)\to\bbC$, the conjugate of $f$, by the following trick: if $f(z)=\sum_{n=0}^{+\infty}c_n(z-a)^n$ is the Taylor series of $f$, then $(\k_{a,r}f)(z)=\sum_{n=0}^{+\infty}\overline{c}_n(z-a)^n$. In other words, $(\k_{a,r}f)(z)=\overline{f(\overline{z-a}+a)}$. More generally, if $f:U\subset B(a,r)\to\bbC$ is a holomorphic function with a holomorphic extension $g:B(a,r)\to\bbC$, we define $\k_{a,r}f=(K_{a,r}g)|_U$. Note that $\k_{a,r}^2=\operatorname{id}$.
Consider $\bbC$ as a locally ringed space equipped with the sheaf of entire functions $\sO_{\bbC}^\ent$. That is, by definition, a section of $\sO_\bbC^\ent$ over $U\subset\bbC$ is a function $f:U\to\bbC$ that has an entire extension. Define an endomorphism of ringed spaces $\varphi:(\bbC,\sO_{\bbC}^\ent)\to(\bbC,\sO_{\bbC}^\ent)$ that is the identity on topological spaces and whose maps on sections sends an entirely extendable function $f:U\subset\bbC\to\bbC$ to $\k_{0,+\infty}f$. Then $\varphi$ is not a morphism of locally ringed spaces, for the entire function $z-i$, which vanish at $i$, is sent to the function $z+i$, that doesn't vanish at $i$.
(A similar example is produced when considering the sheaf of polynomial functions on $\bbC$ instead of $\sO_{\bbC}^\ent$.)
I was trying to adapt this idea to construct an endomorphism of ringed spaces $(\bbC,\sO_\bbC)\to(\bbC,\sO_\bbC)$ that is not local (where $\sO_\bbC$ is the sheaf of holomorphic functions). This would answer the part on my question on complex manifolds. What I thought is: define the map on spaces to be the identity. For the map on sections, I consider a holomorphic function $f:U\subset\bbC\to\bbC$, and I thought “I would like to get a holomorphic function $\k f:U\to\bbC$ such that for each $a\in U$ and $r>0$ with $B(a,r)\subset U$, we have $(\k f)|_{B(a,r)}=\k_{a,r} (f|_{B(a,r)})$.” However, this is not possible, because if $g(z)=\sum_{n=0}^{\infty}c_n(z-a)^n$ and $h(z)=\sum_{n=0}^{+\infty}d_n(z-b)^n$ are holomorphic in $B(a,r)$ and $B(b,s)$ and agree in $B(a,r)\cap B(b,s)$, then we can only conclude that $(\k_{a,r}g)(\overline{z-a}+a)=(\k_{b,s}h)(\overline{z-b}+b)$, for $z\in B(a,r)\cap B(b,s)$. So $\k_{a,r}g$ and $\k_{b,s}h$ may not agree on $B(a,r)\cap B(b,s)$.
Summing up:
Could we expand on a similar idea to obtain a counterexample of the form $(\bbC,\sO_\bbC)\to(\bbC,\sO_\bbC)$?
How could we get a counterexample for smooth manifolds?
What it is clear by \eqref{1} is that a counterexample cannot be $\mathbb{K}$-linear on sections.