Hi Jan,
To add to Pavel's response, the direct summation code is located in structure_factors_direct.h (
https://github.com/cctbx/cctbx_project/blob/master/cctbx/xray/structure_factors_direct.h). The most recent change is for handling anharmonic ADP. The Python interface is in cctbx.xray.structure_factors.from_scatterers_direct and an example of usage can be found in the test, cctbx/regression/tst_xray.py, in the "exercise_from_scatterers_direct" function.
As for simulating powder diffraction images, I'm not sure about that specific technique, but there is some ongoing work in the simtbx directory for serial protein crystallography and some older work in cudatbx for solution scattering. For the solution scattering work, an image is simulated and the 1-d SAXS curve can be calculated.
Research Scientist, Molecular Biophysics and Integrated Bioimaging
Lawrence Berkeley National Laboratory
1 Cyclotron Road, M/S 33R0345
Berkeley, CA 94720
Tel: (510) 486-5709
Fax: (510) 486-5909