Re: [PyMOL] Performance of extended commands vs python function

2019-12-18 Thread Lorenzo Gaifas
Hi Thomas,

I'm not sure I get it. Does that mean that `cmd.sync()` is actually not
doing anything at all if called outside of `cmd.do()`?

Cheers,
Lorenzo

Il giorno mer 18 dic 2019 alle ore 10:49 Thomas Holder <
thomas.hol...@schrodinger.com> ha scritto:

> Hi Lorenzo,
>
> Thanks for the script, and great that you could identify cmd.sync() as the
> culprit. I looked at the code, cmd.do("cmd.sync()") literally blocks itself
> until it times out after 1 second. cmd.do() puts commands in a queue, and
> cmd.sync() tries to ensure that all queued commands have been executed.
> PyMOL calls cmd.sync() in a few places right before capturing an image for
> example.
>
> Not sure how this could be improved. Maybe cmd.sync() should print a
> warning if it times out, that would help to notice a self-lock.
>
> Cheers,
>   Thomas
>
>
> > On Dec 17, 2019, at 11:42 AM, Lorenzo Gaifas  wrote:
> >
> > After playing around with it a bit longer, it's clear that I
> misunderstood. The issue was not with `cmd.alter` nor with `cmd.show_as`,
> but with `cmd.sync`.
> >
> > I was calling many times a smaller function that contained `cmd.sync()`,
> which resulted - it seems - in all these calls piling up.
> >
> > Still, I don't know if it's intended behaviour for `sync` to be so much
> slower if it's called as a pymol function. Attached you will find a minimal
> working example to show the difference.
> >
> >
> > Il giorno lun 16 dic 2019 alle ore 17:52 Thomas Holder <
> thomas.hol...@schrodinger.com> ha scritto:
> > OK thanks. I haven't seen such performance differences before and
> couldn't reproduce it so far. Could you share your script (and data files
> if possible) with me?
> >
> > Thanks,
> >   Thomas
> >
> >
> > > On Dec 16, 2019, at 5:42 PM, Lorenzo Gaifas  wrote:
> > >
> > > Yes, it does. Both cases are with the GUI and ewual graphical
> representation.
> > >
> > > On Mon, Dec 16, 2019, 17:37 Thomas Holder <
> thomas.hol...@schrodinger.com> wrote:
> > > Hi Lorenzo,
> > >
> > > When you say "run from a python script", is that with the graphical
> GUI? That "instant update", does that include instant update of visual
> representations?
> > >
> > > Thanks,
> > >   Thomas
> > >
> > >
> > > > On Dec 13, 2019, at 12:55 PM, Lorenzo Gaifas 
> wrote:
> > > >
> > > > Dear Pymol users,
> > > >
> > > > I just discovered something I did not expect: the same python
> function can have extremely different performance when called as a python
> function or using the pymol api.
> > > >
> > > > To be more specific: I have a function func that (among other
> things) uses cmd.alter several times over a big system to change the
> properties and representation.
> > > >
> > > > If I run it calling func() from a python script, its effects are
> almost instant. If I call it with cmd.do('func') (or directly from within
> pymol with func), it’s extremely slow (up to 10 seconds) and Pymol freezes
> completely during this time.
> > > >
> > > > I expected this to be due to an overhead of the api itself, but when
> I do the same thing with a simpler function, I see no noticeable difference.
> > > >
> > > > Why exactly is this happening? And more importantly, how can I get
> the performance of func even when I call it from within pymol?
> > > >
> > > > Thank you,
> > > > Lorenzo
> > > >
> > > > ___
> > > > PyMOL-users mailing list
> > > > Archives:
> http://www.mail-archive.com/pymol-users@lists.sourceforge.net
> > > > Unsubscribe:
> https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe
> > >
> > > --
> > > Thomas Holder
> > > PyMOL Principal Developer
> > > Schrödinger, Inc.
> > >
> >
> > --
> > Thomas Holder
> > PyMOL Principal Developer
> > Schrödinger, Inc.
> >
> > 
>
> --
> Thomas Holder
> PyMOL Principal Developer
> Schrödinger, Inc.
>
>
___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Re: [PyMOL] Performance of extended commands vs python function

