|
1 | 1 | """
|
2 | 2 |
|
3 |
| -Example: Streaming an IMDv3 trajectory |
4 |
| -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 3 | +Minimal Instructions for various Simulation Engine |
| 4 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
5 | 5 |
|
6 |
| -To stream a trajectory from GROMACS or another simulation engine that supports |
7 |
| -IMDv3, ensure that the simulation engine is running and waiting for an IMD connection. |
| 6 | +To stream a trajectory from a simulation engine that supports IMDv3, |
| 7 | +one may use the appropriate input options to establish a connection and stream simulation data. |
| 8 | +Below, we have proided brief instructions on how to setup the various |
| 9 | +simulation engine to stream data using IMDv3. |
8 | 10 |
|
9 |
| -For example, in GROMACS, you can use ``gmx mdrun`` with the ``-imdwait`` flag |
| 11 | +GROMACS |
| 12 | +^^^^^^ |
| 13 | +In GROMACS, you can use ``gmx mdrun`` with the ``-imdwait`` flag |
10 | 14 | to ensure that GROMACS will wait for a client before starting the simulation.
|
11 | 15 | In GROMACS, you will know that the simulation is ready and waiting for the
|
12 | 16 | MDAnalysis IMDReader client when this line is printed to the terminal:
|
|
15 | 19 |
|
16 | 20 | IMD: Will wait until I have a connection and IMD_GO orders.
|
17 | 21 |
|
| 22 | +LAMMPS |
| 23 | +^^^^^^ |
| 24 | +
|
| 25 | +NAMD |
| 26 | +^^^^ |
| 27 | +In NAMD, the simulation will wait for a client connection when the |
| 28 | +``IMDon`` option is set to ``yes`` in the NAMD configuration file. |
| 29 | +Other options that can be set are detailed |
| 30 | +`here <https://github.com/amruthesht/namd-3.0/blob/IMDv3-dev/IMDv3-dev.md>`_. |
| 31 | +This will produce a simulation that is ready for a client connection with the |
| 32 | +following terminal message: |
| 33 | +
|
| 34 | +.. code-block:: none |
| 35 | +
|
| 36 | + Info: INTERACTIVE MD AWAITING CONNECTION |
| 37 | +
|
| 38 | +
|
| 39 | +Example Streaming Code |
| 40 | +^^^^^^^^^^^^^^^^^^^^^^^ |
| 41 | +
|
18 | 42 | Once the simulation is ready for a client connection, setup your :class:`Universe`
|
19 | 43 | like this: ::
|
20 | 44 |
|
21 | 45 | import imdclient
|
22 | 46 | import MDAnalysis as mda
|
23 | 47 | # Pass host and port of the listening GROMACACS simulation
|
24 | 48 | # server as the trajectory argument
|
| 49 | +
|
| 50 | + # GROMACS |
25 | 51 | u = mda.Universe("topology.tpr", "localhost:8888")
|
26 | 52 |
|
| 53 | + # LAMMPS |
| 54 | + |
| 55 | + # NAMD |
| 56 | + u = mda.Universe("topology.psf", "localhost:8888") |
| 57 | +
|
27 | 58 | Classes
|
28 | 59 | ^^^^^^^
|
29 | 60 |
|
|
0 commit comments