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 条
  • [31] d2o: a distributed data object for parallel high-performance computing in Python
    Steininger T.
    Greiner M.
    Beaujean F.
    Enßlin T.
    Steininger, Theo (theos@mpa-garching.mpg.de), 1600, SpringerOpen (03)
  • [32] reciprocalspaceship: a Python']Python library for crystallographic data analysis
    Greisman, Jack B.
    Dalton, Kevin M.
    Hekstra, Doeke R.
    JOURNAL OF APPLIED CRYSTALLOGRAPHY, 2021, 54 : 1521 - 1529
  • [33] Performance and Energy Efficiency of CUDA and OpenCL for GPU Computing Using Python']Python
    Holm, Havard H.
    Brodtkorb, Andre R.
    Saetra, Martin L.
    PARALLEL COMPUTING: TECHNOLOGY TRENDS, 2020, 36 : 593 - 604
  • [34] Parallel distributed computing using Python']Python
    Dalcin, Lisandro D.
    Paz, Rodrigo R.
    Kler, Pablo A.
    Cosimo, Alejandro
    ADVANCES IN WATER RESOURCES, 2011, 34 (09) : 1124 - 1139
  • [35] Python']Python and XML for agile scientific computing
    Vallisneri, Michele
    Babak, Stanislav
    COMPUTING IN SCIENCE & ENGINEERING, 2008, 10 (01) : 80 - 87
  • [36] Mrs: MapReduce for Scientific Computing in Python']Python
    McNabb, Andrew
    Lund, Jeffrey
    Seppi, Kevin
    2012 SC COMPANION: HIGH PERFORMANCE COMPUTING, NETWORKING, STORAGE AND ANALYSIS (SCC), 2012, : 600 - 608
  • [37] DendroPy: a Python']Python library for phylogenetic computing
    Sukumaran, Jeet
    Holder, Mark T.
    BIOINFORMATICS, 2010, 26 (12) : 1569 - 1571
  • [38] PyPerC: Python']Python Toolbox for Perceptual Computing
    Ghanavati, Zohreh Amini
    Katebzadeh, MohammadReza
    Tahayori, Hooman
    Khunjush, Farshad
    2018 6TH IRANIAN JOINT CONGRESS ON FUZZY AND INTELLIGENT SYSTEMS (CFIS), 2018, : 210 - 214
  • [39] GeoSkelSL: A Python']Python High-Level DSL for Parallel Computing in Geosciences
    Bourgeois, Kevin
    Robert, Sophie
    Limet, Sebastien
    Essayan, Victor
    COMPUTATIONAL SCIENCE - ICCS 2018, PT III, 2018, 10862 : 839 - 845
  • [40] Efficient development of high performance data analytics in Python']Python
    Alvarez Cid-Fuentes, Javier
    Alvarez, Pol
    Amela, Ramon
    Ishii, Kuninori
    Morizawa, Rafael K.
    Badia, Rosa M.
    FUTURE GENERATION COMPUTER SYSTEMS-THE INTERNATIONAL JOURNAL OF ESCIENCE, 2020, 111 : 570 - 581