Imagine I have an expression of the type:
$$\langle \phi_{x_1} \phi_{x_1} \phi_{x_2} \phi_{x_2} \phi_{z_1} \phi_{z_1} A_{z_1} \phi_{z_2} \phi_{z_2} A_{z_2} \phi_{z_3} \phi_{z_3} A_{z_3} \phi_{z_4} \phi_{z_4} A_{z_4} \rangle \tag{1}$$
with $\phi_{x_i}:= \phi(x_i)$, and I would like to know all the ways to Wick contract that are possible. Is there a program or some online calculator that can do that, starting from an expression like $(1)$?
Added: and it would be so great if it could also allow to remove self-energy contractions from the results!