Views
No views yet
pip install chemical-converters| Style Token | Description |
|---|---|
<BASE> | The most known name of the substance, sometimes is the mixture of traditional and systematic style |
<SYST> | The totally systematic style without trivial names |
<TRAD> | The style is based on trivial names of the parts of substances |
1from chemicalconverters import NamesConverter
2
3converter = NamesConverter(model_name="knowledgator/SMILES2IUPAC-canonical-small")
4print(converter.smiles_to_iupac('CCO'))
5print(converter.smiles_to_iupac(['<SYST>CCO', '<TRAD>CCO', '<BASE>CCO']))1['ethanol']
2['ethanol', 'ethanol', 'ethanol']1from chemicalconverters import NamesConverter
2
3converter = NamesConverter(model_name="knowledgator/SMILES2IUPAC-canonical-small")
4print(converter.smiles_to_iupac(["<BASE>C=CC=C" for _ in range(10)], num_beams=1,
5 process_in_batch=True, batch_size=1000))['buta-1,3-diene', 'buta-1,3-diene'...]1from chemicalconverters import NamesConverter
2
3converter = NamesConverter(model_name="knowledgator/SMILES2IUPAC-canonical-small")
4print(converter.smiles_to_iupac('CCO', validate=True))['ethanol'] 1.01from chemicalconverters import NamesConverter
2
3validation_model = NamesConverter(model_name="knowledgator/IUPAC2SMILES-canonical-base")
4print(NamesConverter.validate_iupac(input_sequence='CCO', predicted_sequence='CCO', validation_model=validation_model))1.0| Model | Accuracy | BLEU-4 score | Size(MB) |
|---|---|---|---|
| SMILES2IUPAC-canonical-small | 75% | 0.93 | 23 |
| SMILES2IUPAC-canonical-base | 86.9% | 0.964 | 180 |
| STOUT V2.0* | 66.65% | 0.92 | 128 |
| STOUT V2.0 (according to our tests) | 0.89 | 128 | |
| *According to the original paper https://jcheminf.biomedcentral.com/articles/10.1186/s13321-021-00512-4 |