print mat2str( pc_calc.unit_cell ) print 'a=%f b=%f c=%f, alpha=%f, beta=%f gamma=%f\n'%(pc_calc.cell_a, pc_calc.cell_b, pc_calc.cell_c, pc_calc.cell_alpha, pc_calc.cell_beta, pc_calc.cell_gamma) print 'Magnetic moment (mu_B/cell)' print mat2str(cs1.groundstate.magnetization) lin_exp1 = linear_expansion( cs1 ) lin_exp1.calculate_expansion_coefficients() lin_exp2 = linear_expansion( cs2 ) lin_exp2.calculate_expansion_coefficients() lin_exp = lin_exp1 lin_exp.B_m_alpha = lin_exp2.B_m_alpha lin_exp.B_alpha_j = lin_exp2.B_alpha_j lin_exp.calculate_expansion_coefficients(False) print '===============================================================================' print '= CLAMPED CELL PROPERTIES =' print '===============================================================================' fc, units = lin_exp.force_constant_matrix()
print mat2str( pc_calc.unit_cell ) print 'a=%f b=%f c=%f, alpha=%f, beta=%f gamma=%f\n'%(pc_calc.cell_a, pc_calc.cell_b, pc_calc.cell_c, pc_calc.cell_alpha, pc_calc.cell_beta, pc_calc.cell_gamma) print 'Magnetic moment (mu_B/cell)' print mat2str(cs.groundstate.magnetization) lin_exp = linear_expansion( cs ) lin_exp.calculate_expansion_coefficients() print '===============================================================================' print '= CLAMPED CELL PROPERTIES =' print '===============================================================================' fc, units = lin_exp.force_constant_matrix() print 'Force constant matrix (%s)'%units print mat2str(fc) ee, _ = linalg.eig(fc) print 'Matrix eigenvalues' print mat2str(ee) bc, units = lin_exp.born_charges() print 'Born charges (%s)'%units
print 'Using saxis: %s' % `saxis` print 'Using cache: %s' % `usecache` cs=calculation_set.read_directory(directory, saxis, usecache) cs.set_ionic('.*/calc_.._.*[0123]') cs.set_lattice('.*/calc_00_...') cs.set_groundstate('.*/calc_00_0') calculation_set.BPH_MAXDIST = 0.25 calculation_set.BPH_CORRECTION = 0.5 cs.try_fix_displacements() cs.try_fix_polarizations() lin_exp = linear_expansion( cs ) lin_exp.calculate_expansion_coefficients() ev=linalg.eig(lin_exp.B_m_n) print mat2str(ev[0]) print mat2str(ev[1].T) saxis = [0., 1., 0.] usecache = True directory = "/data/jacek/BiFeO3_mono/rotated/thick-0.06" print 'Reading from directory: %s' % directory print 'Using saxis: %s' % `saxis` print 'Using cache: %s' % `usecache` strainedcs=calculation_set.read_directory(directory, saxis, usecache)