Analysis of an Op-amp circuit
The way this is drawn we can ignore I1, Q2 and R4 and write: 

Vout = \$V_B(1+\frac {R_3}{R_2})\$

\$V_B = -V_T ln(\frac {Vin}{R_1 I_S}) \$, if Vin > 0 and 0 if Vin &lt; 0 

Where Is ~= 0.026V at room temperature and Is is saturation current of the transistor. This follows directly from the Ebers-Moll model equation Ic \$\approx I_S e^{\frac {V_{BE}}{V_T}}\$

For example, suppose R1 = 10K, Vin = 5V, Vt = 0.026V, Is = 6.73fA , then Vb = -.651V.