Skip to main content

IPyMOL allows you to control PyMOL sessions via IPython.

Project description

IPyMOL allows you to control PyMOL sessions via IPython. This tool is ideal for situations where you’d like to present your work neatly in a Jupyter Notebook or conveniently prototype PyMOL scripts.

Before You Begin

Please ensure that PyMOL is in your $PATH as pymol or you can start PyMOL in server mode:

$ pymol -R #-cKRQ to run it without a GUI

Installation

pip install ipymol

Example Usage

You can fire up an IPython or IPython Notebook session and start using IPyMOL. For example:

from ipymol import viewer as pymol
pymol.start()   # Start PyMOL RPC server
pymol.do('fetch 3odu; as cartoon; bg white')
pymol.show()

This series of commands will define a variable pymol of class MolViewer, which can pass commands to PyMOL, and then create an image of PDBID:3odu in your IPython session. Any additional commands can be invoked via pymol.do("[ENTER YOUR COMMAND HERE]").

Here’s an additional example.

Enjoy!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipymol-0.3.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file ipymol-0.3.tar.gz.

File metadata

  • Download URL: ipymol-0.3.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ipymol-0.3.tar.gz
Algorithm Hash digest
SHA256 bee56c98203cfbdb5d813aa4a43130fb03d391f5d3980c2d8aaf910aba189bc1
MD5 5cca66e1ec3596bb7bda071483d9f152
BLAKE2b-256 52e0f7d7e75e797990c3f19d545aae63b9556b0c0abd6d11ee943cffbb0210e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page