Nuclei and nuclear masses

A basic data structure for nuclei, class o2scl::nucleus, is implemented as a child of of o2scl::part_tl.

Nuclear masses are given as children of o2scl::nucmass and are generally of two types: tables of masses (children of o2scl::nucmass_table) or formulas which generate masses from a set of parameters and can be fit to data (o2scl::nucmass_fit).

There are eleven mass table types currently included.

The mass formulas which can be fit to data are

In order to create a set of nuclei stored in a std::vector object, one can use o2scl_part::nucdist_set().

Nuclear mass fit example

/* Example: ex_nucmass_fit.cpp
-------------------------------------------------------------------
*/
#include <iostream>
#include <o2scl/test_mgr.h>
#include <o2scl/nucmass_fit.h>
#ifdef O2SCL_HDF
#include <o2scl/hdf_file.h>
#include <o2scl/hdf_nucmass_io.h>
#endif
using namespace std;
using namespace o2scl;
using namespace o2scl_const;
int main(void) {
cout.setf(ios::scientific);
#ifdef O2SCL_HDF
// The RMS deviation of the fit
double res;
// The mass formula to be fitted
// The fitting class
// Load the experimental data
nucdist_set(mf.dist,ame);
// Perform the fit
mf.fit(sem,res);
// Output the results
cout << sem.B << " " << sem.Sv << " " << sem.Ss << " "
<< sem.Ec << " " << sem.Epair << endl;
cout << res << endl;
t.test_gen(res<4.0,"Successful fit.");
#else
cout << "No fitting was performed because O2scl appears not to have been "
<< "compiled with HDF support." << endl;
#endif
t.report();
return 0;
}
// End of example

Nuclear mass example