2019-12-17 Thread Lorenzo Gaifas
After playing around with it a bit longer, it's clear that I misunderstood.
The issue was not with `cmd.alter` nor with `cmd.show_as`, but with
`cmd.sync`.

I was calling many times a smaller function that contained `cmd.sync()`,
which resulted - it seems - in all these calls piling up.

Still, I don't know if it's intended behaviour for `sync` to be so much
slower if it's called as a pymol function. Attached you will find a minimal
working example to show the difference.


Il giorno lun 16 dic 2019 alle ore 17:52 Thomas Holder <
thomas.hol...@schrodinger.com> ha scritto:

> OK thanks. I haven't seen such performance differences before and couldn't
> reproduce it so far. Could you share your script (and data files if
> possible) with me?
>
> Thanks,
>   Thomas
>
>
> > On Dec 16, 2019, at 5:42 PM, Lorenzo Gaifas  wrote:
> >
> > Yes, it does. Both cases are with the GUI and ewual graphical
> representation.
> >
> > On Mon, Dec 16, 2019, 17:37 Thomas Holder 
> wrote:
> > Hi Lorenzo,
> >
> > When you say "run from a python script", is that with the graphical GUI?
> That "instant update", does that include instant update of visual
> representations?
> >
> > Thanks,
> >   Thomas
> >
> >
> > > On Dec 13, 2019, at 12:55 PM, Lorenzo Gaifas 
> wrote:
> > >
> > > Dear Pymol users,
> > >
> > > I just discovered something I did not expect: the same python function
> can have extremely different performance when called as a python function
> or using the pymol api.
> > >
> > > To be more specific: I have a function func that (among other things)
> uses cmd.alter several times over a big system to change the properties and
> representation.
> > >
> > > If I run it calling func() from a python script, its effects are
> almost instant. If I call it with cmd.do('func') (or directly from within
> pymol with func), it’s extremely slow (up to 10 seconds) and Pymol freezes
> completely during this time.
> > >
> > > I expected this to be due to an overhead of the api itself, but when I
> do the same thing with a simpler function, I see no noticeable difference.
> > >
> > > Why exactly is this happening? And more importantly, how can I get the
> performance of func even when I call it from within pymol?
> > >
> > > Thank you,
> > > Lorenzo
> > >
> > > ___
> > > PyMOL-users mailing list
> > > Archives:
> http://www.mail-archive.com/pymol-users@lists.sourceforge.net
> > > Unsubscribe:
> https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe
> >
> > --
> > Thomas Holder
> > PyMOL Principal Developer
> > Schrödinger, Inc.
> >
>
> --
> Thomas Holder
> PyMOL Principal Developer
> Schrödinger, Inc.
>
>
#!/usr/bin/env python3

import pymol
from pymol import cmd
import __main__

__main__.pymol_argv = ['pymol']
pymol.finish_launching()


def heavy():
for _ in range(100):
print('things are happening')
cmd.sync()


if __name__ == '__main__':
cmd.extend('heavy', heavy)

# this function takes instants
#heavy()

# this one takes quite long between iterations.
# the same happens when calling 'heavy' from within pymol
#cmd.do('heavy')
___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Re: [PyMOL] Performance of extended commands vs python function

2019-12-16 Thread Lorenzo Gaifas
Yes, it does. Both cases are with the GUI and ewual graphical
representation.

On Mon, Dec 16, 2019, 17:37 Thomas Holder 
wrote:

