Partition function of Hamiltonian without momentum dependence Considering an ideal gas of $N$ diatomic molecules with dipole momenta $\vec{p}$. Given the Hamiltonian of one molecule
$$ H = -\vec{p} \cdot \vec{E} = -pE\cos(\theta)$$
when calculating the partition function we "ignore" the p-dependence by not integrating over the momentum space, but is this really right? How is this justified? Do we just "ignore" every variable, which the Hamiltonian is not dependent on? This is what I would have done:
\begin{align}
 Z & = \frac{1}{h^3} \int \mathrm{d}^3q\ e^{\beta p E \cos(\theta)} \\
 & = \frac{1}{h^3} \int_0^R \mathrm{d}r \int_{-\pi}^\pi  \mathrm{d}\varphi \int_0^\pi \mathrm{d}\theta\ r^2 \sin(\theta) e^{\beta p E \cos(\theta)} \\
 & = \frac{4\pi R^3}{e\beta h^3 p E} \sinh(\beta p E)
\end{align}
When using spherical coordinates to compute the partition function of the given Hamiltonian, do we (as a consequence) not integrate over the radius $R$ and $\varphi$?
EDIT: added my calculation
 A: Yes, we cannot ignore the momentum dependence of the system and must integrate over all of state space. However as @d_b pointed out, this is not the momentum, it is the dipole moment. So, this is not the same $\theta$ associated with the position of the centre of mass of the diatomic molecule but rather the angle between the dipole moment and the electric field.
In the partition function, we have to sum over all possible states of the system. In the above Hamiltonian, there is no dependence on momentum. Perhaps, this is a special case of a sort of lattice. We can add a momentum dependence to the Hamiltonian(a $\frac{\vec{p}^2}{2m}$ term.
Since there is no coupling between the momentum and the dipole moment, the partition function for a diatomic molecule will separate into 3 parts:
$$
z = z_{dipole} \times z_{momentum} \times z_{position}
$$
First we can find the dipole part that is:
$$
z_{dipole} = \int_0^\pi Exp(-\beta \; H(\theta))\;g(\theta) \; d\theta
$$
Here $g(\theta)$ is the degeneracy of the diatomic molecule. If we assume that this degeneracy is constant g then we can simplify the partition function by evaluating the integral.
For the other 2 partition functions, we can use the results of the ideal gas.
I have not evaluated any integral but i hope i have answered your question! Please let me know if you would like to know more or have a query!
