Let $X\subset \mathbb P^3$ be a smooth variety and $D \subset X$ be an effective, reduced, irreducible divisor. My question is the following.


If I know the defining equations of $X$ and $D$ then is there any software that can compute $H^2(X, T\_X(-\log D))$?



Computing H^2(X, T_X(-\log D))
Computing cohomology of the logarithmic tangent sheaf $T\_X(-\log D)$ is a usually easier once you know the cohomology of the sheaves $T\_X, \quad T\_X(-D)$ and $N\_D$, the normal bundle of $D$ in $X$. To get $H^i(X,T\_X(-\log D))$ one can use the exact sequences
$$
0 \to T\_X(-D) \to T\_X(-\log D) \to T\_D \to 0
$$or
$$
0 \to T\_X(-\log D) \to TX\to N\_{D}\to 0.
$$These sequences make sense even when $D$ is singular (see Sernesi's book on deformation theory). These sheaves and their cohomology groups can be handeled in, say, Macaulay2, if you have the explicit equations. 


EDIT: Let me try to explain the above in more detail: If one is in the lucky position that some of the cohomology groups of, say $N\_D$, vanish (e.g., a line $L$ on a cubic surface has $h^0(L,N\_L)=h^1(L,N\_L)=0$, you can calculate the cohomology almost immediately. In the general case, you will have to write down the maps and calculate the cohomology using say, Cech cohomology. Macaulay2 have built-in routines for this, see for example Francesco Polizzi's answer to [this question](https://mathoverflow.net/questions/52535/calculating-the-decomposition-of-a-vector-bundle-over-rational-curve).


