stream_molecules_from_sdf_file

openff.nagl.toolkits.openff.stream_molecules_from_sdf_file(file: str, explicit_hydrogens: bool = True, as_smiles: bool = False, mapped_smiles: bool = False, include_sdf_data: bool = True, toolkit_registry=NAGL_TOOLKIT_REGISTRY)[source]

Stream molecules from an SDF file.

Parameters:
  • file – The path to the SDF file.

  • explicit_hydrogens – Leave explicit hydrogens in the molecules.

  • as_smiles – If True, return the molecules as SMILES strings.

  • mapped_smiles – If True, return mapped smiles with atom indices

  • include_sdf_data – If SDF tag data (e.g. charges) should be included in the molecule properties

  • toolkit_registry – The toolkit registry to use.

Returns:

A generator of openff.toolkit.topology.Molecule objects or SMILES strings