> Hi Lorenzo,
>
> When you say "run from a python script", is that with the graphical GUI?
> That "instant update", does that include instant update of visual
> representations?
>
> Thanks,
>   Thomas
>
>
> > On Dec 13, 2019, at 12:55 PM, Lorenzo Gaifas  wrote:
> >
> > Dear Pymol users,
> >
> > I just discovered something I did not expect: the same python function
> can have extremely different performance when called as a python function
> or using the pymol api.
> >
> > To be more specific: I have a function func that (among other things)
> uses cmd.alter several times over a big system to change the properties and
> representation.
> >
> > If I run it calling func() from a python script, its effects are almost
> instant. If I call it with cmd.do('func') (or directly from within pymol
> with func), it’s extremely slow (up to 10 seconds) and Pymol freezes
> completely during this time.
> >
> > I expected this to be due to an overhead of the api itself, but when I
> do the same thing with a simpler function, I see no noticeable difference.
> >
> > Why exactly is this happening? And more importantly, how can I get the
> performance of func even when I call it from within pymol?
> >
> > Thank you,
> > Lorenzo
> >
> > ___
> > PyMOL-users mailing list
> > Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
> > Unsubscribe:
> https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe
>
> --
> Thomas Holder
> PyMOL Principal Developer
> Schrödinger, Inc.
>
>
___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

[PyMOL] Performance of extended commands vs python function

2019-12-13 Thread Lorenzo Gaifas
Dear Pymol users,

I just discovered something I did not expect: the same python function can
have extremely different performance when called as a python function or
using the pymol api.

To be more specific: I have a function func that (among other things) uses
cmd.alter several times over a big system to change the properties and
representation.

If I run it calling func() from a python script, its effects are almost
instant. If I call it with cmd.do('func') (or directly from within pymol
with func), it’s extremely slow (up to 10 seconds) and Pymol freezes
completely during this time.

I expected this to be due to an overhead of the api itself, but when I do
the same thing with a simpler function, I see no noticeable difference.

Why exactly is this happening? And more importantly, how can I get the
performance of func even when I call it from within pymol?

Thank you,
Lorenzo
___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Re: [PyMOL] [EXTERNAL] Differentiate between bond types by color and representation

2019-12-11 Thread Lorenzo Gaifas
Hi Blaine,

Yes, that's essentially what I'm doing. My worry is that since this doubles
the amount of coordinates to keep track of, it will be detrimental to how
long a trajectory I can load. Is there any other way to do this?

On Wed, Dec 11, 2019, 16:31 Mooers, Blaine H.M. (HSC) <
blaine-moo...@ouhsc.edu> wrote:

> Hi Lorenzo,
>
> You could make an object out of the elastic bonds with the 'create'
> command, show it as sticks, and use the stick_color setting to color the
> sticks only.
> You could make different objects for different subsets of the elastic
> bonds and color them differently.
>
> Here is an example of the 'create' command that I used to make an object
> out of six coordinate covalent bonds between a sodium, a N7 nitrogen of an
> adenine, and five waters.
>
> cmd.create('coorCov', '(3nd4_0001 and (resi 19 or resi 119 or resi 219 or
> resi 319 or resi 419 or resi 519 or (resi 3 and name N7)))')
> cmd.set('stick_color','magenta','coorCov')
> cmd.show('sticks','coorCov')
>
> The color of the atoms, if shown as spheres, will remain the same.
> Although the above two commands are in the Python form, you can paste them
> onto the top command line in PyMOL.
>
> By specifying the object as your selection in the argument to the set
> command, you can also change the thickness of the sticks in only than
> object so
> you can have sticks of different thickness in the same scene.
>
> Best regards,
>
> Blaine
>
> Blaine Mooers, Ph.D.
> Associate Professor
> Department of Biochemistry and Molecular Biology
> College of Medicine
> University of Oklahoma Health Sciences Center
> S.L. Young Biomedical Research Center (BRC) Rm. 466
> 975 NE 10th Street, BRC 466
> Oklahoma City, OK 73104-5419
>
> 
> From: Lorenzo Gaifas [bris...@gmail.com]
> Sent: Wednesday, December 11, 2019 8:38 AM
> To: pymol-users
> Subject: [EXTERNAL] [PyMOL] Differentiate between bond types by color and
> representation
>
> Dear pymol users,
>
> I'm trying to properly represent a coarse-grained protein model that has
> an elastic network.
>
> I would like to show the bonds that are part of the elastic network with a
> different color (and possibly representation) from the normal bonds between
> atoms. However, as far as I know, color settings are atom-based, so I
> wasn't able to do what I wanted, because all bonds that lead to an atom
> will always share the same color.
>
> The only solution I found was to create a copy of the protein with
> pseudoatoms and draw the elastic network there. However, I expect this has
> a negative effect on the performance, which is relevant since I plan to use
> this for molecular dynamics trajectories.
>
> Am I trying to do this the wrong way? Is it just unfeasible?
>
___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

