def main(): from ase_utils.cubic_perovskite import gen_primitive, gen222 primitive_atoms = gen_primitive( A='Ba', B='Ti', O='O', latticeconstant=3.946, mag_order='PM') print primitive_atoms from pyFA.abinit import DDB_reader from ase_utils.myabinit import read_output #atoms = read_output() atoms = gen_primitive( A='Ba', B='Ti', O='O', latticeconstant=3.946, mag_order='G') #atoms=make_supercell(primitive_atoms,[(0,1,1),(1,0,1),(1,1,0)]) #atoms=DDB_reader("./abinito_DS3_DDB").read_atoms() parser = ifc_parser( symbols='BaTiO6BaTi', fname='./abinit_ifc.out', primitive_atoms=primitive_atoms) print(parser.atom_positions) #print(parser.G) #print(parser.ifc[0]) #masses = [1] * 10 #phonon(masses, parser.ifc) print(parser.atoms.get_positions()) #print(parser.atoms.get_cell()) parser.map_ifc_to_primitive_cell() parser.make_model() parser.solve_model()
def wannier_default(name='BaTiO3'): from ase_utils.cubic_perovskite import gen_primitive z_db = {'Ba': 10, 'Ti': 12, 'O': 6} # orb_db is (symbol, label), label can be valence, but also others,like 'high_spin' orb_db = { # (symbol, valence): [(m, l, r, occ),... ] ('Ba', 2): [(None, 0, 5, 2), (None, 1, 5, 6), (None, 0, 6, 0)], ('Ti', 4): [(None, 0, 3, 2), (None, 1, 3, 6), (None, 2, 3, 0), (None, 0, 4, 0)], ('O', -2): [(None, 0, 2, 2), (None, 1, 2, 6)], } atoms = gen_primitive('BaTiO3', latticeconstant=3.946, mag_order='PM') vals = {'Ba': 2, 'Ti': 4, 'O': -2} wa = wannier_input(atoms) syms = atoms.get_chemical_symbols() nwann = sum((z_db[s] for s in syms)) print(wa.gen_input()) return wa