Springer Nature is making SARS-CoV-2 and COVID-19 research free. View research | View latest news | Sign up for updates

Exploiting OpenMP and OpenACC to accelerate a geometric approach to molecular docking in heterogeneous HPC nodes


In drug discovery, molecular docking is the task in charge of estimating the position of a molecule when interacting with the docking site. This task is usually used to perform screening of a large library of molecules, in the early phase of the process. Given the amount of candidate molecules and the complexity of the application, this task is usually performed using high-performance computing (HPC) platforms. In modern HPC systems, heterogeneous platforms provide a better throughput with respect to homogeneous platforms. In this work, we ported and optimized a molecular docking application to a heterogeneous system, with one or more GPU accelerators, leveraging a hybrid OpenMP and OpenACC approach. The target application focuses on the virtual screening phases in the drug discovery process, and it is based on geometric transformations of the target ligands. We prove that our approach has a better exploitation of the node compared to pure CPU/GPU data splitting approaches, reaching a throughput improvement up to 25% while considering the same computing node.

This is a preview of subscription content, log in to check access.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10


  1. 1.

    The GeoDock execution triggered an illegal access to the GPU memory when trying to transfer the private data structure.

  2. 2.

    When we enable the multi-threading with OpenMP, the CUDA managed memory fails. The manager tries to allocate the memory, from different threads, in the same area and returns a runtime error.

  3. 3.


  1. 1.

    Beato C, Beccari AR, Cavazzoni C, Lorenzi S, Costantino G (2013) Use of experimental design to optimize docking performance: the case of ligendock, the docking module of ligen, a new de novo design program. J Chem Inf Model 53(6):1503–1517

  2. 2.

    Dagum L, Menon R (1998) OpenMP: an industry standard API for shared-memory programming. Comput Sci Eng IEEE 5(1):46–55

  3. 3.

    Ewing TJ, Makino S, Skillman AG, Kuntz ID (2001) Dock 4.0: search strategies for automated molecular docking of flexible molecule databases. J Comput Aided Mol Des 15(5):411–428

  4. 4.

    Farber R (2017) Parallel programming with OpenACC. Morgan Kaufmann, Boston

  5. 5.

    Friesner RA, Banks JL, Murphy RB, Halgren TA, Klicic JJ, Mainz DT, Repasky MP, Knoll EH, Shelley M, Perry JK et al (2004) Glide: a new approach for rapid, accurate docking and scoring. 1. method and assessment of docking accuracy. J Med Chem 47(7):1739–1749

  6. 6.

    Jain AN (2007) Surflex-dock 2.1: robust performance from ligand energetic modeling, ring flexibility, and knowledge-based search. J Comput Aided Mol Des 21(5):281–306

  7. 7.

    Knüpfer A, Rössel C, Mey Da, Biersdorff S, Diethelm K, Eschweiler D, Geimer M, Gerndt M, Lorenz D, Malony A, Nagel WE, Oleynik Y, Philippen P, Saviankou P, Schmidl D, Shende S, Tschüter R, Wagner M, Wesarg B, Wolf F (2012) Score-p: a joint performance measurement run-time infrastructure for periscope, scalasca, tau, and vampir. In: Brunst H, Müller MS, Nagel WE, Resch MM (eds) Tools for High Performance Computing 2011. Springer, Berlin, pp 79–91

  8. 8.

    Kramer B, Rarey M, Lengauer T (1999) Evaluation of the flexx incremental construction algorithm for protein-ligand docking. Proteins Struct Funct Bioinform 37(2):228–241

  9. 9.

    Markidis S, Gong J, Schliephake M, Laure E, Hart A, Henty D, Heisey K, Fischer P (2015) OpenACC acceleration of the nek5000 spectral element code. Int J High Perform Comput Appl 29(3):311–319.

  10. 10.

    Morris GM, Huey R, Lindstrom W, Sanner MF, Belew RK, Goodsell DS, Olson AJ (2009) Autodock4 and autodocktools4: automated docking with selective receptor flexibility. J Comput Chem 30(16):2785–2791

  11. 11.

    Nickolls J, Buck I, Garland M, Skadron K (2008) Scalable parallel programming with CUDA. Queue 6(2):40–53

  12. 12. Openacc programming and best practices guide (2015). Accessed 6 May 2019

  13. 13.

    Sawadsitang S, Lin J, See S, Bodin F, Matsuoka S (2015) Understanding performance portability of OpenACC for supercomputers. In: 2015 IEEE International Parallel and Distributed Processing Symposium Workshop, pp 699–707.

  14. 14.

    Stone JE, Gohara D, Shi G (2010) Opencl: a parallel programming standard for heterogeneous computing systems. IEEE Des Test 12(3):66–73.

  15. 15.

    Thomsen R, Christensen MH (2006) Moldock: a new technique for high-accuracy molecular docking. J Med Chem 49(11):3315–3321

  16. 16. Top 500 list (2018). Accessed 6 May 2019

  17. 17.

    Trott O, Olson AJ (2010) Autodock vina: improving the speed and accuracy of docking with a new scoring function, efficient optimization, and multithreading. J Med Chem 31(2):455–461

  18. 18.

    Vitali E, Gadioli D, Palermo G, Beccari A, Silvano C (2018) Accelerating a geometric approach to molecular docking with OpenACC. In: Proceedings of the 6th International Workshop on Parallelism in Bioinformatics, PBio 2018. ACM, New York, pp 45–51.

  19. 19.

    Wang R, Lai L, Wang S (2002) Further development and validation of empirical scoring functions for structure-based binding affinity prediction. J Comput Aided Mol Des 16(1):11–26

  20. 20.

    Xu R, Chandrasekaran S, Chapman B (2013) Exploring programming multi-gpus using OpenMP and OpenACC-based hybrid model.

  21. 21.

    Xu R, Tian X, Chandrasekaran S, Chapman B (2016) Multi-GPU support on single node using directive-based programming model. Sci Program 2015:3:3–3:3.

  22. 22.

    Yan Y, Lin PH, Liao C, de Supinski BR, Quinlan DJ (2015) Supporting multiple accelerators in high-level programming models, pp 170–180.

  23. 23.

    Yan Y, Liu J, Cameron KW, Umar M (2017) Homp: Automated distribution of parallel loops and data in highly parallel accelerator-based systems, pp. 788–798.

Download references


This work has been partially funded by the EU H2020-FET-HPC program under the project ANTAREX—AutoTuning and Adaptivity appRoach for Energy efficient eXascale HPC systems (Grant Number 671623)

Author information

Correspondence to Emanuele Vitali.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Vitali, E., Gadioli, D., Palermo, G. et al. Exploiting OpenMP and OpenACC to accelerate a geometric approach to molecular docking in heterogeneous HPC nodes. J Supercomput 75, 3374–3396 (2019).

Download citation


  • Molecular docking
  • GPU
  • CPU
  • OpenACC
  • OpenMP
  • High-performance computing