it possible to estimate the density profile in the film of semi-flexible chains adsorbed onto the surface.

Let $L$ denote the number of sites in a layer, $\theta_{i}L$ the number of occupied lattice sites, and write the Boltzmann weight for the interactions between occupied sites $\eta = \exp( -V / k_B T)$, the absolute activity $\lambda = \exp (\mu/k_B T)$, $\mu$ being chemical potential; $w_{f}=\exp (-U_{f}
/k_{\text{B}}T)$ and $w_{s} = \exp (-U_s/k_B T)$ the Boltzmann weights for the flex energy and adsorption energy, respectively. The configurational energy of the system is $E_{i}=(VN_{11} + U_{f}N_{g} + U_{s}N_{s})_i$, where $N_{11}$ is the number of nearest neighbor pairs of segments irrespective to wether they form bond or not, $N_{g}$ the total number of the gauche configurations, $\mu$ the chemical potential. The grand partition function of the system can be written as $$\label{GPF_total}
    \Xi = \sum_{\{\theta_{i}\}} Q(\{\theta_{i}\}) \lambda^{\theta_{i}L} =  \sum_{ \{\theta_{i}\}} \sum_{E} \Omega(\{\theta_{i}\},E) \lambda^{\theta_{i}L} \exp (-E/k_{B} T) ,$$ where $Q$ is the canonical partition function. The series can be replaced by its maximum term with only negligible error. It means that among all sets $\{\theta_{i}\}$’s one chooses only the set $\{\theta_{i}^{\ast}\}$ that corresponds to the equilibrium density in the given layer, $\theta_{i}^{\ast}$. The equilibrium 