| 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]. |
| | 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]. Note that Chimera remains interactive (user is able to select, move and color atoms) throughout the entire MD simulation. |