[PyMOL] Differentiate between bond types by color and representation

2019-12-11 Thread Lorenzo Gaifas
Dear pymol users,

I'm trying to properly represent a coarse-grained protein model that has an
elastic network.

I would like to show the bonds that are part of the elastic network with a
different color (and possibly representation) from the normal bonds between
atoms. However, as far as I know, color settings are atom-based, so I
wasn't able to do what I wanted, because all bonds that lead to an atom
will always share the same color.

The only solution I found was to create a copy of the protein with
pseudoatoms and draw the elastic network there. However, I expect this has
a negative effect on the performance, which is relevant since I plan to use
this for molecular dynamics trajectories.

Am I trying to do this the wrong way? Is it just unfeasible?
___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Re: [PyMOL] PDB post-processing and TER records

2019-06-25 Thread Lorenzo Gaifas
Hi James,

not sure if it's relevant in this case, but you might also want to use
retain_order, to avoid messing up your pdbs.
https://pymolwiki.org/index.php/Retain_order

Cheers,
Lorenzo

Il giorno mar 25 giu 2019 alle ore 16:04 Thomas Holder <
thomas.hol...@schrodinger.com> ha scritto:

> > generally if I integrate a pymol silent script inside my
> > bash script, I do not need to use cmd.* syntax, right?
>
> Correct. The -d argument takes PyMOL commands, like a .pml script. Python
> syntax is optional.
>
> Python syntax (cmd.*) is necessary and most useful if you write a Python
> script (.py extension) and run that with PyMOL. You could write your
> multi-chains loop as a Python script:
>
>  example.py ##
> from pymol import cmd
> pdb = "my.pdb"
> chains_arrays = ["A", "B", "C", "D", "E", "F", "G"]
>
> for chain in chains_array:
> cmd.load(pdb)
> cmd.alter('chain ' + chain, 'chain=""')
> cmd.save('output_' + chain + '.pdb')
> cmd.delete('*')
> ##
>
> Then run it with PyMOL:
> pymol -ckqr example.py
>
> See also:
> https://pymolwiki.org/index.php/Launching_From_a_Script
> https://pymolwiki.org/index.php/Python_Integration
>
> Cheers,
>   Thomas
>
> > On Jun 25, 2019, at 3:08 PM, James Starlight 
> wrote:
> >
> > one extra programming question:
> >
> > imagine now in my pdb I have severals chain which I would like to
> > rename to blank chain.
> >
> > I can do it simply like this
> > # a case for 3 chains to be renamed
> >
> > #!/bin/bash
> > pdb="my.pdb"
> > output=$(pwd)
> > pymol -c -d "
> > cmd.load('${pdb}')
> > cmd.alter('(chain A)', 'chain=\"\"')
> > cmd.alter('(chain B)', 'chain=\"\"')
> > cmd.alter('(chain C)', 'chain=\"\"')
> > cmd.save('${output}/output.pdb','all')
> > "
> >
> > or for multi-chain protein I can alternatively create external loop,
> > thus running pymol 3 times iteratively (which is not good realization)
> > providin array info from external shell session
> >
> > # this example save 7 different pdbs renaming one chain in each of them
> > #!/bin/bash
> > pdb="my.pdb"
> > output=$(pwd)
> > chains_arrays=( A B C D E F G )
> >
> > for i in "$chains_array[@]}"; do
> > pymol -c -d "
> > cmd.load('${pdb}')
> > cmd.alter('(chain $i)', 'chain=\"\"')
> > cmd.save('${output}/output_$i.pdb','all')
> > "
> > done
> >
> > would it be possible rather to make an array and loop inside the pymol
> > to rename all chains into the blank chain during one execution of
> > pymol?
> >
> > Thanks in advance!
> >
> > вт, 25 июн. 2019 г. в 14:50, James Starlight :
> >>
> >> I have got the idea!
> >> thank you so much Thomas!
> >> One question: generally if I integrate a pymol silent script inside my
> >> bash script, I do not need to use cmd.* syntax, right?  In what cases
> >> cmd.* sytax might be usefull?
> >>
> >> Thank you again!
> >>
> >> вт, 25 июн. 2019 г. в 12:05, Thomas Holder <
> thomas.hol...@schrodinger.com>:
> >>>
> >>>
>  On Jun 25, 2019, at 11:48 AM, James Starlight 
> wrote:
> 
>  so what I need is just to update my pymol, keep using the same
> command?
> >>>
> >>> Yes
> >>>
>  P.S.would the following integration of the code into bash script be
>  usefull to remove chains in no gui mode?
> 
>  pymol -cQkd "
>  from pymol import cmd
>  fetch $pdb, type=pdb, tmp
>  cmd.alter('(chain A)',chain='')
>  "
>  I am not sure whether I used here cmd.alter in correct way ..
> >>>
> >>>
> >>> With fetch, use "async=0" or use Python syntax. And keyword arguments
> (type=) must be after positional arguments (tmp).
> >>>
> >>> It's easier if you don't use Python syntax for alter, otherwise you'll
> need three levels of nested quotes, which gets ugly:
> >>>
> >>> pymol -cQkd "
> >>> fetch $pdb, tmp, type=pdb, async=0
> >>> alter (chain A), chain=''
> >>> "
> >>>
> >>> With Python syntax (note the ugly escaping of quotes):
> >>>
> >>> pymol -cQkd "
> >>> cmd.fetch('$pdb', 'tmp', type='pdb')
> >>> cmd.alter('(chain A)', 'chain=\"\"')
> >>> "
> >>>
> >>> Cheers,
> >>>  Thomas
> >>>
> >>> --
> >>> Thomas Holder
> >>> PyMOL Principal Developer
> >>> Schrödinger, Inc.
> >>>
>
> --
> Thomas Holder
> PyMOL Principal Developer
> Schrödinger, Inc.
>
>
>
> ___
> PyMOL-users mailing list
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
> Unsubscribe:
> https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe
___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

