High-performance Python']Python for crystallographic computing

被引:6
|
作者
Boulle, A. [1 ]
Kieffer, J. [2 ]
机构
[1] Ctr Europeen Ceram, CNRS, UMR 7315, Inst Rech Ceram, 12 Rue Atlantis, F-87068 Limoges, France
[2] European Synchrotron Radiat Facil, 71 Ave Martyrs, F-38000 Grenoble, France
关键词
computing; !text type='Python']Python[!/text; NumPy; compilers; X-RAY-DIFFRACTION; SCATTERING; VISUALIZATION; STRAIN;
D O I
10.1107/S1600576719008471
中图分类号
O6 [化学];
学科分类号
0703 ;
摘要
The Python programming language, combined with the numerical computing library NumPy and the scientific computing library SciPy, has become the de facto standard for scientific computing in a variety of fields. This popularity is mainly due to the ease with which a Python program can be written and executed (easy syntax, dynamical typing, no compilation etc.), coupled with the existence of a large number of specialized third-party libraries that aim to lift all the limitations of the raw Python language. NumPy introduces vector programming, improving execution speeds, whereas SciPy brings a wealth of highly optimized and reliable scientific functions. There are cases, however, where vector programming alone is not sufficient to reach optimal performance. This issue is addressed with dedicated compilers that aim to translate Python code into native and statically typed code with support for the multi-core architectures of modern processors. In the present article it is shown how these approaches can be efficiently used to tackle different problems, with increasing complexity, that are relevant to crystallography: the 2D Laue function, scattering from a strained 2D crystal, scattering from 3D nanocrystals and, finally, diffraction from films and multilayers. For each case, detailed implementations and explanations of the functioning of the algorithms are provided. Different Python compilers (namely NumExpr, Numba, Pythran and Cython) are used to improve performance and are benchmarked against state-of-the-art NumPy implementations. All examples are also provided as commented and didactic Python (Jupyter) notebooks that can be used as starting points for crystallographers curious to enter the Python ecosystem or wishing to accelerate their existing codes.
引用
收藏
页码:882 / 897
页数:16
相关论文
共 50 条
  • [11] PyExaFMM: An Exercise in Designing High-Performance Software With Python']Python and Numba
    Kailasa, Srinath A.
    Wang, Tingyu
    Barba, Lorena
    Betcke, Timo
    COMPUTING IN SCIENCE & ENGINEERING, 2022, 24 (05) : 77 - 84
  • [12] PyTrilinos: High-performance distributed-memory solvers for python']python
    Sala, Marzio
    Spotz, W. F.
    Heroux, M. A.
    ACM TRANSACTIONS ON MATHEMATICAL SOFTWARE, 2008, 34 (02):
  • [13] PYTRILINOS: High-performance distributed-memory solvers for Python']Python
    Sala, Marzio
    Spotz, William F.
    Heroux, Michael A.
    APPLIED PARALLEL COMPUTING: STATE OF THE ART IN SCIENTIFIC COMPUTING, 2007, 4699 : 966 - +
  • [14] High-Performance Parallel Computations Using Python']Python as High-Level Language
    Masini, Stefano
    Bientinesi, Paolo
    EURO-PAR 2010 PARALLEL PROCESSING WORKSHOPS, 2011, 6586 : 541 - 548
  • [15] A Python']Python-based programming language for high-performance computational genomics
    Shajii, Ariya
    Numanagic, Ibrahim
    Leighton, Alexander T.
    Greenyer, Haley
    Amarasinghe, Saman
    Berger, Bonnie
    NATURE BIOTECHNOLOGY, 2021, 39 (09) : 1062 - 1064
  • [16] GPU Computing with Python']Python: Performance, Energy Efficiency and Usability
    Holm, Havard H.
    Brodtkorb, Andre R.
    Saetra, Martin L.
    COMPUTATION, 2020, 8 (01)
  • [17] VeloxChem: A Python']Python-driven density-functional theory program for spectroscopy simulations in high-performance computing environments
    Rinkevicius, Zilvinas
    Li, Xin
    Vahtras, Olav
    Ahmadzadeh, Karan
    Brand, Manuel
    Ringholm, Magnus
    List, Nanna Holmgaard
    Scheurer, Maximilian
    Scott, Mikael
    Dreuw, Andreas
    Norman, Patrick
    WILEY INTERDISCIPLINARY REVIEWS-COMPUTATIONAL MOLECULAR SCIENCE, 2020, 10 (05)
  • [18] Scientific computing with python']python
    Beazley, DM
    ASTRONOMICAL DATA ANALYSIS SOFTWARE AND SYSTEMS IX, 2000, 216 : 49 - 58
  • [19] Python']Python for scientific computing
    Oliphant, Travis E.
    COMPUTING IN SCIENCE & ENGINEERING, 2007, 9 (03) : 10 - 20
  • [20] NoisePy: A New High-Performance Python']Python Tool for Ambient-Noise Seismology
    Jiang, Chengxin
    Denolle, Marine A.
    SEISMOLOGICAL RESEARCH LETTERS, 2020, 91 (03) : 1853 - 1866