How to deduce this equation for a 4-dim almost Kahler manifold? Let $(X,\omega,J)$ be a 4-dim almost Kahler manifold, equivalently, $(X,\omega)$ is an 4-dim symplectic manifold, $J$ is an almost complex structure on $X$ which is compatible with $\omega$, $g$ is the Riemann metric $\omega(X,Y)=g(JX,Y)$.
Denote $D$ to be the Levi-Civita connection which is compatible with $g$. 
A $(0,2)$-tensor $B$ is defined by $B_{ij}=g^{kl}g_{mn}D_kJ_i^m D_lJ_j^n$.
I want to know how to deduce the equation $B=\frac{1}{4}|DJ|^2 g$ under the conditions given above?
REMARK: It seems that the condition '$X$ is 4-dim' is crucial.
 A: Here is one way to do this computation:
Choose a local coframing $\eta = (\eta_i)$ 
in which $g = {\eta_1}^2{+}{\eta_2}^2{+}{\eta_3}^2{+}{\eta_4}^2$
and $\omega = \eta_1\wedge\eta_2{+}\eta_3\wedge\eta_4$.  Let $\nabla$
be the Levi-Civita connection of $g$ and orient $M$ so that $\tfrac12\omega^2$
is the positive volume form for $g$.  
The complex structure $J$ defined by $\omega$ is compatible with $g$, 
so $\omega$ is a self-dual $2$-form of constant norm.  It follows that
$\nabla_X\omega$ must be self-dual for any vector field $X$ and it must
satisfy $\omega\wedge(\nabla_X\omega) = 0$ as well.  Since $\kappa=\eta_1\wedge\eta_3+\eta_4\wedge\eta_2$ 
and $\lambda=\eta_1\wedge\eta_4+\eta_2\wedge\eta_3$, together
with $\omega$, form a basis for the self-dual $2$-forms on the domain of
the coframing $\eta$, it follows that
$$
\nabla\omega = \alpha\otimes\kappa+\beta\otimes\lambda
$$ 
where $\alpha$ and $\beta$ are $1$-forms on the domain of the coframing.
Since $\omega$ is closed and $\nabla$ is torsion-free, we have
$$
0 = d\omega = \alpha\wedge\kappa+\beta\wedge\lambda.
$$
Thus, if $
\alpha = a_1\ \eta_1 + a_2\ \eta_2 + a_3\ \eta_3 + a_4\ \eta_4\ ,
$
then
$$
\beta = a_2\ \eta_1 - a_1\ \eta_2 + a_4\ \eta_3 - a_3\ \eta_4\ . 
$$
At a point where all of the $a_i$ vanish, $\nabla\omega$
vanishes, so that the $(0,2)$-tensor $B$ vanishes there as well,
so there is nothing to prove.
Near a point where not all of the $a_i$ vanish, one can choose
the coframing $\eta$ in such a way that $a_2=a_3=a_4=0$ while $a_1 = a >0$.
(NB:  This is because the set of $g$-orthonormal coframings $\eta$ for which $\omega$, $\kappa$, and $\lambda$ have the given expressions in terms of $\eta$ is the set of (local) sections of 
an $SU(2)$-bundle, and this $SU(2)\subset SO(4)$ acts (simply) transitively on the 
unit sphere in $\mathbb{R}^4$.)
In this coframing, 
$$
\nabla\omega = a\eta_1\otimes(\eta_1\wedge\eta_3{+}\eta_4\wedge\eta_2)
               -a\eta_2\otimes(\eta_1\wedge\eta_4{+}\eta_2\wedge\eta_3).
$$
Thus, $D_3J = D_4J=0$ while $D_1J = a K$ and $D_2J = -a L$, 
where $K$ and $L$ are the almost complex structures 
that are compatible with $g$ and satisfy
$$
g(KX,Y) = \kappa(X,Y)\qquad\text{and}\qquad g(LX,Y) = \lambda(X,Y).
$$
Because the coframe $\eta$
is $g$-orthonormal, the matrix $(g_{ij})$ is the identity matrix.
Because $K$ and $L$ are skew-symmetric, the tensor $B$, regarded
as a (symmetric) endomorphism, is of the form
$$
B = -a^2 K^2 - a^2 L^2 =  2a^2\ Id,
$$
so, regarded as a $(0,2)$ tensor, $B = 2a^2\ g$.
Meanwhile, $\|\nabla\omega\|^2 = 4a^2$, so $\|\nabla J\|^2 = 8a^2$. 
