Exemplo n.º 1
0
  print '\tCalculate Dynamics: ', run_dyn
  print '\tCalculate Nye Tensor: ', calc_nye
  print '\tInput File: ', input_file
  print '\tPotential: ',  pot_type

  if pot_type == 'EAM':
    global potdir
    potdir   = os.environ['POTDIR']
    eam_pot  = os.path.join(potdir, 'PotBH.xml')
    r_scale  = 1.00894848312
    pot      = Potential('IP EAM_ErcolAd do_rescale_r=T r_scale={0}'.format(r_scale), param_filename=eam_pot)
  elif pot_type == 'TB':
    tb = TightBindingPot(alat= 1.00, nk=12)
    screw_slab_unit = Atoms(screw_slab_unit)
    center_cell = np.diag(screw_slab_unit.get_cell())/2.
    screw_slab_unit.add_atoms(center_cell,1)
    #screw_slab_unit.add_atoms(center_cell*0.76, 6)

    screw_slab_unit.set_atoms(screw_slab_unit.Z)
    print len(screw_slab_unit)
    tb.write_control_file('ctrl.fe', screw_slab_unit)
    pot = Potential('IP LMTO_TBE', param_str="""
    <params>
      <LMTO_TBE_params n_types="2" control_file="ctrl.fe">
        <per_type_data type="1" atomic_num="26"/>
        <per_type_data type="2" atomic_num="1"/>
      </LMTO_TBE_params>
    </params>""")
#If there is an initial strain energy increment that here:
  pot.print_()
  screw_slab_unit.write('screw_unitcell.xyz')
Exemplo n.º 2
0
POT_DIR = os.environ['POTDIR']
eam_pot = os.path.join(POT_DIR, 'PotBH.xml')
r_scale = 1.00894848312
pot = Potential('IP EAM_ErcolAd do_rescale_r=T r_scale={0}'.format(r_scale), param_filename=eam_pot)
#alat = 2.82893
#could just use the proper one as well....
alat = 2.837666

sup_cell = args.supercellsize
tetra_pos = alat*np.array([0.5, 0.0, 0.75])
octa_pos = alat*np.array([0.5, 0.5, 0.0])
#Structures
gb = BodyCenteredCubic(directions = [[1,0,0], [0,1,0], [0,0,1]],
                       size = (sup_cell[0],sup_cell[1],sup_cell[2]), symbol='Fe', pbc=(1,1,1),
                       latticeconstant = alat)
mid_point = 0.5*(np.diag(gb.get_cell()))
mid_point = [((sup_cell[0]-1)/2.)*alat for sp in sup_cell]
gb = Atoms(gb)
if args.tetra:
    print 'Tetrahedral Defect'
    tetra_pos += mid_point
    gb.add_atoms(tetra_pos, 1)
    gb.write('bcc_h.xyz')
elif args.octa:
    print 'Octahedral Defect'
    octa_pos += mid_point
    gb.add_atoms(octa_pos, 1)
    gb.write('bcc_h.xyz')
else:
    gb.write('bcc.xyz')
Exemplo n.º 3
0
    print '\tInput File: ', input_file
    print '\tPotential: ', pot_type

    if pot_type == 'EAM':
        global potdir
        potdir = os.environ['POTDIR']
        eam_pot = os.path.join(potdir, 'PotBH.xml')
        r_scale = 1.00894848312
        pot = Potential(
            'IP EAM_ErcolAd do_rescale_r=T r_scale={0}'.format(r_scale),
            param_filename=eam_pot)
    elif pot_type == 'TB':
        tb = TightBindingPot(alat=1.00, nk=12)
        screw_slab_unit = Atoms(screw_slab_unit)
        center_cell = np.diag(screw_slab_unit.get_cell()) / 2.
        screw_slab_unit.add_atoms(center_cell, 1)
        #screw_slab_unit.add_atoms(center_cell*0.76, 6)

        screw_slab_unit.set_atoms(screw_slab_unit.Z)
        print len(screw_slab_unit)
        tb.write_control_file('ctrl.fe', screw_slab_unit)
        pot = Potential('IP LMTO_TBE',
                        param_str="""
    <params>
      <LMTO_TBE_params n_types="2" control_file="ctrl.fe">
        <per_type_data type="1" atomic_num="26"/>
        <per_type_data type="2" atomic_num="1"/>
      </LMTO_TBE_params>
    </params>""")
#If there is an initial strain energy increment that here:
    pot.print_()