In algebraic geometry, the Donaldson-Thomas invariants are virtual counts of ideal sheaves (rank one, torsion-free, trivial determinant) on a Calabi-Yau threefold $X$. We have

$\text{DT}_{\beta, n}(X) = \int_{[M_{\beta,n}(X)]^{\text{vir}}}1$

where $M_{\beta, n}(X)$ is the moduli space of ideal sheaves with Chern character $(1, 0, - \beta, -n)$.

In physics, I believe $\text{DT}_{\beta, n}(X)$ is the virtual count of BPS particles in 4d with charge $(1, 0, - \beta, -n)$ in Type IIA superstring theory compactified on $X$. These are bound states of D2-D0 branes in a single D6-brane. But I've also heard that DT invariants are quantities in the topological B-model on $X$.

My questions are the following:

1. Mathematically, the DT invariants are *deformation invariants* meaning they are unchanged under deformations of the complex structure on $X$ (though they can jump across walls!). So how are they B-model quantities when the B-model depends on the complex moduli of $X$?

2. Secondly, and possibly related, I'm hoping someone can tell me if the following physical statements are correct:

We can curl up the time direction in $\mathbb{R}^{1, 3}$ to a circle of radius $R$ and perform T-duality. This says that Type IIA in the $R \to \infty$ limit is equivalent to Type IIB in the $R \to 0$ limit. This takes BPS *particles* coming from D6-D2-D0 bound states to BPS *instantons* coming from D5-D1-D(-1) branes, wrapping the same cycles in $X$.

Is this correct, and is this how DT invariants can be related to Type IIB theory?