ML4chemistry/hydroxyl_radical_reaction_constants
Model Card for Model ID
<!-- Provide a quick summary of what the model is/does. -->
Model Details
Model Description
<!-- Provide a longer summary of what this model is. -->
This is the model card of a ๐ค transformers model that has been pushed on the Hub. This model card has been automatically generated.
- Developed by: [Zhi Huang(Sichuan university)]
- Funded by [optional]: [More Information Needed]
- Shared by [optional]: [Zhi Huang(Sichuan university)]
- Model type: [Regression]
- Language(s) (NLP): [NLP]
- License: [Commercial use requires author's permission]
- Finetuned from model [optional]: [Chat-GPT]
Model Sources [optional]
<!-- Provide the basic links for the model. -->
- Datasets: https://github.com/525514353/Chem-GPT
- Paper [optional]: [More Information Needed]
- Demo [optional]: [More Information Needed]
Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
Direct Use
[load the model and tokenizer
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.frompretrained("ML4chemistry/hydroxylradicalreactionconstants") model = AutoModelForSequenceClassification.frompretrained("ML4chemistry/hydroxylradicalreactionconstants")
prediction of single compound
sample='Cc1noc(NS(=O)c2ccc(N)cc2)c1C'#SMILES of sulfisoxazole tokenized=tokenizer(sample,returntensors='pt') output=model(inputids=tokenized['inputids'],attentionmask=tokenized['attention_mask']).logits
print(f'the reactionconstants of sulfisoxazole with hydroxylradical is {output.detach().numpy()[0][0]}')
the reaction_constants of sulfisoxazole with hydroxyl_radical is 9.812551498413086
prediction of mutiple compound
sample='Cc1noc(N[S(=O)c2ccc(N)cc2)c1C','Cc1sc(NS(=O)c2ccc(N)cc2)nn1']#SMILES of sulfisoxazole and sulfamethizole tokenized=tokenizer(sample,returntensors='pt',padding=True) output=model(inputids=tokenized['inputids'],attentionmask=tokenized['attentionmask']).logits print(f'the reactionconstants of sulfisoxazole with hydroxyl_radical is {output.detach().numpy()[0][0]}')
print(f'the reactionconstants of sulfamethizole with hydroxylradical is {output.detach().numpy()[1][0]}')]
the reaction_constants of sulfisoxazole with hydroxyl_radical is 9.812551498413086
the reaction_constants of sulfamethizole with hydroxyl_radical is 9.78555965423584
