Esempio n. 1
0
 def test_3r0t(self):
     """Binding of protein kinase CK2 alpha subunit in with the inhibitor CX-5279 (3r0t)
     Reference:  Battistutta et al. Unprecedented selectivity and structural determinants of a new class of protein
     kinase CK2 inhibitors in clinical trials for the treatment of cancer (2011).
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/3r0t.pdb')
     bsid = 'FU9:A:338'
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # Hydrogen bonds to Val116
     hbonds = {hbond.resnr for hbond in s.hbonds_pdon}
     self.assertTrue({116}.issubset(hbonds))
     # Water bridge to Trp176
     waterbridges = {wb.resnr for wb in s.water_bridges}
     self.assertTrue({176}.issubset(waterbridges))
     # Saltbridge to Ly68
     saltb = {saltbridge.resnr for saltbridge in s.saltbridge_lneg}
     self.assertTrue({68}.issubset(saltb))
     # hydrophobic interaction of Val66, Phe113 and Ile174
     hydrophobics = {
         hydrophobic.resnr
         for hydrophobic in s.all_hydrophobic_contacts
     }
     self.assertTrue({66, 113, 174}.issubset(hydrophobics))
     # pi-stacking interaction with His160
     pistackres = {pistack.resnr for pistack in s.pistacking}
     self.assertTrue({160}.issubset(pistackres))
Esempio n. 2
0
 def test_4kya(self):
     """Binding of non-classical TS inhibitor 3 with Toxoplasma gondii TS-DHFR(4kya)
     Reference:  Zaware et al. Structural basis of HIV-1 capsid recognition by PF74 and CPSF6(2014)
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/4kya.pdb')
     bsid = '1UG:E:702'
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # Hydrogen bonds to Ala609
     hbonds = {hbond.resnr for hbond in s.hbonds_pdon}
     self.assertTrue({609}.issubset(hbonds))
     # Saltbridge to Asp513
     saltb = {saltbridge.resnr for saltbridge in s.saltbridge_pneg}
     self.assertTrue({513}.issubset(saltb))
     # hydrophobic interaction of Ile402, Leu516, Phe520 and Met608
     hydrophobics = {
         hydrophobic.resnr
         for hydrophobic in s.all_hydrophobic_contacts
     }
     self.assertTrue({402, 516, 520, 608}.issubset(hydrophobics))
     # pi-stacking interaction with Trp403 and Phe520
     pistackres = {pistack.resnr for pistack in s.pistacking}
     self.assertTrue({403, 520}.issubset(pistackres))
