rxn.reaction_preprocessing.config.RxnImportConfig
- class rxn.reaction_preprocessing.config.RxnImportConfig(input_file='${data.path}', output_csv='${data.proc_dir}/${data.name}.imported.csv', data_format=InitialDataFormat.CSV, input_csv_column_name='${common.reaction_column_name}', reaction_column_name='${common.reaction_column_name}', fragment_bond='${common.fragment_bond}', remove_atom_mapping=True, column_for_light=None, column_for_heat=None, keep_original_rxn_column=False)[source]
Bases:
object
Configuration for the initial import of the reaction data.
- Fields:
input_file: the input file path (.txt, .csv). output_csv: the output file path. initial_data_format: whether the input file is in TXT or CSV format. reaction_column_name: name the column containing the reactions if the input
is in CSV format. The value is ignored if the input is not in CSV format.
- reaction_column_name: how to name the column with the reaction SMILES in
the output CSV.
fragment_bond: token denoting a fragment bond in the reaction SMILES (after import). remove_atom_mapping: whether to remove the atom mapping from the input reaction SMILES. column_for_light: name of the column containing boolean values that indicate
whether the reaction happens under light. If specified, the light token will be added to the precursors of the corresponding reactions.
- column_for_heat: name of the column containing boolean values that indicate
whether the reaction happens under heat. If specified, the heat token will be added to the precursors of the corresponding reactions.
- keep_original_rxn_column: determines whether the original column with the
raw reaction SMILES is to be kept or not.
- Parameters
input_file (
str
, default:'${data.path}'
) –output_csv (
str
, default:'${data.proc_dir}/${data.name}.imported.csv'
) –data_format (
InitialDataFormat
, default:<InitialDataFormat.CSV: 2>
) –input_csv_column_name (
str
, default:'${common.reaction_column_name}'
) –reaction_column_name (
str
, default:'${common.reaction_column_name}'
) –fragment_bond (
FragmentBond
, default:'${common.fragment_bond}'
) –remove_atom_mapping (
bool
, default:True
) –column_for_light (
Optional
[str
], default:None
) –column_for_heat (
Optional
[str
], default:None
) –keep_original_rxn_column (
bool
, default:False
) –
- __init__(input_file='${data.path}', output_csv='${data.proc_dir}/${data.name}.imported.csv', data_format=InitialDataFormat.CSV, input_csv_column_name='${common.reaction_column_name}', reaction_column_name='${common.reaction_column_name}', fragment_bond='${common.fragment_bond}', remove_atom_mapping=True, column_for_light=None, column_for_heat=None, keep_original_rxn_column=False)
- Parameters
input_file (
str
, default:'${data.path}'
) –output_csv (
str
, default:'${data.proc_dir}/${data.name}.imported.csv'
) –data_format (
InitialDataFormat
, default:<InitialDataFormat.CSV: 2>
) –input_csv_column_name (
str
, default:'${common.reaction_column_name}'
) –reaction_column_name (
str
, default:'${common.reaction_column_name}'
) –fragment_bond (
FragmentBond
, default:'${common.fragment_bond}'
) –remove_atom_mapping (
bool
, default:True
) –column_for_light (
Optional
[str
], default:None
) –column_for_heat (
Optional
[str
], default:None
) –keep_original_rxn_column (
bool
, default:False
) –
- Return type
None
Methods
__init__
([input_file, output_csv, ...])- param input_file
Attributes
column_for_heat
column_for_light
data_format
fragment_bond
input_csv_column_name
input_file
keep_original_rxn_column
output_csv
reaction_column_name
remove_atom_mapping