code: def _write_box_information(xml_file, structure, ref_distance):
      
      if np.allclose(structure.box[3:6], np.array([90, 90, 90])):
          box_str = '<box units="sigma"  Lx="{}" Ly="{}" Lz="{}"/>\n'
          xml_file.write(box_str.format(*structure.box[:3] / ref_distance))
      else:
          a, b, c = structure.box[0:3] / ref_distance
          alpha, beta, gamma = np.radians(structure.box[3:6])
  
          lx = a
          xy = b * np.cos(gamma)
          xz = c * np.cos(beta)
          ly = np.sqrt(b**2 - xy**2)
          yz = (b*c*np.cos(alpha) - xy*xz) / ly
          lz = np.sqrt(c**2 - xz**2 - yz**2)
          box_str = '<box units="sigma"  Lx="{}" Ly="{}" Lz="{}" xy="{}" xz="{}" yz="{}"/>\n'
          xml_file.write(box_str.format(lx, ly, lz, xy, xz, yz))
docs: Write box information.
  
      Parameters
      ----------
      xml_file : file object
          The file object of the hoomdxml file being written
      structure : parmed.Structure
          Parmed structure object
      ref_energy : float, default=1.0
          Reference energy for conversion to reduced units