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 条
  • [41] Codon: A Compiler for High-Performance Python']Pythonic Applications and DSLs
    Shajii, Ariya
    Ramirez, Gabriel
    Smajlovic, Haris
    Ray, Jessica
    Berger, Bonnie
    Amarasinghe, Saman
    Numanagic, Ibrahim
    PROCEEDINGS OF THE 32ND ACM SIGPLAN INTERNATIONAL CONFERENCE ON COMPILER CONSTRUCTION, CC 2023, 2023, : 191 - 202
  • [42] Teaching Parallel Computing and Dependence Analysis with Python']Python
    Watkinson, Neftali
    Shivam, Aniket
    Nicolau, Alexandru
    Veidenbaum, Alexander V.
    2019 IEEE INTERNATIONAL PARALLEL AND DISTRIBUTED PROCESSING SYMPOSIUM WORKSHOPS (IPDPSW), 2019, : 320 - 325
  • [43] A scalable interactive parallel computing environment for python']python
    Raghunathan, Sudarshan
    COMPUTING AND INFORMATICS, 2008, 27 (02) : 249 - 259
  • [44] A Python']Python Software Library for Computing with Words and Perceptions
    Sharma, Deepak
    Gupta, Prashant K.
    Andreu-Perez, Javier
    Mendel, Jerry M.
    Martinez Lopez, Luis
    IEEE CIS INTERNATIONAL CONFERENCE ON FUZZY SYSTEMS 2021 (FUZZ-IEEE), 2021,
  • [45] Matched regulation of gastrointestinal performance in the Burmese python']python, Python']Python molurus
    Cox, Christian L.
    Secor, Stephen M.
    JOURNAL OF EXPERIMENTAL BIOLOGY, 2008, 211 (07): : 1131 - 1140
  • [46] High performance Python']Python for direct numerical simulations of turbulent flows
    Mortensen, Mikael
    Langtangen, Hans Petter
    COMPUTER PHYSICS COMMUNICATIONS, 2016, 203 : 53 - 65
  • [47] Hi-LASSO: High-performance python']python and apache spark packages for feature selection with high-dimensional data
    Jo, Jongkwon
    Jung, Seungha
    Park, Joongyang
    Kim, Youngsoon
    Kang, Mingon
    PLOS ONE, 2022, 17 (12):
  • [48] Agent-oriented computing platform in Python']Python
    Kazirod, Maciej
    Korczynski, Wojciech
    Byrski, Aleksander
    2014 IEEE/WIC/ACM INTERNATIONAL JOINT CONFERENCES ON WEB INTELLIGENCE (WI) AND INTELLIGENT AGENT TECHNOLOGIES (IAT), VOL 3, 2014, : 365 - 372
  • [49] Mrs: High Performance MapReduce for Iterative and Asynchronous Algorithms in Python']Python
    Lund, Jeffrey
    Ashcraft, Chace
    McNabb, Andrew
    Seppi, Kevin
    PROCEEDINGS OF PYHPC2016: 6TH WORKSHOP ON PYTHON FOR HIGH-PERFORMANCE AND SCIENTIFIC COMPUTING, 2016, : 76 - 85
  • [50] PyOphidia: A Python']Python library for High Performance Data Analytics at scale
    Elia, Donatello
    Palazzo, Cosimo
    Fiore, Sandro
    D'Anca, Alessandro
    Mariello, Andrea
    Aloisio, Giovanni
    SOFTWAREX, 2023, 24