MikoshiBio
Molecular Modeling for Python & MikoshiLang
Protein structure analysis, molecular dynamics, and docking tools. Use as a pure Python library or with MikoshiLang's symbolic/Wolfram-style syntax.
Features
8th Knowledge Pack: PDB (Protein Data Bank)
- Query 200,000+ experimental protein structures
- Get resolution, experimental method, release dates
- Download PDB/mmCIF files
- Extract sequences from structures
BioPython Integration
- Load PDB structures from files, URLs, or PDB IDs
- Calculate RMSD between structures
- Find inter-atomic contacts
- Identify binding sites
- Secondary structure analysis (DSSP)
- Sequence property analysis
MDAnalysis Integration (v0.2.0) ✨ NEW
- Load and analyze MD trajectories
- Calculate RMSD, RMSF, radius of gyration
- Track contacts and distances over time
- Extract frames and align trajectories
- Support for DCD, XTC, TRR formats
Molecular Docking (v0.2.0) ✨ NEW
- AutoDock Vina integration
- Protein-ligand docking
- Binding affinity calculation
- Virtual screening
- Automatic docking box calculation
- PDB to PDBQT conversion
Planned Features
- Py3Dmol/NGLView visualization (v0.3.0)
- RDKit molecular descriptors (v0.4.0)
- Advanced trajectory analysis (v0.5.0)
Installation
# Python API only (BioPython + NumPy)
pip install mikoshi-bio
# With MikoshiLang symbolic/Wolfram-style syntax
pip install mikoshi-bio[symbolic]
# With molecular dynamics support
pip install mikoshi-bio[md]
# With docking tools
pip install mikoshi-bio[docking]
# With visualization
pip install mikoshi-bio[visualization]
# Everything
pip install mikoshi-bio[all]
Quick Start
Python API (No MikoshiLang Required)
from mikoshibio import LoadPDB, GetSequence, FindContacts, SequenceAnalysis
# Load structure from PDB
structure = LoadPDB("pdb", "1CRN")
# Extract sequence
seq = GetSequence(structure)
print(f"Sequence: {seq}")
# Find contacts within 5 Angstroms
contacts = FindContacts(structure, distance=5.0)
print(f"Found {len(contacts)} contacts")
# Analyze sequence properties
props = SequenceAnalysis(seq)
print(f"MW: {props['molecular_weight']:.2f} Da")
print(f"pI: {props['isoelectric_point']:.2f}")
Query PDB Database
from mikoshibio import PDBPack
pdb = PDBPack()
# Search for structures
results = pdb.search("hemoglobin", limit=5)
# → [{"id": "1A3N", "label": "Crystal Structure of Human Hemoglobin", ...}]
# Get structure metadata
resolution = pdb.get_value("1CRN", "Resolution")
print(f"Resolution: {resolution['value']} Å")
# Get PDB file URL
pdb_url = pdb.get_value("1CRN", "PDBFile")
# → "https://files.rcsb.org/download/1CRN.pdb"
Compare Structures
# Load two structures
ref = LoadPDB("pdb", "1CRN")
mobile = LoadPDB("pdb", "2CRN")
# Calculate RMSD
rmsd = CalculateRMSD(ref, mobile)
print(f"RMSD: {rmsd:.2f} Å")
Find Binding Sites
# Load structure with ligand
structure = LoadPDB("pdb", "1ATP")
# Find residues near ATP
binding_residues = GetBindingSites(structure, "ATP", distance=4.0)
print(f"Binding site residues: {binding_residues}")
Optional: MikoshiLang Symbolic Syntax
Install with pip install mikoshi-bio[symbolic] for Wolfram-style symbolic computation:
from mikoshilang import parse_and_eval
import mikoshibio # Registers structure rules
# Check if symbolic features are available
from mikoshibio import MIKOSHILANG_AVAILABLE
if not MIKOSHILANG_AVAILABLE:
print("Install mikoshi-bio[symbolic] for MikoshiLang integration")
# Load structure
result = parse_and_eval('LoadPDB["pdb", "1CRN"]')
# Get sequence (stored in variable)
parse_and_eval('seq = GetSequence[result]')
# Analyze sequence
parse_and_eval('SequenceAnalysis[seq]')
# Find contacts
parse_and_eval('FindContacts[result, 5.0]')
Integration with Meta-Analysis Workflow
Example: Autism Epigenetics + Protein Structure
from mikoshilang import parse_and_eval
import mikoshibio
# For each epigenetic gene in your meta-analysis
genes = ["RELN", "OXTR", "MECP2", "UBE3A"]
for gene in genes:
# Query AlphaFold for predicted structure
alphafold = parse_and_eval(f'PackSearch["alphafold", "{gene}"]')
# Query PDB for experimental structures
pdb = parse_and_eval(f'PackSearch["pdb", "{gene}"]')
# Get sequence from best structure
if pdb and len(pdb) > 0:
structure = LoadPDB("pdb", pdb[0]["id"])
sequence = GetSequence(structure)
# Analyze protein properties
props = SequenceAnalysis(sequence)
print(f"{gene}: MW={props['molecular_weight']:.0f} Da, pI={props['isoelectric_point']:.2f}")
# Check for DNA-binding domains (future feature)
# binding_sites = GetBindingSites(structure, "DNA", distance=4.0)
Architecture
mikoshibio/
├── pdb_pack.py # PDB knowledge pack (8th pack)
├── biopython_bridge.py # BioPython wrappers
├── structure_rules.py # MikoshiLang evaluator rules
├── mdanalysis_tools.py # MD trajectory analysis (planned)
├── docking.py # AutoDock Vina interface (planned)
└── visualization.py # Molecular viewers (planned)
Knowledge Packs Comparison
| Pack | Domain | Coverage | License |
|---|---|---|---|
| PubChem | Small molecules | 100M+ | Public Domain |
| AlphaFold | Predicted structures | 200M+ | CC BY 4.0 |
| PDB | Experimental structures | 200K+ | CC0 1.0 |
Requirements
Core:
- Python ≥ 3.9
- mikoshilang ≥ 3.5.0
- biopython ≥ 1.80
Optional:
- MDAnalysis ≥ 2.0 (trajectory analysis)
- AutoDock Vina ≥ 1.2 (molecular docking)
- py3Dmol ≥ 2.0 (visualization)
- RDKit ≥ 2022.9 (molecular descriptors)
Functions Reference
Knowledge Pack Functions
PackSearch["pdb", query, limit=5] # Search PDB structures
PackValue["pdb", pdb_id, property] # Get structure metadata
Properties: Title, Method, Resolution, ReleaseDate, Organism, Chains, Sequence, PDBFile, MMCIF
Structure Analysis Functions
LoadPDB["pdb", pdb_id] # Load from PDB
LoadPDB[file_path] # Load from file
GetSequence[structure] # Extract amino acid sequence
FindContacts[structure, distance] # Find inter-atomic contacts
CalculateRMSD[struct1, struct2] # Structural alignment
CalculateSecondaryStructure[struct, file] # DSSP analysis
GetBindingSites[structure, ligand] # Binding site residues
SequenceAnalysis[sequence] # Protein properties
Development Status
- ✅ v0.1.0: PDB pack + BioPython integration
- ⏳ v0.2.0: MDAnalysis trajectory tools
- ⏳ v0.3.0: AutoDock Vina docking interface
- ⏳ v0.4.0: Molecular visualization (Py3Dmol/NGLView)
- ⏳ v0.5.0: RDKit molecular descriptors
License
Apache 2.0
Links
- GitHub: https://github.com/DarrenEdwards111/MikoshiBio
- MikoshiLang: https://pypi.org/project/mikoshilang/
- Documentation: https://mikoshi.co.uk/mikoshilang
Citation
If you use MikoshiBio in your research, please cite:
@software{mikoshibio2026,
title = {MikoshiBio: Molecular Modeling Extension for MikoshiLang},
author = {Mikoshi Ltd},
year = {2026},
url = {https://github.com/DarrenEdwards111/MikoshiBio}
}
Built by Mikoshi Ltd as an extension to MikoshiLang.
Metadata
Release files for mikoshi-bio 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mikoshi_bio-0.2.1.tar.gz | 15.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mikoshi_bio-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.7 kB
Release files / mikoshi_bio-0.2.1.tar.gz
| Download URL | mikoshi_bio-0.2.1.tar.gz |
|---|---|
| Size | 15.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf0a758b5b4ea70309a262a385952e14a62488c79aadba57825442cf3244477a
|
|
BLAKE2b-256 checksum How to use checksums |
da84cf95411b13eb1b8e3c36ed3ba5e6122277034ae16de7221cf8b340b5dd40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / mikoshi_bio-0.2.1-py3-none-any.whl
| Download URL | mikoshi_bio-0.2.1-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e8781bef4eff702da4a25a34c3346bd39ec51be87e0cc74161947f1573a84648
|
|
BLAKE2b-256 checksum How to use checksums |
1f137d8bf637591e983bb782d175014398ebc6bf572f198f2e55dbf42b5becc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for mikoshi-bio 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.