hdf_nucmass_io.h
Go to the documentation of this file.
1 /*
2  -------------------------------------------------------------------
3 
4  Copyright (C) 2006-2018, 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_UBUNTU_HDF5
32 #include <hdf5/serial/hdf5.h>
33 #include <hdf5/serial/hdf5_hl.h>
34 #else
35 #include <hdf5.h>
36 #include <hdf5_hl.h>
37 #endif
38 
39 #include <o2scl/constants.h>
40 #include <o2scl/hdf_file.h>
41 #include <o2scl/lib_settings.h>
42 #include <o2scl/nucmass.h>
43 #include <o2scl/nucmass_ame.h>
44 #include <o2scl/nucmass_hfb.h>
45 #include <o2scl/nucmass_frdm.h>
46 
47 #ifndef DOXYGEN_NO_O2NS
48 
49 // While ideally we would leave this o2scl_hdf namespace in the
50 // documentation, Doxygen seems to get confused with the o2scl_hdf
51 // documentation already in the parent O2scl library.
52 // For now, we leave the o2scl_hdf namespace in
53 
54 namespace o2scl_hdf {
55 #endif
56 
57  /** \brief Read data for \ref o2scl::nucmass_ame from an HDF table
58  specified in a file
59 
60  \note This function is in the o2scl_hdf namespace,
61  see \ref hdf_nucmass_io.h .
62  */
63  void ame_load(o2scl::nucmass_ame &ame, std::string file_name,
64  std::string table_name);
65 
66  /** \brief Read an AME mass table from the \o2 internal data files
67 
68  There are five data sets, selected by the specification of the
69  \c version string
70  - "95rmd" - "Recommended" data from \ref Audi95 (ame95rmd.o2)
71  - "95exp" - "Experimental" data from \ref Audi95 (ame95exp.o2)
72  - "03round" - "Rounded" data from \ref Audi03 (ame03round.o2)
73  - "03" - Data from \ref Audi03 (ame03.o2)
74  - "12" - Data from \ref Audi12 and \ref Wang12 (ame12.o2)
75  - "16" - (default) Data from \ref Huang17 and \ref Wang17 (ame16.o2)
76  - "16round" - Data from \ref Huang17 and \ref Wang17 (ame16round.o2)
77 
78  If any string other than these five is used, the error handler
79  is called. If a data file has not been loaded, then
80  nucmass_ame::is_loaded() returns false.
81 
82  \note This function is in the o2scl_hdf namespace,
83  see \ref hdf_nucmass_io.h .
84  */
85  void ame_load(o2scl::nucmass_ame &ame, std::string name="16");
86 
87  /** \brief Read data for \ref o2scl::nucmass_mnmsk from an HDF table
88 
89  \comment
90  On ubuntu/doxygen-1.8.11, \ref o2scl_hdf fails here.
91  \endcomment
92  \note This function is in the o2scl_hdf namespace,
93  see \ref hdf_nucmass_io.h .
94 
95  \todo Switch to the same 'external' file mechanism used in
96  hdf_eos_io.h.
97  */
98  void mnmsk_load(o2scl::nucmass_mnmsk &mnmsk, std::string dir="");
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  \comment
108  On ubuntu/doxygen-1.8.11, \ref o2scl_hdf fails here.
109  \endcomment
110  \note This function is in the o2scl_hdf namespace,
111  see \ref hdf_nucmass_io.h .
112 
113  \todo Switch to the same 'external' file mechanism used in
114  hdf_eos_io.h.
115  */
116  void hfb_load(o2scl::nucmass_hfb &hfb, size_t model=14, std::string dir="");
117 
118  /** \brief Read data for \ref o2scl::nucmass_hfb from an HDF table
119 
120  Valid values of \c model at present are 17 and 21, corresponding
121  to the HFB17 (\ref Goriely02) and HFB21 (\ref Samyn04). If a
122  number other than these two is given, the error handler is
123  called.
124 
125  \comment
126  On ubuntu/doxygen-1.8.11, \ref o2scl_hdf fails here.
127  \endcomment
128  \note This function is in the o2scl_hdf namespace,
129  see \ref hdf_nucmass_io.h .
130 
131  \todo Switch to the same 'external' file mechanism used in
132  hdf_eos_io.h.
133  */
134  void hfb_sp_load(o2scl::nucmass_hfb_sp &hfb, size_t model=21,
135  std::string dir="");
136 
137 #ifndef DOXYGEN_NO_O2NS
138 }
139 #endif
140 
141 #endif
Mass formula from Moller, Nix, Myers, Swiatecki and Kratz.
Definition: nucmass_frdm.h:285
void mnmsk_load(o2scl::nucmass_mnmsk &mnmsk, std::string dir="")
Read data for o2scl::nucmass_mnmsk from an HDF table.
Masses from the Atomic Mass Evaluation.
Definition: nucmass_ame.h:123
HFB Mass formula with spin and parity information.
Definition: nucmass_hfb.h:157
void ame_load(o2scl::nucmass_ame &ame, std::string file_name, std::string table_name)
Read data for o2scl::nucmass_ame from an HDF table specified in a file.
HFB Mass formula.
Definition: nucmass_hfb.h:49
void hfb_load(o2scl::nucmass_hfb &hfb, size_t model=14, std::string dir="")
Read data for o2scl::nucmass_hfb from an HDF table.
void hfb_sp_load(o2scl::nucmass_hfb_sp &hfb, size_t model=21, std::string dir="")
Read data for o2scl::nucmass_hfb from an HDF table.

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