Re: [PyMOL] Batch processing

2015-06-08 Thread Shane Caldwell
Hi Praz, I use a bit of a different script than you for this (I don't use any movie commands, just moving camera and writing the png), so I'll just cut out the relevant part below. It may need some tweaking to work in your script. In this case I had previously defined molname and chainid so that

Re: [PyMOL] Batch processing

2015-06-08 Thread Praz Nina
Great, perfect now, completely re-done my script in this way, works as a charm! Thanks again! I would also like to know if it is possible to render multiple .pngs from one .pdb? For example, in my old script I have a full circle rotation across 450 frames: mset 1, 450 util.mroll 1, 450, 1 set ray

Re: [PyMOL] Batch processing

2015-06-08 Thread Osvaldo Martin
Glad is working! Since the script is a Python script (not a PyMOL script) you should be using the PyMOL API syntax. For example: - “set light_count,8” becomes cmd.set(“light_count”, “8”) - “load filename” becomes cmd.load(“filename”) I hope it helps. Cheers, Osvaldo. On Mon, Jun 8, 2015 a

Re: [PyMOL] Batch processing

2015-06-08 Thread Praz Nina
Thanks Osvaldo, now it works perfectly. I even managed to figured out how to load sdf files instead of pdb. One question - in the code where there is ### insert your code here ###, I paste my PyMol settings, but I get an "invalid syntax" error. For example, I put "set light_count,8" and that resul

Re: [PyMOL] Batch processing

2015-06-08 Thread Osvaldo Martin
Hi Praz, Sorry. Please use this new version of the script. import __main__ __main__.pymol_argv = ['pymol','-qc'] import pymol from pymol import cmd pymol.finish_launching() import glob import os path = os.path.dirname(pymol.__script__) cmd.delete('all') pdb_files = glob.glob(os.path.join(path,

Re: [PyMOL] Batch processing

2015-06-08 Thread Praz Nina
Thank you Osvaldo. However, as a beginner, I am having problems with getting this to work. I pasted your script in a file (script.txt) and placed it in the same folder where the pdb files are. Then I ran PyMol and typed "run c:\somefolder\script.txt", but I all get is a black screen and no .png fi

Re: [PyMOL] Batch processing

2015-06-05 Thread Osvaldo Martin
Hi Praz, When I want to process several files, do complex or repetitive tasks I prefer to write a Python script and access the PyMOL functions using the PyMOL API, as in the code below. This example will upload all the pdb files in the folder where the script is located, one file at a time, save

[PyMOL] Batch processing

2015-06-05 Thread Praz Nina
Hi all, I'm a beginner at PyMol, but I'm wondering if a batch action like this would be possible: If I have a bunch of .sdf and .pdb files in a folder, and I want to apply a specific "look" to all of them (I've written the parameters regarding light, field of view etc.), is it possible to batch pr