def test(): #atoms=gen_pnma('LaMnO3',out_of_phase_rotation=1.5) #atoms=gen_pnma('LaMnO3',JT_d=0.2) #atoms=gen_pnma('LaMnO3',in_phase_tilting=0.6) atoms = gen_distorted_perovskite('LaMnO3', out_of_phase_rotation=0.0, JT_d=0.0, in_phase_tilting=0.9, breathing=0.0) vesta_view(atoms)
def test(): atoms=gen_P21c_perovskite(name='YNiO3', cell=[3.7,3.7,3.7], supercell_matrix=[[1, -1, 0], [1, 1, 0], [0, 0, 2]], modes=dict( #R2_m_O1=0.8, #breathing #R3_m_O1=1.0, #R3_m_O2=1.0, # R3-[O1:c:dsp]A2u(b), O, out-of-plane-stagger, inplane antiphase #R5_m_O1=1.2, # R5-[O1:c:dsp]Eu(a), O a- #R5_m_O2=1.2, # R5-[O1:c:dsp]Eu(a), O b- #R5_m_O3=1.0, # R5-[O1:c:dsp]Eu(c), O c- #X5_m_A1=1.0, # [Nd1:a:dsp]T1u(a), A , Antiferro mode #R4_m_A1=0.5, # R4-[Nd1:a:dsp]T1u(a), A , Antipolar mode in Pnma #R4_m_A2=0.5, # R4-[Nd1:a:dsp]T1u(b), A, Antipolar mode in Pnma R4_m_A3=0.0, # R4-[Nd1:a:dsp]T1u(c), A, Unusual #R4_m_A3=0.0, # R4-[Nd1:a:dsp]T1u(c), A, Unusual #R4_m_O1=0.0, # R4-[O1:c:dsp]Eu(a), O, Unusual #R4_m_O2=0.0, # R4-[O1:c:dsp]Eu(b), O, Unusual #R4_m_O3=0.0, # R4-[O1:c:dsp]Eu(c), O, Unusual #M2_p_O1=1.2, # M2+[O1:c:dsp]Eu(a), O, In phase rotation c+ #M3_p_O1=0.1, # M3+[O1:c:dsp]A2u(a), O, D-type JT inplane stagger #M5_p_O1=1.0, # M5+[O1:c:dsp]Eu(a), O, Out of phase tilting #M4_p_O1=1.0 , # M4+[O1:c:dsp]A2u(a), O, in-plane-breathing (not in P21/c) G_Ax=0.0, G_Ay=0.0, G_Az=0.0, G_Sx=0.0, G_Sy=0.0, G_Sz=0.0, G_Axex=0.0, G_Axey=0.0, G_Axez=0.0, G_Lx=0.0, G_Ly=0.0, G_Lz=0.0, #G_G4x=0.1, #G_G4y=0.1, #G_G4z=0.1, ) ) #write('P4mm.vasp', atoms, vasp5=True) vesta_view(atoms)
def test_distortion(): amp=np.random.random(6) atoms=gen_P21c_perovskite( 'NdNiO3', cell=[3.785415]*3, supercell_matrix=[[1, -1, 0], [1, 1, 0], [0, 0, 2]], modes=dict( #R2_m_O1=amp[0]*0.1, # R2-[O1:c:dsp]A2u(a), O, breathing #R3_m_O1=-0.0023, # R3-[O1:c:dsp]A2u(a), O JT inplane-stagger, out-of-plane antiphase #R3_m_O2=amp[1], # R3-[O1:c:dsp]A2u(b), O, out-of-plane-stagger, inplane antiphase #R4_m_A1=amp[2], # R4-[Nd1:a:dsp]T1u(a), A #R4_m_A2=0.0, # R4-[Nd1:a:dsp]T1u(b), A #R4_m_A3=0.0, # R4-[Nd1:a:dsp]T1u(c), A #R4_m_O1=0.0, # R4-[O1:c:dsp]Eu(a), O #R4_m_O2=0.0, # R4-[O1:c:dsp]Eu(b), O #R4_m_O3=0.0, # R4-[O1:c:dsp]Eu(c), O R5_m_O1=0.81457, # R5-[O1:c:dsp]Eu(a), O a- R5_m_O2=0.81457, # R5-[O1:c:dsp]Eu(b), O b- R5_m_O3=0.81457, # R5-[O1:c:dsp]Eu(c), O c- (not in Pnma) #X3_m_A1=0.0, # X3-[Nd1:a:dsp]T1u(a), What's this.. #X3_m_O1=0.0, # X3-[O1:c:dsp]A2u(a) #X5_m_A1=0.3219, # [Nd1:a:dsp]T1u(a), A , Antiferro mode #Z5_m_A2=0.3219, # [Nd1:a:dsp]T1u(b), A , save as above #X5_m_O1=-0.06299, # [Nd1:a:dsp]T1u(a), O , Antiferro mode #Z5_m_O2=-0.06299, # [Nd1:a:dsp]T1u(b), O , same as above #M2_p_O1=0.739, # M2+[O1:c:dsp]Eu(a), O, In phase rotation #M3_p_O1=0.00412, # M3+[O1:c:dsp]A2u(a), O, D-type JT inplane stagger #M5_p_O1=0.00015, # M5+[O1:c:dsp]Eu(a), O, Out of phase tilting #M5_p_O2=-0.00015, # M5+[O1:c:dsp]Eu(b), O, Out of phase tilting, -above #M4_p_O1=0.0 , # M4+[O1:c:dsp]A2u(a), O, in-plane-breathing (not in P21/c) ) ) vesta_view(atoms) #write("NNO_br%s.vasp"%br,atoms, vasp5=True) return amp, atoms
""" if name is not None: symbols=string2symbols(name) A, B, O, _, _ = symbols atoms = PerovskiteCubic([A, B, O], latticeconstant=latticeconstant) direction_dict = { 'A': ([1, 0, 0], [0, 1, 0], [0, 0, 2]), 'C': ([1, -1, 0], [1, 1, 0], [0, 0, 1]), 'G': ([0, 1, 1], [1, 0, 1], [1, 1, 0]), 'FM': np.eye(3), } size_dict = {'A': (1, 1, 2), 'C': (1, 1, 1), 'G': (1, 1, 1)} A, B, O = atoms.get_chemical_symbols()[0:3] if mag_order == 'PM': atoms = atoms elif mag_order == 'FM': atoms = atoms atoms = set_element_mag(atoms, B, [m]) else: atoms.translate([0.045] * 3) atoms = normalize(atoms) atoms = make_supercell(atoms, direction_dict[mag_order]) atoms.translate([-0.045] * 3) atoms = set_element_mag(atoms, B, [m, -m]) return atoms if __name__ == '__main__': atoms = gen_primitive(name='LaMnO3',mag_order='C') vesta_view(atoms)
def test(): mylwf = LWF.load_nc(fname='./Downfolded_hr.nc') atoms = lwf_to_atoms(mylwf, scmat=np.diag([5, 5, 5]), amplist=[[(0, 0, 0), 0, 1], [(0, 0, 0), 1, 1]]) vesta_view(atoms)
#!/usr/bin/env python from pyDFTutils.perovskite.frozen_mode import gen_distorted_perovskite from pyDFTutils.ase_utils import vesta_view from pyDFTutils.ase_utils import substitute_atoms from ase.io import write def gen(): atoms = gen_distorted_perovskite( name='NdNiO3', cell=[3.79, 3.79, 3.79], #supercell_matrix=[[1, -1, 0], [1, 1, -2], [1, 1, 1]], #supercell_matrix=[[1, 1, 1.0], [-1, 1, 1.0], [0, -2, 1.0]], supercell_matrix=[[1, 1, 2.0], [-1, 1, 2.0], [0, -2, 2.0]], out_of_phase_rotation=0.4, in_phase_rotation=0.3, #in_phase_tilting=0.3, #JT_a=1.35, #JT_d=1.05, #breathing=0.5 ) #atom=substitute_atoms(atoms,['Ni5','Ni10'],['Ga','Ga']) return atoms write('P21c.cif', gen()) vesta_view(gen())