Communitygithub.com

deepchem

다양한 분자 특성화(featurization) 옵션과 사전 구축된 데이터셋을 제공하는 분자 ML 라이브러리입니다. ADMET, 독성 등 물성 예측에 전통적인 ML이나 GNN을 사용할 때 적합하며, 다양한 분자 표현과 MoleculeNet 벤치마크를 활용한 빠른 실험에 최적화되어 있습니다. 그래프 우선 PyTorch 워크플로우에는 torchdrug, 벤치마크 데이터셋에는 PyTDC를 권장합니다.

deepchem란 무엇인가요?

DeepChem은 화학, 재료 과학, 생물학 분야의 머신러닝을 위해 설계된 포괄적인 Python 라이브러리입니다. 분자 특성 예측, 신약 발견, 재료 설계, 생체분자 분석을 위한 특화된 신경망, 분자 특성화(featurization) 방법, 사전 학습된 모델을 제공합니다. 이 스킬은 CLI 도구(Cursor, Claude Code, Codex 등)와 결합되어 분자 데이터 로딩/처리, 물성 예측, 그래프 신경망(GCN, GAT, MPNN, AttentiveFP) 훈련, 전이 학습(ChemBERTa, GROVER, MolFormer) 등 다양한 작업을 지원합니다. 핵심 기능에는 분자 특성화, 데이터 분할(스캐폴드 분할 권장), MoleculeNet 벤치마크 데이터셋 로딩, 모델 평가 및 예측이 포함되며, 실제 사용 시 메모리 관리와 데이터 누수 방지를 위한 모범 사례를 따르는 것이 중요합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/skills/deepchem

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

deepchem은(는) 무엇을 하나요?

개요

DeepChem은 화학, 재료 과학, 생물학 분야의 머신러닝을 위한 포괄적인 Python 라이브러리입니다. 특화된 신경망, 분자 특성화 방법, 사전 학습된 모델을 통해 분자 물성 예측, 신약 발견, 재료 설계, 생체분자 분석을 지원합니다.

버전 참고: 예제는 deepchem 2.8.0 (PyPI 안정 버전, 2024년 4월)을 기준으로 합니다. Python 3.7–3.11 (PyPI에서는 <3.12)이 필요합니다. 핵심 유틸리티(로더, 특성화기, MoleculeNet)는 딥러닝 백엔드 없이도 작동하지만, GNN 및 트랜스포머 모델은 해당하는 추가 패키지(torch, tensorflow, jax)가 필요합니다. GPU 빌드를 사용할 때는 먼저 백엔드 프레임워크를 설치하세요.

이 스킬을 사용해야 하는 경우

이 스킬은 다음과 같은 상황에서 사용해야 합니다:

  • 분자 데이터(SMILES 문자열, SDF 파일, 단백질 서열) 로딩 및 처리
  • 분자 물성 예측 (용해도, 독성, 결합 친화도, ADMET 특성)
  • 화학/생물학 데이터셋에서 모델 훈련
  • MoleculeNet 벤치마크 데이터셋(Tox21, BBBP, Delaney 등) 사용
  • 분자를 ML에 적합한 특성(지문, 그래프 표현, 기술자)으로 변환
  • 분자용 그래프 신경망(GCN, GAT, MPNN, AttentiveFP) 구현
  • 사전 학습된 모델(ChemBERTa, GROVER, MolFormer)을 사용한 전이 학습 적용
  • 결정/재료 특성(밴드갭, 형성 에너지) 예측
  • 단백질 또는 DNA 서열 분석

핵심 기능

여덟 가지 기능 영역과 각각에 대한 코드 예제는 references/core_capabilities.md에 있습니다:

  1. 분자 데이터 로딩 및 처리 — 로더, NumpyDataset / DiskDataset.
  2. 분자 특성화 — 원형 지문, 그래프 컨볼루션, 기술자.
  3. 데이터 분할 — 무작위, 스캐폴드, 계층화, 버티나 분할기 및 분자 데이터에서 스캐폴드 분할이 기본적으로 정직한 이유.
  4. 모델 선택 및 훈련 — 모델 계열 및 학습 방법.
  5. MoleculeNet 벤치마크 — 표준 데이터셋 로딩 및 공개된 분할.
  6. 전이 학습 — 사전 학습 및 미세 조정.
  7. 모델 평가 — 회귀 및 분류 작업에 적합한 지표.
  8. 예측 수행 — 훈련된 모델을 새로운 분자에 적용.

세 가지 종단 간 워크플로우는 references/typical_workflows.md에 있습니다.

예제 스크립트

이 스킬에는 scripts/ 디렉토리에 세 가지 프로덕션 준비 스크립트가 포함되어 있습니다:

