[PyMOL] Concurrency in pymol

2020-07-10 Thread achatz
Hello, I need to call functions like cmd.get_area() or cmd.centerofmass() with a lot of different selection macros selecting residues. As this is quite slow I wanted to ask if it is possible to call these functions concurrently. A first test with concurrent.futures.ThreadPoolExecutor seemded to

Re: [PyMOL] How to count the number of molecules in a selection?

2020-07-10 Thread Pedro Lacerda
Thank you! Em qui., 9 de jul. de 2020 às 18:40, Thomas Holder < thomas.hol...@schrodinger.com> escreveu: > @cmd.extend > def count_molecules(selection="all", quiet=0): > tmpsele = cmd.get_unused_name("_tmp") > count = 0 > if cmd.select(tmpsele, selection): > count += 1 >

[PyMOL] Question about python command in PyMOL

2020-07-10 Thread Hrutvik Bhavsar
Hello, My name is Vik, I'm writing a python script that allows a user to input a TSV (tab-separated value) file of PDB's which then edits them. I'm now trying to change the code so that it can run directly in PyMOL instead of having to run this python script and PyMOL separately. I'm having troubl