Esempio n. 3
0
 def test_1n7g(self):
     """Binding of NADPH to MURI from Arabidopsis thaliana (1n7g)
     Reference:  Mulichak et al. Structure of the MUR1 GDP-mannose 4, 6-dehydratase from Arabidopsis thaliana:
     implications for ligand binding and specificity(2002)
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/1n7g.pdb')
     bsid = 'NDP:A:701'
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # Hydrogen bonds to Thr37, Gly38, Gln39, Asp40,  Arg60, Leu92, Asp91, Ser63, Leu92, Ala115, Ser117,
     # Tyr128, Tyr185, Lys189, His215 and Arg220
     # Publication give the Prediction for Asp91 as hydrogen bond, when this contains two acceptor atoms.
     hbonds = {hbond.resnr for hbond in s.hbonds_pdon}
     # #@todo Hbond to 128 not detected
     self.assertTrue(
         {37, 38, 39, 40, 92, 63, 92, 115, 117, 185, 189, 215,
          220}.issubset(hbonds))
     # Water bridges to Gly35, Thr37, Gly38, Asp40, Arg60, Arg61, Ser63, Asn66, Ser117, Tyr128, Lys189, Arg220
     waterbridges = {wb.resnr for wb in s.water_bridges}
     # Hydrogen bonds to 35, 37, 38, 40, 63, 117, 128, 189, 220 not detected due to prioritization
     self.assertTrue({60, 66, 61}.issubset(waterbridges))
     # Saltbridge to arg60, Arg61, Arg69 and Arg220
     saltb = {saltbridge.resnr for saltbridge in s.saltbridge_lneg}
     # #@todo Additional saltbridges report to 69 and 200 (with large distances)
     self.assertTrue({60, 61}.issubset(saltb))
     # Cation-pi interactions with Arg60
     picat = {pication.resnr for pication in s.pication_laro}
     self.assertEqual({60}, picat)
Esempio n. 4
0
 def test_4rao(self):
     """Binding of (4rao)
     Reference: Keough et al. Aza-acyclic Nucleoside Phosphonates Containing a Second Phosphonate Group
     As Inhibitors of the Human, Plasmodium falciparum and vivax 6‑Oxopurine Phosphoribosyltransferases
     and Their Prodrugs As Antimalarial Agents (2004)
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/4rao.pdb')
     bsid = '3L7:B:301'
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # Hydrogen bonds to Val187, Lys165, Thr141, Lys140, Gly139, Thr138, Asp137
     hbonds = {hbond.resnr
               for hbond in s.hbonds_pdon
               }  # res nr 100, 68, 69 and 199 in alternative conformation,
     self.assertTrue({137, 138, 139, 140, 141, 165, 187}.issubset(hbonds))
     # Water bridges to Asp137, Thr141, Met142, Arg199 and Gly139
     # res nr 199 and 142 in alternative conformation
     # Water bridges to 137m 141, 139 not detected due to prioritization
     # pi-stacking interaction with Phe186
     pistackres = {pistack.resnr for pistack in s.pistacking}
     self.assertTrue({186}.issubset(pistackres))
Esempio n. 5
0
 def test_1bma(self):
     """Binding of aminimide to porcine pancreatic elastase(1bma)
     Reference: Peisach et al. Interaction of a Peptidomimetic Aminimide Inhibitor with Elastase. (1995)
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/1bma.pdb')
     bsid = '0QH:A:256'
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # Hydrogen bonds to val224 and Gln200
     hbonds = {hbond.resnr for hbond in s.hbonds_pdon}
     self.assertTrue({224, 200}.issubset(hbonds))
     self.assertTrue({224, 200}.issubset(hbonds))
     # hydrophobic interaction of Phe223 and val103
     hydrophobics = {
         hydrophobic.resnr
         for hydrophobic in s.all_hydrophobic_contacts
     }
     self.assertTrue({223, 103}.issubset(hydrophobics))
     # Water bridges to Ser203 not detected due to prioritization
     waterbridges = {wb.resnr for wb in s.water_bridges}
     self.assertTrue(set().issubset(waterbridges))
Esempio n. 6
0
 def test_2w0s(self):
     """Binding of Vacc-TK to TDP (2w0s)
     Reference: Caillat et al. Crystal structure of poxvirus thymidylate kinase: An unexpected dimerization
     has implications for antiviral therapy (2008)
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/2w0s.pdb')
     bsid = 'BVP:B:1207'  # Complex of BVDU with Magnesium Cofactor
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # Hydrogen bonding of Tyr101 and Arg72
     hbonds = {hbond.resnr for hbond in s.hbonds_pdon}
     self.assertTrue({101, 72}.issubset(hbonds))
     # Halogen Bonding of Asn65
     halogens = {halogen.resnr for halogen in s.halogen_bonds}
     self.assertTrue({65}.issubset(halogens))
     # pi-stacking interaction with Phe68
     pistackres = {pistack.resnr for pistack in s.pistacking}
     self.assertTrue({68}.issubset(pistackres))
     # Saltbridge to Arg41 and Arg93
     saltb = {saltbridge.resnr for saltbridge in s.saltbridge_lneg}
     self.assertTrue({41, 93}.issubset(saltb))
Esempio n. 7
0
def characterize_complex(pdb_file: str, binding_site_id: str) -> PLInteraction:
    pdb_complex = PDBComplex()
    pdb_complex.load_pdb(pdb_file)
    for ligand in pdb_complex.ligands:
        if ':'.join([ligand.hetid, ligand.chain, str(ligand.position)]) == binding_site_id:
            pdb_complex.characterize_complex(ligand)
    return pdb_complex.interaction_sets[binding_site_id]