[PyMOL] `selection` argument in load_traj

2019-06-25 Thread Lorenzo Gaifas
Dear pymol users,

What is the purpose of the `selection` argument in the `load_traj` command?

My intuition would say that it allows to somehow select which atoms to load
into pymol before the actual loading happens. However, it seems to do
nothing whatsoever. What am I missing?

Thanks,
Lorenzo
___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

[PyMOL] Scripting: printing progress of a slow function

2019-06-16 Thread Lorenzo Gaifas
Dear pymol users,

I'm working on a script that often requires a long time to execute. As I
wait for the underlying issue to be addressed in the upstream repository, I
would like to give the user some sort of a progress bar to let them know
the program did not crash. Unfortunately, pymol seems to freeze completely
every time a function is run, and you can only see the real-time output in
the terminal (only if you actually launched it from a terminal...).

Moreover, the pymol console doesn't seem to accept carriage returns, which
just seem to print new lines as normal.

Did anyone have this problem before? What do you suggest is the best way to
tackle this? Is there a way to un-free pymol while it's crunching numbers?

Thank you,
Lorenzo
___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Re: [PyMOL] [EXTERNAL] Absymal performance when creating large numbers of bonds

2019-05-25 Thread Lorenzo Gaifas
Hi Blaine,

Thanks for your help.
I don't think what you suggest is going to solve the problem. The loop
itself is quite fast, and I don't need to perform anything else in the loop
other than adding those bonds.
I already have a list of tuples [(atom1, atom2), (atom3, atom4)] and all I
need to do is create a bond between each pair. The bottleneck is the bond
function, not the loop itself.

