fitting.py (pymol-open-source-2.2.0) | : | fitting.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.fitting': | if True: | |||
cmd = __import__("sys").modules["pymol.cmd"] | cmd = __import__("sys").modules["pymol.cmd"] | |||
from .cmd import _cmd,lock,unlock | from .cmd import _cmd,lock,unlock | |||
from . import selector | from . import selector | |||
import os | import os | |||
import pymol | import pymol | |||
from .cmd import _cmd,lock,unlock,Shortcut, \ | from .cmd import _cmd,lock,unlock,Shortcut, \ | |||
DEFAULT_ERROR, DEFAULT_SUCCESS, _raising, is_ok, is_error | DEFAULT_ERROR, DEFAULT_SUCCESS, _raising, is_ok, is_error | |||
skipping to change at line 732 | skipping to change at line 732 | |||
internally, you can provide just two selections. Otherwise, you | internally, you can provide just two selections. Otherwise, you | |||
may need to specify each pair of atoms separately, two by two, as | may need to specify each pair of atoms separately, two by two, as | |||
additional arguments to pair_fit. | additional arguments to pair_fit. | |||
Script files are usually recommended when using this command. | Script files are usually recommended when using this command. | |||
SEE ALSO | SEE ALSO | |||
fit, rms, rms_cur, intra_fit, intra_rms, intra_rms_cur | fit, rms, rms_cur, intra_fit, intra_rms, intra_rms_cur | |||
''' | ''' | |||
_self = kw.get('_self',cmd) | _self = kw.pop('_self',cmd) | |||
quiet = int(kw.pop('quiet', 0)) | ||||
if kw: | ||||
raise pymol.CmdException('unexpected keyword arguments: ' + str( | ||||
list(kw))) | ||||
r = DEFAULT_ERROR | r = DEFAULT_ERROR | |||
if len(arg) < 2: | if len(arg) < 2: | |||
raise pymol.CmdException('need at least 2 selection') | raise pymol.CmdException('need at least 2 selection') | |||
if len(arg) % 2: | if len(arg) % 2: | |||
raise pymol.CmdException('need even number of selections') | raise pymol.CmdException('need even number of selections') | |||
new_arg = list(map(selector.process, arg)) | new_arg = list(map(selector.process, arg)) | |||
try: | try: | |||
_self.lock(_self) | _self.lock(_self) | |||
r = _cmd.fit_pairs(_self._COb,new_arg) | r = _cmd.fit_pairs(_self._COb,new_arg, quiet) | |||
finally: | finally: | |||
_self.unlock(r,_self) | _self.unlock(r,_self) | |||
if _self._raising(r,_self): raise pymol.CmdException | if _self._raising(r,_self): raise pymol.CmdException | |||
return r | return r | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 9 lines changed or added |