Re: [PyMOL] Running pymol without launching window in batch

2025-01-12 Thread Saurabh Gayali
Apart from others' reply, I believe pymol will run .pml files while python will run .py files. Regards, Saurabh Gayali -- *Saurabh Gayali* Business Analyst [Excelra], Former Research Scientist [IGIB] saurabh.gay...@gmail.com / +91 8800412916 Bang

Re: [PyMOL] Running pymol without launching window in batch

2025-01-06 Thread Gruber, Karl (karl.gru...@uni-graz.at)
Dear Yarrow, The problem in your script is the `if __name__ == "__main__"` clause. When the script is run using `pymol -cqk test.py`, __name__ refers to the string "pymol". The following script fetches a structure from the PDB and saves a PNG image. Run it using `pymol -cqk test.py -- `. (The

Re: [PyMOL] Running pymol without launching window in batch

2025-01-06 Thread Florian Nachon
Hello, It is much easier than that. Make a pymol script, for example, test.pml: # load 3gbn.pdb select Selection1, resi 80:115 save Selection1.cif, Selection1 quit # then run it with the -c option : pymol test.pml -c If you want to pass an argument, like the filename of a pdb file to be dire

[PyMOL] Running pymol without launching window in batch

2024-12-09 Thread Yarrow Madrona
I'm trying to run pymol in batch mode without launching the window. I am running PyMOL 3.1.1. Here is my code for an example script (test.py). I'm trying to run before running the real script. In the command line I enter: pymol -cq test.py from pymol import cmd import time def main(): print("St