• 原子核壳模型程序 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 ' '
    
  • 相关阅读:
    Sql 中取小数点后面两位小数
    常用SQL时间格式SQLServer中文版的默认的日期字段datetime格式是yyyy-mm-d
    sql server 2008 R2连接失败 错误:18456
    SQl server 2008 附加数据库失败,错误:5120
    sql server 2008 R2无法连接127.0.0.1报错 Server error:40(错误:53)
    SQL Server 2008的MSSQLSERVER 请求失败或服务未及时响应
    查看系统事件日志
    ssh-keygen公钥进行免登
    docker命令
    maven将依赖的jar包复制到指定位置
  • 原文地址:https://www.cnblogs.com/luyi07/p/15408354.html
Copyright © 2020-2023  润新知