Changes between Version 3 and Version 4 of Scripts/MMTK


Ignore:
Timestamp:
Sep 3, 2010, 1:27:44 PM (16 years ago)
Author:
Conrad Huang
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Scripts/MMTK

    v3 v4  
    2727To follow the progress of a molecular dynamics run, we can create a Chimera molecule from the MMTK universe and update its atomic coordinates as simulation progresses.  To keep Chimera interactive, we can run the simulation in the background, and poll for atom coordinates changes every few display frames.  The example code is in [attachment:followMD.py followMD.py], which contains a mix of MMTK and Chimera code.
    2828
    29 A more elaborate example, [attachment:plotMD.py plotMD.py], extends the previous example to include a plot of the system potential energy along with updating atomic coordinates.  The additional creates a '''matplotlib''' plot, and registers a callback function that is invoked whenever Chimera atomic coordinates are updated.  The arguments to the callback are (1) the MMTK universe, (2) a mapping from MMTK atoms to Chimera atoms, and (3) an MMTK state (which is '''None''' when the callback is invoked after the simulation ends).  The execution of plotMD.py is shown in [attachment:plotMD.mp4 plotMD.mp4].
     29A more elaborate example, [attachment:plotMD.py plotMD.py], extends the previous example to include a plot of the system potential energy along with updating atomic coordinates.  The additional creates a '''matplotlib''' plot, and registers a callback function that is invoked whenever Chimera atomic coordinates are updated.  The arguments to the callback are (1) the MMTK universe, (2) a mapping from MMTK atoms to Chimera atoms, and (3) an MMTK state (which is '''None''' when the callback is invoked after the simulation ends).  The execution of plotMD.py is shown in [attachment:plotMD.mp4 plotMD.mp4].  Note that Chimera remains interactive (user is able to select, move and color atoms) throughout the entire MD simulation.
    3030
    3131== Caveats ==