What techniques are out there to calculate the cohomology groups of the structure sheaf $\mathcal{O}\_X$ of a smooth quasi-projective variety $X$?


For example can we conclude something from the dimension of the complement $Z = \bar{X} \X$, where $\bar{X}$ is smooth and projective. I know I could use Hodge theory to calculate the cohomology groups $H^i(\bar{X},\mathcal{O}\_{\bar X})$. 


Is there some way to relate the groups $H^i(\bar{X},\mathcal{O}\_{\bar X})$ and $H^i(X,\mathcal{O}\_X)$,. 


I should mention here that I do know the cohomology groups $H^i(\bar{X},\mathcal{O}\_{\bar X})$ and the space $Z$ quite well.



Cohomology of Structure sheaves
Not knowing anything else about your situation, the approach that comes to mind is to use
the long exact sequence:
$$\cdots \to H^i\_Z(\overline{X},\mathcal O\_{\overline{X}}) \to H^i(\overline{X},
\mathcal O\_{\overline{X}}) \to H^i(X,\mathcal O\_X) \to \cdots $$
(described somewhere in a Hartshorne exercise). This requires knowing the local cohomology
$H^i\_Z(\overline{X},\mathcal O\_{\overline{X}})$, which you can hopefully get a handle on,
if you know enough about $Z$ and its embedding in $\overline{X}$.


