querying.py (pymol-open-source-2.2.0) | : | querying.py (pymol-open-source-2.3.0) | ||
---|---|---|---|---|
skipping to change at line 17 | skipping to change at line 17 | |||
#G* Please see the accompanying LICENSE file for further information. | #G* Please see the accompanying LICENSE file for further information. | |||
#H* ------------------------------------------------------------------- | #H* ------------------------------------------------------------------- | |||
#I* Additional authors of this source file include: | #I* Additional authors of this source file include: | |||
#-* | #-* | |||
#-* | #-* | |||
#-* | #-* | |||
#Z* ------------------------------------------------------------------- | #Z* ------------------------------------------------------------------- | |||
from __future__ import print_function | from __future__ import print_function | |||
if __name__=='pymol.querying': | if True: | |||
import time | import time | |||
from . import selector | from . import selector | |||
import pymol | import pymol | |||
cmd = __import__("sys").modules["pymol.cmd"] | cmd = __import__("sys").modules["pymol.cmd"] | |||
from .cmd import _cmd,lock,unlock,Shortcut, \ | from .cmd import _cmd,lock,unlock,Shortcut, \ | |||
_feedback,fb_module,fb_mask,is_list, \ | _feedback,fb_module,fb_mask,is_list, \ | |||
DEFAULT_ERROR, DEFAULT_SUCCESS, _raising, is_ok, is_error | DEFAULT_ERROR, DEFAULT_SUCCESS, _raising, is_ok, is_error | |||
def auto_measure(_self=cmd): | def auto_measure(_self=cmd): | |||
skipping to change at line 814 | skipping to change at line 814 | |||
r = _cmd.export_dots(_self._COb,object,int(state)-1) | r = _cmd.export_dots(_self._COb,object,int(state)-1) | |||
finally: | finally: | |||
_self.unlock(r,_self) | _self.unlock(r,_self) | |||
if _raising(r,_self): raise pymol.CmdException | if _raising(r,_self): raise pymol.CmdException | |||
return r | return r | |||
def overlap(selection1, selection2, state1=1, state2=1, adjust=0.0, quiet=1, _self=cmd): | def overlap(selection1, selection2, state1=1, state2=1, adjust=0.0, quiet=1, _self=cmd): | |||
''' | ''' | |||
DESCRIPTION | DESCRIPTION | |||
"overlap" is an unsupported command that may have something to do | "overlap" is an unsupported command that sums up | |||
with measuring the total amount of van der Waals overlap between | [(VDWi + VDWj) - distance_ij]/2 between pairs of | |||
two selections. | selected atoms. | |||
PYMOL API | ||||
cmd.overlap(string selection1, string selection2 [, int state1=1, int state2 | ||||
=1, float adjust=0.0]) | ||||
NOTES | NOTES | |||
For best performance, use the smaller molecule as selection 1. | It does not compute the volume overlap, | |||
selections with more atoms will have a larger | ||||
sum. | ||||
''' | ''' | |||
# preprocess selections | # preprocess selections | |||
selection1 = selector.process(selection1) | selection1 = selector.process(selection1) | |||
selection2 = selector.process(selection2) | selection2 = selector.process(selection2) | |||
# | # | |||
r = DEFAULT_ERROR | r = DEFAULT_ERROR | |||
try: | try: | |||
_self.lock(_self) | _self.lock(_self) | |||
skipping to change at line 1637 | skipping to change at line 1643 | |||
DESCRIPTION | DESCRIPTION | |||
"get_raw_alignment" returns a list of lists of (object,index) | "get_raw_alignment" returns a list of lists of (object,index) | |||
tuples containing the raw per-atom alignment relationships | tuples containing the raw per-atom alignment relationships | |||
PYMOL API | PYMOL API | |||
cmd.get_raw_alignment(name) | cmd.get_raw_alignment(name) | |||
''' | ''' | |||
r = DEFAULT_ERROR | ||||
try: | try: | |||
_self.lock(_self) | _self.lock(_self) | |||
r = _cmd.get_raw_alignment(_self._COb,str(name),int(active_only)) | r = _cmd.get_raw_alignment(_self._COb,str(name),int(active_only)) | |||
finally: | finally: | |||
_self.unlock(r,_self) | _self.unlock(r,_self) | |||
if _raising(r,_self): raise pymol.CmdException | if _raising(r,_self): raise pymol.CmdException | |||
return r | return r | |||
def get_object_state(name, _self=cmd): | def get_object_state(name, _self=cmd): | |||
''' | ''' | |||
End of changes. 4 change blocks. | ||||
5 lines changed or deleted | 13 lines changed or added |