Example #1
0
LAM = 1.5233e-22 * Egam**6 - 1.2061e-17 * Egam**5 + 2.5484e-13 * Egam**4 + 1.6593e-10 * Egam**3 + 1.9332e-06 * Egam**2 + 1.1043e-02 * Egam
exp_const = 4 * kvect / LAM
auc = unitcell.a * unitcell.b * np.sin(unitcell.gamma)
#/expconstant/end#
#globalsetting/end#

#--set instrument--#
#/instrument/begin#
inst = model.Instrument(wavel=wal, alpha=2.0)
#/instrument/end#

#--set bulk slab--#
#/bulk/begin#
bulk = model.Slab()
bulk_file = 'Cu100_bulk.str'
tool_box.add_atom_in_slab(bulk, os.path.join(batch_path_head, bulk_file))
#/bulk/end#

#--set surface slabs--#
#/surfaceslab/begin#
surface_slab_head = 'Cu100_surface_'
use_same_tag = 1
for i in range(num_surface_slabs):
    globals()['surface_{}'.format(i + 1)] = model.Slab(c=1.0)
    if use_same_tag == None:
        tag = i + 1
    else:
        tag = use_same_tag
    tool_box.add_atom_in_slab(
        globals()['surface_{}'.format(i + 1)],
        os.path.join(batch_path_head,
##<Setting electron density constraint>##
if electron_density_constraint:
    predefined_e_density=domain_creator.extract_e_density_info_muscovite(file=os.path.join(output_file_path,'temp_plot_eden'))
#globalsetting/end#

#--set instrument--#
#/instrument/begin#
inst = model.Instrument(wavel = wal, alpha = 2.0)
#/instrument/end#

#--set bulk slab--#
#/bulk/begin#
bulk = model.Slab()
bulk_file = 'muscovite_001_bulk_u_corrected_new.str'
tool_box.add_atom_in_slab(bulk,os.path.join(batch_path_head,bulk_file), height_offset = height_offset)
#/bulk/end#

#--set surface slabs--#
#/surfaceslab/begin#
surface_slab_head = 'muscovite_001_surface_AlSi_u_corrected_new_'
use_same_tag = 1
#only consider one domain for now
if num_surface_slabs != 1:
    num_surface_slabs = 1
for i in range(num_surface_slabs):
    globals()['surface_{}'.format(i+1)] = model.Slab(c = 1.0)
    if use_same_tag == None:
        tag = i+1
    else:
        tag = use_same_tag