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 条
  • [21] Landscape of High-Performance Python']Python to Develop Data Science and Machine Learning Applications
    Castro, Oscar
    Bruneau, Pierrick
    Sottet, Jean-Sebastien
    Torregrossa, Dario
    ACM COMPUTING SURVEYS, 2024, 56 (03)
  • [22] PyNetCor: a high-performance Python']Python package for large-scale correlation analysis
    Long, Shibin
    Xia, Yan
    Liang, Lifeng
    Yang, Ying
    Xie, Hailiang
    Wang, Xiaokai
    NAR GENOMICS AND BIOINFORMATICS, 2024, 6 (04)
  • [23] pyBaram: Parallel compressible flow solver in high-performance Python']Python for teaching and research
    Park, Jin Seok
    SOFTWAREX, 2022, 20
  • [24] High-performance Python']Python-C plus plus bindings with PyPy and Cling
    Lavrijsen, Wim T. L. P.
    Dutta, Aditi
    PROCEEDINGS OF PYHPC2016: 6TH WORKSHOP ON PYTHON FOR HIGH-PERFORMANCE AND SCIENTIFIC COMPUTING, 2016, : 27 - 35
  • [25] Powering Practical Performance: Accelerated Numerical Computing in Pure Python']Python
    Penn, Matthew
    Milroy, Chris
    2022 IEEE HIGH PERFORMANCE EXTREME COMPUTING VIRTUAL CONFERENCE (HPEC), 2022,
  • [26] Python']Python: An Ecosystem for Scientific Computing
    Perez, Fernando
    Granger, Brian E.
    Hunter, John D.
    COMPUTING IN SCIENCE & ENGINEERING, 2011, 13 (02) : 13 - 21
  • [27] A functional start to computing with Python']Python
    Clare, Amanda
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2015, 25
  • [28] SymPy: symbolic computing in Python']Python
    Meurer, Aaron
    Smith, Christopher P.
    Paprocki, Mateusz
    Certik, Ondrej
    Kirpichev, Sergey B.
    Rocklin, Matthew
    Kumar, AMiT
    Ivanov, Sergiu
    Moore, Jason K.
    Singh, Sartaj
    Rathnayake, Thilina
    Vig, Sean
    Granger, Brian E.
    Muller, Richard P.
    Bonazzi, Francesco
    Gupta, Harsh
    Vats, Shivam
    Johansson, Fredrik
    Pedregosa, Fabian
    Curry, Matthew J.
    Terrel, Andy R.
    Roucka, Stepan
    Saboo, Ashutosh
    Fernando, Isuru
    Kulal, Sumith
    Cimrman, Robert
    Scopatz, Anthony
    PEERJ COMPUTER SCIENCE, 2017,
  • [29] A Low Cost High Performance Computing Platform for Cellular Nonlinear Networks using Python']Python for CUDA
    Dogaru, Radu
    Dogaru, Ioana
    2015 20TH INTERNATIONAL CONFERENCE ON CONTROL SYSTEMS AND COMPUTER SCIENCE, 2015, : 593 - 598
  • [30] TFInterpy: A high-performance spatial interpolation Python package
    Chen, Zhiwen
    Zhong, Baorong
    SoftwareX, 2022, 20