AutoDock Vina est un programme de simulation gratuit et open source dédié à la modélisation moléculaire, et en particulier au docking. Le docking moléculaire est une simulation informatique de la manière dont un ligand pourrait se lier à une cible. Il est largement utilisé dans la découverte et le développement de médicaments. Cet article présente un exemple simple montrant comment exécuter une simulation de docking avec AutoDock Vina sur la plateforme de cloud computing de Qarnot.
Le cas de test utilise la version 1.1.2 d'AutoDock Vina, sorti en 2011.
Si vous êtes intéressé par une autre version, veuillez nous envoyer un courriel à qlab@qarnot.com.
Avant de lancer une tâche de calcul, veuillez vous assurer que vous remplissez déjà les conditions suivantes :
Ce cas de test est un exemple simple d'utilisation d'AutoDock Vina sur le cloud Qarnot avec le SDK Python. Il présente le docking de l'Indinavir, un inhibiteur de la protéase du VIH-1, utilisé comme antirétroviral dans le traitement du SIDA. Le ligand, la cible et le fichier de configuration nécessaires pour lancer la simulation peuvent être téléchargés ici. Vous devez dézipper l'archive indinavir-HIV-docking.zip pour pouvoir lancer le calcul sur le cloud Qarnot.
Copiez le code suivant dans un script Python et enregistrez-le dans le même répertoire que le dossier indinavir-HIV-docking
. Nommez-le autodock.py.
#!/usr/bin/env python3
import qarnot
import sys
# Create a connection
conn = qarnot.Connection(client_token="MY_SECRET_TOKEN")
# Create a task
task = conn.create_task('autodock_vina-demo', 'docker-batch', 1)
# Store if an error happened during the process
error_happened = False
try:
# Create a resource bucket and add the content of resources_vina_qarnot into it
input_bucket = conn.create_bucket('autodock_vina-demo-input')
input_bucket.sync_directory('indinavir-HIV-docking/')
# Attach the bucket to the task
task.resources.append(input_bucket)
# Create a result bucket and attach it to the task
output_bucket = conn.create_bucket('autodock_vina-demo-output')
task.results = output_bucket
# Set the command to run when launching the container, by overriding a constant.
# Task constants are the main way of controlling a task's behaviour
task.constants['DOCKER_REPO'] = 'qarnotlab/autodock'
task.constants['DOCKER_TAG'] = '1.1.2'
task.constants['DOCKER_CMD'] = 'vina --config config.txt'
# Submit the task to the API, that will launch it on the cluster
task.submit()
# Wait for the task to be finished, and monitor the progress of its
# deployment
last_state = ''
done = False
while not done:
if task.state != last_state:
last_state = task.state
print('** {}'.format(last_state))
# Wait for the task to complete, with a timeout of 5 seconds.
# This will return True as soon as the task is complete, or False
# after the timeout.
done = task.wait(5)
# Display fresh stdout / stderr
sys.stdout.write(task.fresh_stdout())
sys.stderr.write(task.fresh_stderr())
# Display errors on failure
if task.state == 'Failure':
print('** Errors: %s' % task.errors[0])
error_happened = True
else:
# Download results from output_bucket into given folder
task.download_results('output')
finally:
# Exit code in case of error
if error_happened:
sys.exit(1)
Assurez-vous d'avoir copié votre jeton d'authentification dans le script (à la place de MY_SECRET_TOKEN
) pour pouvoir lancer la tâche sur le cloud Qarnot. Vérifiez que tous les fichiers d'entrée (2 fichiers pdbqt et 1 fichier config.txt) se trouvent dans le même dossier nommé indinavir-HIV-docking
. Votre répertoire de travail doit ressembler à ceci :
indinavir-HIV-docking/
config.txt
: pour la lisibilité, certaines options de ligne de commande ont été placées dans un fichier de configuration.
hsg1.pdbqt
: structure cristalline du VIH humain.ind.pdbqt
: ligand Indinavir prétraité.
autodock.py
: script Python pour exécuter le calcul sur le cloud Qarnot.Pour lancer ce script, ouvrez un terminal dans votre répertoire de travail et exécutez python3 autodock.py &
.
À tout moment, vous pouvez surveiller l'état de votre tâche.
Vous devriez maintenant avoir un dossier output
dans votre répertoire de travail sur votre ordinateur et un bucket autodock-out
, le cloud de Qarnot, contenant le fichier de sortie (results.pdbqt, voir ci-dessous).
MODEL 1 REMARK VINA RESULT: -17.1 0.000 0.000 REMARK 4 1HSG COMPLIES WITH FORMAT V. 2.0, 11-OCT-2000 ROOT HETATM 1 N1 IND I 201 4.013 6.704 -3.128 1.00 28.25 N HETATM 2 C1 IND I 201 2.671 6.990 -3.702 1.00 30.30 C HETATM 3 C2 IND I 201 1.819 5.890 -4.302 1.00 27.27 C HETATM 4 C3 IND I 201 0.559 6.508 -4.846 1.00 28.85 C HETATM 5 O1 IND I 201 0.605 7.244 -5.824 1.00 29.59 O HETATM 6 N2 IND I 201 -0.565 6.231 -4.215 1.00 22.29 N HETATM 7 C4 IND I 201 -1.910 6.600 -4.519 1.00 23.47 C HETATM 8 C5 IND I 201 -2.771 6.188 -3.310 1.00 27.66 C HETATM 9 C6 IND I 201 -2.392 6.013 -5.677 1.00 21.71 C HETATM 10 C7 IND I 201 -2.109 8.048 -4.636 1.00 22.75 C HETATM 11 N3 IND I 201 2.725 5.354 -5.377 1.00 28.91 N HETATM 12 C8 IND I 201 4.172 5.201 -5.086 1.00 26.24 C HETATM 13 C9 IND I 201 4.812 6.217 -4.162 1.00 27.47 C HETATM 14 C10 IND I 201 2.268 4.201 -6.126 1.00 20.86 C HETATM 15 C11 IND I 201 2.348 4.367 -7.644 1.00 21.68 C HETATM 16 O2 IND I 201 2.352 2.999 -7.920 1.00 15.87 O HETATM 17 C12 IND I 201 1.250 5.022 -8.501 1.00 21.49 C HETATM 18 C13 IND I 201 1.427 5.175 -10.018 1.00 26.89 C HETATM 19 C14 IND I 201 0.212 5.841 -10.684 1.00 28.67 C HETATM 20 C15 IND I 201 0.383 5.998 -12.151 1.00 26.89 C HETATM 21 C16 IND I 201 0.713 4.931 -12.987 1.00 29.22 C HETATM 22 C17 IND I 201 0.899 5.130 -14.347 1.00 29.22 C HETATM 23 C18 IND I 201 0.751 6.419 -14.864 1.00 30.97 C HETATM 24 C19 IND I 201 0.412 7.491 -14.030 1.00 29.25 C HETATM 25 C20 IND I 201 0.227 7.274 -12.663 1.00 29.96 C HETATM 26 C21 IND I 201 2.680 5.968 -10.371 1.00 29.35 C HETATM 27 O3 IND I 201 2.921 7.048 -9.811 1.00 32.66 O HETATM 28 N4 IND I 201 3.397 5.482 -11.380 1.00 31.19 N HETATM 29 C22 IND I 201 4.413 6.280 -12.046 1.00 29.22 C HETATM 30 C23 IND I 201 4.492 5.977 -13.532 1.00 28.82 C HETATM 31 O4 IND I 201 4.202 4.608 -13.771 1.00 28.32 O HETATM 32 C24 IND I 201 5.886 6.390 -13.948 1.00 32.05 C HETATM 33 C25 IND I 201 6.856 6.205 -12.810 1.00 31.29 C HETATM 34 C26 IND I 201 8.216 6.074 -12.652 1.00 32.00 C HETATM 35 C27 IND I 201 8.717 5.873 -11.361 1.00 28.00 C HETATM 36 C28 IND I 201 7.855 5.808 -10.256 1.00 29.01 C HETATM 37 C29 IND I 201 6.478 5.927 -10.386 1.00 27.70 C HETATM 38 C30 IND I 201 5.889 6.120 -11.596 1.00 31.86 C HETATM 39 C31 IND I 201 4.634 7.756 -2.314 1.00 36.25 C HETATM 40 C32 IND I 201 3.998 8.231 -1.003 1.00 42.75 C HETATM 41 C33 IND I 201 4.053 7.492 0.187 1.00 47.41 C HETATM 42 N5 IND I 201 3.514 7.870 1.427 1.00 51.38 N HETATM 43 C34 IND I 201 2.893 9.115 1.337 1.00 50.60 C HETATM 44 C35 IND I 201 2.801 9.903 0.185 1.00 49.34 C HETATM 45 C36 IND I 201 3.364 9.455 -1.007 1.00 44.71 C HETATM 46 H1 IND I 201 2.824 7.705 -4.510 1.00 0.00 H HETATM 47 H2 IND I 201 2.070 7.406 -2.893 1.00 0.00 H HETATM 48 H3 IND I 201 1.584 5.170 -3.518 1.00 0.00 H HETATM 49 H4 IND I 201 -0.455 5.655 -3.368 1.00 0.00 H HETATM 50 H5 IND I 201 -3.812 6.452 -3.498 1.00 0.00 H HETATM 51 H6 IND I 201 -2.692 5.112 -3.157 1.00 0.00 H HETATM 52 H7 IND I 201 -2.421 6.709 -2.419 1.00 0.00 H HETATM 53 H8 IND I 201 -3.419 6.336 -5.848 1.00 0.00 H HETATM 54 H9 IND I 201 -1.772 6.312 -6.522 1.00 0.00 H HETATM 55 H10 IND I 201 -2.365 4.928 -5.574 1.00 0.00 H HETATM 56 1H1 IND I 201 -3.153 8.254 -4.867 1.00 0.00 H HETATM 57 2H1 IND I 201 -1.844 8.529 -3.694 1.00 0.00 H HETATM 58 3H1 IND I 201 -1.477 8.438 -5.433 1.00 0.00 H HETATM 59 4H1 IND I 201 4.705 5.266 -6.034 1.00 0.00 H HETATM 60 5H1 IND I 201 4.311 4.227 -4.617 1.00 0.00 H HETATM 61 6H1 IND I 201 5.680 5.735 -3.713 1.00 0.00 H HETATM 62 7H1 IND I 201 5.110 7.064 -4.780 1.00 0.00 H HETATM 63 8H1 IND I 201 1.226 4.015 -5.867 1.00 0.00 H HETATM 64 9H1 IND I 201 2.889 3.348 -5.854 1.00 0.00 H HETATM 65 H20 IND I 201 3.237 4.905 -7.969 1.00 0.00 H HETATM 66 H21 IND I 201 1.401 2.697 -8.174 1.00 0.00 H HETATM 67 2H2 IND I 201 1.119 6.037 -8.122 1.00 0.00 H HETATM 68 3H2 IND I 201 0.351 4.419 -8.374 1.00 0.00 H HETATM 69 H24 IND I 201 1.566 4.214 -10.516 1.00 0.00 H HETATM 70 5H2 IND I 201 0.017 6.839 -10.290 1.00 0.00 H HETATM 71 6H2 IND I 201 -0.706 5.271 -10.542 1.00 0.00 H HETATM 72 H27 IND I 201 0.826 3.931 -12.568 1.00 0.00 H HETATM 73 H28 IND I 201 1.155 4.296 -15.000 1.00 0.00 H HETATM 74 H29 IND I 201 0.901 6.592 -15.930 1.00 0.00 H HETATM 75 H30 IND I 201 0.292 8.492 -14.445 1.00 0.00 H HETATM 76 H31 IND I 201 -0.036 8.103 -12.007 1.00 0.00 H HETATM 77 H32 IND I 201 3.227 4.517 -11.699 1.00 0.00 H HETATM 78 H33 IND I 201 4.219 7.349 -11.952 1.00 0.00 H HETATM 79 H34 IND I 201 3.774 6.587 -14.081 1.00 0.00 H HETATM 80 H35 IND I 201 3.194 4.497 -13.957 1.00 0.00 H HETATM 81 6H3 IND I 201 5.902 7.439 -14.244 1.00 0.00 H HETATM 82 7H3 IND I 201 6.229 5.791 -14.791 1.00 0.00 H HETATM 83 H38 IND I 201 8.886 6.125 -13.510 1.00 0.00 H HETATM 84 H39 IND I 201 9.791 5.764 -11.212 1.00 0.00 H HETATM 85 H40 IND I 201 8.280 5.660 -9.263 1.00 0.00 H HETATM 86 H41 IND I 201 5.854 5.862 -9.495 1.00 0.00 H HETATM 87 2H4 IND I 201 4.687 8.644 -2.943 1.00 0.00 H HETATM 88 3H4 IND I 201 5.622 7.388 -2.034 1.00 0.00 H HETATM 89 H44 IND I 201 4.565 6.530 0.146 1.00 0.00 H HETATM 90 H45 IND I 201 2.438 9.510 2.245 1.00 0.00 H HETATM 91 H46 IND I 201 2.291 10.864 0.221 1.00 0.00 H HETATM 92 H47 IND I 201 3.304 10.054 -1.916 1.00 0.00 H ENDROOT TORSDOF 5 ENDMDL
C'est tout ! Si vous avez des questions, veuillez contacter qlab@qarnot.com et nous vous aiderons avec plaisir !