I need to process a lot of proteins (around 100) and part of that processing requires pymol. Since for each protein I load up to 20 PDBs I decided to write a python script that runs pymol and then closes it (to free memory space) but every time I try to close pymol it freezes, no matter how I try to close it (using pymol.cmd.quit(), manually or even using pyautogui and pressing Alt+F4). If I use the command line to run pymol I don't have any problem, but if I use python the freeze happens, does anyone have any suggestion?
I'm using both Win10 and Debian 9. In both cases pymol 2.4.1 and it is installed in a conda environment
A sample of the script:
import pymol pymol.finish_launching() pymol.cmd.quit()