Pymol - trouble saving images.
1
0
Entering edit mode
8.1 years ago
Bioaln ▴ 360

Hello. I'm relatively new to PyMol scripting features and I've come across a problem regarding image export.

python
import time
import os
import csv
def get_num(x):
    return float(''.join(ele for ele in x if ele.isdigit()))
with open('combined1.csv') as csvfile:
    for entry in csvfile :
        print(entry)
        print("Fetching sequence..")
        cmd.fetch(entry[0:4])
        time.sleep(3)
        outfile1 = str(entry+'.png')
        print("Plotting!")
        cmd.png(outfile1,ray=1)
        cmd.remove('all')
        print("New molecule!")            
python end

Using this code, I successfully manage to obtain sequences, yet images are not exported. What am I doing wrong? In my csv there are just names of pdb files.

Thanks for any help.

pymol png export • 3.1k views
ADD COMMENT
0
Entering edit mode
8.1 years ago
Bioaln ▴ 360

I managed to save it using mpng, but this question is still open.

ADD COMMENT
0
Entering edit mode

I moved it to an answer, you can accept your own answer, if you think the details are enough!

ADD REPLY

Login before adding your answer.

Traffic: 2346 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