99Bohr = 0.5291772105638411
1010class overlap_R :
1111 def __init__ (self , orb_file_dir , atoms0 , atomst ):
12- # 从结构中获取轨道信息
12+ # get orbital information from the structure
1313 orb_file_list = list (atoms0 .info ['basis' ].values ())
1414 orb_file_list = [orb_file_dir + orbfile for orbfile in orb_file_list ]
1515 orb_file_num = len (orb_file_list )
@@ -19,37 +19,29 @@ def __init__(self, orb_file_dir, atoms0, atomst):
1919 unique_elements = set (symbols )
2020 assert orb_file_num == len (unique_elements ), f"轨道数目{ orb_file_num } 与元素数目{ len (unique_elements )} 不一致!"
2121
22- # 构建轨道合集
22+ # Build orbital collection
2323 self .orb = nao .RadialCollection ()
2424 self .orb .build (orb_file_num , orb_file_list , 'o' )
2525
26- # 统一轨道的格点
26+ # Standardize the orbital grid
2727 rmax = self .orb .rcut_max * 2.0
2828 dr = 0.01
2929 nr = int (rmax / dr ) + 1
3030 self .orb .set_uniform_grid (True , nr , rmax , 'i' , True )
3131
32- # 打印轨道基本信息
32+ # Print basic orbital information
3333 ntype = self .orb .ntype
3434 lmax = self .orb .lmax
35- # print('轨道类型数目 =', ntype)
36- # print('轨道文件中最大的Lmax =', lmax)
37- # for i in range(ntype):
38- # print(f'第 {i} 轨道信息:', orb_file_list[i])
39- # print(' symbol =', self.orb.symbol(i))
40- # print(' lmax =', self.orb.lmax_(i))
41- # for iL in range(self.orb.lmax_(i)+1):
42- # print(' L = %d'%(iL), ' zeta轨道数目 =', self.orb.nzeta(i, iL))
43-
44- # 初始化求解器
35+
36+ # Initialize the integrator
4537 self .S_intor = nao .TwoCenterIntegrator ()
4638 self .S_intor .tabulate (self .orb , self .orb , 'S' , nr , rmax )
4739
48- # 从结构中获取轨道指标的排序
49- # 确定基组指标与轨道信息之间的对应关系
50- self .lattice_vector = atoms0 .get_cell ()[:] / Bohr #晶格矢量的单位是Bohr
51- self .atom_positions_c = atoms0 .get_positions () / Bohr # 原子坐标的单位是Bohr
52- self .atom_positions_ct = atomst .get_positions () / Bohr # 原子坐标的单位是Bohr
40+ # Retrieve orbital index sorting from the structure
41+ # Determine the correspondence between the basis set indices and orbital information
42+ self .lattice_vector = atoms0 .get_cell ()[:] / Bohr
43+ self .atom_positions_c = atoms0 .get_positions () / Bohr
44+ self .atom_positions_ct = atomst .get_positions () / Bohr
5345 self .cal_R_direct_coor ()
5446
5547 self .iw2it = dict ()
@@ -78,7 +70,6 @@ def __init__(self, orb_file_dir, atoms0, atomst):
7870 count = count + 1
7971 count_atom = count_atom + 1
8072
81- # print(self.iw2positions_c)
8273 def cal_R_direct_coor (self ):
8374 rcut = self .orb .rcut_max * np .ones (len (self .atom_positions_c ),dtype = float )
8475 print (rcut )
0 commit comments