Gemmi C++ API
Loading...
Searching...
No Matches
neutron92.hpp
Go to the documentation of this file.
1// Copyright 2022 Global Phasing Ltd.
2
3// Neutron coherent scattering lengths of the elements,
4// from Neutron News, Vol. 3, No. 3, 1992.
5//
6// We use the same data as cctbx/eltbx/neutron.h, which is based on
7// https://www.ncnr.nist.gov/resources/n-lengths/list.html
8// which in turn is based on Neutron News, Vol. 3, No. 3, 1992, pp. 29-37.
9
10#ifndef GEMMI_NEUTRON92_HPP_
11#define GEMMI_NEUTRON92_HPP_
12
13#include "formfact.hpp" // for GaussianCoef
14#include "elem.hpp" // for El
15
16namespace gemmi {
17
18#if defined(__GNUC__) && __GNUC__-0 > 4
19#pragma GCC diagnostic push
20#pragma GCC diagnostic ignored "-Wfloat-conversion"
21#endif
22
23template<class Real>
24struct Neutron92 {
26 static Real data[121];
27
28 static Real& get_(El el) { return data[static_cast<int>(el)]; }
29 static bool has(El el) { return get_(el) != 0; }
30 static Coef get(El el, signed char /*charge*/=0) { return Coef{{get_(el)}}; }
31};
32
33// real part of the bound coherent neutron scattering length (fm)
34template<class Real>
35Real Neutron92<Real>::data[121] = {
36 /*X*/ 0.0,
37 /*H*/ -3.7390, /*He*/ 3.26,
38 /*Li*/ -1.90, /*Be*/ 7.79, /*B*/ 5.30, /*C*/ 6.646,
39 /*N*/ 9.36, /*O*/ 5.803, /*F*/ 5.654, /*Ne*/ 4.566,
40 /*Na*/ 3.63, /*Mg*/ 5.375, /*Al*/ 3.449, /*Si*/ 4.1491,
41 /*P*/ 5.13, /*S*/ 2.847, /*Cl*/ 9.577, /*Ar*/ 1.909,
42 /*K*/ 3.67, /*Ca*/ 4.70, /*Sc*/ 12.29, /*Ti*/ -3.438,
43 /*V*/ -0.3824, /*Cr*/ 3.635, /*Mn*/ -3.73, /*Fe*/ 9.45,
44 /*Co*/ 2.49, /*Ni*/ 10.3, /*Cu*/ 7.718, /*Zn*/ 5.68,
45 /*Ga*/ 7.288, /*Ge*/ 8.185, /*As*/ 6.58, /*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*Fl*/ 0., /*Mc*/ 0., /*Lv*/ 0., /*Ts*/ 0., /*Og*/ 0.,
65 /*D*/ 6.671, /*END*/ 0.
66};
67
68#if defined(__GNUC__) && __GNUC__-0 > 4
69#pragma GCC diagnostic pop
70#endif
71
72} // namespace gemmi
73#endif
static Real data[121]
Definition neutron92.hpp:26
static Coef get(El el, signed char=0)
Definition neutron92.hpp:30
static bool has(El el)
Definition neutron92.hpp:29