smiles-to-cas-conversion

Convert SMILES strings to CAS registry numbers using material informatics tools to identify chemical substances.

157 stars

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

$curl -o ~/.claude/skills/smiles-to-cas-conversion/SKILL.md --create-dirs "https://raw.githubusercontent.com/InternScience/DrClaw/main/drclaw/agent_hub/templates/chemistry/skills/smiles-to-cas-conversion/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/smiles-to-cas-conversion/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How smiles-to-cas-conversion Compares

Feature / Agentsmiles-to-cas-conversionStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/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 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.read, self.write, self.get_session_id = await self.transport.__aenter__()
            self.session_ctx = ClientSession(self.read, self.write)
            self.session = await self.session_ctx.__aenter__()
            await self.session.initialize()
            return True
        except Exception as e:
            print(f"✗ connect failure: {e}")
            return False

    async def disconnect(self):
        try:
            if self.session:
                await self.session_ctx.__aexit__(None, None, None)
            if hasattr(self, 'transport'):
                await self.transport.__aexit__(None, None, None)
        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 management

Related Skills

unit_conversion_suite

157
from InternScience/DrClaw

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).

energy_conversion

157
from InternScience/DrClaw

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).

smiles_comprehensive_analysis

157
from InternScience/DrClaw

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

157
from InternScience/DrClaw

Search PubChem database using SMILES strings to retrieve compound information and chemical properties.

molecular-format-conversion

157
from InternScience/DrClaw

Convert between molecular formats including SMILES, InChI, InChIKey, and SELFIES for cheminformatics applications.

acpx

157
from InternScience/DrClaw

Use the ACPX CLI through DrClaw's existing exec/long_exec tools to run Codex in the current project workspace.

ui-ux-pro-max

157
from InternScience/DrClaw

[Frontend] Frontend UI/UX design intelligence - activate FIRST when user requests beautiful, stunning, gorgeous, or aesthetic interfaces. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks. Triggers on ui design, ux design, design system, color palette, typography, glassmorphism, claymorphism, neumorphism, bento grid, font pairing, ui-ux-pro-max, stunning interface, beautiful ui.

fetch

157
from InternScience/DrClaw

Fetch metadata and links from arXiv for a given query.

web_literature_mining

157
from InternScience/DrClaw

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).

uniprot_deep_analysis

157
from InternScience/DrClaw

UniProt Deep Protein Analysis - Deep UniProt analysis: entry data, UniRef clusters, UniParc cross-references, and gene-centric view. Use this skill for protein science tasks involving get uniprotkb entry by accession get uniref cluster by id get uniparc entry by upi get gene centric by accession. Combines 4 tools from 1 SCP server(s).

synthetic_biology_design

157
from InternScience/DrClaw

Synthetic Biology Design - Design synthetic biology construct: gene lookup, codon optimization, protein property prediction, and structure prediction. Use this skill for synthetic biology tasks involving get sequence id DegenerateCodonCalculatorbyAminoAcid calculate protein sequence properties pred protein structure esmfold. Combines 4 tools from 4 SCP server(s).

structural_homology_modeling

157
from InternScience/DrClaw

Structural Homology & Evolution Analysis - Analyze protein evolution: get gene tree from Ensembl, find homologs, compare sequences, and predict structure. Use this skill for evolutionary biology tasks involving get homology symbol get genetree member symbol calculate protein sequence properties pred protein structure esmfold. Combines 4 tools from 3 SCP server(s).