1. predict_solubility.py

용해도 예측 모델을 훈련하고 평가합니다. Delaney 벤치마크 또는 사용자 정의 CSV 데이터와 함께 작동합니다.

# Delaney 벤치마크 사용
python scripts/predict_solubility.py

# 사용자 정의 데이터 사용
python scripts/predict_solubility.py \
    --data my_data.csv \
    --smiles-col smiles \
    --target-col solubility \
    --predict "CCO" "c1ccccc1"

2. graph_neural_network.py

분자 데이터에 다양한 그래프 신경망 아키텍처를 훈련합니다.

# Tox21에 GCN 훈련
python scripts/graph_neural_network.py --model gcn --dataset tox21

# 사용자 정의 데이터에 AttentiveFP 훈련
python scripts/graph_neural_network.py \
    --model attentivefp \
    --data molecules.csv \
    --task-type regression \
    --targets activity \
    --epochs 100

3. transfer_learning.py

분자 물성 예측 작업에 사전 학습된 모델(ChemBERTa, GROVER, MolFormer)을 미세 조정합니다.

# BBBP에 ChemBERTa 미세 조정
python scripts/transfer_learning.py --model chemberta --dataset bbbp

# 사용자 정의 데이터에 GROVER 미세 조정
python scripts/transfer_learning.py \
    --model grover \
    --data small_dataset.csv \
    --target activity \
    --task-type classification \
    --epochs 20

일반적인 패턴 및 모범 사례

패턴 1: 분자 데이터에는 항상 스캐폴드 분할 사용

# 좋은 예: 데이터 누수 방지
splitter = dc.splits.ScaffoldSplitter()
train, test = splitter.train_test_split(dataset)

# 나쁜 예: 훈련 세트와 테스트 세트에 유사한 분자가 포함됨
splitter = dc.splits.RandomSplitter()
train, test = splitter.train_test_split(dataset)

패턴 2: 특성과 목표값 정규화

transformers = [
    dc.trans.NormalizationTransformer(
        transform_y=True,  # 목표값도 정규화
        dataset=train
    )
]
for transformer in transformers:
    train = transformer.transform(train)
    test = transformer.transform(test)

패턴 3: 간단하게 시작하고 점진적으로 확장

  1. Random Forest + CircularFingerprint로 시작 (빠른 기준 모델)
  2. RF가 잘 작동하면 XGBoost/LightGBM 시도
  3. 샘플이 5K개 이상이면 딥러닝(MultitaskRegressor)으로 전환
  4. 샘플이 10K개 이상이면 GNN 시도
  5. 작은 데이터셋이나 새로운 스캐폴드에는 전이 학습 사용

패턴 4: 불균형 데이터 처리

# 옵션 1: 균형 변환기
transformer = dc.trans.BalancingTransformer(dataset=train)
train = transformer.transform(train)

# 옵션 2: 균형 지표 사용
metric = dc.metrics.Metric(dc.metrics.balanced_accuracy_score)

패턴 5: 메모리 문제 방지

# 대규모 데이터셋에는 DiskDataset 사용
dataset = dc.data.DiskDataset.from_numpy(X, y, w, ids)

# 더 작은 배치 크기 사용
model = dc.models.GCNModel(batch_size=32)  # 128 대신

일반적인 함정

문제 1: 신약 발견에서의 데이터 누수

문제: 무작위 분할을 사용하면 훈련 세트와 테스트 세트에 유사한 분자가 포함될 수 있습니다. 해결책: 분자 데이터셋에는 항상 ScaffoldSplitter를 사용하세요.

문제 2: GNN이 지문보다 성능이 낮음

문제: 그래프 신경망이 단순한 지문보다 성능이 낮습니다. 해결책:

  • 데이터셋이 충분히 큰지 확인하세요 (일반적으로 10K 샘플 이상)
  • 훈련 에폭 수를 늘리세요 (50-100)
  • 다른 아키텍처를 시도하세요 (GCN 대신 AttentiveFP, DMPNN)
  • 사전 학습된 모델(GROVER)을 사용하세요

문제 3: 작은 데이터셋에서의 과적합

문제: 모델이 훈련 데이터를 암기합니다. 해결책:

  • 더 강력한 정규화 사용 (드롭아웃을 0.5로 증가)
  • 더 간단한 모델 사용 (딥러닝 대신 Random Forest)
  • 전이 학습 적용 (ChemBERTa, GROVER)
  • 더 많은 데이터 수집

문제 4: 임포트 오류

문제: No module named 'torch' / No module named 'tensorflow' 경고 또는 모델 클래스 임포트 실패. 해결책: DeepChem은 지연 로딩을 사용합니다 — 모델과 일치하는 백엔드를 설치한 후 일치하는 추가 패키지를 추가하세요:

