User Tools

Site Tools


ai2bmd

AI2BMD is an artificial intelligence-based ab initio biomolecular dynamics system. Nature | Github

1. Description

AI2BMD has the same accuracy with QM and faster running speed (one order slower than MM).

2. Installation

According to Prof. Wang's response (Github issue 20), the software can only be installed with Docker.

2.1 Install Docker with apt

Docker Docs

  • (1) add apt source

    # Add Docker's official GPG key:
    sudo apt-get update
    sudo apt-get install ca-certificates curl
    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc
    # Add the repository to Apt sources:
    echo \
    "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
    $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
    sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    sudo apt-get update
  • (2) install Docker-ce

    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
  • (3) Update openssl (Optional)

    REF. I encounter the error (curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to download.docker.com:443).

    sudo apt-get upgrade openssl
  • (4) Add mirror link

    ref To download docker image domestically.

    # add lines below into /etc/docker/daemon.json
    {
    "registry-mirrors": [
      "https://docker.m.daocloud.io"
    ]
    }
    # apply the daemon configurations
    sudo systemctl daemon-reload
    sudo systemctl restart docker
  • (5) verify the installation

    sudo docker run hello-world
  • (6) install nvidia container toolkit

    Ref This toolkit is needed if cuda is used in Docker image. Add the apt source, update index and install the package.

    curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
    && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
      sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
      sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
    sudo apt-get update
    sudo apt-get install -y nvidia-container-toolkit

    REF To fix the error "could not select device driver ““ with capabilities: [[gpu]]".

    sudo nvidia-ctk runtime configure --runtime=docker
    sudo vi /etc/docker/daemon.json
    sudo systemctl restart docker
  • (7) Add permission for one user (Optional)

    Everytime you change the configuration (add one user, modify the daemon.json and so on), restart the server and print the status.

    sudo groupadd docker
    sudo usermod -aG docker $USER
    newgrp docker
    sudo systemctl restart docker
    sudo systemctl status docker

2.2 Pull AI2BMD docker image

REF

  • (1) Pull the image

    # add sudo to the command if the user doesn't have the permission
    # or just add the permission following the instruction above
    # it may take ~2 hours (a faster mirror link or the VPN may help a lot in this step)
    docker pull ghcr.io/microsoft/ai2bmd:latest
  • (2) Get the software

    wget 'https://raw.githubusercontent.com/microsoft/AI2BMD/main/scripts/ai2bmd'
    chmod +x ai2bmd

    It is recommended to put the script in your PATH, such as /home/usr/bin

  • (3) Get the test system

    # download the Chignolin protein structure data file
    wget 'https://raw.githubusercontent.com/microsoft/AI2BMD/main/examples/chig.pdb'
    # download the preprocessed and solvated Chignolin protein structure data files
    wget --directory-prefix=chig_preprocessed 'https://raw.githubusercontent.com/microsoft/AI2BMD/main/examples/chig_preprocessed/chig-preeq.pdb'
    wget --directory-prefix=chig_preprocessed 'https://raw.githubusercontent.com/microsoft/AI2BMD/main/examples/chig_preprocessed/chig-preeq-nowat.pdb'
  • (4) Run it !

    ai2bmd --prot-file chig.pdb --preprocess-dir chig_preprocessed --preeq-steps 0 --sim-steps 1000 --record-per-steps 1 --gpus 0
    # I add the option --gpus, otherwise all cards will be called. The envirionment variable 'CUDA_VISIBLE_DEVICE' won't work.
    # Use './ai2bmd' to call the script if it's not put into the PATH
    # Use 'sudo ./ai2bmd' if the permission is not added to the user

3. Usage

4. Notes

There is one problem not solved. The files generated have the permission root:root, so one normal user can't delete the folder...

I have serched online to find the solution but failed to get an elegant one.

I raised a Github issue, waiting for Prof. Wang's reply.

ai2bmd.txt · Last modified: 2025/02/18 12:17 by 127.0.0.1