Gemmi C++ API
Loading...
Searching...
No Matches
fprime.hpp
Go to the documentation of this file.
1// Cromer-Liberman calculation of anomalous scattering factors,
2// with corrections from Kissel & Pratt.
3
4// Read the header comment in src/fprime.cpp for the details.
5
6#ifndef GEMMI_FPRIME_HPP_
7#define GEMMI_FPRIME_HPP_
8
9#include "fail.hpp"
10
11namespace gemmi {
12
21GEMMI_DLL void cromer_liberman_for_array(int z, int npts, const double* energy,
22 double* fp, double* fpp);
23
25inline double cromer_liberman(int z, double energy, double* fpp) {
26 double fp = 0., fpp_ = 0.;
27 cromer_liberman_for_array(z, 1, &energy, &fp, &fpp_);
28 if (fpp)
29 *fpp = fpp_;
30 return fp;
31}
32
33} // namespace gemmi
34#endif
fail(), unreachable() and __declspec/__attribute__ macros
#define GEMMI_DLL
Definition fail.hpp:53
GEMMI_DLL void cromer_liberman_for_array(int z, int npts, const double *energy, double *fp, double *fpp)
Cromer-Liberman calculation of anomalous scattering factors.
double cromer_liberman(int z, double energy, double *fpp)
returns fp, fpp is returned through the last argument.
Definition fprime.hpp:25