smiles-to-cas-conversion
Convert SMILES strings to CAS registry numbers using material informatics tools to identify chemical substances.
Best use case
smiles-to-cas-conversion is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Convert SMILES strings to CAS registry numbers using material informatics tools to identify chemical substances.
Teams using smiles-to-cas-conversion should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/smiles-to-cas-conversion/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How smiles-to-cas-conversion Compares
| Feature / Agent | smiles-to-cas-conversion | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Convert SMILES strings to CAS registry numbers using material informatics tools to identify chemical substances.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# SMILES to CAS Conversion
## Usage
### 1. MCP Server Definition
```python
import asyncio
import json
from contextlib import AsyncExitStack
from mcp.client.streamable_http import streamablehttp_client
from mcp import ClientSession
class MaterialToolsClient:
"""SciToolAgent-Mat MCP Client"""
def __init__(self, server_url: str, api_key: str):
self.server_url = server_url
self.api_key = api_key
self.session = None
async def connect(self):
try:
self.transport = streamablehttp_client(
url=self.server_url,
headers={"SCP-HUB-API-KEY": self.api_key}
)
self._stack = AsyncExitStack()
await self._stack.__aenter__()
self.read, self.write, self.get_session_id = await self._stack.enter_async_context(self.transport)
self.session_ctx = ClientSession(self.read, self.write)
self.session = await self._stack.enter_async_context(self.session_ctx)
await self.session.initialize()
return True
except Exception as e:
print(f"✗ connect failure: {e}")
return False
async def disconnect(self):
"""Disconnect from server"""
try:
if hasattr(self, '_stack'):
await self._stack.aclose()
print("✓ already disconnect")
except Exception as e:
print(f"✗ disconnect error: {e}")
def parse_result(self, result):
try:
if hasattr(result, 'content') and result.content:
content = result.content[0]
if hasattr(content, 'text'):
try:
return json.loads(content.text)
except:
return content.text
return str(result)
except Exception as e:
return {"error": f"parse error: {e}", "raw": str(result)}
```
### 2. SMILES to CAS Conversion Workflow
Convert SMILES notation to CAS registry numbers.
**Implementation:**
```python
## Initialize client
client = MaterialToolsClient(
"https://scp.intern-ai.org.cn/api/v1/mcp/30/SciToolAgent-Mat",
"<your-api-key>"
)
if not await client.connect():
print("connection failed")
exit()
## Input: SMILES strings
smiles_list = [
"CCO", # Ethanol
"CC(=O)O", # Acetic acid
"c1ccccc1" # Benzene
]
print("SMILES to CAS Conversion:")
for smiles in smiles_list:
result = await client.session.call_tool(
"SMILESToCAS",
arguments={"smiles": smiles}
)
result_data = client.parse_result(result)
print(f"SMILES: {smiles}")
print(f"Result: {result_data}\n")
await client.disconnect()
```
### Tool Descriptions
**SciToolAgent-Mat Server:**
- `SMILESToCAS`: Convert SMILES to CAS registry number
- Args:
- `smiles` (str): SMILES notation
- Returns: CAS registry number
### Use Cases
- Chemical substance identification
- Regulatory compliance checking
- Material safety data sheet lookup
- Chemical inventory managementRelated Skills
unit_conversion_suite
Multi-Unit Conversion Suite - Convert units across domains: length mm to m, radius m to cm, dimensions to meters, nm to um, volume to cm3. Use this skill for metrology tasks involving convert length mm to m convert radius m to cm convert dimensions to meters convert nm to um convert volume to cm3. Combines 5 tools from 1 SCP server(s).
unit-conversion-nanoscale
Convert physical quantities and units at nanoscale for materials science and nanotechnology applications.
smiles_comprehensive_analysis
SMILES Comprehensive Analysis - Comprehensive SMILES analysis: validate, convert name, compute all molecular descriptors, and predict ADMET. Use this skill for cheminformatics tasks involving is valid smiles ChemicalStructureAnalyzer calculate mol basic info pred molecule admet. Combines 4 tools from 3 SCP server(s).
pubchem-smiles-search
Search PubChem database using SMILES strings to retrieve compound information and chemical properties.
molecular-format-conversion
Convert between molecular formats including SMILES, InChI, InChIKey, and SELFIES for cheminformatics applications.
energy_conversion
Energy Unit Conversion Pipeline - Convert between energy units and analyze: MeV to Joules, scientific notation, and error calculation. Use this skill for physics tasks involving convert energy MeV to J convert to scientific notation format scientific notation calculate absolute error. Combines 4 tools from 2 SCP server(s).
wind-site-assessment
Assess wind energy potential and perform site analysis using atmospheric science calculations.
web_literature_mining
Scientific Literature Mining - Mine scientific literature: PubMed search, arXiv search, web search, and Tavily deep search. Use this skill for scientific informatics tasks involving pubmed search search literature search web tavily search. Combines 4 tools from 2 SCP server(s).
virus_genomics
Virus Genomics Analysis - Analyze virus genomics: NCBI virus dataset, annotation, taxonomy, and literature search. Use this skill for virology tasks involving get virus dataset report get virus annotation report get taxonomy search literature. Combines 4 tools from 2 SCP server(s).
virtual_screening
Virtual Screening Pipeline - Virtual screening: search PubChem by substructure, compute similarity, filter by drug-likeness, and predict binding affinity. Use this skill for drug discovery tasks involving search pubchem by smiles calculate smiles similarity calculate mol drug chemistry boltz binding affinity. Combines 4 tools from 3 SCP server(s).
variant_pathogenicity
Variant Pathogenicity Assessment - Assess variant pathogenicity: Ensembl VEP prediction, ClinVar lookup, variation details, and gene phenotype associations. Use this skill for clinical genetics tasks involving get vep hgvs clinvar search get variation get phenotype gene. Combines 4 tools from 2 SCP server(s).
variant-population-frequency
Query gnomAD for variant allele frequency across populations. Uses FAVOR to convert rsID→variant_id first, then queries gnomAD.