How to calculate the gain of the op amp in this circuit?
This isn't an amplifier but a Schmitt trigger, because the feedback resistor VR2 is between the output and the positive input.

So as soon the output becomes positive, the positive input becomes more positive and following, the output becomes even more positive.

https://en.wikipedia.org/wiki/Schmitt_trigger#Op-amp_implementations