Code
SDP_PF
A package of MATLAB code integrated with MATPOWER that implements the semidefinite programming relaxation of the optimal power flow problem for large-scale systems, a sufficient condition for global optimality of a optimal power flow solution, a power flow insolvability condition (including the possibility of generator reactive power limits), and voltage stability margins.
Available in the current release of the MATPOWER distribution: http://www.pserc.cornell.edu/matpower/