rxn.reaction_preprocessing.importer.RxnImporter
- class rxn.reaction_preprocessing.importer.RxnImporter(data_format, input_csv_column_name, reaction_column_name, fragment_bond, remove_atom_maps, column_for_light, column_for_heat, keep_original_rxn_column)[source]
Bases:
object
- Parameters
data_format (
InitialDataFormat
) –input_csv_column_name (
str
) –reaction_column_name (
str
) –fragment_bond (
str
) –remove_atom_maps (
bool
) –column_for_light (
Optional
[str
]) –column_for_heat (
Optional
[str
]) –keep_original_rxn_column (
bool
) –
- __init__(data_format, input_csv_column_name, reaction_column_name, fragment_bond, remove_atom_maps, column_for_light, column_for_heat, keep_original_rxn_column)[source]
- Parameters
data_format (
InitialDataFormat
) –input_csv_column_name (
str
) –reaction_column_name (
str
) –fragment_bond (
str
) –remove_atom_maps (
bool
) –column_for_light (
Optional
[str
]) –column_for_heat (
Optional
[str
]) –keep_original_rxn_column (
bool
) –
Methods
__init__
(data_format, input_csv_column_name, ...)- param data_format
import_from_file
(input_file, output_csv)Function to import the reactions from one file and write them to another file.
import_from_iterator
(csv_iterator)Same as
import_rxns
, except that it acts onCsvIterator
instances instead of files.- import_from_file(input_file, output_csv)[source]
Function to import the reactions from one file and write them to another file.
Goes through all the steps involved in the import: parsing of the reaction SMILES, removal of the atom mapping, addition of special tokens.
- Parameters
input_file (
Union
[str
,PathLike
]) –output_csv (
Union
[str
,PathLike
]) –
- Return type
None