Question: Pymol - trouble saving images.
0
gravatar for Bioaln
3.1 years ago by
Bioaln300
France
Bioaln300 wrote:

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.

export png pymol • 1.0k views
ADD COMMENTlink written 3.1 years ago by Bioaln300
0
gravatar for Bioaln
3.1 years ago by
Bioaln300
France
Bioaln300 wrote:

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

ADD COMMENTlink written 3.1 years ago by Bioaln300

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

ADD REPLYlink written 3.1 years ago by Sukhdeep Singh9.7k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1136 users visited in the last hour