Cheminformatics and structural biology tools for BioChemAIgent and Drug Discovery Platform.
micromamba env create -f environment.yml -y
micromamba env create -f environment.yml -y --prefix ~/env/bcai
pip install -e .Some tools need a local install, license, or token that biochem can't bundle — pass it directly as a function argument, or set the matching environment variable as a fallback (argument wins if both are given):
| Argument | Env var fallback | Required by | What it is |
|---|---|---|---|
token |
ESM3_TOKEN |
run_esm3 |
Forge API token for the hosted ESM3 model — register at forge.evolutionaryscale.ai |
af3_path |
AF3_PATH |
run_af3 |
Path to a local AlphaFold3 installation (weights obtained separately under DeepMind's AlphaFold3 license) |
foldx_binary |
FOLDX_BINARY |
optimize_protein_foldx (used by protonate_and_optimize_protein) |
Path to the FoldX binary — academic license at foldxsuite.crg.eu |
software_dir |
SOFTWARE_DIR |
run_docking / run_molecular_docking |
Path to the folder containing docking binaries (smina.static, gnina, vina, qvina-w, qvina21). Defaults to software (relative to the working directory); set to ../software when running from bcai/main/ |
Every function follows the same fallback, e.g.:
token = token or os.getenv("ESM3_TOKEN")Copy .env.example to .env and fill in what you have. biochem doesn't load .env itself — it just reads os.getenv(...) from whatever's already in the process environment, so get values in with one of:
- Shell:
export $(grep -v '^#' .env | xargs)before running your script, or add theexport VAR=...lines to your shell profile. - python-dotenv:
pip install python-dotenv, thenfrom dotenv import load_dotenv; load_dotenv()beforeimport biochem. - Already inside
bcai: it loads its ownenvfile at startup (bcai/main/*.py→load_dotenv("../env")) — add these 4 lines there instead of keeping a separate.envfor biochem.
Without the relevant variable (or function argument) set: run_af3 and optimize_protein_foldx raise a ValueError naming what's missing; run_docking/run_molecular_docking silently falls back to a software/ folder relative to the working directory, which will fail later (e.g. "binary not found") if that folder doesn't actually contain the docking binaries. None of these degrade gracefully the way biofetch's search tools do — they wrap external installs, not optional API calls. .env is gitignored; only commit .env.example.
render_structures— render PDB/CIF/SDF/MOL2 files to interactive 3D HTML (py3Dmol). Exposesstyle_rules,surface_rules,label_rules,chain_color_map,interaction_tables, box constraint overlay.get_protein_ligand_interaction/interaction_plot— compute and visualise protein-ligand interaction networks.run_af3/run_esm3— AlphaFold3 and ESM3 structure prediction.molecular_dockingtools — protein/ligand preparation, VINA/SMINA/GNINA/DiffDock docking.protein_ligand_basics— SMILES→3D, protonation, PDB extraction, ADMET prediction.screen_library_pharmacophore— CDPKit/CDPL pharmacophore-alignment screening of a candidate ligand library against one known-active query molecule, ranked by fit score.
render_structures.style_rulesandsurface_rulesuseTypedDict(StyleRule,SurfaceRule) so FastMCP generates a schema with named properties. This is required for LLMs to correctly populate nested selection/style dicts — bareDict[str, Any]causes models to emit empty{}objects.- Cartoon style without an explicit
colorrenders white on the default white background. Always include"color": "spectrum"or another colour when specifying cartoon style rules.
This software is licensed under the PolyForm Noncommercial License 1.0.0 — see LICENSE.
Free for academic, research, and other noncommercial use. Commercial use — including use in proprietary pipelines, SaaS products, or any revenue-generating activity — requires a separate commercial license. Contact: yousefi.bme@gmail.com, sbonn@uke.de
SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0