measuring distance between two beta sheets in pymol

111 views Asked by At

how to measure distance between two beta sheet in pymol?

i have tried below commands:

color skyblue, ss s
select sheet1, resid 1-10
select sheet2, resid 20-30
distance dist, sheet1, sheet2, mode=4 

But i got distance between centroid distance.

is there other option to calculate distances between two sheets in pymol?

1

There are 1 answers

0
pippo1980 On

this is not an answer, just trying to figure out the question better. To help people to answer. Using this .pdb file 6e5c.pdb , https://www.rcsb.org/structure/6e5c

with this code:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import pymol

from Centroid import centroid

import math

from pymol import (   
                    cmd ,
                    stored,
                    cgo
                    )

print('########## PYMOL VERSION ##########################################')
print('         ',  cmd.get_version() )
print('###################################################################')

pymol.finish_launching()

cmd.set('internal_gui_width' ,  '500')

# cmd.load('6e5c_mod_01_purged.pdb' , '6e5c')

cmd.fetch('6e5c' ,  '6e5c' , state = 0 , quiet = 0, async_ = 0)

cmd.color('green' , '6e5c')

cmd.select('1st' , 'resi 2-8+71-77+23-28+46-52')

cmd.select('2nd', 'resi 13-18+59-65+32-36+39-43')

cmd.color('red' , '1st')

cmd.color('blue' , '2nd')

cmd.distance('dist' , '1st' , '2nd' , mode = 4)

cmd.centroid= centroid

print("n\ncmd.centroid('1st' , center = 0) : ", cmd.centroid('1st' , center = 0),'\n\n')

centroid_1st = cmd.centroid('1st' , center = 0)

print("n\ncmd.centroid('2snd' , center = 0) : ", cmd.centroid('2nd' , center = 0),'\n\n')

centroid_2nd = cmd.centroid('2nd' , center = 0)

red_sphere = [cgo.COLOR, 1, 1, 0, cgo.SPHERE, centroid_1st[0] , centroid_1st[1] , centroid_1st[2] , 1]

blue_sphere = [cgo.COLOR, 1, 1, 0, cgo.SPHERE, centroid_2nd[0] , centroid_2nd[1] , centroid_2nd[2] , 1]

cmd.load_cgo(red_sphere, 'red_sphere')

cmd.load_cgo(blue_sphere, 'blue_sphere')

cmd.zoom()

I got this results using : cmd.distance('dist' , '1st' , '2nd' , mode = 4)

that is according to https://pymolwiki.org/index.php/Distance :

4: distance between centroids (new in 1.8.2) .

On a side note https://pymol.org/pymol-command-ref.html#distance reports up to 8 different modes , not sure there are still usable , please point me toward the most recent and better updated command references.

enter image description here

the two yellow spheres represent the centroidhttps://pymolwiki.org/index.php/Centroid , obtained by script centroid.py https://raw.githubusercontent.com/Pymol-Scripts/Pymol-script-repo/master/centroid.py [not sure why centroid command is not in the API since it is used by cmd.distance . cmd.centroid gives AttributeError: module 'pymol.cmd' has no attribute 'centroid'].

I selected the two beta-sheets residues by hands, getting worst result than the question color skyblue, ss s , nevetheless I am wondering about how else I could figure out a measure of distance , between the two sheets:

some form of averaged/weighted distances between some of the resi involved ?? I'll try to ggole for it. Tried to calculate the volume between the two B-sheets as difference between the volumes of the entire protein minus the volumes of the single B-sheet halves of the protein but got negative value, need to think more about this approach, I'll try other ways like surfaces between ghe two