How to calculate the mean/center frequency of the spectrum?
[EDIT] If just want to compute the location of the maximum amplitude, you just have to compute the maximum. You can work in a more generic context, however. As you remarked, the notion of center frequency is not evident. The notion of centroid could be more pertinent.

I assume that your signal is real (since you are talking about a maximum, not well defined in the complex domain). Since its amplitude spectrum is symmetric about $0$, this possible center of mass is useless, since it is the same for all real signals (the zero-frequency). More likely, one is looking at a more useful quantity, based on a one-sided spectrum:

$$\overline{\omega}_W = \int_{\mathbb{R}^+} \omega W(X(\omega))d\omega$$

where $W(X(\omega))$ is a weighting function that (may) depend on the spectrum $X$. The "mean" $\overline{\omega}_W $ will depend on the choice of $W$. A code was given in  the answer to Finding the right measure to compare sound signals in the frequency domain. 

You can base it on an absolute value, or something else (positive).  But it is important to have a normalized weight: it should, somehow, sum to one, like for a traditional center of mass. The reason is scaling homogeneity. The mean should not change if you multiply every $X(w)$ by the same quantity.

For orthogonal transforms, based on the energy conservation:

$$ \int [x(t)|^2dt = \int [X(\omega)|^2d\omega $$ 

it is very common to use a mean/center definition based on an energetic weight, ie 
a square of the absolute spectrum. So  every often, the mean frequency is defined as:

$$\overline{\omega}_2 = \frac{\int_{\mathbb{R}^+} \omega|X(\omega)|^2d\omega}{\int_{\mathbb{R}^+}|X(\omega)|^2d\omega}\,.$$

This choice is very sensitive when dealing with time/frequency location uncertainty related to the Weyl-Pauli-Heisenberg inequalities.

But you can use other $L_p$ norms, with:

$$\overline{\omega}_p = \frac{\int_{\mathbb{R}^+} \omega|X(\omega)|^pd\omega}{\int_{\mathbb{R}^+}|X(\omega)|^pd\omega}\,.$$

As $p\to\infty$, this estimator converges to the location of a maximum, as demonstrated in Metric Spaces: Why $L_\infty$ selects the maximum value. 

When $p=1$, this is called the spectral centroid, or "brightness" (of sound), or simply "centre of gravity of amplitudes". It is described with other moments in Chapter 6.1 Spectral shape description. When $p=2$, this is sometimes called the power spectral centroid. 

I have not found yet useful references for other powers (still searching).