Skip to Content
Bioinformatics with Python Cookbook - Second Edition
book

Bioinformatics with Python Cookbook - Second Edition

by Tiago Antao
November 2018
Intermediate to advanced
360 pages
9h 36m
English
Packt Publishing
Content preview from Bioinformatics with Python Cookbook - Second Edition

How to do it...

Take a look at the following steps:

  1. Let's initialize and retrieve our PDB model and prepare the rendering, as follows:
import pymolfrom pymol import cmd#pymol.pymol_argv = ['pymol', '-qc'] # Quiet / no GUIpymol.finish_launching()cmd.fetch('1TUP', async=False)cmd.disable('all')cmd.enable('1TUP')cmd.hide('all')cmd.show('sphere', 'name zn')

Note that the pymol_argv line makes the code silent. In your first execution, you may want to comment this out and see the user interface.

For movie rendering, this will come in handy (as we will see soon). As a library, PyMOL is quite tricky to use. For instance, after the import, you have to call finish_launching. We then fetch our PDB file.

What then follows is a set of PyMOL commands. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Bioinformatics with Python Cookbook

Bioinformatics with Python Cookbook

Tiago Antao

Publisher Resources

ISBN: 9781789344691Supplemental Content