Also, I doubt simply the speed difference between C++ and Python could
explain such a drastic difference (minutes against fractions of a second).
There is clearly a difference in the way the `bond` command is implemented
and the way bonds are generated at startup.

What I think is needed, is either a way for pymol to perform those actions
in parallel (unlikely) or a way to get my hands on the way bonds are
generated at startup and use those functions or at least the same approach.

Thank you,
Lorenzo

Il giorno sab 25 mag 2019 alle ore 16:23 Mooers, Blaine H.M. (HSC) <
blaine-moo...@ouhsc.edu> ha scritto:

> Hi Lorenzo,
>
> You can import numpy  and replace your lists of coordinates with NumPy
> arrays.
> Operations with numpy arrays can be >100 times faster than with lists in
> for loops.
> See the last example the following blog post for inspiration:
>
>
> https://medium.freecodecamp.org/if-you-have-slow-loops-in-python-you-can-fix-it-until-you-cant-3a39e03b6f35
> .
>
> Please recall that PyMOL is collection of C and C++ programs wrapped by
> Python.
> The fast display of bonds inside the viewport is due to C or C++ programs.
>
> Best regards,
>
> Blaine
>
> Blaine Mooers, Ph.D.
> Associate Professor
> Department of Biochemistry and Molecular Biology
> College of Medicine
> University of Oklahoma Health Sciences Center
> S.L. Young Biomedical Research Center (BRC) Rm. 466
> 975 NE 10th Street, BRC 466
> Oklahoma City, OK 73104-5419
>
> 
> From: Lorenzo Gaifas [bris...@gmail.com]
> Sent: Saturday, May 25, 2019 5:48 AM
> To: pymol-users@lists.sourceforge.net
> Subject: [EXTERNAL] [PyMOL] Absymal performance when creating large
> numbers of bonds
>
> Dear pymol users,
>
> I'm working on a script, using the python API, that needs to add a very
> large number of bonds to the loaded structure.
>
> I thought simply using cmd.bond() in a for loop would do the trick, but
> -even though it works- it is extremely slow. I figured something was fishy,
> since pymol at startup is almost istantaneous and there, too, it has to
> compute, draw and even guess equally large numbers of bonds.
>
> I also tried to parallelise the command, but by now I *think* this can't
> be done due to the Global Intepreter Lock.
>
> I feel like there must be something I'm missing (maybe a way to prevent
> pymol from updating the rendering between each cmd.bond call?) or at least
> an API function that better exposes the bond generation procedure. Does
> someone have suggestions on how to solve this problem?
>
> Cheers,
> Lorenzo
>
___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

[PyMOL] Absymal performance when creating large numbers of bonds

2019-05-25 Thread Lorenzo Gaifas
Dear pymol users,

I'm working on a script, using the python API, that needs to add a very
large number of bonds to the loaded structure.

I thought simply using cmd.bond() in a for loop would do the trick, but
-even though it works- it is extremely slow. I figured something was fishy,
since pymol at startup is almost istantaneous and there, too, it has to
compute, draw and even guess equally large numbers of bonds.

I also tried to parallelise the command, but by now I *think* this can't be
done due to the Global Intepreter Lock.

I feel like there must be something I'm missing (maybe a way to prevent
pymol from updating the rendering between each cmd.bond call?) or at least
an API function that better exposes the bond generation procedure. Does
someone have suggestions on how to solve this problem?

Cheers,
Lorenzo
___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe