Anonymous Vincent Favre-Nicolin


PyNX stands for Python tools for Nano-structures Crystallography.

It is a small python library which aims to help computing scattering (X-ray or neutrons) for atomic structures, especially if they are distorted or disordered.

The library uses GPU computing (although parallel CPU computing is also available as a fall-back), with the following platforms:

Using GPU computing, PyNX provides fast parallel computation of scattering from large assemblies of atoms (>>1000 atoms) and 1D, 2D or 3D coordinates (>>1000) in reciprocal space. Typical computing speeds on GPUs more than 10^11 reflections.atoms/s on nVidia cards (3.5x10^11 on 2xTitan, 2x10^11 on a GTX 690, 5x10^10 on a GTX295, 2.5x10^10 on a GTX465), more than 2 orders of magnitude faster than on a CPU.

To begin with PyNX, you can go to the installation page, or look at the examples to see how simple it is to use it.


  • 2012/06/26: the OpenCL code has been improved, and should provide better performance and stability (avoid 'out of resources' issues)
  • 2011/10/01: the PyNX code has been updated to work both with CUDA and OpenCL

Citation & Bibliography

If you use PyNX for scientific work, please consider including a citation:


The PyNX library is distributed with a CeCILL-B license (an open-source license similar to the FreeBSD one).


Wiki: Examples
Wiki: Installation