google-deepmind/science-skills

pubchem-database

Query PubChem, search by name/CID/SMILES, retrieve properties, similarity/substructure searches, bioactivity, for cheminformatics.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/google-deepmind/science-skills --skill pubchem-database

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

PubChem Database

Prerequisites

  1. `uv`: Read the uv skill and follow its Setup instructions to ensure

uv is installed and on PATH.

  1. User Notification: If .licenses/pubchemdatabaseLICENSE.txt does not

already exist in the workspace root directory then (1) prominently notify the user to check the terms at https://pubchem.ncbi.nlm.nih.gov/docs/citation-guidelines and https://pubchem.ncbi.nlm.nih.gov/docs/pug-rest, then (2) create the file recording the notification text and timestamp.

Quick Start

PubChem queries are executed via a robust Python wrapper script to respect terms-of-service and handle complex JSON parsing. This script allows safe multi-agent use of APIs.

Example: Resolve a chemical name to its Compound ID (CID)

bash
uv run scripts/pubchem_api.py resolve --name "aspirin" --output result.json

Core Rules

  • Use the Wrapper: ALWAYS execute the provided helper scripts to query the

database rather than accessing the database directly. The scripts automatically enforce the required rate limit gracefully.

  • Read the generated JSON output file, and process it with jq or code.
  • Verify Facts: ALWAYS verify information retrieved from memory with a

database query if the user asks for a specific fact that can be checked in PubChem. Do not rely solely on internal knowledge.

  • Notification: If this skill is used, ensure this is mentioned in the

output.

Core Capabilities

1. Compound Resolution (Name or InChI to Identifiers) Convert chemical/trade names or InChI strings into PubChem CIDs, SMILES, and InChIKeys.

bash
uv run scripts/pubchem_api.py resolve --name "ibuprofen" --output result.json
# OR
uv run scripts/pubchem_api.py resolve --inchi "InChI=1S/C3/c1-3-2/i1+1" --output result.json

2. Physical & Chemical Property Retrieval Fetch computed properties (e.g., MolecularWeight, XLogP, TPSA).

bash
uv run scripts/pubchem_api.py properties --cid 2244 --output result.json

3. Synonyms and Trade Names Find alternative names and brand names.

bash
uv run scripts/pubchem_api.py synonyms --cid 2244 --output result.json

Advanced Context

4. Safety and Hazard Information (GHS) Retrieve Global Harmonized System hazard statements and handling precautions (uses PUG-View).

bash
uv run scripts/pubchem_api.py safety --cid 2244 --output result.json

5. Drug and Medication Information Fetch FDA pharmacology data, mechanism of action, and therapeutic uses (uses PUG-View).

bash
uv run scripts/pubchem_api.py pharmacology --cid 2244 --output result.json

6. Custom Heading (PUG-View) Retrieve any specific heading from the PUG-View system (e.g., 'Geometry', 'Crystal Structures').

bash
uv run scripts/pubchem_api.py view --cid 3939 --heading "Crystal Structures" --output result.json

7. Image Generation Retrieve 2D chemical structure images. The script returns a Markdown-formatted image link.

bash
uv run scripts/pubchem_api.py image --cid 2244 --output result.json

Complex Search & Biology

8. Structure-Based Searching (Similarity & Substructure) Find molecules similar to a SMILES string or containing a specific substructure.

bash
uv run scripts/pubchem_api.py similarity --smiles "CC(=O)OC1=CC=CC=C1C(=O)O" --output result.json

and

bash
uv run scripts/pubchem_api.py substructure --smiles "C1=CC=CC=C1" --output result.json

9. BioAssay & Target Interactions Identify genes or proteins a chemical interacts with.

bash
uv run scripts/pubchem_api.py assays --cid 2244 --output result.json

Advanced Usage & Workflows

10. Cross-references (Xrefs) Fetch identifiers cross-referenced with a CID (e.g., PatentID, PubMedID).

bash
uv run scripts/pubchem_api.py xrefs --cid 2244 --type "PatentID" --output result.json

11. Property Range Search Find CIDs within a specific property range. Supported features include: molecular_weight, heavy_atom_count, xlogp, tpsa, h_bond_donor_count, h_bond_acceptor_count, rotatable_bond_count, exact_mass, monoisotopic_mass, and complexity.

bash
uv run scripts/pubchem_api.py range --feature molecular_weight --min 400.0 --max 400.05 --output result.json

12. Custom PUG-REST Query Execute a raw path against the PUG-REST API.

bash
uv run scripts/pubchem_api.py query --path "compound/cid/2244/xrefs/PatentID/JSON" --output result.json

Fallback Search Strategies

If direct resolution by name or formula fails (e.g., for complex compounds or specific ions):

  • Search for parent/neutral molecule: If searching for an ion or salt, try

searching for the neutral parent compound.

  • Deconstruct complex formulas: If a complex formula returns no results,

try searching for major components or ligands.

  • Use substructure or similarity search: If you have a SMILES string or

can generate one for a component, use it to find related compounds.

Complex Queries and Multi-Step Tasks

  • Custom/Complex Queries: For more details, read

references/endpoints.md to construct raw PUG-REST URLs.

  • Multi-Step Tasks: For complex tasks like drug discovery pipelines,

follow the checklists in references/workflows.md.

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
google-deepmind
커뮤니티

clinical-trials-database

Query ClinicalTrials.gov via APIv2. Use when you want to search for trials by condition, drug, location, status, or phase; retrieve trial details by NCT ID; check eligibility/inclusion criteria; count trials across conditions or time periods; identify a sponsor's trial portfolio; find recruiting trials for patient matching.

설치 수
1
GitHub Stars
3.2천
업데이트
10월 9일
google-deepmind
커뮤니티

literature-search-europepmc

Search Europe PMC for scientific literature and download open-access full texts and PDFs. Retrieve full-text XML/plain text by PMCID, get citation lists and bibliography.

설치 수
1
GitHub Stars
3.2천
업데이트
10월 9일
google-deepmind
커뮤니티

literature-search-arxiv

Search for scientific papers, preprints, and publications on arXiv. Extract metadata, abstracts, and download full-text PDFs or HTML versions of papers. Use when the user asks to find research papers, literature, or specific arXiv IDs.

설치 수
2
GitHub Stars
3.1천
업데이트
9월 15일
google-deepmind
커뮤니티

literature-search-openalex

Query the OpenAlex scholarly database for research papers, authors, institutions, topics, sources, publishers, funders, geo-locations, and keywords. Use when searching academic papers, resolving DOIs, downloading open-access PDFs, finding an author's publications, aggregating bibliometric data (citation counts, h-index, impact factor), exploring the research taxonomies, or performing DOI lookups.

설치 수
2
GitHub Stars
3.1천
업데이트
9월 15일