code: def from_file(filename, file_format="xyz"):
          
          mols = list(pb.readfile(str(file_format), str(filename)))
          return BabelMolAdaptor(mols[0].OBMol)
docs: Uses OpenBabel to read a molecule from a file in all supported formats.
  
          Args:
              filename: Filename of input file
              file_format: String specifying any OpenBabel supported formats.
  
          Returns:
              BabelMolAdaptor object