Пример #1
0
 def test_run_residues(self, fp_class):
     fp_class.run(u.trajectory[0:1],
                  ligand_ag,
                  protein_ag,
                  residues="all",
                  progress=False)
     lig_id = ResidueId.from_string("LIG1.G")
     assert hasattr(fp_class, "ifp")
     assert len(fp_class.ifp) == 1
     res = ResidueId.from_string("LYS387.B")
     assert (lig_id, res) in fp_class.ifp[0].keys()
     fp_class.run(u.trajectory[1:2],
                  ligand_ag,
                  protein_ag,
                  residues=["ASP129.A"],
                  progress=False)
     assert hasattr(fp_class, "ifp")
     assert len(fp_class.ifp) == 1
     res = ResidueId.from_string("ASP129.A")
     assert (lig_id, res) in fp_class.ifp[0].keys()
     fp_class.run(u.trajectory[:3],
                  ligand_ag,
                  protein_ag,
                  residues=None,
                  progress=False)
     assert hasattr(fp_class, "ifp")
     assert len(fp_class.ifp) == 3
     assert len(fp_class.ifp[0]) > 1
     res = ResidueId.from_string("VAL201.A")
     assert (lig_id, res) in fp_class.ifp[0].keys()
     u.trajectory[0]
Пример #2
0
def test_pocket_residues():
    resids = get_residues_near_ligand(ligand_mol, protein_mol)
    residues = [
        "TYR38.A", "TYR40.A", "GLN41.A", "VAL102.A", "SER106.A", "TYR109.A",
        "THR110.A", "TRP115.A", "TRP125.A", "LEU126.A", "ASP129.A", "ILE130.A",
        "THR131.A", "CYS133.A", "THR134.A", "ILE137.A", "ILE180.A", "GLU198.A",
        "CYS199.A", "VAL200.A", "VAL201.A", "ASN202.A", "THR203.A", "TYR208.A",
        "THR209.A", "VAL210.A", "TYR211.A", "SER212.A", "THR213.A", "VAL214.A",
        "GLY215.A", "ALA216.A", "PHE217.A", "TRP327.B", "PHE330.B", "PHE331.B",
        "ILE333.B", "SER334.B", "LEU335.B", "MET337.B", "PRO338.B", "LEU348.B",
        "ALA349.B", "ILE350.B", "PHE351.B", "ASP352.B", "PHE353.B", "PHE354.B",
        "THR355.B", "TRP356.B", "GLY358.B", "TYR359.B"
    ]
    for res in residues:
        r = ResidueId.from_string(res)
        assert r in resids
Пример #3
0
 def test_repr(self, resid_str):
     resid = ResidueId.from_string(resid_str)
     expected = f"ResidueId({resid.name}, {resid.number}, {resid.chain})"
     assert repr(resid) == expected
Пример #4
0
 def test_lt(self, res1, res2):
     res1 = ResidueId.from_string(res1)
     res2 = ResidueId.from_string(res2)
     assert res1 < res2
Пример #5
0
 def test_string_methods(self, resid_str, expected):
     resid = ResidueId.from_string(resid_str)
     assert resid == ResidueId(*expected)
     assert str(resid) == resid_str
Пример #6
0
 def test_from_string(self, resid_str, expected):
     resid = ResidueId.from_string(resid_str)
     assert resid == ResidueId(*expected)