Esempio n. 8
0
 def test_pi_stacking(self):
     pdb_complex = PDBComplex()
     pdb_complex.load_pdb('./pdb/4dst_protonated.pdb')
     for ligand in pdb_complex.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == 'GCP:A:202':
             pdb_complex.characterize_complex(ligand)
             structure_report = StructureReport(pdb_complex,
                                                outputprefix="test_")
             structure_report.write_xml(as_string=True)
Esempio n. 9
0
 def test_4day(self):
     config.PEPTIDES = ['C']
     pdb_complex = PDBComplex()
     pdb_complex.load_pdb('./pdb/4day.pdb')
     for ligand in pdb_complex.ligands:
         pdb_complex.characterize_complex(ligand)
         structure_report = StructureReport(pdb_complex,
                                            outputprefix="test_")
         structure_report.write_xml(as_string=True)
     config.PEPTIDES = []
Esempio n. 10
0
    def _protein_ligand_interactions(
            pdb: str, as_string: bool) -> Tuple[dict, str, dict]:
        """Static method to calculate protein-ligand interactions for each ligand in
            the pdb file.

        Parameters
        ----------
        pdb : str
            File or string containing the protein-ligand complex.

        as_string : bool
            Variable to know if the pdb passed is a string or a file.

        Returns
        -------
        all_interactions : dict
            Dictionary which keys are ligand ids and values are all the interaction data 
            for that ligand. 
        
        pdb_string : str
            The corrected pdb stucture as a string.

        ligands : dict
             Dictionary which keys are ligand Ids and values are pybel molecules
        """
        mol_system = PDBComplex()
        mol_system.load_pdb(pdb, as_string=as_string)
        mol_system.analyze()

        pdb_string = mol_system.corrected_pdb

        # Dictionary with interactions for each small molecule in the protein
        all_interactions = mol_system.interaction_sets

        # Store ligands so we can extract their smiles later on.
        ligands = dict()

        for ligand in mol_system.ligands:
            n_atoms = len(ligand.atomorder)
            ligand_id = ":".join(
                [ligand.hetid, ligand.chain,
                 str(ligand.position)])
            # Filter ions and molecules with less than 5 atoms
            if ligand.type != "SMALLMOLECULE" or n_atoms <= 5:
                all_interactions.pop(ligand_id)
                continue
            # ligand.mol is an openbabel molecule
            ligands[ligand_id] = ligand.mol

        return all_interactions, pdb_string, ligands
Esempio n. 11
0
 def test_dna_rna(self):
     """Test if DNA and RNA is correctly processed as ligands"""
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/1tf6.pdb')
     # DNA ligand four times consisting of 31 parts (composite)
     self.assertEqual([len(ligand.members)
                       for ligand in tmpmol.ligands].count(31), 4)
     for ligset in [
             set((x[0] for x in ligand.members))
             for ligand in tmpmol.ligands
     ]:
         if len(ligset) == 4:
             # DNA only contains four bases
             self.assertEqual(ligset, {'DG', 'DC', 'DA', 'DT'})
Esempio n. 12
0
    def test_2pvb(self):
        """Pike parvalbumin binding calcium (2pvb)
        Reference: Harding. The architecture of metal coordination groups in proteins. (2004), Fig. 6
        """

        tmpmol = PDBComplex()
        tmpmol.load_pdb('./pdb/2pvb.pdb')
        bsid = 'CA:A:110'
        for ligand in tmpmol.ligands:
            if ':'.join([ligand.hetid, ligand.chain, str(ligand.position)]) == bsid:
                tmpmol.characterize_complex(ligand)
        s = tmpmol.interaction_sets[bsid]
        # Ca atom with square pyramidal geometry (coordination number 5)
        self.assertEqual(s.metal_complexes[0].coordination_num, 5)
        self.assertEqual(s.metal_complexes[0].geometry, 'square.pyramidal')
