Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .claude/skills/chemistry-rdkit/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,24 @@ metadata:
4. Tanimoto similarity: `DataStructs.TanimotoSimilarity(fp1, fp2)`
5. Use radius=2 (ECFP4 equivalent) as default for most applications
6. For virtual screening, Tanimoto > 0.7 suggests structural similarity
7. To filter for unique structures, use `Chem.MolToInchiKey`

### Substructure Search
1. SMARTS patterns: `pattern = Chem.MolFromSmarts('[OH]')`
2. Check match: `mol.HasSubstructMatch(pattern)`
3. Get all matches: `mol.GetSubstructMatches(pattern)`
4. Common SMARTS: `[#6](=O)[OH]` (carboxylic acid), `[NH2]` (primary amine)
5. Filter compound libraries by functional group presence
5. Common SMARTS: `[#6](=O)[OH]` (carboxylic acid), `[NH2]` (primary amine)
6. Find maximum common substructure with `mcs = rdFMCS.FindMCS(mols)`
7. Filter compound libraries by functional group presence

### Property Calculation Patterns
1. Batch processing: iterate over SDMolSupplier, skip None entries
2. Use `Chem.Descriptors.descList` for all available descriptors
3. For ADMET filtering, calculate Lipinski, Veber, and PAINS filters
4. Generate 3D coordinates: `AllChem.EmbedMolecule(mol, AllChem.ETKDG())`
5. Minimize energy: `AllChem.MMFFOptimizeMolecule(mol)`
4. For general druglikeness, use `Descriptors.qed`, for synthesizability `from SA_Score import sascorer`
5. For `sascorer`, append the contrib path first: `sys.path.append(os.path.join(os.environ['CONDA_PREFIX'],'share','RDKit','Contrib'))`
6. Generate 3D coordinates: `AllChem.EmbedMolecule(mol, AllChem.ETKDG())`
7. Minimize energy: `AllChem.MMFFOptimizeMolecule(mol)`

### Common Pitfalls
1. Always sanitize molecules (default behavior) — disable only when needed
Expand Down
8 changes: 8 additions & 0 deletions researchclaw/literature/semantic_scholar.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,14 @@ def _request_with_retry(
if exc.code == 429:
if _cb_on_429():
return None # breaker tripped
# On first 429, don't retry S2 — fall through to next backend
# immediately so arXiv/OpenAlex can run without waiting.
if attempt == 0:
logger.warning(
"S2 rate-limited (429) on first attempt — "
"skipping S2 for this query, trying next backend"
)
return None
delay = min(2 ** (attempt + 1), _MAX_WAIT_SEC)
jitter = random.uniform(0, delay * 0.3)
wait = delay + jitter
Expand Down
3 changes: 2 additions & 1 deletion researchclaw/llm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"base_url": "https://api.novita.ai/openai",
},
"minimax": {
"base_url": "https://api.minimaxi.com/v1",
"base_url": "https://api.minimax.io/anthropic",
"wire_api": "anthropic",
},
"volcengine": {
"base_url": "https://ark.cn-beijing.volces.com/api/v3",
Expand Down