This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to visualize electron density of a specific part of the protein residue?

Hi everyone (moctly who are interested in structural bioinformatics). I face the problem that I cannot plot the electron density of the specific part of my protein. For the whole protein it is not a problem:

from Bio.PDB import *
import nglview as nv
import ipywidgets


pdbl = PDBList()
path = pdbl.retrieve_pdb_file('1FAT')
parser = MMCIFParser()
struct = parser.get_structure("1fat", path)
view = nv.show_biopython(struct)
view

But when I tried to pick up residues from 10 till 109 (res_list = Selection.unfold_entities(struct, "R")[10:109]) and plot I couldn't do that, because for nglview I need to have a special Object. As beein a newbie, I decided to adress this question to specialists.

Thank You in Advance!

electron density biopython structure protein

Probably easier to do the selection with a parser like ProDy.

from Bio.PDB import *
import nglview as nv
import ipywidgets

import prody

#Using  ProDy to get the structure and
#subset residues 10 through 109 from chain A.
struct = prody.parsePDB('1FAT', model = 1)
substruct = struct.select('chain A resnum 10to109')

#Using nglview's show_prody to visualize
#the structure.
view = nv.show_prody(substruct)
view

0 answers

No answers yet.

Log in to answer this question.