In-medium similarity renormalization group for $^{32}$Mg

  • Reference state: spherica HFB state

  • Chiral interaction

  • Evolved Operators:

$$ O(s) = e^{\Omega(s)} O(0)e^{-\Omega(s)} $$

  • Energy flow

$$ E(s) = \langle \Phi\vert H(s)\vert \Phi\rangle $$ where $s$ the flow parameter.

In [3]:
import pandas as pd

import matplotlib.pyplot as plt

help functions

In [27]:
def energy_flow(file,color):
    content = []
    with open(file,'r') as f:
        for cnt, line in enumerate(f): 
            if 'RESTART' not in line and cnt>5:
                content.append(line.split())
    
    features=['s','E','Ecor','E_final','EL3B','dE/ds','Fob_y','norm_eta']
    df = pd.DataFrame(content)
    df.columns=features
    df_num=df[features].astype(float)
    plt.plot(df_num['s'],df_num['E'],c=color)
    plt.xscale('log')
    return df_num
In [28]:
def file2df(file):
    content = []
    with open(file,'r') as f:
        for cnt, line in enumerate(f): 
            if 'RESTART' not in line and cnt>5:
                content.append(line.split())
    
    features=['s','E','Ecor','E_final','EL3B','dE/ds','Fob_y','norm_eta']
    df = pd.DataFrame(content)
    df.columns=features
    df_num=df[features].astype(float) 
    return df_num
In [29]:
def set_figstyle(xmin,xmax,ymin,ymax,xlabel,ylabel,how):
    """
        how --  True: label both sides of y;
                False: only label the left side
    """
    plt.xlabel(xlabel,fontsize=24)
    plt.ylabel(ylabel, fontsize=24)
    plt.ylim(ymin,ymax)
    plt.xlim(xmin,xmax)
    plt.tick_params(which='major',direction='in',length=10,labelsize=20)
    plt.tick_params(which='minor',direction='in',length=5,labelsize=20)
    plt.tick_params(labelbottom=True, labeltop=False, labelleft=True, labelright=how,
                    bottom=True, top=False, left=True, right=True)
In [30]:
def comparison2(df1,df2,color1,color2):
    plt.plot(df1['s'],df1['E'],c=color1)
    plt.plot(df2['s'],df2['E'],c=color2)
    plt.xscale('log')
    
    
def comparison4(df1,df2,df3,df4,color1,color2,color3,color4,label1,label2,label3,label4):
    plt.plot(df1['s'],df1['E'],c=color1,label=label1)
    plt.plot(df2['s'],df2['E'],c=color2,label=label2)
    plt.plot(df3['s'],df3['E'],c=color3,label=label3)
    plt.plot(df4['s'],df4['E'],c=color4,label=label4)
    plt.xscale('log')
In [31]:
import plotly 
import plotly.graph_objs as go
import plotly.offline as py
plotly.offline.init_notebook_mode(connected=True)

def interactive_comparison2(df1,df2,label1,label2):
    plot1 = go.Scatter(x=df1['s'],y=df1['E'],mode = 'lines+markers',name=label1)
    plot2 = go.Scatter(x=df2['s'],y=df2['E'],mode = 'markers',name=label2)
    
    layout = go.Layout(
        xaxis=dict(
        type='log',
#         autorange=True,
#         showgrid=False,
#         zeroline=False,
#         showline=False,
#         ticks='',
        showticklabels=True
        ),
        yaxis=dict(
#         autorange=True,
#         showgrid=False,
#         zeroline=False,
#         showline=False,
#         ticks='',
        showticklabels=True
        )
    )
    
    
    data = [plot1,plot2] 
    fig = go.Figure(data=data, layout=layout)
    py.iplot(fig) 
In [32]:
def interactive_comparison3(df1,df2,df3,label1,label2,label3):
    plot1 = go.Scatter(x=df1['s'],y=df1['E'],mode = 'markers',name=label1)
    plot2 = go.Scatter(x=df2['s'],y=df2['E'],mode = 'lines',name=label2)
    plot3 = go.Scatter(x=df3['s'],y=df3['E'],mode = 'lines+markers',name=label3)
    
    layout = go.Layout(
        xaxis=dict(
        type='log',
#         autorange=True,
#         showgrid=False,
#         zeroline=False,
#         showline=False,
#         ticks='',
        showticklabels=True
        ),
        yaxis=dict(
#         autorange=True,
#         showgrid=False, 
#         zeroline=False,
#         showline=False,
#         ticks='',
        showticklabels=True
        )
    )
    
    
    data = [plot1,plot2,plot3] 
    fig = go.Figure(data=data, layout=layout)
    py.iplot(fig) 
