Menu

Commit [r27379]  Maximize  Restore  History

Large speed up of the mol-res-spin selection object.

The Selection.contains_mol(), Selection.contains_res() and Selection.contains_spin() methods of the
lib.selection module have been redesigned for speed. Instead of setting a number of flags and
performing bit operations at the end of the method to return the correct Boolean value, each of the
multiple checks now simply returns a Boolean value, avoiding all subsequent checks. The check list
order has also been rearranged so that the least expensive checks are to the top and the most time
intensive checks are last.

bugman 2015-01-30

changed /trunk/lib/selection.py
/trunk/lib/selection.py Diff Switch to side-by-side view
Loading...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.