second part of the equation evaluates the second derivative of the transmission coefficient profile, serving as the smoothness penalty function. Note that the smoothness of the profiles is the only constraint we impose in the objective function. The smoothing parameter $\alpha$ determines the relative importance of the second part to the first part. If $\alpha = 1$, then no smoothness constraint is imposed. Here, we use $$\alpha = \frac{\int\left(\frac{d^2T^{0}_{12}}{d\omega^2}\right)^2d\omega}{|g_{ab-initio}(T^{0}_{12}(\omega)) - g_{measured}|},$$ where $T^0_{12}(\omega)$ is the initial profile. The formula is chosen such that the first and second parts of the equation have the same order of magnitude.

To search for the optimal profile that minimizes the objective function, the PSO algorithm randomly initializes a collection of transmission coefficient profiles and evolves them in steps throughout the phase space which contains all possible transmission coefficient profiles. At each step and for each profile, the algorithm evaluates the objective function defined as above. After this evaluation, the algorithm decides how each profile should evolve according to the current best profile. The profile evolves, then the algorithm reevaluates. The algorithm stops when the objective function reaches the desired value. The transmission coefficient profile that achieves the minimum value of the objective function is 