# How to exchange left and right $\mathcal{D}_X$-modules when $X$ is not smooth?

When $X$ is a smooth scheme (over something of characteristic $0$), one can exchange left and right $\mathcal{D}_X$-modules ($\mathcal{D}_X$ means the sheaf of differential operators) by tensor with (resp. putting Hom from) $\omega_X$, the canonical sheaf of $X$. However, as I know, to do this, one need

the right $\mathcal{D}_X$-module structure on the tensor product $R\otimes_{\mathcal{O}} L$ whenever $R$ is a right $\mathcal{D}_X$-module and $L$ is a left $\mathcal{D}_X$-module, and the left $\mathcal{D}_X$-module strucuture of $\mathcal{H}om_{\mathcal{O}}(R,S)$ whenever both $R$ and $S$ are right $\mathcal{D}_X$-modules.

However, I don't know how to do this in the non-smooth situation, because in general $\mathcal{D}_X$ is not generated by $\mathcal{O}_X$ and derivations on $X$.

Question: Do those structures in the above box still exist even when $\mathcal{D}_X$ is not generated by $\mathcal{O}_X$ and derivations? If so, how to define them? If not, can we still obtain an equivalence between the category of left $\mathcal{D}_X$-modules and the category of right $\mathcal{D}_X$-modules?