Esempio n. 13
0
 def test_1vsn(self):
     """Binding of NFT to Cathepsin K (1vsn)
     Reference: Li et al. Identification of a potent and selective non-basic cathepsin K inhibitor. (2006)
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/1vsn.pdb')
     bsid = 'NFT:A:283'
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # Hydrogen bonding to Gly66
     hbonds = {hbond.resnr for hbond in s.hbonds_pdon}
     self.assertTrue({66}.issubset(hbonds))
Esempio n. 14
0
 def test_1p5e(self):
     """Binding of TBS to CDK2(1p5e)
     Reference: De Moliner et al. Alternative binding modes of an inhibitor to two different kinases. (2003)
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/1p5e.pdb')
     bsid = 'TBS:A:301'
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # Halogen Bonding of Ile10 and Leu83
     halogens = {halogen.resnr for halogen in s.halogen_bonds}
     self.assertTrue({10, 83}.issubset(halogens))
Esempio n. 15
0
 def test_1acj(self):
     """Binding of Tacrine (THA) to active-site gorge of acetylcholinesterase (1acj)
     Reference: Harel et al. Quaternary ligand binding to aromatic residues in the active-site gorge of
     acetylcholinesterase.. (1993)
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/1acj.pdb')
     bsid = 'THA:A:999'
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # pi-stacking interaction with Phe330 and Trp84
     pistackres = {pistack.resnr for pistack in s.pistacking}
     self.assertTrue({330, 84}.issubset(pistackres))
Esempio n. 16
0
def process_pdb(pdbfile, outpath, as_string=False, outputprefix='report'):
    """Analysis of a single PDB file. Can generate textual reports XML, PyMOL session files and images as output."""
    if not as_string:
        pdb_file_name = pdbfile.split('/')[-1]
        startmessage = f'starting analysis of {pdb_file_name}'
    else:
        startmessage = 'starting analysis from STDIN'
    logger.info(startmessage)
    mol = PDBComplex()
    mol.output_path = outpath
    mol.load_pdb(pdbfile, as_string=as_string)
    # @todo Offers possibility for filter function from command line (by ligand chain, position, hetid)
    for ligand in mol.ligands:
        mol.characterize_complex(ligand)

    create_folder_if_not_exists(outpath)

    # Generate the report files
    streport = StructureReport(mol, outputprefix=outputprefix)

    config.MAXTHREADS = min(config.MAXTHREADS, len(mol.interaction_sets))

    ######################################
    # PyMOL Visualization (parallelized) #
    ######################################

    if config.PYMOL or config.PICS:
        from plip.visualization.visualize import visualize_in_pymol
        complexes = [
            VisualizerData(mol, site) for site in sorted(mol.interaction_sets)
            if not len(mol.interaction_sets[site].interacting_res) == 0
        ]
        if config.MAXTHREADS > 1:
            logger.info(
                f'generating visualizations in parallel on {config.MAXTHREADS} cores'
            )
            parfn = parallel_fn(visualize_in_pymol)
            parfn(complexes, processes=config.MAXTHREADS)
        else:
            [visualize_in_pymol(plcomplex) for plcomplex in complexes]

    if config.XML:  # Generate report in xml format
        streport.write_xml(as_string=config.STDOUT)

    if config.TXT:  # Generate report in txt (rst) format
        streport.write_txt(as_string=config.STDOUT)
Esempio n. 17
0
 def test_3thy(self):
     """Binding of ADP tp MutS(3thy)
     Reference:  Shikha et al. Mechanism of mismatch recognition revealed by human MutSβ bound to unpaired DNA loops.(2012)
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/3thy.pdb')
     bsid = 'ADP:A:935'
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # Saltbridge to His295 and Lys675
     saltb = {saltbridge.resnr for saltbridge in s.saltbridge_lneg}
     self.assertTrue({675}.issubset(saltb))
     # pi-stacking interaction with Tyr815
     pistackres = {pistack.resnr for pistack in s.pistacking}
     self.assertTrue({815}.issubset(pistackres))
