File size: 1,938 Bytes
3928090
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
"""
Inference Script for Protein-Ligand Binding Affinity Engine
==========================================================
Author: Ramprasad Atluri (At1uri)
Repository: At1uri/protein-ligand-binding-affinity-engine
"""

from affinity_engine import EquivariantBindingAffinityEngine

def run_biomol_demo():
    engine = EquivariantBindingAffinityEngine()

    test_targets = [
        ("1FPU", "Cc1ccc(cc1Nc2nccc(n2)c3cccnc3)NC(=O)c4ccc(cc4)CN5CCN(CC5)C"), # Abl-Imatinib
        ("2XYN", "COc1cc2ncnc(c2cc1OCCCN3CCOCC3)Nc4ccc(c(c4)Cl)F"),             # EGFR-Gefitinib
        ("7L10", "CC1(C2C1C(N(C2)C(=O)C(C(C)(C)C)NC(=O)C(F)(F)F)C(=O)NC(CC3CCNC3=O)C#N)C") # Mpro-Paxlovid
    ]

    print("=" * 70)
    print("BIOMOLECULAR BINDING AFFINITY & DELTA G INFERENCE")
    print("=" * 70)

    for pdb, smiles in test_targets:
        pred = engine.predict_affinity(pdb, smiles)
        print(f"\n[Target: {pred['target_pdb']} - {pred['protein_name']}]")
        print(f"  Predicted pKd:               {pred['predicted_pkd']}")
        print(f"  Gibbs Free Energy Delta G:   {pred['binding_delta_g_kcal_mol']} kcal/mol")
        print(f"  Dissociation Constant Kd:    {pred['dissociation_constant_kd_nm']} nM ({pred['binding_class']})")
        print(f"  Contact Hydrogen Bonds:      {pred['predicted_hbonds']}")
        print(f"  Buried Surface Area:         {pred['buried_surface_area_a2']} A^2")

    print("\n" + "=" * 70)
    print("IN-SILICO POINT MUTATION DRUG RESISTANCE PREDICTION (T315I)")
    print("=" * 70)
    mut_pred = engine.predict_mutation_impact("1FPU", "THR", "ILE", 315)
    print(f"  Mutation:            {mut_pred['mutation']}")
    print(f"  Delta Delta G:       +{mut_pred['mutation_delta_delta_g_kcal_mol']} kcal/mol")
    print(f"  Phenotypic Impact:   {mut_pred['phenotype']}")
    print(f"  Affinity Reduction:  {mut_pred['affinity_fold_reduction']}x fold loss")

if __name__ == "__main__":
    run_biomol_demo()