Mdo: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
===DESCRIPTION===
'''mdo''' sets up a command to be executed upon entry into the specified frame of the movie.  These commands are usually created by a PyMOL utility program (such as util.mrock).  Command can actually contain several commands separated by semicolons ';'
 
  "mdo" sets up a command to be executed upon entry into the
  specified frame of the movie.  These commands are usually created
  by a PyMOL utility program (such as util.mrock).  Command can
  actually contain several commands separated by semicolons ';'
===USAGE===
===USAGE===
   
  mdo frame : command
  mdo frame : command
 
===PYMOL API===
===PYMOL API====
<source lang="python">  
<source lang="python">  
cmd.mdo( int frame, string command )
  cmd.mdo( int frame, string command )
</source>
</source>


===EXAMPLE===
===EXAMPLE===
   
  // Creates a single frame movie involving a rotation about X and Y
  // Creates a single frame movie involving a rotation about X and Y
  load test.pdb
   
mset 1
  load test.pdb
mdo 1: turn x,5; turn y,5;
  mset 1
mplay
  mdo 1, turn x,5; turn y,5;
 
  mplay
<source lang="python">
//Show waters within 4 Angstroms around the first residue from a 15 frame simulation trajectory
load structure.pdb
load_traj structure.dcd, structure, start=1, stop=15
mset 1 -15
for a in range(1,16): cmd.mdo(a,"hide sphere; select waters, (structure & i. 1 around 4) & resn HOH, state="+str(a)+"; show sphere, waters")
</source>
 
===NOTES===
===NOTES===
The '''mset''' command must first be used to define the movie before "mdo" statements will have any effect.  Redefinition of the movie clears any existing mdo statements.
  The "mset" command must first be used to define the movie before
 
  "mdo" statements will have any effect.  Redefinition of the movie
  clears any existing mdo statements.
===SEE ALSO===
===SEE ALSO===
[[Mset]], [[Mplay]], [[Mstop]]
  [[Cmd mset]], [[Cmd mplay]], [[Cmd mstop]]
 
[[Category:Commands|Mdo]]
[[Category:Commands|mdo]]

Latest revision as of 15:41, 8 February 2012

mdo sets up a command to be executed upon entry into the specified frame of the movie. These commands are usually created by a PyMOL utility program (such as util.mrock). Command can actually contain several commands separated by semicolons ';'

USAGE

mdo frame : command

PYMOL API

 
cmd.mdo( int frame, string command )

EXAMPLE

// Creates a single frame movie involving a rotation about X and Y
load test.pdb
mset 1
mdo 1: turn x,5; turn y,5;
mplay
//Show waters within 4 Angstroms around the first residue from a 15 frame simulation trajectory
load structure.pdb
load_traj structure.dcd, structure, start=1, stop=15
mset 1 -15
for a in range(1,16): cmd.mdo(a,"hide sphere; select waters, (structure & i. 1 around 4) & resn HOH, state="+str(a)+"; show sphere, waters")

NOTES

The mset command must first be used to define the movie before "mdo" statements will have any effect. Redefinition of the movie clears any existing mdo statements.

SEE ALSO

Mset, Mplay, Mstop