# Path: siman/analysis_functions.py
# class ALGLIB:
# 
#     def build_2d_bicubic_spline(self, x, m, y, n, z, d): self.bicubicv2d = xalglib.spline2dbuildbicubicv(x, m, y, n, z, d)
# 
#     def calc(self, x, y, ind): 
#         l = xalglib.spline2ddiff(self.bicubicv2d,x,y)
#         if ind==0: return l[0]    # z
#         elif ind==1: return l[1]  # dz/dx
#         elif ind==2: return l[2]  # dz/dy
#         elif ind==3: return l[3]  # d2z/dxdy
#         else: raise RuntimeError ('Unknown ind = '+str(ind))


﻿import sys, os
import matplotlib
import matplotlib.pyplot as plt
    import matplotlib.pyplot as plt
    import numpy as np
from mpl_toolkits.mplot3d import axes3d
from siman.analysis_functions import ALGLIB as ALB
    from mpl_toolkits.mplot3d import axes3d
    from matplotlib import cm
    from matplotlib.ticker import LinearLocator, FormatStrFormatter, MultipleLocator, AutoLocator
    for i in range(len(etotal_list)):
        acell = acell_list[i]
        jj=0
        exit = False
        for j in b:
            if exit==True: break
            for k in a:
                if acell[0]==k and acell[1]==j:
                    etot[jj] = etotal_list[i]
                    exit = True
                    break
                else: jj+=1

    # Find position with minimum energy
    etot_min = min(etot)
    f0.write('Etot_min (without spline) = '+ str(etot_min)+' eV\n\n')
    ii=0; exit = False
    for j in b:
        if exit==True: break
        for k in a:
            if etot[ii]==etot_min:
                amin = k
                bmin = j
                exit = True
                break
            else: ii+=1

    f0.write('xcell_min (without spline) = '+ str(amin)+' Angstrom\n')
    f0.write('ycell_min (without spline) = '+ str(bmin)+' Angstrom\n\n\n')


# Path: siman/analysis_functions.py
# class ALGLIB:
# 
#     def build_2d_bicubic_spline(self, x, m, y, n, z, d): self.bicubicv2d = xalglib.spline2dbuildbicubicv(x, m, y, n, z, d)
# 
#     def calc(self, x, y, ind): 
#         l = xalglib.spline2ddiff(self.bicubicv2d,x,y)
#         if ind==0: return l[0]    # z
#         elif ind==1: return l[1]  # dz/dx
#         elif ind==2: return l[2]  # dz/dy
#         elif ind==3: return l[3]  # d2z/dxdy
#         else: raise RuntimeError ('Unknown ind = '+str(ind))


# Path: siman/plot_functions.py
﻿import sys, os
import matplotlib
import matplotlib.pyplot as plt
    import matplotlib.pyplot as plt
    import numpy as np
from mpl_toolkits.mplot3d import axes3d
from siman.analysis_functions import ALGLIB as ALB
    from mpl_toolkits.mplot3d import axes3d
    from matplotlib import cm
    from matplotlib.ticker import LinearLocator, FormatStrFormatter, MultipleLocator, AutoLocator

    for i in range(len(etotal_list)):
        acell = acell_list[i]
        jj=0
        exit = False
        for j in b:
            if exit==True: break
            for k in a:
                if acell[0]==k and acell[1]==j:
                    etot[jj] = etotal_list[i]
                    exit = True
                    break
                else: jj+=1

    # Find position with minimum energy
    etot_min = min(etot)
    f0.write('Etot_min (without spline) = '+ str(etot_min)+' eV\n\n')
    ii=0; exit = False
    for j in b:
        if exit==True: break
        for k in a:
            if etot[ii]==etot_min:
                amin = k
                bmin = j
                exit = True
                break
            else: ii+=1

    f0.write('xcell_min (without spline) = '+ str(amin)+' Angstrom\n')
    f0.write('ycell_min (without spline) = '+ str(bmin)+' Angstrom\n\n\n')


    e2 = ALB()