zoukankan      html  css  js  c++  java
  • 原子核壳模型程序 BigStick 脚本:sd壳能谱+B(E2)

    • 以下脚本使用可执行程序:
      bigstick.x, tropic1b.x, genstrength.x
    • 使用 sd 壳相关文件:
      sd.sps, usdb.int
    • 结果文件:
      pxnx.res, pxnx.e2.str
    • 使用了 awk 语句:awk 'BEGIN{print "'$A'"^0.16666666666666666666
      这个语句的值就是'''$A'''^0.166666这个式子的值,awk语句中使用shell变量需要加上三引号。
      使用 awk 语句的值只需在 shell 语句中加上 $()
    #!/bin/bash
    
    Np=$1
    Nn=$2
    nucleus=p${Np}n${Nn}
    Acore=16
    A=$(( $Np + $Nn + $Acore ))
    HOlength=$(awk 'BEGIN{print "'$A'"^0.16666666666666666666 }')
    nkeep=50
    
    echo ' '
    echo ' Sample script to compute B(E2) using usdb interaction '
    echo ' '
    echo ' running tropic1b to generate E2 operator '
    echo ' '
    ./tropic1b.x << input
    sd     ! BIGSTICK-format .sps file needed for code
    2      ! menu option 2: E2
    2      ! proton-neutron
    y      ! include cross-shell (irrelevant here)
    $HOlength      ! value of osc length = (A)^1/6 fm
    1.5  0.5   ! effective charge for proton, neutron
    usdb  ! output file name
    n      ! in single-column xpn format? n = double column pns format
    input
    
    echo ' '
    echo ' * * * * * * * * * * * * * * * * '
    echo ' * * * * * * * * * * * * * * * * '
    echo ' creating density matrices '
    echo ' * * * * * * * * * * * * * * * *'
    echo ' * * * * * * * * * * * * * * * * '
    
    
    ./bigstick.x << INPUT
    dp     ! menu choice -- proton neutron densities 
    $nucleus                                                   
    sd    !  name of .sp file  (in this case, NuShell format) 
               $Np           $Nn  ! # of valence protons, neutrons 
               0        ! 2 x Jz of systems 
    usdb     ! signal to read NuShell-format unnormalized interaction
    1  $(( $Acore + 2 ))  $A  0.3
    end
    ld    ! Lanczos menu option 
              $nkeep         3000      ! # states to keep, max # iterations
    INPUT
    
    echo ' * * * * * * * '
    echo ' * * * * * * * * * * * * * * * * '
    echo ' * * * * * * * * * * * * * * * * '
    echo 'finished with run '
    echo ' * * * * * * * * * * * * * * * * '
    echo ' * * * * * * * * * * * * * * * * '
    echo ' * * * * * * * * '
    
    ./genstrength.x << input
    usdb        ! name of .opme 
    1             ! no additional scaling
    $nucleus      ! name of reference parent state file
    $nkeep             ! # of parent states
    $nucleus      ! name of reference daughter state file
    $nkeep             ! # of daughter states
    $nucleus      ! name of density file
    n             ! do not read in additional density files
    $nucleus.e2        ! name of output
    input
    
    echo ' '
    echo " B(E2)s written to "$nucleus".e2.str"
    echo ' '
    
  • 相关阅读:
    2018-11-13-常用模块1 (time random os sys)
    2018-11-12-递归函数&二分查找
    2018-11-9-匿名函数&递归函数初识
    JS-正则表达式实战篇(Angel著)
    Ubuntu 14.04远程登录服务器
    (37)Spring Boot集成EHCache实现缓存机制【从零开始学Spring Boot】
    (36)Spring Boot Cache理论篇【从零开始学Spring Boot】
    (35)Spring Boot集成Redis实现缓存机制【从零开始学Spring Boot】
    (34)Spring Boot的启动器Starter详解【从零开始学Spring Boot】
    Tensorflow 0.8.0 安装配置方法
  • 原文地址:https://www.cnblogs.com/luyi07/p/15408354.html
Copyright © 2011-2022 走看看