/* Example: ex_nucmass.cpp
-------------------------------------------------------------------
Demonstrate nuclear mass formulas by comparing them with
the Audi et al. (2012) atomic mass evaluation. This example
computes the absolute deviation in the mass excess.
*/
#include <iostream>
#include <o2scl/test_mgr.h>
#include <o2scl/table_units.h>
#include <o2scl/hdf_file.h>
#include <o2scl/hdf_io.h>
#include <o2scl/hdf_nucmass_io.h>
#include <o2scl/nucmass.h>
#include <o2scl/nucdist.h>
#include <o2scl/nucmass_fit.h>
#include <o2scl/nucmass_dz.h>
#include <o2scl/nucmass_hfb.h>
#include <o2scl/nucmass_wlw.h>
#include <o2scl/nucmass_ktuy.h>
using namespace std;
using namespace o2scl;
using namespace o2scl_const;
using namespace o2scl_hdf;
int main(void) {
cout.setf(ios::scientific);
// ---------------------------------------------------------------
// The most recent experimental masses from the 2016 AME as a
// baseline. The flag 'true' at the end ensures only experimentally
// measured masses are included.
o2scl_hdf::ame_load(ame,"16",true);
// ---------------------------------------------------------------
// Instantiate and load all of the nuclear mass objects. Some of
// them require a separate HDF5 file
nucmass_hfb hfb14;
nucmass_ame ame03;
o2scl_hdf::ame_load(ame03,"03",true);
nucmass_ktuy ktuy05;
ktuy05.load("05");
ws32.load("WS3.2");
ws36.load("WS3.6");
// ---------------------------------------------------------------
// List of pointers to all masses for convenience
static const size_t n_tables=11;
nucmass *massp[n_tables]={&se,&mnmsk,&hfb14,&hfb21,&hfb27,
&ame03,&dz,&ktuy05,&dvi,&ws32,&ws36};
// ------------------------------------------------------
// Create a list of all of the experimental masses
vector<nucleus> ame_dist;
nucdist_set(ame_dist,ame,"N>7 && Z>7");
// ------------------------------------------------------
// Fit the semi-empirical and DvI (2009) mass formulas to
// the 2012 AME data
static const size_t n_fits=2;
// The default number of trials isn't enough for the DvI
// model, so we increase it
mf.def_mmin.ntrial*=10;
// Use the same list as above
mf.dist=ame_dist;
// The RMS deviation in the mass excess
double res;
// Fit both mass formulas
nucmass_fit_base *fitp[n_fits]={&se,&dvi};
for(size_t i=0;i<n_fits;i++) {
mf.fit(*(fitp[i]),res);
}
// ------------------------------------------------------
// Create a table to store the data
tu.line_of_names(((string)"Z N ame se mnmsk hfb14 hfb21 ")+
"hfb27 ame03 dz96 ktuy05 dvi ws32 ws36");
// ------------------------------------------------------
// Fill the table
for(size_t i=0;i<ame_dist.size();i++) {
line.push_back(ame_dist[i].Z);
line.push_back(ame_dist[i].N);
double ame_mass=ame.mass_excess(ame_dist[i].Z,ame_dist[i].N);
line.push_back(ame_mass);
for(size_t j=0;j<n_tables;j++) {
if (massp[j]->is_included(ame_dist[i].Z,ame_dist[i].N)) {
double val=ame_mass-
massp[j]->mass_excess(ame_dist[i].Z,ame_dist[i].N);
line.push_back(val);
} else {
line.push_back(0.0);
}
}
tu.line_of_data(line);
}
// ------------------------------------------------------
// Output the table to a file
hf.open_or_create("ex_nucmass_table.o2");
hdf_output(hf,tu,"nuclear_masses");
hf.close();
t.report();
return 0;
}
// End of example
o2scl::nucmass_hfb_sp
HFB Mass formula with spin and parity information.
Definition: nucmass_hfb.h:145
o2scl_const
hdf_output
void hdf_output(hdf_file &hf, o2scl::uniform_grid< double > &h, std::string name)
vector< double >
o2scl::test_mgr::test_gen
bool test_gen(bool value, std::string description)
o2scl::nucmass_dvi
Nuclear mass formula from Dieperink and van Isacker (2009)
Definition: nucmass.h:519
o2scl::nucmass_ktuy::load
int load(std::string model="05", bool external=false)
Load masses using the specified model number.
o2scl::test_mgr::report
bool report() const
o2scl::nucmass_hfb
HFB Mass formula.
Definition: nucmass_hfb.h:49
mmin_base< multi_funct, multi_funct, boost::numeric::ublas::vector< double > >::ntrial
int ntrial
o2scl::nucmass_wlw
Nuclear structure from Wang et al.
Definition: nucmass_wlw.h:50
o2scl::nucmass_semi_empirical::Ss
double Ss
Surface energy (in MeV, default 18)
Definition: nucmass.h:440
o2scl_hdf::hdf_file::close
void close()
o2scl::nucmass_ame::mass_excess
virtual double mass_excess(int Z, int N)
Given Z and N, return the mass excess in MeV.
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::nucmass_fit::def_mmin
mmin_simp2 def_mmin
The default minimizer.
Definition: nucmass_fit.h:99
o2scl::table_units
o2scl::nucmass_fit::dist
std::vector< nucleus > dist
Select the experimental nuclei to fit.
Definition: nucmass_fit.h:109
o2scl::nucmass_ktuy
KTUY Mass formula.
Definition: nucmass_ktuy.h:38
o2scl::nucmass_fit
Fit a nuclear mass formula.
Definition: nucmass_fit.h:51
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_fit_base
Fittable mass formula [abstract base].
Definition: nucmass.h:375
o2scl::nucmass_semi_empirical::Epair
double Epair
Pairing energy (MeV, default 13.0)
Definition: nucmass.h:446
o2scl::test_mgr
o2scl::nucmass_mnmsk
Mass formula from Moller, Nix, Myers, Swiatecki and Kratz.
Definition: nucmass_frdm.h:285
o2scl::nucmass_semi_empirical::Ec
double Ec
Coulomb energy (in MeV, default 0.7)
Definition: nucmass.h:443
o2scl_part::nucdist_set
void nucdist_set(std::vector< nucleus > &dist, nucmass &nm, std::string expr="1", int maxA=400, bool include_neutron=false)
Set a distribution of nuclei from a mass formula and a function string.
o2scl::nucmass
Nuclear mass formula base [abstract base].
Definition: nucmass.h:206
o2scl::test_mgr::set_output_level
void set_output_level(int l)
o2scl_hdf::hdf_file
o2scl_hdf::hdf_file::open_or_create
void open_or_create(std::string fname)
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::mass_excess
virtual double mass_excess(int Z, int N)=0
Given Z and N, return the mass excess in MeV [abstract].
o2scl::nucmass_ame
Masses from the Atomic Mass Evaluation.
Definition: nucmass_ame.h:123
o2scl::nucmass_dz_table
Duflo-Zuker mass formula from tables.
Definition: nucmass_dz.h:48
o2scl::nucmass_semi_empirical::Sv
double Sv
Symmetry energy (in MeV, default 23.7)
Definition: nucmass.h:437
o2scl_hdf::mnmsk_load
void mnmsk_load(o2scl::nucmass_mnmsk &mnmsk, std::string filename="")
Read data for o2scl::nucmass_mnmsk from an HDF table.
o2scl::nucmass_semi_empirical::B
double B
Binding energy (negative and in MeV, default -16)
Definition: nucmass.h:434
o2scl::nucmass_semi_empirical
Semi-empirical mass formula.
Definition: nucmass.h:427
o2scl::nucmass_fit::fit
virtual void fit(nucmass_fit_base &n, double &res)
Fit the nuclear mass formula.

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