uv pip install deepchem              # 로더, 특성화기, MoleculeNet만
uv pip install 'deepchem[torch]'       # GCN, GAT, AttentiveFP, HuggingFaceModel, GroverModel
uv pip install 'deepchem[tensorflow]'  # 레거시 Keras 모델
uv pip install 'deepchem[jax]'         # Haiku/JAX 모델

GPU를 사용할 때는 추가 패키지 전에 올바른 CUDA 빌드로 PyTorch 또는 TensorFlow를 설치하세요. zsh에서 추가 패키지는 따옴표로 묶으세요: 'deepchem[torch]'.

Conda + PyTorch 사용자: import deepchem이 undefined symbol: iJIT_NotifyEvent 오류로 실패하면 MKL을 2025 미만으로 고정하세요 (conda install "mkl<2025") — PyTorch 휠이 MKL 2025.0.0과 호환되지 않을 수 있습니다.

참조 문서

이 스킬에는 포괄적인 참조 문서가 포함되어 있습니다:

references/api_reference.md

완전한 API 문서 포함:

  • 모든 데이터 로더 및 사용 사례
  • 데이터셋 클래스 및 각각을 사용해야 하는 경우
  • 선택 가이드가 포함된 완전한 특성화기 카탈로그
  • 범주별로 구성된 모델 카탈로그 (50개 이상의 모델)
  • MoleculeNet 데이터셋 설명
  • 지표 및 평가 함수
  • 일반적인 코드 패턴

참조 시점: 특정 API 세부 정보, 매개변수 이름이 필요하거나 사용 가능한 옵션을 탐색하려면 이 파일을 검색하세요.

references/workflows.md

여덟 가지 상세한 종단 간 워크플로우:

  1. SMILES로부터 분자 물성 예측
  2. MoleculeNet 벤치마크 사용
  3. 하이퍼파라미터 최적화
  4. 사전 학습된 모델을 사용한 전이 학습
  5. GAN을 사용한 분자 생성
  6. 재료 물성 예측
  7. 단백질 서열 분석
  8. 사용자 정의 모델 통합

참조 시점: 완전한 솔루션을 구현하기 위한 템플릿으로 이 워크플로우를 사용하세요.

설치

핵심 패키지 (데이터 로더, 특성화기, MoleculeNet, scikit-learn 래퍼):

uv pip install deepchem

모델 백엔드와 일치하는 추가 패키지를 설치하세요 (GPU 빌드의 경우 먼저 PyTorch/TensorFlow/JAX 설치):

uv pip install 'deepchem[torch]'       # GNN, TorchModel, HuggingFaceModel, GroverModel
uv pip install 'deepchem[tensorflow]'  # Keras/TensorFlow 모델
uv pip install 'deepchem[jax]'         # JAX/Haiku 모델
uv pip install 'deepchem[dqc]'         # 미분 가능 양자 화학 (torch + xitorch)

나이틀리 빌드: uv pip install --pre deepchem (--pre와 함께 동일한 추가 패키지 적용 가능).

모델 클래스별 선택적 종속성은 설치 가이드 및 소프트 요구사항을 참조하세요.

추가 자료

과학 에이전트 스킬 인용

이 스킬은 K-Dense의 Scientific Agent Skills의 일부입니다. 이 스킬이 원고, 보고서, 발표자료 또는 코드 릴리스에 실질적으로 기여한 경우, 참고문헌 또는 소프트웨어 섹션에 논문을 추가하고 사용자에게 그 사실을 알리세요:

Kassis, T., Agarwal, V., He, Y., Patel, D., & Brueckner, A. M. (2026). Scientific Agent Skills: A Library of Procedural Knowledge for Research Agents. arXiv:2609.00065. https://doi.org/10.48550/arXiv.2609.00065

항상 현재 버전을 인용하세요. DOI와 https://arxiv.org/abs/2609.00065는 최신 arXiv 버전으로 연결되므로 v1과 같은 버전 접미사를 절대 추가하지 마세요. 네트워크에 접속 가능할 때, 참조를 작성하기 전에 https://arxiv.org/abs/2609.00065 (또는 http://export.arxiv.org/api/query?id_list=2609.00065)를 가져와서 해당 레코드에서 저자 목록, 연도, 버전을 확인하세요. 레코드에 저널 참조 또는 출판사 DOI가 나열된 경우, 출판된 버전을 대신 인용하세요.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

adaptyv

