"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "modules/pymol/editing.py" between
pymol-open-source-2.2.0.tar.gz and pymol-open-source-2.3.0.tar.gz

About: PyMOL is a Python-enhanced molecular graphics tool. It excels at 3D visualization of proteins, small molecules, density, surfaces, and trajectories. It also includes molecular editing, ray tracing, and movies. Open Source version.

editing.py  (pymol-open-source-2.2.0):editing.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.editing': if True:
import pymol import pymol
import math import math
from . import selector from . import selector
cmd = __import__("sys").modules["pymol.cmd"] cmd = __import__("sys").modules["pymol.cmd"]
from .cmd import _cmd,lock,unlock,Shortcut,is_string, \ from .cmd import _cmd,lock,unlock,Shortcut,is_string, \
boolean_sc,boolean_dict,safe_list_eval, is_sequence, \ boolean_sc,boolean_dict,safe_list_eval, is_sequence, \
DEFAULT_ERROR, DEFAULT_SUCCESS, _raising, is_ok, is_error DEFAULT_ERROR, DEFAULT_SUCCESS, _raising, is_ok, is_error
from chempy import cpv from chempy import cpv
skipping to change at line 948 skipping to change at line 948
selection = string: atoms to drag. If not provided, and dragging selection = string: atoms to drag. If not provided, and dragging
is active, then dragging is instead deactivated. is active, then dragging is instead deactivated.
NOTES NOTES
Currently, the selection of atom to drag must all reside in a Currently, the selection of atom to drag must all reside in a
single molecular object. single molecular object.
''' '''
import pymol.wizard.dragging
quiet = int(quiet) quiet = int(quiet)
if (selection!=None) and (selection!=""): if (selection!=None) and (selection!=""):
selection = selector.process(selection) selection = selector.process(selection)
if is_string(edit): if is_string(edit):
edit=boolean_dict[boolean_sc.auto_err(edit,'boolean')] edit=boolean_dict[boolean_sc.auto_err(edit,'boolean')]
if is_string(wizard): if is_string(wizard):
wizard=boolean_dict[boolean_sc.auto_err(wizard,'boolean')] wizard=boolean_dict[boolean_sc.auto_err(wizard,'boolean')]
edit = int(edit) edit = int(edit)
wizard = int(wizard) wizard = int(wizard)
old_button_mode = _self.get('button_mode') old_button_mode = _self.get('button_mode')
skipping to change at line 976 skipping to change at line 978
r = _cmd.drag(_self._COb,str(selection),int(quiet),int(mode)) r = _cmd.drag(_self._COb,str(selection),int(quiet),int(mode))
finally: finally:
_self.unlock(r,_self) _self.unlock(r,_self)
if not is_error(r): if not is_error(r):
if edit: if edit:
_self.edit_mode(edit) _self.edit_mode(edit)
if wizard: if wizard:
wiz = _self.get_wizard() wiz = _self.get_wizard()
if (wiz == None): if (wiz == None):
_self.wizard("dragging",old_button_mode) _self.wizard("dragging",old_button_mode)
elif wiz.__class__ != 'pymol.wizard.dragging.Dragging': elif not isinstance(wiz, pymol.wizard.dragging.Dragging):
_self.wizard("dragging",old_button_mode) _self.wizard("dragging",old_button_mode)
else: else:
wiz.recount() wiz.recount()
if _self._raising(r,_self): raise pymol.CmdException if _self._raising(r,_self): raise pymol.CmdException
return r return r
def edit(selection1='', selection2='none', selection3='none', def edit(selection1='', selection2='none', selection3='none',
selection4='none', pkresi=0, pkbond=1, quiet=1, _self=cmd): selection4='none', pkresi=0, pkbond=1, quiet=1, _self=cmd):
''' '''
DESCRIPTION DESCRIPTION
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)