Re: [PyMOL] get_dihedral bottleneck

2009-04-01 Thread Sean Law
ct to get normal PX1=DY12*DZ23-DY23*DZ12; PY1=DZ12*DX23-DZ23*DX12; PZ1=DX12*DY23-DX23*DY12; NP1=sqrt(PX1*PX1+PY1*PY1+PZ1*PZ1); PX1=PX1/NP1 PY1=PY1/NP1 PZ1=PZ1/NP1 PX2=DY43*DZ23-DY23*DZ43; PY2=DZ43*DX23-DZ23*DX43; PZ2=DX43*DY23-DX23*DY43; NP2=sqrt(PX2*PX2

Re: [PyMOL] get_dihedral bottleneck

2009-04-01 Thread gilleain torrance
On Tue, Mar 31, 2009 at 9:45 PM, Sean Law wrote: > the performance is lightning fast.  Can anybody help me improve the overall > performance or suggest an alternative?  Thanks in advance! A kind of alternative would be to use a custom dihedral command, that avoids evaluating selections: def tors

Re: [PyMOL] get_dihedral bottleneck

2009-04-01 Thread Warren DeLano
Sean, get_dihedral is expensive because, in the general case, it requires evaluation of four atom selections - a process which is essentially order N with respect to the number of atoms currently loaded inside PyMOL. As you've discovered, the easiest way to optimize performance is therefore to