Beispiel #1
0
from sys import exit
from shutil import rmtree
from os.path import exists, join
from math import ceil, sqrt
from numpy import dot, array, matrix
from numpy.linalg import norm
from boost.mpi import world
from pylada.vff import Vff
from pylada.crystal import Structure, Lattice, fill_structure
from pylada.escan import read_input

input = read_input("input.py")

structure = Structure()
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
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
Beispiel #3
0
from pylada.crystal import Structure
from pylada.pcm import Clj, bond_name
from pylada.physics import a0, Ry
from quantities import angstrom, eV, hartree

clj  = Clj()
""" Point charge + r^12 + r^6 model. """
clj.ewald_cutoff = 80 * Ry

clj.charges["A"] = -1.0
clj.charges["B"] =  1.0

structure = Structure()
structure.set_cell = (1,0,0),\
                     (0,1,0),\
                     (0,0,1)
structure.scale = 50
structure.add_atom = (0,0,0), "A"
structure.add_atom = (a0.rescale(angstrom)/structure.scale,0,0), "B"

print clj.ewald(structure).energy, hartree.rescale(eV)


from pylada.crystal.A2BX4 import b5
from pylada.crystal import fill_structure
from numpy import array
clj.ewald_cutoff = 20 * Ry
lattice = b5()
lattice.sites[4].type='A'
structure = fill_structure(lattice.cell, lattice)
Beispiel #4
0
vff.add_angle = "As", "In", "As", ("tet", -5.753, 5.7599)
vff.add_angle = "Ga", "As", "In", (-0.35016, -4.926, 7.5651)
vff.minimizer.verbose = True
vff.minimizer.type = "gsl_bfgs2"
vff.minimizer.itermax = 1
vff.minimizer.tolerance = 1e-5
vff.minimizer.uncertainties = 1e-3

structure = Structure()
# structure.set_cell = (00.0, 0.5, 0.5),\
#                      (0.50, 0.0, 0.5),\
#                      (0.50, 0.5, 0.0)
# structure.add_atoms = ((0.00, 0.00, 0.00), "In"),\
#                       ((0.25, 0.25, 0.25), "As")
structure.set_cell = (10.0, 0.5, 0.5),\
                     (0.00, 0.0, 0.5),\
                     (0.00, 0.5, 0.0)
structure.add_atoms = ((0.00, 0.00, 0.00), "Ga"),\
                      ((0.25, 0.25, 0.25), "As"),\
                      ((1.00, 0.00, 0.00), "Ga"),\
                      ((1.25, 0.25, 0.25), "As"),\
                      ((2.00, 0.00, 0.00), "In"),\
                      ((2.25, 0.25, 0.25), "As"),\
                      ((3.00, 0.00, 0.00), "In"),\
                      ((3.25, 0.25, 0.25), "As"),\
                      ((4.00, 0.00, 0.00), "Ga"),\
                      ((4.25, 0.25, 0.25), "As"),\
                      ((5.00, 0.00, 0.00), "In"),\
                      ((5.25, 0.25, 0.25), "As"),\
                      ((6.00, 0.00, 0.00), "In"),\
                      ((6.25, 0.25, 0.25), "As"),\