Electronic structure and conformational flexibility of d-cycloserine