Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why I can not convert amino acid using pymol? #305

Open
JonasLi-19 opened this issue Aug 22, 2023 · 6 comments
Open

Why I can not convert amino acid using pymol? #305

JonasLi-19 opened this issue Aug 22, 2023 · 6 comments

Comments

@JonasLi-19
Copy link

JonasLi-19 commented Aug 22, 2023

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:

 Selector: selection "res" defined with 14 atoms.
PyMOL>cmd.get_wizard().set_mode('LEU')
PyMOL>cmd.get_wizard().apply()
PyMOL>select res, 1aaq_protein and chain B and resi 98
 Selector: selection "res" defined with 14 atoms.
PyMOL>cmd.get_wizard().set_mode('LEU')
PyMOL>cmd.get_wizard().apply()
@JonasLi-19 JonasLi-19 changed the title Why I cannot mutate specific amino? Why I can not mutate specific amino acid in python using pymol cmd? Aug 22, 2023
@JonasLi-19
Copy link
Author

JonasLi-19 commented Aug 22, 2023

Any suggestions?

@speleo3
Copy link
Contributor

speleo3 commented Aug 22, 2023

Before cmd.get_wizard().apply(), add this:

cmd.get_wizard().do_select("res")

@speleo3
Copy link
Contributor

speleo3 commented Aug 22, 2023

You could also use psico.modelling.mutate_all.

psico.modelling.mutate_all(f"{base_name} and resn ASN+GLN", "LEU")

@SanFran-Me
Copy link

SanFran-Me commented Aug 31, 2023

I find pymol might turn ASP into VAL or ALA using this code, but I set as ASP→LEU, why?

@JonasLi-19 JonasLi-19 changed the title Why I can not mutate specific amino acid in python using pymol cmd? Why I can not convert amino acid using pymol? Sep 1, 2023
@JonasLi-19
Copy link
Author

JonasLi-19 commented Sep 1, 2023

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()

@JonasLi-19
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants