linchemin.cheminfo.atom_mapping.perform_atom_mapping¶
- linchemin.cheminfo.atom_mapping.perform_atom_mapping(reactions_list: List[dict], mapper_name: str) MappingOutput[source]¶
To map a list of reaction smiles
Parameters:¶
- reactions_list: List[dict]
The list of dictionaries with the reaction strings to be mapped in the form [{‘query_id’: n, ‘input_string’: s}]
- mapper_name: str
the name of the mapper to be used.
Returns:¶
- mapped reactions: MappingOutput
Its attributes contain (i) the mapped reaction strings (ii) the reaction strings that remained unmapped
Raises:¶
UnavailableMapper: if the selected mapper is not available
Example:¶
>>> reactions = [{'query_id': 0, 'input_string': 'CN.CC(O)=O>O>CNC(C)=O'}, >>> {'query_id': 1, 'input_string': 'CC(O)=O.CN>O>CNC(C)=O'}, >>> {'query_id': 2, 'input_string': 'CC(O)=O.CN>>CNC(C)=O'}] >>> out = perform_atom_mapping(reactions, 'rxnmapper') >>> mapped_reactions = out.mapped_reactions