ASE: Interactive Molecular Dynamics¶
Running an ASE OpenMM server from the command line¶
When narupa-ase is installed, it provides the narupa-omm-ase
command in the command line. When provided with the description of an
OpenMM simulation as an XML file serialised as described in the Narupa OpenMM documentation
, narupa-omm-ase runs an interactive simulation.
The host address and port can be set with
the --address
and the --port
option, respectively.
Running a server from python¶
The narupa-ase module provides the
narupa.ase.ASEImdServer
class. Given an ASE simulation set up with an
ASE molecular dynamics runner, this class will
attach interactive molecular dynamics functionality and frame serving to the dynamics.
An example is given below, assuming an ASE Atoms object has been set up, named atoms:
Full examples are given in the examples folder, which additionally contains several Jupyter notebooks that explore how Narupa can be used with OpenMM:
- narupa_ase_client_server: A notebook showing how one can run the server for an OpenMM simulation, connect a client to it, and render a simple visualisation.
- narupa_ase_interactive_md: A notebook that runs a simulation of a carbon nanotube, then applies interactive forces to it from the notebook.
- narupa_interactive_visualiser: A notebook that assumes a server is already running, and visualises it with NGLView. To run this notebook, ensure NGLView is installed with: