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.