High-performance Python for crystallographic computing. Boulle, A. & Kieffer, J. Journal of Applied Crystallography, 52(4):882–897, August, 2019.
Paper doi abstract bibtex 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.
@article{boulle_high-performance_2019,
title = {High-performance {Python} for crystallographic computing},
volume = {52},
issn = {1600-5767},
url = {http://scripts.iucr.org/cgi-bin/paper?S1600576719008471},
doi = {10.1107/S1600576719008471},
abstract = {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.},
number = {4},
urldate = {2019-07-30},
journal = {Journal of Applied Crystallography},
author = {Boulle, A. and Kieffer, J.},
month = aug,
year = {2019},
keywords = {Computing, Crystallography, mentions sympy},
pages = {882--897},
}
Downloads: 0
{"_id":"75yrCXRBDsocafshF","bibbaseid":"boulle-kieffer-highperformancepythonforcrystallographiccomputing-2019","authorIDs":[],"author_short":["Boulle, A.","Kieffer, J."],"bibdata":{"bibtype":"article","type":"article","title":"High-performance Python for crystallographic computing","volume":"52","issn":"1600-5767","url":"http://scripts.iucr.org/cgi-bin/paper?S1600576719008471","doi":"10.1107/S1600576719008471","abstract":"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.","number":"4","urldate":"2019-07-30","journal":"Journal of Applied Crystallography","author":[{"propositions":[],"lastnames":["Boulle"],"firstnames":["A."],"suffixes":[]},{"propositions":[],"lastnames":["Kieffer"],"firstnames":["J."],"suffixes":[]}],"month":"August","year":"2019","keywords":"Computing, Crystallography, mentions sympy","pages":"882–897","bibtex":"@article{boulle_high-performance_2019,\n\ttitle = {High-performance {Python} for crystallographic computing},\n\tvolume = {52},\n\tissn = {1600-5767},\n\turl = {http://scripts.iucr.org/cgi-bin/paper?S1600576719008471},\n\tdoi = {10.1107/S1600576719008471},\n\tabstract = {The Python programming language, combined with the numerical computing library\n NumPy\n and the scientific computing library\n SciPy\n , has become the\n de facto\n 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\n etc.\n ), 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.\n NumPy\n introduces vector programming, improving execution speeds, whereas\n SciPy\n 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\n NumExpr\n ,\n Numba\n ,\n Pythran\n and\n Cython\n ) are used to improve performance and are benchmarked against state-of-the-art\n NumPy\n implementations. All examples are also provided as commented and didactic Python (\n Jupyter\n ) notebooks that can be used as starting points for crystallographers curious to enter the Python ecosystem or wishing to accelerate their existing codes.},\n\tnumber = {4},\n\turldate = {2019-07-30},\n\tjournal = {Journal of Applied Crystallography},\n\tauthor = {Boulle, A. and Kieffer, J.},\n\tmonth = aug,\n\tyear = {2019},\n\tkeywords = {Computing, Crystallography, mentions sympy},\n\tpages = {882--897},\n}\n\n\n\n\n\n\n\n","author_short":["Boulle, A.","Kieffer, J."],"key":"boulle_high-performance_2019","id":"boulle_high-performance_2019","bibbaseid":"boulle-kieffer-highperformancepythonforcrystallographiccomputing-2019","role":"author","urls":{"Paper":"http://scripts.iucr.org/cgi-bin/paper?S1600576719008471"},"keyword":["Computing","Crystallography","mentions sympy"],"metadata":{"authorlinks":{}},"downloads":0},"bibtype":"article","biburl":"https://bibbase.org/zotero-group/nicoguaro/525293","creationDate":"2020-07-15T19:11:20.424Z","downloads":0,"keywords":["computing","crystallography","mentions sympy"],"search_terms":["high","performance","python","crystallographic","computing","boulle","kieffer"],"title":"High-performance Python for crystallographic computing","year":2019,"dataSources":["YtBDXPDiQEyhyEDZC","fhHfrQgj3AaGp7e9E","qzbMjEJf5d9Lk78vE","45tA9RFoXA9XeH4MM","MeSgs2KDKZo3bEbxH","nSXCrcahhCNfzvXEY","ecatNAsyr4f2iQyGq","tpWeaaCgFjPTYCjg3"]}