Esempio n. 18
0
 def test_4qnb(self):
     """Binding of (4qnb)
     Reference:  Bhattacharya et al. Structural basis of HIV-1 capsid recognition by PF74 and CPSF6(2014)
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/4qnb.pdb')
     bsid = '1B0:A:301'
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # Hydrogen bonds to Asn57 and Lys70
     hbonds = {hbond.resnr for hbond in s.hbonds_pdon}
     self.assertTrue({57, 70}.issubset(hbonds))
     # Cation-pi interactions with Lys70
     picat = {pication.resnr for pication in s.pication_laro}
     self.assertEqual({70}, picat)
Esempio n. 19
0
 def test_4alw(self):
     """Binding of benzofuropyrimidinones compound 3 to PIM-1 (4alw)
     Reference:  Tsuhako et al. The design, synthesis, and biological evaluation of PIM kinase inhibitors.(2012)
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/4alw.pdb')
     bsid = 'HY7:A:1308'
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # Hydrogen bonds to Asp186
     hbonds = {hbond.resnr for hbond in s.hbonds_pdon}
     self.assertTrue({186}.issubset(hbonds))
     # Saltbridge to A186 and Glu171
     saltb = {saltbridge.resnr for saltbridge in s.saltbridge_pneg}
     self.assertTrue({186, 171}.issubset(saltb))
Esempio n. 20
0
 def test_1eve(self):
     """Binding of anti-Alzheimer drug E2020 to acetylcholinesterase from Torpedo californica (1eve)
     Reference: Chakrabarti et al. Geometry of nonbonded interactions involving planar groups in proteins. (2007)
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/1eve.pdb')
     bsid = 'E20:A:2001'
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # Aromatic stacking with Trp84 and Trp279
     pistackres = {pistack.resnr for pistack in s.pistacking}
     self.assertTrue({84, 279}.issubset(pistackres))
     # Pi-Cation interaction of Phe330 with ligand
     pication = {pication.resnr for pication in s.pication_paro}
     self.assertTrue({330}.issubset(pication))
Esempio n. 21
0
    def test_1het(self):
        """Liver alcohol deshydrogenase (1het)
        Reference: Harding. The architecture of metal coordination groups in proteins. (2004), Fig. 2
        """

        tmpmol = PDBComplex()
        tmpmol.load_pdb('./pdb/1het.pdb')
        bsid = 'ZN:A:401'
        for ligand in tmpmol.ligands:
            if ':'.join([ligand.hetid, ligand.chain, str(ligand.position)]) == bsid:
                tmpmol.characterize_complex(ligand)
        s = tmpmol.interaction_sets[bsid]
        # Coordination by four cysteines
        metalres = [mres.restype + str(mres.resnr) for mres in s.metal_complexes]
        self.assertEqual(set(metalres), {'CYS97', 'CYS100', 'CYS103', 'CYS111'})
        # Zn atom with tetrahedral geometry (coordination number 4)
        self.assertEqual(s.metal_complexes[0].coordination_num, 4)
        self.assertEqual(s.metal_complexes[0].geometry, 'tetrahedral')
Esempio n. 22
0
 def test_1osn(self):
     """Binding of VZV-tk to BVDU-MP (2reg)
     Reference: Bird et al. Crystal structures of Varicella Zoster Virus Thyrimidine Kinase. (2003)
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/1osn.pdb')
     bsid = 'BVP:A:500'
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # Sandwiched pi-stacking involving Phe93 and Phe139
     pistackres = {pistack.resnr for pistack in s.pistacking}
     self.assertTrue({93, 139}.issubset(pistackres))
     # Hydrogen bonding of Gln90
     hbonds = {hbond.resnr for hbond in s.hbonds_pdon}
     self.assertTrue({90}.issubset(hbonds))
