Last year I created a little online tool to compute sheaf cohomology of twists of the structure sheaf on a complete intersection. It was a fun exercise in implementing power series computations and a result from SGA7 in JavaScript, but it unfortunately only applies to:

  • complete intersections
  • twists of the structure sheaf

Lately I have been toying a little with Macaulay2, and computations of this sort are very easy in this language, and can be done in far greater generality for arbitrary projective varieties and arbitrary coherent sheaves. As long as you can define the objects you are good to go, because of cohomologyTable. As you can use Macaulay2 online you might as well do it this way, instead of using the limited functionality in my implementation.

As an example you can run the following code (the online interface requires you to put your cursor on the first line and then repeatedly click evaluate):

loadPackage "BGG";

-- P^1
X = Proj(QQ[a,b])
cohomologyTable(OO_X(0) ++ OO_X(1), -4, 4)
cohomologyTable(cotangentSheaf X, -4, 4)
-- twisted cubic
X = Proj(QQ[a,b,c,d] / (a*c-b^2, b*d-c^2, a*d-b*c));
cohomologyTable(OO_X^1, -4, 4)
-- Fermat quartic (a K3 surface)
X = Proj(QQ[a,b,c,d] / (a^4+b^4+c^4+d^4));
cohomologyTable(tangentSheaf X, -4, 4)

The output for the K3 surface is

ii16 : -- Fermat quartic (a K3 surface)
       X = Proj(QQ[a,b,c,d] / (a^4+b^4+c^4+d^4));

ii17 : cohomologyTable(tangentSheaf X, -4, 4)

           -4 -3 -2 -1  0  1  2  3  4  5   6   7   8   9  10
oo17 = 2: 124 80 45 20  6  .  .  .  .  .   .   .   .   .   .
       1:   .  1  4 10 16 20 16 10  4  1   .   .   .   .   .
       0:   .  .  .  .  .  .  6 20 45 80 124 176 236 304 380

Observe the (weird) indexing: for the K3 surface we have $\mathrm{h}^1(X,\mathrm{T}_X)=20$, which sits in position (1,1) and not (1,0) as I would expect. The reason for this can be found in the manual:

This function takes as input a coherent sheaf F, two integers l and h, and prints the dimension dim HH^j F(i-j) for h>=i>=l.