Skip to main content

Python implementation of BARFIT routine by A Sierk

Reason this release was yanked:

note ready for distribution

Project description

Python implementation of A. Sierk's BARFIT

Read online version: https://gitlab.in2p3.fr/gregoire.henning/fisbar-python/-/blob/master/README.md

Python 3.6

History

Between 1984 and 2986, A. J. Sierk developped the BARFIT (also refered as fisbar) routine to compute fission barrier, ground state energy and maximum angular momentum a nucleus can sustain in the framework of the liquid drop model.

The routine used fitted value over a wide range of A, Z and L. In fact, it is an impressive piece of code that performs a global fit, where we would use today some kind of machine learning model. The full calculation and routine is described in A. Sierk, Phys. Rev. C33 (1986) 2039..

The routine is still available today from the RIPL-3 website (Readme of original routine).

Python implementation

The 1986 Fortran routine is old and may not compile on modern computers. However, the routine is still of great interest, as it is able to provide an estimate for a fission barrier for light elements (For heavy ones, one can find the predicted values by P. Moeller, A. J. Sierk, et al : "HEAVY-ELEMENT FISSION BARRIERS").

The code of is quite straightforward, so it's not too hard to translate it into python.

This is one implementation in python 3.6. The code is almost a line-for-line translation of the original fortran routine. As is, it is quite un-pythonic, but it makes the working, testing and checking easier when writing from the orginal code.

The lpoly routine of Sierk was replaced with the numpy.polynomial.legendre module to obtain the legendre polynomial values. (This is the only external dependency of the module).

Accuracy

The output of the code is compared to the references values given by A. Sierk in the original Fortran file. The python module was tested against theses values :

A. Sierk's reference values Python Implementation results
Z A L B_f Egs Lmax Bf Egs Lmax
28 58 0 33.14 0.0 46.1 33.14 0.00 46.13
28 58 25 19.5 21.36 46.1 18.52 20.00 46.13
28 58 40 2.97 49.66 46.1 2.47 31.18 46.13
28 58 46.1 0 59.14 46.1 0.00 58.56 46.13
65 153 0 28.88 0.0 82.3 28.88 0.00 82.27
65 153 50 16.16 19.0 82.3 14.16 19.80 82.27
65 153 80 0.26 45.24 82.3 0.12 31.47 82.27
65 153 82.3 0.0 47.01 82.3 0.00 47.29 82.27
93 229 0 3.76 0.0 68.1 3.76 0.00 68.13
93 229 45 1.26 8.21 68.1 1.22 9.12 68.13
93 229 68.1 0.0 17.96 68.1 0.00 17.83 68.13

⚠ We notice significant differences. This is probably due to floating point precision between today's python and the Fortran used by A. Sierk to perform the fits in 1986. Therefore, the values should be not be taken at face value, but they are a good first approximation.

Online version

An online Binder notebook has been created to allow the execution of the code online. via binder.

Running Locally

You can also install and run the routine on your local computer

Installation

Via pip

The prefered way of installing the library is via pip by running the following command:

$ pip install fisbar
via setup.py

Installation can be perfomed using the dist/fisbar-20201120.tar.gz archive, that contain the module installation files, to be installed via :

$ python setup.py

Running

As a standalone program

Usage:

$ python -m fisbar [-h] [--style {columns,human,dict,yaml}] Z A [L]

This runs the module at stand alone program.

Arguments are Z, A (both mandatory), L (default = 0) and output style.

The style can be columns, human, dict (default) or yaml. When using columns output style, the results are outputed as columns following : Z A L bfis Egs Lmax. human outputs the results in a readable format. yaml as a Yaml formated dictionnary and dict as a python dictionnary (also compatible with json). When a value is not computed (because the code failed), it appears either as 0 or ***.

As a python module

The fisbar routine can be used in a python code by importing it inside your program. For example

import fisbar

Z = 92
A = 238
L = 0

print(fisbar,fisbar(Z, A, L))

will output

{}

example

Versions

  • Current:

Authors

  • Greg Henning

Licence

Copyright, 1986,  The Regents of the University of California.
This software was produced under a U. S. Government contract
(W-7405-ENG-36) by the Los Alamos National Laboratory, which is
operated by the University of California for the U. S. Department
of Energy.  The U. S. Government is licensed to use, reproduce,
and distribute this software.  Permission is granted to the public
to copy and use this software without charge, provided that this
notice and any statement of authorship are reproduced on all
copies.  Neither the Government nor the University makes any
warranty, expressed or implied, or assumes any liability
or responsibility for the use of this software.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fisbar-20201120.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

fisbar-20201120-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file fisbar-20201120.tar.gz.

File metadata

  • Download URL: fisbar-20201120.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for fisbar-20201120.tar.gz
Algorithm Hash digest
SHA256 1c22753cb23719b3f0e5265f24411d0e167b568b0017d8281a9a89a3375aac28
MD5 f4fa70bd6e492ff161224131d58cc98b
BLAKE2b-256 889d812ee50770fb4010357ba540ba0fe1b7bed35127f4f6f9af302347d2455f

See more details on using hashes here.

File details

Details for the file fisbar-20201120-py3-none-any.whl.

File metadata

  • Download URL: fisbar-20201120-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for fisbar-20201120-py3-none-any.whl
Algorithm Hash digest
SHA256 75ffccadf45e5bd4296521ce4bb75141626732b60daa566ce40e9367444c7851
MD5 91399ccc4bdcfa8ed9475fbdf53b3683
BLAKE2b-256 5f1d75e831bee5b3b829c4a730fc5a887120cec3d06bff1c5425cd0a9c21dc40

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page