Connect with us

Software

How to save high resolution images in Pymol using command line?

Published

on

How to save high resolution images in Pymol using command line?

Previously, we have provided a tutorial on saving good-quality images using Pymol GUI. In this article, we are going to save high-resolution images using the Pymol commands.

Open Pymol by typing Pymol in a terminal or by double-clicking the shortcut or by launching the Pymol app. Now follow the steps explained below.

Opening an input file

Go to File --> Open --> Select an input PDB file.

Setting display

You can set some parameters such as background color, view, and so on. Details are provided in the previous article.

Saving image

You can also ‘draw‘ an image but the resolution will not be high. Therefore, we will use the ‘ray‘ command. But if you want to draw an image anyway then use the following command.

> draw 1600

1600 is the dimension of image, you can set it to any number.

Saving image with transparent background

> set ray_opaque_background, 0

> ray

> png /path/to/folder/ex.png, dpi=1000

For example, you want to save this image in ‘Downloads‘, then

> png /home/user/Downloads/ex.png, dpi=1000

If you are saving on Windows, then remember to use ‘\’ as shown below

> png path\to\folder\ex.png, dpi=1000

Saving image with background color

You can set the background color either by GUI (go to Display –> Background –> White) or by using the following command.

> bg_color white

Define any color in place of ‘white’ in the above command.

Now, let’s save the image with background color.

> set ray_opaque_background, 1

> ray

> png /path/to/folder/ex.png, dpi=1000


References

  1. The PyMOL Molecular Graphics System, Version 1.2r3pre, Schrödinger, LLC.

Tariq is founder of Bioinformatics Review and CEO at IQL Technologies. His areas of expertise include algorithm design, phylogenetics, MicroArray, Plant Systematics, and genome data analysis. If you have questions, reach out to him via his homepage.

Software

AlphaFill- New algorithm to fill ligands in AlphaFold models.

Published

on

AlphaFill- New algorithm to fill ligands in AlphaFold models.

AlphaFold is a popular artificial intelligence based protein prediction tool [1]. Though it predicts good protein structures, it lacks the capability to predict the small molecules present in the structure such as ligands. For this purpose, AlphaFill is introduced by Hekkelman et al.,[2]. (more…)

Continue Reading

Software

How to calculate binding pocket volume using PyVol plugin in PyMol?

Published

on

How to calculate binding pocket volume using PyVol plugin in PyMol?

Previously, we provided a tutorial for PyVol plugin [1] installation. In this article, we will calculate the binding pocket volume of protein using the same plugin in PyMol [2]. (more…)

Continue Reading

Software

How to generate electron density map using Pymol?

Published

on

How to generate electron density map using Pymol?

Electron density maps are available for most of the protein structures in PDB. Therefore, in this article, we are using PDB to generate electron density maps in Pymol.

(more…)

Continue Reading

LATEST ISSUE

ADVERT