This is a read-only mirror of pymolwiki.org

Difference between revisions of "Mset"

From PyMOL Wiki
Jump to navigation Jump to search
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
===DESCRIPTION===
+
 
 
'''mset''' sets up a relationship between molecular states and movie frames.  This makes it possible to control which states are shown in which frame.
 
'''mset''' sets up a relationship between molecular states and movie frames.  This makes it possible to control which states are shown in which frame.
  
Line 12: Line 12:
 
===EXAMPLES===
 
===EXAMPLES===
 
<source lang="python">
 
<source lang="python">
mset 1        // simplest case, one state -> one frame
+
mset 1        // simplest case, one state -> one frame
mset 1 x10    // ten frames, all corresponding to state 1
+
mset 1 x10    // ten frames, all corresponding to state 1
mset 1 x30 1 -15 15 x30 15 -1
+
mset 1 x30 1 -15 15 x30 15 -1
  // more realistic example:
+
// more realistic example:
  // the first thirty frames are state 1
+
// the first thirty frames are state 1
  // the next 15 frames pass through states 1-15
+
// the next 15 frames pass through states 1-15
  // the next 30 frames are of state 15
+
// the next 30 frames are of state 15
  // the next 15 frames iterate back to state 1
+
// the next 15 frames iterate back to state 1
 
</source>
 
</source>
  
 +
<source lang="python">
 +
mset 1 x200 -78 -2 -78 -2 -78 x200 79 -156 157 x200 -234 235 x400
 +
#mset 1 x200 makes the first state last for 200 frames
 +
# -78 -2 takes us FROM state 1 to 78, then back to frame 2.  I've repeated this for dramatic effect
 +
# then we pause at 78 for 200 frames, then go from 79-156 and pause at 157 for 200 frames, etc.
 +
</source>
  
 
<source lang="python">
 
<source lang="python">
cmd.mset("1 -%d" % cmd.count_states())
+
cmd.mset("1 -%d" % cmd.count_states())
  // this will create a one-to-one mapping of states to movie frames. useful for making movies from trajectory files.  
+
// this will create a one-to-one mapping of states to movie frames. useful for making movies from trajectory files.  
 
</source>
 
</source>
  

Revision as of 18:29, 17 March 2010

mset sets up a relationship between molecular states and movie frames. This makes it possible to control which states are shown in which frame.

USAGE

mset specification [ ,frame ]

PYMOL API

cmd.mset( string specification [, int frame] )

EXAMPLES

mset 1         // simplest case, one state -> one frame
mset 1 x10     // ten frames, all corresponding to state 1
mset 1 x30 1 -15 15 x30 15 -1
// more realistic example:
// the first thirty frames are state 1
// the next 15 frames pass through states 1-15
// the next 30 frames are of state 15
// the next 15 frames iterate back to state 1
mset 1 x200 -78 -2 -78 -2 -78 x200 79 -156 157 x200 -234 235 x400 
#mset 1 x200 makes the first state last for 200 frames
# -78 -2 takes us FROM state 1 to 78, then back to frame 2.  I've repeated this for dramatic effect
# then we pause at 78 for 200 frames, then go from 79-156 and pause at 157 for 200 frames, etc.
cmd.mset("1 -%d" % cmd.count_states())
// this will create a one-to-one mapping of states to movie frames. useful for making movies from trajectory files.

SEE ALSO

Cmd mdo, Cmd mplay, Cmd mclear