Esempio n. 23
0
    def test_1vfy(self):
        """Phosphatidylinositol-3-phosphate binding FYVE domain of VPS27P protein (1vfy)
        Reference: Harding. The architecture of metal coordination groups in proteins. (2004), Fig. 5
        """

        tmpmol = PDBComplex()
        tmpmol.load_pdb('./pdb/1vfy.pdb')
        bsid = 'ZN:A:300'
        for ligand in tmpmol.ligands:
            if ':'.join([ligand.hetid, ligand.chain, str(ligand.position)]) == bsid:
                tmpmol.characterize_complex(ligand)
        s = tmpmol.interaction_sets[bsid]
        # Coordination by four cysteines
        metalres = [mres.restype for mres in s.metal_complexes]
        self.assertEqual(set(metalres), {'CYS'})
        # Zn atom with tetrahedral geometry (coordination number 4)
        self.assertEqual(s.metal_complexes[0].coordination_num, 4)
        self.assertEqual(s.metal_complexes[0].geometry, 'tetrahedral')
Esempio n. 24
0
 def test_2reg(self):
     """Binding of choline to ChoX (2reg)
     Reference: Oswald et al. Crystal structures of the choline/acetylcholine substrate-binding protein ChoX
     from Sinorhizobium meliloti in the liganded and unliganded-closed states. (2008)
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/2reg.pdb')
     bsid = 'CHT:A:1'
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # Cation-pi interactions with Trp43, Trp90, Trp205, and Tyr119
     picat = {pication.resnr for pication in s.pication_paro}
     self.assertEqual({43, 90, 205, 119}, picat)
     # Saltbridge to Asp45
     saltb = {saltbridge.resnr for saltbridge in s.saltbridge_pneg}
     self.assertEqual({45}, saltb)
Esempio n. 25
0
 def test_2efj(self):
     """Binding of teobromine to 1,7 dimethylxanthine methyltransferase(2efj)
     Reference:  McCarthy et al. The Structure of Two N-Methyltransferases from the Caffeine Biosynthetic
     Pathway.(2007)
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/2efj.pdb')
     bsid = '37T:A:502'
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # Hydrogen bond to Ser237
     hbonds = {hbond.resnr for hbond in s.hbonds_pdon}
     self.assertTrue({237}.issubset(hbonds))
     # pi-stacking interaction with Tyr157
     pistackres = {pistack.resnr for pistack in s.pistacking}
     self.assertTrue({157}.issubset(pistackres))
Esempio n. 26
0
 def test_4pjt(self):
     """Binding of BMN 673 to catPARP1(4pj7)
     Reference:  Aoyagi-Scharber et al. Structural basis for the inhibition of poly(ADP-ribose) polymerases 1 and 2 by BMN
     673, a potent inhibitor derived from dihydropyridophthalazinone.(2014)
     """
     tmpmol = PDBComplex()
     tmpmol.load_pdb('./pdb/4pjt.pdb')
     bsid = '2YQ:D:1104'
     for ligand in tmpmol.ligands:
         if ':'.join([ligand.hetid, ligand.chain,
                      str(ligand.position)]) == bsid:
             tmpmol.characterize_complex(ligand)
     s = tmpmol.interaction_sets[bsid]
     # Hydrogen bonds to Gly863
     hbonds = {hbond.resnr for hbond in s.hbonds_pdon}
     self.assertTrue({863}.issubset(hbonds))
     # pi-stacking interaction with Tyr889 and Tyr907
     pistackres = {pistack.resnr for pistack in s.pistacking}
     self.assertTrue({889, 907}.issubset(pistackres))
Esempio n. 27
0
    def test_2q8q(self):
        """Crystal Structure of S. aureus IsdE complexed with heme (2q8q)
        Reference: Grigg et al. Heme coordination by Staphylococcus aureus IsdE. (2007)
        """

        tmpmol = PDBComplex()
        tmpmol.load_pdb('./pdb/2q8q.pdb')
        bsid = 'HEM:A:300'
        for ligand in tmpmol.ligands:
            if ':'.join([ligand.hetid, ligand.chain, str(ligand.position)]) == bsid:
                tmpmol.characterize_complex(ligand)
        s = tmpmol.interaction_sets[bsid]
        # Coordination by four nitrogens of heme itself and one additional histidine from the protein
        metalres = [mres.restype for mres in s.metal_complexes]
        self.assertEqual(metalres.count('HEM'), 4)
        self.assertEqual(metalres.count('HIS'), 1)
        # Fe atom with square pyramidal geometry (coordination number 5)
        self.assertEqual(s.metal_complexes[0].coordination_num, 5)
        self.assertEqual(s.metal_complexes[0].geometry, 'square.pyramidal')
