Open JonasLi-19 opened 1 year ago
Any suggestions?
Before cmd.get_wizard().apply()
, add this:
cmd.get_wizard().do_select("res")
You could also use psico.modelling.mutate_all.
psico.modelling.mutate_all(f"{base_name} and resn ASN+GLN", "LEU")
I find pymol might turn ASP into VAL or ALA using this code, but I set as ASP→LEU, why?
Thanks for your constructive suggestions, and I have a little detailed question about mutation process of pymol to ask you.
When pymol executes the mutation using
mut_dict = {...}
...
cmd.do(f'select ...')
cmd.do(f"cmd.get_wizard().set_mode('{...}')")
cmd.do('...')
...
HOW DOES IT AVOID SPACIAL STRUCTURE CLASHES? I have noticed that it has something to do with rotamers for one specific amino acid.
PyMOL>select res, 3zze_pocket and chain A and resi 1235
Selector: selection "res" defined with 14 atoms.
PyMOL>cmd.get_wizard().set_mode('PHE')
PyMOL>cmd.get_wizard().do_select("res")
Selected!
ExecutiveRMSPairs: RMSD = 0.016 (4 to 4 atoms)
Mutagenesis: no phi/psi, using backbone-independent rotamers.
Mutagenesis: 6 rotamers loaded.
Rotamer 2/6, strain=56.35
PyMOL>cmd.get_wizard().apply()
PyMOL>select res, 3zze_pocket and chain A and resi 1235
Selector: selection "res" defined with 20 atoms.
PyMOL>cmd.get_wizard().set_mode('PHE')
PyMOL>cmd.get_wizard().do_select("res")
Selected!
ExecutiveRMSPairs: RMSD = 0.000 (4 to 4 atoms)
Mutagenesis: no phi/psi, using backbone-independent rotamers.
Mutagenesis: 6 rotamers loaded.
Rotamer 2/6, strain=56.31
PyMOL>cmd.get_wizard().apply()
PyMOL>select res, 3zze_pocket and chain A and resi 1235
Selector: selection "res" defined with 20 atoms.
PyMOL>cmd.get_wizard().set_mode('PHE')
PyMOL>cmd.get_wizard().do_select("res")
Selected!
ExecutiveRMSPairs: RMSD = 0.000 (4 to 4 atoms)
Mutagenesis: no phi/psi, using backbone-independent rotamers.
Mutagenesis: 6 rotamers loaded.
Rotamer 2/6, strain=56.31
PyMOL>cmd.get_wizard().apply()
PyMOL>select res, 3zze_pocket and chain A and resi 1235
Selector: selection "res" defined with 20 atoms.
PyMOL>cmd.get_wizard().set_mode('PHE')
PyMOL>cmd.get_wizard().do_select("res")
Selected!
ExecutiveRMSPairs: RMSD = 0.000 (4 to 4 atoms)
Mutagenesis: no phi/psi, using backbone-independent rotamers.
Mutagenesis: 6 rotamers loaded.
Rotamer 2/6, strain=56.31
PyMOL>cmd.get_wizard().apply()
PyMOL>select res, 3zze_pocket and chain A and resi 1235
Selector: selection "res" defined with 20 atoms.
PyMOL>cmd.get_wizard().set_mode('PHE')
PyMOL>cmd.get_wizard().do_select("res")
Selected!
ExecutiveRMSPairs: RMSD = 0.000 (4 to 4 atoms)
Mutagenesis: no phi/psi, using backbone-independent rotamers.
Mutagenesis: 6 rotamers loaded.
Rotamer 2/6, strain=56.31
PyMOL>cmd.get_wizard().apply()
PyMOL>select res, 3zze_pocket and chain A and resi 1235
Selector: selection "res" defined with 20 atoms.
PyMOL>cmd.get_wizard().set_mode('PHE')
PyMOL>cmd.get_wizard().do_select("res")
Selected!
ExecutiveRMSPairs: RMSD = 0.000 (4 to 4 atoms)
Mutagenesis: no phi/psi, using backbone-independent rotamers.
Mutagenesis: 6 rotamers loaded.
Rotamer 2/6, strain=56.31
PyMOL>cmd.get_wizard().apply()
PyMOL>select res, 3zze_pocket and chain A and resi 1235
Selector: selection "res" defined with 20 atoms.
PyMOL>cmd.get_wizard().set_mode('PHE')
PyMOL>cmd.get_wizard().do_select("res")
Selected!
ExecutiveRMSPairs: RMSD = 0.000 (4 to 4 atoms)
Mutagenesis: no phi/psi, using backbone-independent rotamers.
Mutagenesis: 6 rotamers loaded.
Rotamer 2/6, strain=56.31
PyMOL>cmd.get_wizard().apply()
PyMOL>select res, 3zze_pocket and chain A and resi 1235
Selector: selection "res" defined with 20 atoms.
PyMOL>cmd.get_wizard().set_mode('PHE')
PyMOL>cmd.get_wizard().do_select("res")
Selected!
ExecutiveRMSPairs: RMSD = 0.000 (4 to 4 atoms)
Mutagenesis: no phi/psi, using backbone-independent rotamers.
Mutagenesis: 6 rotamers loaded.
Rotamer 2/6, strain=56.31
PyMOL>cmd.get_wizard().apply()
PyMOL>select res, 3zze_pocket and chain A and resi 1235
Selector: selection "res" defined with 20 atoms.
PyMOL>cmd.get_wizard().set_mode('PHE')
PyMOL>cmd.get_wizard().do_select("res")
Selected!
ExecutiveRMSPairs: RMSD = 0.000 (4 to 4 atoms)
Mutagenesis: no phi/psi, using backbone-independent rotamers.
Mutagenesis: 6 rotamers loaded.
Rotamer 2/6, strain=56.31
PyMOL>cmd.get_wizard().apply()
PyMOL>select res, 3zze_pocket and chain A and resi 1235
Selector: selection "res" defined with 20 atoms.
PyMOL>cmd.get_wizard().set_mode('PHE')
PyMOL>cmd.get_wizard().do_select("res")
Selected!
ExecutiveRMSPairs: RMSD = 0.000 (4 to 4 atoms)
Mutagenesis: no phi/psi, using backbone-independent rotamers.
Mutagenesis: 6 rotamers loaded.
Rotamer 2/6, strain=56.31
PyMOL>cmd.get_wizard().apply()
PyMOL>select res, 3zze_pocket and chain A and resi 1235
Selector: selection "res" defined with 20 atoms.
PyMOL>cmd.get_wizard().set_mode('PHE')
PyMOL>cmd.get_wizard().do_select("res")
Selected!
ExecutiveRMSPairs: RMSD = 0.000 (4 to 4 atoms)
Mutagenesis: no phi/psi, using backbone-independent rotamers.
Mutagenesis: 6 rotamers loaded.
Rotamer 2/6, strain=56.31
PyMOL>cmd.get_wizard().apply()
PyMOL>select res, 3zze_pocket and chain A and resi 1235
Selector: selection "res" defined with 20 atoms.
PyMOL>cmd.get_wizard().set_mode('PHE')
PyMOL>cmd.get_wizard().do_select("res")
Selected!
ExecutiveRMSPairs: RMSD = 0.000 (4 to 4 atoms)
Mutagenesis: no phi/psi, using backbone-independent rotamers.
Mutagenesis: 6 rotamers loaded.
Rotamer 2/6, strain=56.31
PyMOL>cmd.get_wizard().apply()
I find pymol might turn ASP into VAL or ALA using this code, but I set as ASP→LEU, why?
I also find a few residues did not convert as I want, and do not know why.
Dear developer, I want to mutate all GLN&ASN to LEU of protein files to do some further research, but EVEN THOUGH the python scripts runs well without error, the output file still have all the GLN&ASN left.
AND the command terminal code output is like: