### Generate Responses on SMolInstruct Dataset
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Command to run LlaSMol models for generating responses on the SMolInstruct dataset. Supports specifying tasks or generating for all.
```bash
python generate_on_dataset.py --model_name osunlp/LlaSMol-Mistral-7B --output_dir eval/LlaSMol-Mistral-7B/output
```
--------------------------------
### Compute Metrics for SMolInstruct Tasks
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Command to compute evaluation metrics for LlaSMol model predictions on the SMolInstruct dataset. Skips tasks with missing output files.
```bash
python compute_metrics.py --prediction_dir eval/LlaSMol-Mistral-7B/prediction
```
--------------------------------
### Generate Chemistry Answers with LlaSMol
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Python code to initialize the LlaSMol generation model and query it with specific questions, using tags for input types like SMILES.
```python
from generation import LlaSMolGeneration
generator = LlaSMolGeneration('osunlp/LlaSMol-Mistral-7B')
generator.generate('Can you tell me the IUPAC name of C1CCOC1 ?')
```
--------------------------------
### Fine-tune LlaSMol Model
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Command to fine-tune a base model on SMolInstruct using accelerate and LoRA. Ensure to adjust LoRA settings for different base models.
```bash
MODELNAME=LlaSMol-Mistral-7B && CUDA_VISIBLE_DEVICES=0,1,2,3 accelerate launch finetune.py --data_path osunlp/SMolInstruct --base_model mistralai/Mistral-7B-v0.1 --wandb_project LlaSMol --wandb_run_name $MODELNAME --wandb_log_model true --output_dir checkpoint/$MODELNAME
```
--------------------------------
### Extract Predicted Answers from Model Outputs
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Command to extract predicted answers from LlaSMol model outputs for evaluation. Handles missing or incomplete tags by assigning empty answers.
```bash
python extract_prediction.py --output_dir eval/LlaSMol-Mistral-7B/output --prediction_dir eval/LlaSMol-Mistral-7B/prediction
```
--------------------------------
### Chemical Reaction: Forward Synthesis
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Suggests a possible product given reactants and reagents in SMILES format. This is used for predicting the outcome of a chemical reaction.
```text
Query: NC1=CC=C2OCOC2=C1.O=CO Based on the reactants and reagents given above, suggest a possible product.
Response: A possible product can be O=CNC1=CC=C2OCOC2=C1 .
```
--------------------------------
### Chemical Reaction: Retrosynthesis
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Identifies possible reactants from a given product in SMILES format. This is useful for planning chemical synthesis pathways.
```text
Query: Identify possible reactants that could have been used to create the specified product. CC1=CC=C(N)N=C1N
Response: CC(C#N)CCC#N.N
```
--------------------------------
### Name Conversion: IUPAC to SMILES
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Translates an IUPAC name into its SMILES representation. Useful for converting systematic names into a machine-readable format.
```text
Query: Could you provide the SMILES for 4-ethyl-4-methyloxolan-2-one ?
Response: Of course. It's CCC1(C)COC(=O)C1 .
```
--------------------------------
### Molecule Description: Molecule Captioning
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Generates a descriptive text for a molecule provided in SMILES format. This includes its properties and potential uses.
```text
Query: Describe this molecule: CCOC(=O)C1=CN=CN1[C@H](C)C1=CC=CC=C1
Response: The molecule is an imidazole derivative with short-acting sedative, hypnotic, and general anesthetic properties. Etomidate appears to have gamma-aminobutyric acid (GABA) like effects, mediated through GABA-A receptor. The action enhances the inhibitory effect of GABA on the central nervous system by causing chloride channel opening events which leads to membrane hyperpolarization.
```
--------------------------------
### LlaSMol Citation
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
BibTeX entry for citing the LlaSMol paper.
```bibtex
@article{yu2024llasmol,
title={LlaSMol: Advancing Large Language Models for Chemistry with a Large-Scale, Comprehensive, High-Quality Instruction Tuning Dataset},
author={Botao Yu and Frazier N. Baker and Ziqi Chen and Xia Ning and Huan Sun},
journal={arXiv preprint arXiv:2402.09391},
year={2024}
}
```
--------------------------------
### Property Prediction: Clintox
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Assesses the toxicity of a molecule based on its SMILES string. Returns a boolean indicating whether the molecule is toxic.
```text
Query: Is COC[C@@H](NC(C)=O)C(=O)NCC1=CC=CC=C1 toxic?
Response: No
```
--------------------------------
### Name Conversion: SMILES to Molecular Formula
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Derives the molecular formula from a given SMILES string. This is helpful for determining the elemental composition from a structural representation.
```text
Query: Given the SMILES representation S=P1(N(CCCl)CCCl)NCCCO1 , what would be its molecular formula?
Response: It is C7H15Cl2N2OPS .
```
--------------------------------
### Name Conversion: SMILES to IUPAC
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Converts a SMILES string into its IUPAC name. Use this to obtain the systematic chemical name from a structural representation.
```text
Query: Translate the given SMILES formula of a molecule CCC(C)C1CNCCCNC1 into its IUPAC name.
Response: 3-butan-2-yl-1,5-diazocane
```
--------------------------------
### Molecule Description: Molecule Generation
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Generates a SMILES representation of a molecule based on a textual description of its properties and class. Useful for creating novel molecular structures from requirements.
```text
Query: Give me a molecule that satisfies the conditions outlined in the description: The molecule is a member of the class of tripyrroles that is a red-coloured pigment with antibiotic properties produced by Serratia marcescens. It has a role as an antimicrobial agent, a biological pigment, a bacterial metabolite, an apoptosis inducer and an antineoplastic agent. It is a tripyrrole, an aromatic ether and a ring assembly.
Response: Here is a potential molecule: CCCCCC1=C(C)NC(/C=C2\N=C(C3=CC=CN3)C=C2OC)=C1
```
--------------------------------
### Property Prediction: HIV
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Predicts whether a molecule, given by its SMILES string, can act as an inhibitor of HIV replication. Returns a boolean.
```text
Query: Can CC1=CN(C2C=CCCC2O)C(=O)NC1=O serve as an inhibitor of HIV replication?
Response: No
```
--------------------------------
### Name Conversion: IUPAC to Molecular Formula
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Converts an IUPAC name to its corresponding molecular formula. Use this when you need to find the chemical formula from a systematic chemical name.
```text
Query: What is the molecular formula of the compound with this IUPAC name 2,5-diphenyl-1,3-oxazole ?
Response: C15H11NO
```
--------------------------------
### Property Prediction: ESOL
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Predicts the ESOL (Estimated Solubilities) value (log solubility in mol/L) for a given molecule represented by its SMILES string. Useful for estimating aqueous solubility.
```text
Query: How soluble is CC(C)Cl ?
Response: Its log solubility is -1.41 mol/L.
```
--------------------------------
### Property Prediction: LIPO
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Predicts the octanol/water distribution coefficient (logD) at pH 7.4 for a molecule given its SMILES string. This is used to estimate lipophilicity.
```text
Query: Predict the octanol/water distribution coefficient logD under the circumstance of pH 7.4 for NC(=O)C1=CC=CC=C1O .
Response: 1.090
```
--------------------------------
### Property Prediction: SIDER
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Checks for known side effects, specifically those affecting the heart, for a molecule represented by its SMILES string. Returns a boolean.
```text
Query: Are there any known side effects of CC1=CC(C)=C(NC(=O)CN(CC(=O)O)CC(=O)O)C(C)=C1Br affecting the heart?
Response: No
```
--------------------------------
### Property Prediction: BBBP
Source: https://github.com/osu-nlp-group/llm4chem/blob/main/README.md
Determines if a molecule, represented by its SMILES string, exhibits blood-brain barrier permeability. Returns a boolean value.
```text
Query: Is blood-brain barrier permeability (BBBP) a property of CCNC(=O)/C=C/C1=CC=CC(Br)=C1 ?
Response: Yes
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.