Beispiel #1
0
structure.set_cell = (4, 0, 0.5),\
                     (0, 1,   0),\
                     (0, 0, 0.5)
structure = fill_structure(structure.cell)
for i, atom in enumerate(structure.atoms):
  atom.type = "Si" if i < len(structure.atoms)/2 else "Ge"


result_str = Structure()
result_str.scale = 5.450000e+00
result_str.set_cell = (4.068890e+00, -4.235770e-18, 5.083297e-01),\
                     (-1.694308e-17, 1.016103e+00, 2.238072e-18),\
                     (-2.252168e-03, 8.711913e-18, 5.083297e-01)
result_str.weight = 1.000000e+00
result_str.name = ""
result_str.energy = 0.0938967086716
result_str.add_atom = (0.000000e+00, 0.000000e+00, 0.000000e+00), "Si", 0,  0
result_str.add_atom = (2.541649e-01, 2.473273e-01, 2.541649e-01), "Si", 1,  0
result_str.add_atom = (3.567265e+00, 5.062000e-01, -8.956567e-03), "Si", 0,  0
result_str.add_atom = (3.821430e+00, 7.572301e-01, 2.452083e-01), "Si", 1,  0
result_str.add_atom = (3.065136e+00, -1.851371e-03, -1.515736e-02), "Si", 0,  0
result_str.add_atom = (3.319301e+00, 2.491787e-01, 2.390075e-01), "Si", 1,  0
result_str.add_atom = (2.563510e+00, 5.080514e-01, -2.186176e-02), "Si", 0,  0
result_str.add_atom = (2.817675e+00, 7.553787e-01, 2.323031e-01), "Si", 1,  0
result_str.add_atom = (2.055673e+00, -6.642716e-03, -2.235452e-02), "Ge", 0,  0
result_str.add_atom = (2.309838e+00, 2.539701e-01, 2.318104e-01), "Ge", 1,  0
result_str.add_atom = (1.539450e+00, 5.026981e-01, -1.446032e-02), "Ge", 0,  0
result_str.add_atom = (1.793614e+00, 7.607320e-01, 2.397046e-01), "Ge", 1,  0
result_str.add_atom = (1.024061e+00, -5.353269e-03, -7.401445e-03), "Ge", 0,  0
result_str.add_atom = (1.278226e+00, 2.526806e-01, 2.467634e-01), "Ge", 1,  0
result_str.add_atom = (5.078370e-01, 5.014086e-01, 4.927555e-04), "Ge", 0,  0
Beispiel #2
0
# Structure definition.
from pylada.crystal import Structure
from pylada.crystal.defects import third_order_charge_correction
from quantities import eV

structure = Structure()
structure.name   = 'Ga2CdO4: b5'
structure.scale  = 1.0
structure.energy = -75.497933000000003
structure.weight = 1.0
structure.set_cell = (-0.0001445, 4.3538020, 4.3537935),\
                     (4.3538700, -0.0001445, 4.3538615),\
                     (4.3538020, 4.3537935, -0.0001445)
structure.add_atoms = [(7.61911540668, 7.61923876219, 7.61912846850), 'Cd'],\
                      [(1.08833559332, 1.08834823781, 1.08832253150), 'Cd'],\
                      [(4.35372550000, 4.35379350000, 4.35372550000), 'Ga'],\
                      [(4.35379775000, 2.17685850000, 2.17682450000), 'Ga'],\
                      [(2.17682450000, 4.35386575000, 2.17682875000), 'Ga'],\
                      [(2.17682875000, 2.17686275000, 4.35379775000), 'Ga'],\
                      [(2.32881212361, 2.32884849688, 2.32881647755),  'O'],\
                      [(2.32887187256, 4.20174404476, 4.20169148188),  'O'],\
                      [(4.20168277385, 2.32891695560, 4.20168347161),  'O'],\
                      [(4.20168782554, 4.20174474241, 2.32887622633),  'O'],\
                      [(6.37863887654, 6.37873414925, 6.37863016865),  'O'],\
                      [(6.37857477364, 4.50584295539, 4.50575516433),  'O'],\
                      [(4.50576822615, 6.37867004441, 4.50576752839),  'O'],\
                      [(4.50576317445, 4.50584225759, 6.37857477367),  'O']

# this is converged to less than 1meV
third = third_order_charge_correction(structure, epsilon=10.0, n=20)
assert abs(third - 0.11708438633232088*eV) < 1e-12