Welcome to the MDAnalysis 2024 trajectory streaming workshop! For the interactive activity, see interactive activity. If you're interested in using our tools after the workshop, see post workshop
If you'd like to follow along with the speakers or use the demo codes after the workshop, all workshop demo code is available in this repo.
Topic | Duration | Code |
---|---|---|
๐ Welcome | 5 min | |
๐ฆ MDAnalysis mission & ecosystem | 15 min | |
๐ผ๏ธ Streaming: big picture | 15 min | |
๐ Streaming: first look | 10 min | streaming-101/LAMMPS/MDAnalysis/demo.ipynb |
โ Q&A: Streaming overview | 5 min | |
๐ฆStreaming: MD packages, IMDClient | 15 min | |
๐ Demo: Multiple analyses on NAMD simulation stream | 10 min | namd-demos/rmsd-rdf/rmsd-rdf.ipynb |
๐ค Break | 10 min | |
๐ฏActivity: Write your own stream analysis | 40 min | See Interactive activity |
๐ฆ Streaming: MDAnalysis functionality | 10 min | streaming-101/imd-mda/imd-mda.ipynb |
โQ&A: Streaming with MDAnalysis | 5 min | |
๐ Application: Velocity correlation functions and 2PT | 10 min | gromacs-demos/vdos/demo.ipynb |
๐ Application: Ion channel permeation | 10 min | namd-demos/ion-flux/ion-flux.ipynb |
โ Q&A: Applications | 5 min | |
๐ฎ Future direction | 5 min | |
๐ Open Forum | 20 min | |
๐ช Closing | 5 min |
To get started, we recommend using VSCode in the browser with the Github codespace we've provided which includes all the tools you'll need to get started with live simulation streaming.
The easiest way is to simply use this repository to create a codespace. A workshop environment will be created and VSCode will automatically run in your browser.
Duplicate this tab so you will still have access to these instructions when the codespace is launched.
Select the green "Code" button and then create a codespace:
You're done! The codespace will launch in the current tab. Move on to section 2 to get started with the activity.
You can use your own IDE to spin up and connect to a codespace (which GitHub will host).
If you have VSCode installed, you can install the codespace extension.
After installing, you'll see the "remote explorer" icon on the left. Sign in if you aren't already.
Select the dropdown arrow to select "Github codespaces" and then select the "+" to create a new codespace.
A dialog will appear. For the repository, enter "ljwoods2/imd-workshop-2024". For the branch, select "main" For the machine type, select "2 cores, 8GB RAM, 32 GB storage"
After that, VSCode will automatically launch a new window which is executing in the codespace workshop environment. To troubleshoot, see the documentation here.
A codespace extension is also available for Pycharm.
You can also run the workshop activity locally if you have the devcontainers VScode extension and docker installed.
After docker is installed & enabled and your user has been added to the docker group, run:
git clone https://github.com/ljwoods2/imd-workshop-2024.git
code imd-workshop-2024
In VSCode, enter CTRL+SHIFT+P and type: "Dev Containers: Open Folder in Container..." and select the root of the cloned repo as the folder path. A new window will open which is executing in the workshop activity codespace.
First, open the "activity/activity.ipynb" jupyter notebook from this repo in your codespace environment.
Before running any code, click the "Select kernel" button in the upper right corner of the jupyter notebook.
Select "Python environments" and then the "workshop" environment.
Now you're ready to start the activity! Follow the instructions in the notebook to complete the activity.
If you are interested in using our tools, please feel free to reach out for support, bug reports, or for sharing your ideas!
The best way to reach us is on the MDAnalysis Discord in the '#streaming' channel. You can also reach out via email ([email protected])
Below, we provide instructions for using the simulation engines integrated with IMDv3 capability.
For docker usage, ensure docker is installed and the nvidia container toolkit is installed if using GPU builds.
First, pull the container:
# CPU-only build
docker pull ghcr.io/becksteinlab/streaming-md-docker:main-Common-CPU
# CUDA build
docker pull ghcr.io/becksteinlab/streaming-md-docker:main-Common-GPU
To run GROMACS, do:
# CPU
docker run -v /path/to/input/files:/home/conda:rw -p 8889:8889 \
ghcr.io/becksteinlab/streaming-md-docker:main-Common-CPU bash -c 'gmx <cmd>'
# GPU
docker run -v /path/to/input/files:/home/conda:rw --runtime=nvidia --gpus=all -p 8889:8889 \
ghcr.io/becksteinlab/streaming-md-docker:main-Common-GPU bash -c 'gmx <cmd>'
The modified codes are available in this GROMACS fork.
First, clone in the repo:
git clone https://gitlab.com/ljwoods2/gromacs.git
git checkout imd-v3
For build instructions, see the GROMACS installation instructions
New MDP file options (subject to change as we work with GROMACS developers):
IMD-group = <group> ; Use 'System' to send the entire system via IMD (inherited from IMDv2)
IMD-version = <2 | 3> ; Defaults to 2 for backwards compatibility
IMD-nst = <nst> ; Number of integration steps between simulation frames communicated via IMD, defaults to 100
IMD-time = <yes | no> ; Whether to send time and step information via IMD, defaults to 'no'
IMD-box = <yes | no> ; Whether to send box dimension information via IMD, defaults to 'no'
IMD-coords = <yes | no> ; Whether to send atomic coordinate information via IMD, defaults to 'no'
IMD-vels = <yes | no> ; Whether to send atomic velcities information via IMD, defaults to 'no'
IMD-forces = <yes | no> ; Whether to send atomic forces information via IMD, defaults to 'no'
IMD-unwrap = <yes | no> ; Whether to unwrap molecules to make them appear whole, defaults to 'no'
IMD-energies = <yes | no> ; Whether to send system energy information via IMD, defaults to 'no'
Note that new options will not be used if "IMD-version" is set to 2.
mdrun
command line options for IMD are inherited from IMDv2, see gmx-mdrun
First, pull the container:
# CPU-only build
docker pull ghcr.io/becksteinlab/streaming-md-docker:main-Common-CPU
# CUDA build
docker pull ghcr.io/becksteinlab/streaming-md-docker:main-Common-GPU
To run LAMMPS, do:
# CPU
docker run -v /path/to/input/files:/home/conda:rw -p 8889:8889 \
ghcr.io/becksteinlab/streaming-md-docker:main-Common-CPU bash -c 'lmp < </path/to/infile>'
# GPU
docker run -v /path/to/input/files:/home/conda:rw --runtime=nvidia --gpus=all -p 8889:8889 \
ghcr.io/becksteinlab/streaming-md-docker:main-Common-GPU bash -c 'lmp < </path/to/infile>'
The modified codes are available in this LAMMPS fork.
First, clone in the repo:
git clone https://github.com/ljwoods2/lammps.git
git checkout imd-v3-integration
Build instructions are available in the LAMMPS installation instructions
Original options in the IMD fix are available here.
With our modifications:
fix ID group-ID imd <imd_port> [trate <imd_trate>] [version (2|3)] [unwrap (on|off)] [fscale <imd_fscale>] [time (on|off)] [box (on|off)] [coordinates (on|off)] [velocities (on|off)] [forces (on|off)]
'version' will default to 2 for backward compatibility, in which case the new options (time, box, positions, etc) will have no effect.
Please reach out to us directly for instructions on using the modified NAMD codes.