An implementation of the exponential random graph model