def test_kpath(): # only API vecs = np.random.rand(10,3) kpath.kpath(vecs, N=15)
[0,0,.5], [0.5,0,.5], [0.5,0.5,.5], [0.0,0.5,.5], [0,0,.5], ]) # recip. cell in 2*pi/alat units, need this to make QE happy, q-points in # matdyn.in and matdyn.freq output file are cartesian in 2*pi/alat st = io.read_pw_scf('pw.out') rcell_reduced = crys.recip_cell(st.cell) / 2.0 / np.pi * st.cryst_const[0] sp_points = np.dot(sp_points_frac, rcell_reduced) # fine path: use N=500 for nice LO-TO split jumps [see below for more comments # on that] ks_path = kpath.kpath(sp_points, N=50) # call matdyn.x templ_txt = """ &input asr='crystal', XXXMASS flfrc='q2r.fc', flfrq='XXXFNFREQ' / XXXNKS XXXKS """ matdyn_in_fn = 'matdyn.disp.in' matdyn_freq_fn = 'matdyn.freq.disp' mass_str = '\n'.join("amass(%i)=%e" %(ii+1,m) for ii,m in \
def test_kpath(): # only API vecs = np.random.rand(10, 3) kpath.kpath(vecs, N=15)
[0.63040557, 0.36959443, 0. ], [0.76081114, 0.5, 0.23918886], [0.63040557, 0.63040557, 0.23918886], [0.5, 0.5, 0.5], [0.76081114, 0.36959443, 0.36959443], ]) # recip. cell in 2*pi/alat units, need this to make QE happy, q-points in # matdyn.in and matdyn.freq output file are cartesian in 2*pi/alat st = io.read_pw_scf('pw.out') rcell_reduced = crys.recip_cell(st.cell) / 2.0 / np.pi * st.cryst_const[0] sp_points = np.dot(sp_points_frac, rcell_reduced) # fine path: use N=500 for nice LO-TO split jumps [see below for more comments # on that] ks_path = kpath.kpath(sp_points, N=100) # call matdyn.x templ_txt = """ &input asr='crystal', XXXMASS flfrc='q2r.fc', flfrq='XXXFNFREQ' / XXXNKS XXXKS """ matdyn_in_fn = 'matdyn.disp.in' matdyn_freq_fn = 'matdyn.freq.disp' mass_str = '\n'.join("amass(%i)=%e" %(ii+1,m) for ii,m in \