Let $\mathcal{D}$ be a stack. An [atlas](https://mathoverflow.net/questions/303826/understanding-the-definition-of-atlas-of-a-stack) for stack $\mathcal{D}$ is given by 


* a smooth manifold $X$ and
* a map of stacks $p:\underline{X}\rightarrow \mathcal{D}$


such that, for any 


* manifold $M$ and
* a map of stacks $f:\underline{M}\rightarrow \mathcal{D}$


the fiber product $\underline{X}\times\_{\mathcal{D}}\underline{M}$ is represented by a manifold $P$ (i.e., it is isomorphic to stack $\underline{P}$) and the map $P\rightarrow X$ coming from the projection map $\underline{X}\times\_{\mathcal{D}}\underline{M}\rightarrow \underline{M}$ is a smooth submersion.


I understand the set up.


What I do not understand is 


1. How do you check if a map of stacks $p:\underline{X}\rightarrow \mathcal{D}$ is an atlas for $\mathcal{D}$?
2. How do you check if a stack $\mathcal{C}$ is isomorphic to $\underline{P}$ for some manifold.


Any comments are welcome. 



To check if a stack is coming from a manifold
Take $M = X$ and $f=p$, so that $\underline{P} = \underline{X} \times\_\mathcal{D} \underline{X}$. The Lie groupoid $P\rightrightarrows X$ you get should be proper, in the sense the source-target map $(s,t)\colon P\to X\times X$ is a proper map, and $(s,t)$ should be injective, so that there are no nontrivial automorphism groups. Then your original stack is the stack associated to the manifold that is the quotient of $X$ by the equivalence relation corresponding to $P$ (which is closed, by properness of $(s,t)$), i.e. $\mathcal{D} \simeq \underline{X/P}$.




---


To respond to the question about non-injectivity of $(s,t)$ in the comments:


Let us say that the groupoid $P \rightrightarrows X$ has some pair $x,y\in X$ are such that $(s,t)^{-1}(x,y)$ has at least two distinct elements, say $a$ and $b$. Then note that $id\_x$ and $b^{-1}a$ are distinct elements in $(s,t)^{-1}(x,x)=\mathrm{Aut}(x)$. Then consider the groupoid of functors $\ast \to (P\rightrightarrows X)$ and natural isomorphisms, which is equivalent to the groupoid of functors $\ast \to \mathcal{D}$ (this is because every principal $(P \rightrightarrows X)$-bundle over $\ast$ has a section - this is a nice exercise to work out the details). But by Yoneda the groupoid of functors $\ast \to \mathcal{D}$ is equivalent to the groupoid $\mathcal{D}(\ast)$, thinking of $\mathcal{D}$ as a functor $\mathbf{Mfld}^\mathrm{op}\to \mathbf{Gpd}$. But in the groupoid of functors $\ast\to (P\rightrightarrows X)$ the functor sending $\ast$ to $x\in X$ has a nontrivial automorphism, given by $b^{-1}a$, so the groupoid $\mathcal{D}(\ast)$ has an object with a nontrivial automorphism, hence $\mathcal{D}\colon \mathbf{Mfld}^\mathrm{op}\to \mathbf{Gpd}$ doesn't factor through $\mathbf{Set}\hookrightarrow \mathbf{Gpd}$. Every stack arising from a manifold is in fact a sheaf $\mathbf{Mfld}^\mathrm{op}\to \mathbf{Set}$, so in this case $\mathcal{D}$ cannot be the stack associated to a manifold. Hence for $\mathcal{D}$ to come from a manifold, $(s,t)$ must be injective. This is not sufficient, one really does need properness else the quotient $X/P$, which should be the manifold in question, will not exist in $\mathbf{Mfld}$. Consider for instance the action groupoid associated to a [free action of $\mathbb{R}$ on a torus $U(1)^2$ with irrational slope](https://en.wikipedia.org/wiki/Linear_flow_on_the_torus#Applications).


