creating.py (pymol-open-source-2.2.0) | : | creating.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: | |||
#-* Filipe Maia (slicing code) | #-* Filipe Maia (slicing code) | |||
#-* | #-* | |||
#-* | #-* | |||
#Z* ------------------------------------------------------------------- | #Z* ------------------------------------------------------------------- | |||
from __future__ import print_function, absolute_import | from __future__ import print_function, absolute_import | |||
if __name__=='pymol.creating': | if True: | |||
import pymol | import pymol | |||
from . import selector | from . import selector | |||
import traceback | import traceback | |||
cmd = __import__("sys").modules["pymol.cmd"] | cmd = __import__("sys").modules["pymol.cmd"] | |||
import re | import re | |||
import gzip | import gzip | |||
import os | import os | |||
from .cmd import _cmd, Shortcut, is_list, is_string, \ | from .cmd import _cmd, Shortcut, is_list, is_string, \ | |||
safe_list_eval, safe_alpha_list_eval, \ | safe_list_eval, safe_alpha_list_eval, \ | |||
skipping to change at line 662 | skipping to change at line 662 | |||
_self.unlock(r,_self) | _self.unlock(r,_self) | |||
if _self._raising(r,_self): raise pymol.CmdException | if _self._raising(r,_self): raise pymol.CmdException | |||
if ramp: | if ramp: | |||
_self.volume_color(name, ramp) | _self.volume_color(name, ramp) | |||
# unlock and then use this to differentiate our viz | # unlock and then use this to differentiate our viz | |||
return r | return r | |||
def set_raw_alignment(name, raw, guide='', state=1, quiet=1, _self=cmd): | ||||
''' | ||||
DESCRIPTION | ||||
API only. Create an alignment object from lists of indices. | ||||
ARGUMENTS | ||||
name = str: alignment object name | ||||
raw = list: list (columns) of lists with (model, index) tuples | ||||
guide = str: name of guide object | ||||
state = int: object state | ||||
EXAMPLE | ||||
cmd.align('1t46', '1oky', object='aln') | ||||
raw = cmd.get_raw_alignment('aln') | ||||
cmd.delete('aln') | ||||
cmd.set_raw_alignment('alnnew', raw) | ||||
SEE ALSO | ||||
cmd.get_raw_alignment | ||||
''' | ||||
with _self.lockcm: | ||||
return _cmd.set_raw_alignment(name, raw, guide, | ||||
int(state) - 1, int(quiet), _self._COb) | ||||
def slice_new(name, map, state=1, source_state=0, _self=cmd): | def slice_new(name, map, state=1, source_state=0, _self=cmd): | |||
''' | ''' | |||
DESCRIPTION | DESCRIPTION | |||
"slice_map" creates a slice object from a map object. | "slice_map" creates a slice object from a map object. | |||
USAGE | USAGE | |||
slice_map name, map, [opacity, [resolution, [state, [source_state]]]] | slice_map name, map, [opacity, [resolution, [state, [source_state]]]] | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 32 lines changed or added |