Skip to content

Commit da1dc3f

Browse files
author
devsamikhan
committed
feat: add native Bio and Chem engines, precision oncology discovery, and scientific report CLI
1 parent b07ce5f commit da1dc3f

24 files changed

Lines changed: 4480 additions & 27 deletions

‎.gitignore‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ desktop.ini
3333
logs/
3434

3535
# Runtime Database
36-
data/
36+
data/*.db
37+
data/*.wal
3738
*.db
3839
*.wal

‎README.md‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,51 @@ let outcome = qreg.measure(0);
178178
println("Measured: " + to_string(outcome));
179179
```
180180

181+
### 5. 🧬 Native Bioinformatics & Computational Genomics (`Bio`)
182+
```aether
183+
// Parse biological sequences with genetic code translation & alignment
184+
let seq = Bio.Sequence("ATGGCGGCGCTAGCG");
185+
let rna = seq.transcribe();
186+
let protein = seq.translate();
187+
let gc = seq.gc_content();
188+
let aligned = Bio.align_global("ATGGCG", "ATGCCG");
189+
190+
// Colorized nucleotide terminal output
191+
println(Bio.colorize(seq));
192+
```
193+
194+
### 6. 💊 Cheminformatics & Deep Drug Safety Screening (`Chem`)
195+
```aether
196+
// Parse SMILES string into molecular topology with Lipinski & QSAR metrics
197+
let drug = Chem.smiles("CC1=CC=C(C=C1)NC(=O)C2=CC=C(CN3CCN(C)CC3)C=C2");
198+
println("Formula: " + drug.formula());
199+
println("Molecular Weight: " + to_string(drug.weight()));
200+
println("LogP: " + to_string(drug.logp()));
201+
println("Lipinski Passed: " + to_string(drug.lipinski_rule_of_5()));
202+
203+
// Deep toxicity & reactive liability screening (PAINS, Ames, hERG, Hepatotoxicity)
204+
let safety = drug.safety_profile();
205+
println("PAINS Alerts: " + to_string(safety.pains_alerts));
206+
println("hERG Risk: " + safety.herg_cardiotoxicity_risk);
207+
```
208+
209+
---
210+
211+
## 🔬 Scientific Discovery & Reporting CLI
212+
213+
AETHER includes built-in execution and automated scientific reporting:
214+
215+
```bash
216+
# Execute discovery and precision oncology pipelines
217+
aether run examples/kras_g12d_real_discovery.ae
218+
219+
# Generate interactive dark-mode HTML scientific discovery reports
220+
aether report examples/kras_g12d_real_discovery.ae --html discovery_report.html
221+
222+
# Run native language test suites
223+
aether test
224+
```
225+
181226
---
182227

183228
## 📚 Documentation & Ecosystem Links

‎data/kras_human_wt.fasta‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
>sp|P01116|RASK_HUMAN KRAS Wild-Type Homo sapiens Exon-2
2+
ATGACTGAATATAAACTTGTGGTAGTTGGAGCTGGTGGCGTAGGCAAGAGTGCCTTGACGATACAGCTAATTCAGAATCATTTTGTGGACGAATATGATCCAACAATAGAGGATTCCTACAGGAAGCAAGTAGTAATTGATGGAGAAACCTGTCTCTTGGATATTCTCGACACAGCAGGTCAAGAGGAGTACAGTGCAATGAGGGACCAGTACATGAGG

‎data/kras_patient_g12d.fasta‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
>patient|PDAC-2026-9041|KRAS_G12D Pancreatic Ductal Adenocarcinoma Biopsy
2+
ATGACTGAATATAAACTTGTGGTAGTTGGAGCTGATGGCGTAGGCAAGAGTGCCTTGACGATACAGCTAATTCAGAATCATTTTGTGGACGAATATGATCCAACAATAGAGGATTCCTACAGGAAGCAAGTAGTAATTGATGGAGAAACCTGTCTCTTGGATATTCTCGACACAGCAGGTCAAGAGGAGTACAGTGCAATGAGGGACCAGTACATGAGG

‎data/kras_real_bioactivity.json‎

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
[
2+
{
3+
"name": "MRTX1133",
4+
"chembl_or_cid": "CID:156124857",
5+
"smiles": "C#CC1=C(C=CC2=CC(=CC(=C21)C3=NC=C4C(=C3F)N=C(N=C4N5CC6CCC(C5)N6)OCC78CCCN7CC(C8)F)O)F",
6+
"target_specificity": "KRAS G12D Selective Non-Covalent",
7+
"experimental_ic50_nm": 5.0,
8+
"experimental_activity": "High Potency"
9+
},
10+
{
11+
"name": "BI-2852",
12+
"chembl_or_cid": "CID:138756246",
13+
"smiles": "CN1C=C(N=C1)CN2C=CC3=C2C=C(C=C3)CNCC4=C(C5=CC=CC=C5N4)C6C7=C(C=CC(=C7)O)C(=O)N6",
14+
"target_specificity": "Pan-KRAS Switch-I/II Pocket Binder",
15+
"experimental_ic50_nm": 770.0,
16+
"experimental_activity": "Moderate Potency"
17+
},
18+
{
19+
"name": "Sotorasib (AMG 510)",
20+
"chembl_or_cid": "CID:137278711",
21+
"smiles": "CC1CN(CCN1C2=NC(=O)N(C3=NC(=C(C=C32)F)C4=C(C=CC=C4F)O)C5=C(C=CN=C5C(C)C)C)C(=O)C=C",
22+
"target_specificity": "KRAS G12C Covalent Inhibitor (Inactive on G12D)",
23+
"experimental_ic50_nm": 12000.0,
24+
"experimental_activity": "Inactive / Resistance"
25+
},
26+
{
27+
"name": "Adagrasib (MRTX849)",
28+
"chembl_or_cid": "CID:139595267",
29+
"smiles": "C=CC(=O)N1CCN(CC1)C2=NC=C(C3=C2N=C(C=C3)C4=CC5=C(C=CC(=C5Cl)F)N4)F",
30+
"target_specificity": "KRAS G12C Covalent Inhibitor (Inactive on G12D)",
31+
"experimental_ic50_nm": 15000.0,
32+
"experimental_activity": "Inactive / Resistance"
33+
},
34+
{
35+
"name": "ARS-1620",
36+
"chembl_or_cid": "CID:122173007",
37+
"smiles": "C=CC(=O)N1CCN(CC1)C2=NC=C(C3=C2N=C(C=C3)C4=C(C=CC=C4Cl)F)Cl",
38+
"target_specificity": "KRAS G12C Tool Compound (Inactive on G12D)",
39+
"experimental_ic50_nm": 22000.0,
40+
"experimental_activity": "Inactive / Resistance"
41+
},
42+
{
43+
"name": "DCAI Fragment",
44+
"chembl_or_cid": "CHEMBL2396992",
45+
"smiles": "CC1=C(C=C(C=C1)Cl)NC(=O)C2=CC=CC=C2Cl",
46+
"target_specificity": "KRAS Crystallographic Fragment",
47+
"experimental_ic50_nm": 155000.0,
48+
"experimental_activity": "Weak Fragment"
49+
},
50+
{
51+
"name": "Gemcitabine",
52+
"chembl_or_cid": "CHEMBL888",
53+
"smiles": "C1=CN(C(=O)N=C1N)C2C(C(C(O2)CO)O)(F)F",
54+
"target_specificity": "Standard Pancreatic Chemo (Non-targeted)",
55+
"experimental_ic50_nm": 50000.0,
56+
"experimental_activity": "Non-Targeted Cytotoxic"
57+
},
58+
{
59+
"name": "Aspirin",
60+
"chembl_or_cid": "CHEMBL25",
61+
"smiles": "CC(=O)OC1=CC=CC=C1C(=O)O",
62+
"target_specificity": "Negative Control (COX)",
63+
"experimental_ic50_nm": 100000.0,
64+
"experimental_activity": "Negative Control"
65+
},
66+
{
67+
"name": "Caffeine",
68+
"chembl_or_cid": "CHEMBL113",
69+
"smiles": "CN1C=NC2=C1C(=O)N(C(=O)N2C)C",
70+
"target_specificity": "Negative Control (Adenosine)",
71+
"experimental_ic50_nm": 100000.0,
72+
"experimental_activity": "Negative Control"
73+
}
74+
]
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
# ==============================================================================
2+
# AETHER Scientific Computing Showcase:
3+
# Computational Biology, Genomics & AI Drug Discovery (Medicine Prediction)
4+
# ==============================================================================
5+
6+
print("==================================================================")
7+
print(" AETHER NATIVE GENOMICS & COMPUTATIONAL DRUG DISCOVERY ENGINE ")
8+
print("==================================================================")
9+
10+
# ------------------------------------------------------------------------------
11+
# 1. 2-Bit Compressed DNA & Sequence Processing
12+
# ------------------------------------------------------------------------------
13+
print("\n--- 1. Native 2-Bit DNA Compression & Genetics ---")
14+
15+
let raw_dna = "ATGGCCATTGTAATGGGCCGCTGAAAGGGTGCCCGATAG"
16+
let dna = Bio.dna(raw_dna)
17+
18+
print("Original DNA Sequence:", dna.to_string())
19+
print("Sequence Length (bp):", dna.len)
20+
print("Packed Memory (bytes):", dna.raw_bytes)
21+
print("Memory Compression Ratio:", dna.compression_ratio, "x (75% RAM savings)")
22+
print("GC-Content (%):", dna.gc_content())
23+
24+
let rev_comp = dna.reverse_complement()
25+
print("Reverse Complement:", rev_comp.to_string())
26+
27+
let mrna = dna.transcribe()
28+
print("Transcribed mRNA:", mrna)
29+
30+
let protein = dna.translate(0)
31+
print("Translated Amino Acid Chain (Frame 0):", protein)
32+
33+
# ------------------------------------------------------------------------------
34+
# 2. Gene Discovery: Open Reading Frames (ORFs) & K-Mer Profiling
35+
# ------------------------------------------------------------------------------
36+
print("\n--- 2. Gene Discovery: ORFs & K-Mer Profiling ---")
37+
38+
let orfs = dna.find_orfs(2)
39+
print("Detected Open Reading Frames (ORFs):", orfs.len())
40+
for orf in orfs {
41+
print(" -> Found ORF at [", orf.start, ":", orf.end, "] | Codons:", orf.codons, "| Protein:", orf.protein)
42+
}
43+
44+
let kmer_counts = dna.count_kmers(3)
45+
print("Top 3-mers sample: ATG ->", kmer_counts["ATG"], "| GCC ->", kmer_counts["GCC"])
46+
47+
# ------------------------------------------------------------------------------
48+
# 3. Global Sequence Alignment & SNP Mutation Detection
49+
# ------------------------------------------------------------------------------
50+
print("\n--- 3. Sequence Alignment (Needleman-Wunsch) & SNP Detection ---")
51+
52+
let wild_type = Bio.dna("ATGGTGCATCTGACTCCT")
53+
let mutant_variant = Bio.dna("ATGGTGCACCTGACTCCT")
54+
55+
let snp_mutations = wild_type.hamming_distance(mutant_variant)
56+
print("Detected Point Mutations (SNPs):", snp_mutations)
57+
58+
let alignment = Bio.align(wild_type.to_string(), mutant_variant.to_string(), 2, -1, -2)
59+
print("Alignment Score:", alignment.score)
60+
print("Aligned Ref: ", alignment.aligned1)
61+
print("Aligned Query:", alignment.aligned2)
62+
print("Sequence Identity (%):", alignment.identity_percent)
63+
64+
# ------------------------------------------------------------------------------
65+
# 4. Computational Chemistry: SMILES Molecular Parsing & Physicochemical Rules
66+
# ------------------------------------------------------------------------------
67+
print("\n--- 4. Computational Chemistry & Drug Candidates ---")
68+
69+
let aspirin = Chem.from_smiles("CC(=O)OC1=CC=CC=C1C(=O)O")
70+
let ibuprofen = Chem.from_smiles("CC(C)CC1=CC=C(C=C1)C(C)C(=O)O")
71+
let paracetamol = Chem.from_smiles("CC(=O)NC1=CC=C(O)C=C1")
72+
let caffeine = Chem.from_smiles("CN1C=NC2=C1C(=O)N(C(=O)N2C)C")
73+
74+
let candidates = [
75+
("Aspirin", aspirin),
76+
("Ibuprofen", ibuprofen),
77+
("Paracetamol", paracetamol),
78+
("Caffeine", caffeine)
79+
]
80+
81+
for item in candidates {
82+
let name = item[0]
83+
let mol = item[1]
84+
let r5 = mol.rule_of_five()
85+
print("Drug Candidate:", name)
86+
print(" Formula:", mol.formula(), "| MW:", mol.weight(), "Da | Heavy Atoms:", mol.heavy_atoms)
87+
print(" LogP (Lipophilicity):", mol.logp(), "| TPSA:", mol.tpsa(), "Ų")
88+
print(" H-Bond Donors:", mol.hbd(), "| Acceptors:", mol.hba(), "| Rotatable Bonds:", mol.rotatable_bonds())
89+
print(" Lipinski Rule of 5 Oral Bioavailability:", r5.is_drug_like, "(Violations:", r5.violations, ")")
90+
}
91+
92+
# ------------------------------------------------------------------------------
93+
# 5. Extended Connectivity Fingerprints (ECFP) & Chemical Similarity
94+
# ------------------------------------------------------------------------------
95+
print("\n--- 5. Molecular Fingerprinting & Tanimoto Structural Similarity ---")
96+
97+
let fp_asp = aspirin.fingerprint(512)
98+
let fp_ibu = ibuprofen.fingerprint(512)
99+
let fp_par = paracetamol.fingerprint(512)
100+
let fp_caf = caffeine.fingerprint(512)
101+
102+
let sim_asp_par = Chem.tanimoto_similarity(fp_asp, fp_par)
103+
let sim_asp_ibu = Chem.tanimoto_similarity(fp_asp, fp_ibu)
104+
let sim_asp_caf = Chem.tanimoto_similarity(fp_asp, fp_caf)
105+
106+
print("Aspirin vs Paracetamol Structural Similarity:", sim_asp_par)
107+
print("Aspirin vs Ibuprofen Structural Similarity:", sim_asp_ibu)
108+
print("Aspirin vs Caffeine Structural Similarity: ", sim_asp_caf)
109+
110+
# ------------------------------------------------------------------------------
111+
# 6. AI Virtual Screening & Receptor Target Binding Affinity Prediction
112+
# ------------------------------------------------------------------------------
113+
print("\n--- 6. AI Medicine Prediction: Receptor Target Binding Affinity ---")
114+
115+
# Target Receptor Pocket Features (e.g. COX-2 enzyme active site model)
116+
let mut cox2_weights = []
117+
for i in 0..512 {
118+
if i % 12 == 0 {
119+
cox2_weights.push(0.42)
120+
} else if i % 7 == 0 {
121+
cox2_weights.push(0.18)
122+
} else {
123+
cox2_weights.push(0.02)
124+
}
125+
}
126+
127+
for item in candidates {
128+
let name = item[0]
129+
let mol = item[1]
130+
let affinity = Chem.predict_binding_affinity(mol, cox2_weights, 4.8)
131+
print("Molecule:", name)
132+
print(" Predicted pIC50:", affinity.pic50)
133+
print(" Estimated Dissociation Constant (Kd):", affinity.kd_nm, "nM")
134+
print(" Binding Classification:", affinity.binding_class)
135+
}
136+
137+
# ------------------------------------------------------------------------------
138+
# 7. Native Language Unit Test
139+
# ------------------------------------------------------------------------------
140+
test "scientific verification" {
141+
let asp = Chem.from_smiles("CC(=O)OC1=CC=CC=C1C(=O)O")
142+
let asp_r5 = asp.rule_of_five()
143+
assert_eq(asp_r5.is_drug_like, true)
144+
assert_eq(asp.formula(), "C9H8O4")
145+
146+
let test_dna = Bio.dna("ATGGCCATTTAA")
147+
assert_eq(test_dna.translate(0), "MAI*")
148+
}
149+
150+
print("\nAll scientific simulations and analyses completed successfully!")

0 commit comments

Comments
 (0)