hdf_nucmass_io.h
Go to the documentation of this file.
1 /*
2  -------------------------------------------------------------------
3 
4  Copyright (C) 2006-2020, Andrew W. Steiner
5 
6  This file is part of O2scl.
7 
8  O2scl is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 3 of the License, or
11  (at your option) any later version.
12 
13  O2scl is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with O2scl. If not, see <http://www.gnu.org/licenses/>.
20 
21  -------------------------------------------------------------------
22 */
23 #ifndef O2SCL_HDF_NUCMASS_IO_H
24 #define O2SCL_HDF_NUCMASS_IO_H
25 
26 /** \file hdf_nucmass_io.h
27  \brief File for HDF input of the \ref o2scl::nucmass_ame and
28  \ref o2scl::nucmass_mnmsk data files
29 */
30 
31 #ifdef O2SCL_PLAIN_HDF5_HEADER
32 #include <hdf5.h>
33 #include <hdf5_hl.h>
34 #else
35 #ifdef O2SCL_LINUX
36 #include <hdf5/serial/hdf5.h>
37 #include <hdf5/serial/hdf5_hl.h>
38 #else
39 #include <hdf5.h>
40 #include <hdf5_hl.h>
41 #endif
42 #endif
43 
44 #include <o2scl/constants.h>
45 #include <o2scl/hdf_file.h>
46 #include <o2scl/lib_settings.h>
47 #include <o2scl/nucmass.h>
48 #include <o2scl/nucmass_ame.h>
49 #include <o2scl/nucmass_hfb.h>
50 #include <o2scl/nucmass_frdm.h>
51 
52 #ifndef DOXYGEN_NO_O2NS
53 
54 // While ideally we would leave this o2scl_hdf namespace in the
55 // documentation, Doxygen seems to get confused with the o2scl_hdf
56 // documentation already in the parent O2scl library.
57 // For now, we leave the o2scl_hdf namespace in
58 
59 namespace o2scl_hdf {
60 #endif
61 
62  /** \brief Read data for \ref o2scl::nucmass_ame from an HDF table
63  specified in a file
64 
65  \note This function is in the o2scl_hdf namespace,
66  see \ref hdf_nucmass_io.h .
67  */
68  void ame_load_ext(o2scl::nucmass_ame &ame, std::string file_name,
69  std::string table_name, bool exp_only=false);
70 
71  /** \brief Read an AME mass table from the \o2 internal data files
72 
73  There are five data sets, selected by the specification of the
74  \c version string
75  - "95rmd" - "Recommended" data from \ref Audi95 (ame95rmd.o2)
76  - "95exp" - "Experimental" data from \ref Audi95 (ame95exp.o2)
77  - "03round" - "Rounded" data from \ref Audi03 (ame03round.o2)
78  - "03" - Data from \ref Audi03 (ame03.o2)
79  - "12" - Data from \ref Audi12 and \ref Wang12 (ame12.o2)
80  - "16" - (default) Data from \ref Huang17 and \ref Wang17 (ame16.o2)
81  - "16round" - Data from \ref Huang17 and \ref Wang17 (ame16round.o2)
82 
83  If any string other than these seven is used, the error handler
84  is called. If a data file has not been loaded, then
85  nucmass_ame::is_loaded() returns false.
86 
87  \note This function is in the o2scl_hdf namespace,
88  see \ref hdf_nucmass_io.h .
89  */
90  void ame_load(o2scl::nucmass_ame &ame, std::string name="16",
91  bool exp_only=false);
92 
93  /** \brief Read data for \ref o2scl::nucmass_mnmsk from an HDF table
94 
95  \note This function is in the o2scl_hdf namespace,
96  see \ref hdf_nucmass_io.h .
97  */
98  void mnmsk_load(o2scl::nucmass_mnmsk &mnmsk, std::string filename="");
99 
100  /** \brief Read data for \ref o2scl::nucmass_hfb from an HDF table
101 
102  Valid values of \c model at present are 2, 8, and 14, corresponding
103  to the HFB2 (\ref Goriely02), HFB8 (\ref Samyn04), and HFB14
104  (\ref Goriely07). If a number other than these three is given,
105  the error handler is called.
106 
107  \note This function is in the o2scl_hdf namespace,
108  see \ref hdf_nucmass_io.h .
109  */
110  void hfb_load(o2scl::nucmass_hfb &hfb, size_t model=14,
111  std::string filename="");
112 
113  /** \brief Read data for \ref o2scl::nucmass_hfb from an HDF table
114 
115  Valid values of \c model at present are 17, and 21 through 27.
116  The first two correspond to the HFB17 (\ref Goriely02) and HFB21
117  (\ref Samyn04). If a number outside this range is given, then 27
118  is assumed.
119 
120  \todo Document models 22 through 27.
121 
122  \note This function is in the o2scl_hdf namespace,
123  see \ref hdf_nucmass_io.h .
124  */
125  void hfb_sp_load(o2scl::nucmass_hfb_sp &hfb, size_t model=27,
126  std::string filename="");
127 
128 #ifndef DOXYGEN_NO_O2NS
129 }
130 #endif
131 
132 #endif
o2scl_hdf::ame_load_ext
void ame_load_ext(o2scl::nucmass_ame &ame, std::string file_name, std::string table_name, bool exp_only=false)
Read data for o2scl::nucmass_ame from an HDF table specified in a file.
o2scl::nucmass_hfb_sp
HFB Mass formula with spin and parity information.
Definition: nucmass_hfb.h:145
o2scl::nucmass_hfb
HFB Mass formula.
Definition: nucmass_hfb.h:49
o2scl_hdf::hfb_sp_load
void hfb_sp_load(o2scl::nucmass_hfb_sp &hfb, size_t model=27, std::string filename="")
Read data for o2scl::nucmass_hfb from an HDF table.
o2scl_hdf::hfb_load
void hfb_load(o2scl::nucmass_hfb &hfb, size_t model=14, std::string filename="")
Read data for o2scl::nucmass_hfb from an HDF table.
o2scl::nucmass_mnmsk
Mass formula from Moller, Nix, Myers, Swiatecki and Kratz.
Definition: nucmass_frdm.h:285
o2scl_hdf::ame_load
void ame_load(o2scl::nucmass_ame &ame, std::string name="16", bool exp_only=false)
Read an AME mass table from the <a href='../../html/index.html'>O<span style='position: relative; top...
o2scl::nucmass_ame
Masses from the Atomic Mass Evaluation.
Definition: nucmass_ame.h:123
o2scl_hdf::mnmsk_load
void mnmsk_load(o2scl::nucmass_mnmsk &mnmsk, std::string filename="")
Read data for o2scl::nucmass_mnmsk from an HDF table.

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).