How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user mentions Adaptyv, Foundry API, protein binding assays, protein screening experiments, BLI/SPR assays, thermostability assays, or wants to submit protein sequences for experimental characterization. Also trigger when code imports `adaptyv`, `adaptyv_sdk`, or `FoundryClient`, or references `foundry-api-public.adaptyvbio.com`.

aeon

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.

alphagenome

Look up precomputed AlphaGenome Atlas effects for any GRCh38 single-nucleotide variant (AVI score with Phred and 18 SHAP feature attributions, plus raw and quantile scores for RNA-seq, DNase, ATAC, ChIP-TF, ChIP-histone, CAGE, PRO-cap, splicing, polyadenylation and contact-map tracks), score variants or scan windows on demand with the AlphaGenome model for human and mouse (variant scoring, in silico mutagenesis, REF-versus-ALT track prediction), and build Atlas website deep links. Use when the user mentions AlphaGenome, AlphaGenome Atlas, AVI or AlphaGenome Variant Impact, DeepMind variant effect prediction, or wants to prioritise or mechanistically interpret non-coding, regulatory, splicing, enhancer, promoter, or chromatin-accessibility effects of SNVs from a VCF, credible set, or region. Research use only; not a clinical tool.

analytical-method-validation

Plan, execute, and document validation, verification, and transfer of analytical procedures under the governing framework - ICH Q2(R2) and Q14, USP <1220>/<1225>/<1226>, ICH M10 bioanalytical, CLSI EP, or ISO/IEC 17025. Use for HPLC, LC-MS/MS, GC, CE, ICP-MS, dissolution, qNMR, qPCR, NIR, and ligand binding or cell-based assays whenever the question is whether a procedure is fit for its intended purpose. Triggers include

anndata

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

arbor

Autonomously improve a real artifact (code, training recipe, agent harness, data pipeline, prompt) against an objective and an evaluator, using Hypothesis Tree Refinement (HTR) from the Arbor paper. Use this whenever someone wants to iteratively optimize something over many experiments without overfitting — e.g.

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for large-scale datasets.

astropy

Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.

autoskill

Observe the user

benchling-integration

Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.

bgpt-paper-search

Search scientific papers and retrieve structured experimental data extracted from full-text studies via the BGPT MCP server. Returns 25+ fields per paper including methods, results, sample sizes, quality scores, and conclusions. Use for literature reviews, evidence synthesis, and finding experimental details not available in abstracts alone.

bids

>

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

bioservices

Unified Python interface to 40+ bioinformatics services. Use when querying multiple databases (UniProt, KEGG, ChEMBL, Reactome) in a single workflow with consistent API. Best for cross-database analysis, ID mapping across services. For quick single-database lookups use gget; for sequence/file manipulation use biopython.

bulk-rnaseq

End-to-end bulk RNA-seq orchestrator — takes raw FASTQ reads through QC and trimming (FastQC, fastp/Trim Galore), alignment and quantification (STAR, Salmon, featureCounts), assembles a gene-level counts matrix, then hands off to differential expression (pydeseq2), pathway/GSEA enrichment (pathway-enrichment), and publication figures (scientific-visualization). Use whenever the user has bulk RNA-seq reads or quant output and wants a complete, reproducible differential-expression workflow — e.g.

cellxgene-census

Query the CZ CELLxGENE Census programmatically for versioned public single-cell and spatial transcriptomics data. Use when you need population-scale cell metadata, gene expression slices, Census summary counts, source H5AD URIs/downloads, embeddings, spatial Census data, or reference atlas comparisons across organisms, tissues, diseases, assays, and cell types. For analyzing your own local single-cell data use scanpy, anndata, or scvi-tools.

cirq

Google quantum computing framework. Use when targeting Google Quantum AI hardware, designing noise-aware circuits, or running quantum characterization experiments. Best for Google hardware, noise modeling, and low-level circuit design. For IBM hardware use qiskit; for quantum ML with autodiff use pennylane; for physics simulations use qutip.

citation-management

Comprehensive citation management for academic research. Search OpenAlex, PubMed, and Google Scholar for papers, extract accurate metadata, validate citations, and generate properly formatted BibTeX entries. This skill should be used when you need to find papers, verify citation information, convert DOIs to BibTeX, or ensure reference accuracy in scientific writing.

clinical-decision-support

Prepare and validate research-only clinical decision-support evaluation, evidence-profile, cohort, survival, biomarker/model, privacy, and governance artifacts. Use for aggregate or synthetic research documentation and traceability—not patient care or live clinical operation.

clinical-reports

Create safety-bounded draft structures and run local deterministic checks for clinical case, diagnostic, trial, safety, and aggregate research reports. Use only with synthetic, de-identified, or aggregate inputs and verified source-fact manifests; every output requires qualified review.

관련 스킬