stream_molecules_from_smiles_file

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

Stream molecules from a SMILES file.

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

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

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

  • validate_smiles – If True, validate SMILES by converting to and from OpenFF Molecule. If False, SMILES are assumed to be valid, and mapped_smiles is ignored.

  • toolkit_registry – The toolkit registry to use.

Returns:

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