Git Product home page Git Product logo

jorgenem / kshell_public Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 7.0 2.65 MB

This repository contains the shell-model code KSHELL by Noritaka Shimizu (arXiv:1310.5431 [nucl-th]), with some small modifications and additions by me. Notably, the Python utility suite bin/shellmodelutilities.py which allows extraction of gamma-ray strength functions from KSHELL calculations.

Python 29.20% Makefile 1.27% Fortran 69.37% C 0.03% Shell 0.13%

kshell_public's Introduction

This repository contains N. Shimizu's code KSHELL (arXiv:1310.5431 [nucl-th]), downloaded from https://sites.google.com/a/cns.s.u-tokyo.ac.jp/kshell/

Installation

KSHELL can be run on your own laptop or on a multi-node supercomputer. To compile it for your own laptop, just clone or download this repository to your computer and do the following:

cd <kshell directory>/src
make single

Given that you have all the prerequisite software installed (notably gfortran, lapack and blas), it should compile. If successful, it ends with the message

cp kshell transit count_dim ../bin/

Running a calculation

To run a calculation, create an empty directory somewhere on your computer. Let's say you name it Ne20_usda. Navigate into that directory, and from there execute the following command (note that kshell_ui.py is called as an executable):

<kshell directory>/bin/kshell_ui.py 

Follow the instructions on the screen to set up your calculation. If you want to try Ne20 with USDa, and calculate 10 energy levels and transitions between them, you could do

jorgenem@prior:~/gitrepos/kshell-pub/runs/Ne20$ ../../bin/kshell_ui.py

----------------------------- 
  KSHELL user interface 
     to generate job script. 
-----------------------------
 

 MPI parallel? Y/N (default: N) : 
  ... generate shell script for a single node.

 model space and interaction file name (.snt) 
 (e.g. w or w.snt,  TAB key to complete) : usda.snt


*************** specify a nuclide ********************


 number of valence protons and neutrons
  (ex.  2, 3 <CR>)    <CR> to quit : 2,2

 name for script file (default: Ne20_usda ): 

 J, parity, number of lowest states  
  (ex. 10           for 10 +parity, 10 -parity states w/o J-proj. (default)
       -5           for lowest five -parity states, 
       0+3, 2+1     for lowest three 0+ states and one 2+ states, 
       1.5-, 3.5+3  for lowest one 3/2- states and three 7/2+ states) :
10

 truncation for "+" parity state in  Ne20_usda_p.ptn
 truncation scheme ?
      0 : No trucation (default) 
      1 : particle-hole truncation for orbit(s) 
      2 : hw truncation 
      3 : Both (1) and (2) 

generating partition file ............ done.

 truncation for "-" parity state in  Ne20_usda_n.ptn
No states in negative parity

 --- input parameter --- 
  beta_cm = 0.d0
  eff_charge = 1.5, 0.5, 
  gl = 1.0, 0.0, 
  gs = 5.0271, -3.4435, 
  hw_type = 2
  max_lanc_vec = 200
  maxiter = 300
  mode_lv_hdd = 1
  n_restart_vec = 10

modify parameter? 
 (e.g.  maxiter = 300 for parameter change
        <CR>          for no more modification ) :


 compute transition probabilities (E2/M1/E1) for 
    Ne20_usda ? Y/N (default: N) : y


*************** specify a nuclide ********************


 number of valence protons and neutrons
  (ex.  2, 3 <CR>)    <CR> to quit : 

 Finish. Execute ./Ne20_usda.sh

jorgenem@prior:~/gitrepos/kshell-pub/runs/Ne20$ 

You may then proceed to run the actual KSHELL calculation by executing the .sh file:

jorgenem@prior:~/gitrepos/kshell-pub/runs/Ne20$ ./Ne20_usda.sh 
start running log_Ne20_usda_m0p.txt ...
start running log_Ne20_usda_tr_m0p_m0p.txt ...
Compressing all text files from run into logs_Ne20_usda.tar.gz 

log_Ne20_usda_m0p.txt
log_Ne20_usda_tr_m0p_m0p.txt
save_input_ui.txt
summary_Ne20_usda.txt
usda.snt
Ne20_usda_p.ptn
Ne20_usda.sh
Copying logs_Ne20_usda.tar.gz to ~/KSHELL_jobs/Ne20_usda-20181121 

Finish computing Ne20_usda. See summary_Ne20_usda.txt

jorgenem@prior:~/gitrepos/kshell-pub/runs/Ne20$ 

Additions by me

I have added some Python scripts in the bin/ folder, namely shellmodelutilities.py and spin_selection.py. The latter is a small tool to ease setup of calculations, while the first is a comprehensive library of tools to calculate level density (NLD) and gamma-ray strength function (gSF) from shell model files.

The folder example_nld_gsf/ contains an example of just that, using the shellmodelutilities library. There is also an example summary file on Ne20 with the USDa interaction, to demonstrate the use of the script. The calculated NLD and gSF is not very interesting, however, but I cannot put a large file on Github. If you like, you can download a more interesting calculation summary file from the supplemental material to our PRC on M1 systematics (arXiv:1807.04036 [nucl-th]) from this link: https://doi.org/10.5281/zenodo.1493220

Technical notes

  • I have modified the transit.f90 file slightly so it prints transition strengths with more decimal precision, to facilitate the gSF calculations. I have updated collect_logs.py accordingly.
  • I have modified collect_logs.py to ensure it does not double-count transitions.
  • I have added some lines to kshell_ui.py so that it does an automatic backup of all the text files from the run into a folder called KSHELL_runs under the home path. This is mainly useful when running on a supercomputer, where the calculation is typically run on a scratch disk where files are deleted after some weeks.

kshell_public's People

Contributors

jorgenem avatar vetlewi avatar

Stargazers

 avatar Ragnar Stroberg avatar Eli Temanson avatar Bingcheng He avatar  avatar Ann-Cecilie Larsen avatar Steven Gardiner avatar Hongyi Wu(吴鸿毅) avatar

Watchers

 avatar James Cloos avatar Ann-Cecilie Larsen avatar paper2code - bot avatar

kshell_public's Issues

Problems running python scripts

The python scripts in the bin folder is written for python 2.7. For systems where python 3 is default running the scripts will fail.

Compiling with gfortran10 requires an additional flag

I just reinstalled KSHELL on my new laptop, where I have gfortran10. This compiler is apparently less forgiving than the previous one, and I had to add
-fallow-argument-mismatch
in line 50 of the Makefile to make it compile. Then it worked like a charm :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.