createInChIStruct(mets, sdfFileName)[source]

Converts metabolite structures in SDF to InChI strings with OpenBabel, and maps InChIs to mets.


inchiStruct = createInChIStruct(mets, sdfFileName)


  • metsm x 1 cell array of metabolite identifiers (e.g., BiGG abbreviations).
  • sdfFileName – SDF with structures of metabolites in mets. Metabolite identifiers in the SDF are assumed to be the same as in mets.


  • inchiStruct – Structure with following fields:
    • .standard - Standard InChIs with no isotope, stereo or charge layers.
    • .standardWithStereo - Standard InChIs with stereo layers.
    • .standardWithStereoAndCharge - Standard InChIs with stereo and charge layers
    • .nonstandard - Nonstandard InChI with all layers.
sdf2inchi(sdfFileName, options)[source]

Converts metabolite structures in an SDF to a cell array of InChI strings with OpenBabel.


[inchi, metList] = sdf2inchi(sdfFileName, options)


  • sdfFileName – Path to SDF file.

Optional input

  • options – Write options for InChI strings. See InChI documentation for details. If no options are specified the function will output standard InChI.


  • inchi – Cell array of InChI strings for metabolites in the SDF file.
  • metList – Cell array of metabolite identifiers (first line of each molfile in SDF). Will be empty unless write option t is used (i.e., options >= ‘-xt’).