liuganghuggingface/moltextnet

Dataset

Load the MolTextNet Dataset

13

4 commits

1 linked in READMEs

updated May 17, 2025

See the code

README

Load the MolTextNet Dataset

from datasets import load_dataset

# Load the dataset
dataset = load_dataset("liuganghuggingface/moltextnet")

# Print the dataset object
print(dataset)
# Output:
# DatasetDict({
#     train: Dataset({
#         features: ['id', 'canonical_smiles', 'description'],
#         num_rows: 2474584
#     })
# })

# Show available splits
print(dataset.keys())
# Output:
# dict_keys(['train'])

# Display the first example from the training set
print(dataset["train"][0])
# Output:
# {
#     'id': '1',
#     'canonical_smiles': 'Cc1cc(-n2ncc(=O)[nH]c2=O)ccc1C(=O)c1ccccc1C',
#     'description': '2-[4-(2-Chloro-benzoyl)-3-methyl-phenyl]-2H-[1,2,4]triazine-3,5-dione, with the canonical SMILES string Cc1cc(-n2ncc(=O)[nH]c2=O)ccc1C(=O)c1ccccc1Cl, exhibits a complex molecular structure characterized...'
# }
biology
chemistry
graph
medical

Contributors

liuganghuggingface/moltextnet

Dataset

Load the MolTextNet Dataset

13

4 commits

1 linked in READMEs

updated May 17, 2025

See the code

README

Load the MolTextNet Dataset

from datasets import load_dataset

# Load the dataset
dataset = load_dataset("liuganghuggingface/moltextnet")

# Print the dataset object
print(dataset)
# Output:
# DatasetDict({
#     train: Dataset({
#         features: ['id', 'canonical_smiles', 'description'],
#         num_rows: 2474584
#     })
# })

# Show available splits
print(dataset.keys())
# Output:
# dict_keys(['train'])

# Display the first example from the training set
print(dataset["train"][0])
# Output:
# {
#     'id': '1',
#     'canonical_smiles': 'Cc1cc(-n2ncc(=O)[nH]c2=O)ccc1C(=O)c1ccccc1C',
#     'description': '2-[4-(2-Chloro-benzoyl)-3-methyl-phenyl]-2H-[1,2,4]triazine-3,5-dione, with the canonical SMILES string Cc1cc(-n2ncc(=O)[nH]c2=O)ccc1C(=O)c1ccccc1Cl, exhibits a complex molecular structure characterized...'
# }
biology
chemistry
graph
medical

Contributors