This is a read-only mirror of pymolwiki.org
Difference between revisions of "Protect"
Jump to navigation
Jump to search
m (1 revision) |
|||
(11 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | === | + | '''protect''' protects a set of atoms from tranformations performed using the editing features. This is most useful when you are modifying an internal portion of a chain or cycle and do not wish to affect the rest of the molecule. |
− | + | ||
− | + | ==USAGE== | |
− | [[Category:Commands| | + | protect (selection) |
+ | |||
+ | ==PYMOL API== | ||
+ | <source lang="python"> | ||
+ | cmd.protect(string selection) | ||
+ | </source> | ||
+ | |||
+ | == Example == | ||
+ | This example makes a very cool little, and fake, molecular movie. Copy/paste this into PyMOL: | ||
+ | <source lang="python"> | ||
+ | load $PYMOL_PATH/test/dat/pept.pdb, obj | ||
+ | |||
+ | # create the fake trajectory (of states) | ||
+ | for a in range(2,31): cmd.create("obj","obj",1,a) | ||
+ | # remove the bond | ||
+ | unbond 5/C, 6/N | ||
+ | # This protects everything but all atoms witing 4 | ||
+ | # Ang. of residue 5's carbon and residue 6's nitrogen. | ||
+ | protect not ((5/C or 6/N) extend 4) | ||
+ | |||
+ | # do some quick sculpting | ||
+ | sculpt_activate obj, 30 | ||
+ | sculpt_iterate obj, 30, 100 | ||
+ | smooth obj, 30, 3 | ||
+ | |||
+ | # then program a bond-break/re-form movie | ||
+ | mset 1 x30 1 -30 30 x30 30 -1 | ||
+ | mdo 45: unbond 5/C, 6/N, quiet=1 | ||
+ | mdo 100: bond 5/C, 6/N, quiet=1 | ||
+ | |||
+ | frame 100 | ||
+ | |||
+ | as sticks | ||
+ | orient 5-6/N+CA+C | ||
+ | mplay | ||
+ | </source> | ||
+ | |||
+ | ==SEE ALSO== | ||
+ | [[Deprotect]], [[Mask]], [[Unmask]] | ||
+ | |||
+ | [[Category:Commands|Protect]] | ||
+ | [[Category:Editing Module|Protect]] |
Latest revision as of 05:26, 8 February 2016
protect protects a set of atoms from tranformations performed using the editing features. This is most useful when you are modifying an internal portion of a chain or cycle and do not wish to affect the rest of the molecule.
USAGE
protect (selection)
PYMOL API
cmd.protect(string selection)
Example
This example makes a very cool little, and fake, molecular movie. Copy/paste this into PyMOL:
load $PYMOL_PATH/test/dat/pept.pdb, obj
# create the fake trajectory (of states)
for a in range(2,31): cmd.create("obj","obj",1,a)
# remove the bond
unbond 5/C, 6/N
# This protects everything but all atoms witing 4
# Ang. of residue 5's carbon and residue 6's nitrogen.
protect not ((5/C or 6/N) extend 4)
# do some quick sculpting
sculpt_activate obj, 30
sculpt_iterate obj, 30, 100
smooth obj, 30, 3
# then program a bond-break/re-form movie
mset 1 x30 1 -30 30 x30 30 -1
mdo 45: unbond 5/C, 6/N, quiet=1
mdo 100: bond 5/C, 6/N, quiet=1
frame 100
as sticks
orient 5-6/N+CA+C
mplay