Esempio n. 28
0
    def test_1rmd(self):
        """Zinc binding sites in RAG1 dimerization domain (1rmd)
        Reference: Harding. The architecture of metal coordination groups in proteins. (2004), Fig. 1a
        """

        tmpmol = PDBComplex()
        tmpmol.load_pdb('./pdb/1rmd.pdb')
        bsid = 'ZN:A:119'
        for ligand in tmpmol.ligands:
            if ':'.join([ligand.hetid, ligand.chain, str(ligand.position)]) == bsid:
                tmpmol.characterize_complex(ligand)
        s = tmpmol.interaction_sets[bsid]
        # Coordination by three cysteines and one histidine of the protein
        metalres = [mres.restype for mres in s.metal_complexes]
        self.assertEqual(metalres.count('CYS'), 3)
        self.assertEqual(metalres.count('HIS'), 1)
        # Zn atom with tetrahedral geometry (coordination number 4)
        self.assertEqual(s.metal_complexes[0].coordination_num, 4)
        self.assertEqual(s.metal_complexes[0].geometry, 'tetrahedral')
Esempio n. 29
0
def calculate_interactions(pdb_filepath):
    """
    Calculate protein-ligand interactions in a PDB file.

    Parameters
    ----------
    pdb_filepath : str or pathlib.Path
        Filepath of the PDB file containing the protein-ligand complex.

    Returns
    -------
    dict of dict
        Dictionary of all different interaction data for all detected ligands.
        - The keys of first dictionary correspond to the ligand-IDs of detected ligands in the
          PDB file.
        - The keys of each sub-dictionary correspond to interaction types, as defined in
          `PLIP.Consts.InteractionTypes`.
    """
    protein_ligand_complex = PDBComplex()
    protein_ligand_complex.load_pdb(str(Path(pdb_filepath).with_suffix(".pdb")))

    for ligand in protein_ligand_complex.ligands:
        protein_ligand_complex.characterize_complex(ligand)

    all_ligands_interactions = {}

    for ligand, ligand_binding_site in sorted(protein_ligand_complex.interaction_sets.items()):

        interaction_object = BindingSiteReport(
            ligand_binding_site
        )  # collect data about interactions

        interaction_data = {
            interaction_type.value: (
                [getattr(interaction_object, f"{interaction_type.value}_features")]
                + getattr(interaction_object, f"{interaction_type.value}_info")
            )
            for interaction_type in Consts.InteractionTypes
        }

        all_ligands_interactions[ligand] = interaction_data

    return all_ligands_interactions
Esempio n. 30
0
    def test_visualization(self) -> None:

        pdb_file = './pdb/2ndo.pdb'
        binding_site_id = 'SFQ:A:201'
        config.PYMOL = True
        config.MODEL = 2
        config.OUTPATH = str(self.tmp_dir)
        pdb_complex = PDBComplex()
        pdb_complex.load_pdb(pdb_file)
        for ligand in pdb_complex.ligands:
            if ':'.join([ligand.hetid, ligand.chain,
                         str(ligand.position)]) == binding_site_id:
                pdb_complex.characterize_complex(ligand)
        visualizer_complexes = [
            VisualizerData(pdb_complex, site)
            for site in sorted(pdb_complex.interaction_sets)
            if not len(pdb_complex.interaction_sets[site].interacting_res) == 0
        ]
        visualize_in_pymol(visualizer_complexes[0])
        self.assertEqual(1, len(os.listdir(self.tmp_dir)))