In [33]:
def interactive_comparison4(df1,df2,df3,df4,label1,label2,label3,label4):
    plot1 = go.Scatter(x=df1['s'],y=df1['E'],mode = 'markers',name=label1)
    plot2 = go.Scatter(x=df2['s'],y=df2['E'],mode = 'lines',name=label2)
    plot3 = go.Scatter(x=df3['s'],y=df3['E'],mode = 'lines+markers',name=label3)
    plot4 = go.Scatter(x=df4['s'],y=df4['E'],mode = 'markers',name=label4)
    
    layout = go.Layout(
        xaxis=dict(
        type='log',
#         autorange=True,
#         showgrid=False,
#         zeroline=False,
#         showline=False,
#         ticks='',
        showticklabels=True
        ),
        yaxis=dict(
#         autorange=True,
#         showgrid=False, 
#         zeroline=False,
#         showline=False,
#         ticks='',
        showticklabels=True
        )
    )
    
    
    data = [plot1,plot2,plot3,plot4] 
    fig = go.Figure(data=data, layout=layout)
    py.iplot(fig)
    return fig

load data

In [48]:
file1="MR/Mg32_em1.8-2.0_eMax04_lMax04_hwHO016.flow"
In [49]:
file2="MR/sd/Mg32_em1.8-2.0_eMax04_lMax04_hwHO016.flow"
In [50]:
file3="PNP/Mg32_em1.8-2.0_eMax04_lMax04_hwHO016.flow"
In [51]:
file4="beta00/Mg32_em1.8-2.0_eMax04_lMax04_hwHO016.flow"
In [52]:
df_mr_L12 = file2df(file1)
df_mr_L123= file2df(file2)
df_pnp= file2df(file3)
df_mr_gcm4sph= file2df(file4)
In [53]:
fig4 = interactive_comparison4(df_mr_L12,df_mr_L123,df_mr_gcm4sph, df_pnp,
                        r'MR(w/o L3B)',r'MR(w/L3B)','MR(w/L3B GCM4Sph)','PNP')
In [54]:
comparison4(df_mr_L12,df_mr_L123,df_mr_gcm4sph,df_pnp, 'b','y','g','r',
                        r'MR(w/o L3B)',r'MR(w/L3B,sd)','MR(w/L3B GCM4Sph,sd)','PNP')

plt.legend(fontsize=14)

set_figstyle(0.01,10,-215,-210,'Flow parameter s',' E [MeV]',True)

It is shown in the above figure that

  • The result by "PNP" is kind of 'exact' solution at the NO2B(2) level.
  • Other results are from the general multi-reference IMSRG calculations where the irreducible three-body density is not or partially taken into account.
  • The irreducible three-body density affects the convergence pattern at the tail part.
In [90]:
import plotly.io as pio
In [91]:
pio.write_image(fig4, 'fig4.png')

Three-body irreducible density

L3B from PNP calculation

In [4]:
L3b = pd.read_csv("MR/sd/Mg32_em1.8-2.0_eMax04_lMax04_hwHO016.lambda.me3b.gz",delimiter=r'\s+')
L3b.columns=['idx123','idx456','L3B']
In [5]:
L3b.head()
Out[5]:
idx123 idx456 L3B
0 1096 1102 -0.009233
1 1096 1108 -0.022548
2 1096 1142 0.007972
3 1096 1190 0.007972
4 1096 1236 -0.215142
In [6]:
L3b_diag = L3b[L3b['idx123']==L3b['idx456']]
In [7]:
L3b_diag['L3B'].sum()
Out[7]:
-0.186084176502162

L3B from GCM4Sph calculation

In [9]:
L3b2 = pd.read_csv("beta00/L3B.dat",delimiter=r'\s+')
L3b2.columns=['idx123','idx456','L3B']
In [10]:
L3b2.head()
Out[10]:
idx123 idx456 L3B
0 1096 1102 -0.008268
1 1096 1108 -0.021329
2 1096 1142 0.007541
3 1096 1190 0.007541
4 1096 1236 -0.204959
In [47]:
L3b2[L3b2['idx123']==L3b2['idx456']].L3B.sum()
Out[47]:
-0.1773225969
In [11]:
L3B_cat = pd.merge(L3b2,L3b,on=['idx123','idx456'],how='outer')
In [12]:
L3B_cat.head()
Out[12]:
idx123 idx456 L3B_x L3B_y
0 1096 1102 -0.008268 -0.009233
1 1096 1108 -0.021329 -0.022548
2 1096 1142 0.007541 0.007972
3 1096 1190 0.007541 0.007972
4 1096 1236 -0.204959 -0.215142
In [13]:
L3B_cat['diff']=L3B_cat['L3B_x']-L3B_cat['L3B_y']
In [42]:
L3B_cat['ratio']=2*(L3B_cat['L3B_x']-L3B_cat['L3B_y'])/(L3B_cat['L3B_x']+L3B_cat['L3B_y'])
In [16]:
plt.scatter(L3B_cat['L3B_x'],L3B_cat['diff'])
Out[16]:
<matplotlib.collections.PathCollection at 0x1229c75f8>
In [43]:
plt.scatter(L3B_cat['L3B_x'],L3B_cat['ratio'])
Out[43]:
<matplotlib.collections.PathCollection at 0x1318fb940>
In [18]:
import seaborn as sns