Pymol Not Outputting Images Correctly
0
0
Entering edit mode
10.1 years ago

I am trying to draw a protein structure from a pdb file using pymol.

However, when I try to run the script below, a pymol window opens but it is just pitch black. Also, bizarrely, the pdb file is outputted to the shell.

Here is my code:

bioservices_pdb_obj = PDB()
pdb_file = bioservices_pdb_obj.getFile(results[str(Brick.part_attrib(self,'uniprot_id'))][detail-1],'pdb')
pdb_name = str(Brick.part_attrib(self,'uniprot_id'))
pymol.finish_launching()                
pymol.cmd.load(pdb_file, pdb_name)
pymol.cmd.disable("all")
pymol.cmd.enable(pdb_name)
pymol.cmd.png("my_pdb.png")
pymol.cmd.quit()

Does anyone know what is going on here?

The .png file 'my_pdb' is dumped into the working directory, but that's just black as well.

pymol python pdb protein • 2.9k views
ADD COMMENT
0
Entering edit mode

That does not look like native pymol code. Where does the PDB() object come from? You do know that pymol has a built-in command for fetching files from PDB, right?

ADD REPLY

Login before adding your answer.

Traffic: 3953 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6