Medium effects in action, visualized by the crystal structures of open and closed forms of a molecular receptor