generate_adsorption_sites_ase

Generate adsorption configurations on [111] surface of FCC metals.

class AddAtoms(object)

Place atoms (adsorbate) on surface.

adder = AddAtoms('POSCAR_surf_opt_1.gat',   # input file name.
           species='C3H6_di',               # name of adsorbates. O, H, OH, OOH, C3H6_di, C3H6_pi, C3H7
           sites='disigma',            # name of sites. ontop, bridge, hollow, disigma, or all
           dist_from_surf=1.7,        # distance between adsorbate and the surface. Decrease this variable if the adsorbate is too high.
           num_atomic_layer_along_Z=6) # number of atomic layers along z direction of the slab model.
 from agat.lib.adsorbate_poscar import adsorbate_poscar
 num_sites = adder.write_file_with_adsorption_sites(adsorbate_poscar)
__init__(self, fname, sites='all', species='O', num_atomic_layer_along_Z=3, dist_from_surf=2.2, crystal_type='fcc')
Parameters:
  • fname (str) – file name of a surface structure.

  • sites (str/list) – a list of sites for placing adsorbate.

  • species (str) – name of adsorbate.

  • num_atomic_layer_along_Z (int) – input number of atomic layers along z of input structural file.

  • dist_from_surf (float) – distance between adsorbate and surface.

  • crystal_type (str) – FCC, BCC, HCP, cubic.

property _support_sites
Type:

list

Value:

[‘ontop’, ‘bridge’, ‘hollow’]

shift_fcoords(self, fcoord1, fcoord2)

Identify closest periodic image between two scaled coordinates.

Parameters:
  • fcoord1 (numpy.ndarray) – the first coordinate.

  • fcoord2 (numpy.ndarray) – the second coordinate.

Returns:

  • fcoord1_new: new coordinate of first input.

  • fcoord2_new: new coordinate of second input.

Note

This method treats periodic boundary conditions. Two returned coordinates show shortest distance among periodic cells.

get_1NN_cutoff(self)

Get cutoff for identifying the first-nearest neighbor.

Returns:

1NN cutoff

Return type:

float

get_atomic_diameter_for_slab(self, layer_sapcing, atomic_layers, structure)

Get average atomic diameter in a slab model.

Parameters:
  • layer_sapcing (float) – Layer spacing along z.

  • atomic_layers (int) – Number of atomic layers along z.

  • structure (ase.atoms) – ase atoms object.

Returns:

average atomic diameter.

get_1NN_of_top_layer(self, structure=None)

Neighbor analysis of the top atomic layer.

Parameters:

structure (ase.atoms) – input structure.

Returns:

1NN relation of top atomic layer.

Return type:

numpy.ndarray

get_ontop_sites(self, x_shift=0.0, y_shift=0.0)

Find ontop sites for placing adsorbate.

Parameters:
  • x_shift (float) – move adsorbate along x.

  • y_shift (float) – move adsorbate along y.

Returns:

  • ccoords: Cartesian coordinates

  • an array of None with the same length of ccords.

get_bridge_sites(self, x_shift=0.0, y_shift=0.0)

Find bridge sites for placing adsorbate.

Parameters:
  • x_shift (float) – move adsorbate along x.

  • y_shift (float) – move adsorbate along y.

Returns:

  • ccoords: Cartesian coordinates

  • an array of None with the same length of ccords.

get_disigma_sites(self, x_shift=0.0, y_shift=0.0)

Find bridge sites for placing adsorbate.

Note

Not used for now.

Parameters:
  • x_shift (float) – move adsorbate along x.

  • y_shift (float) – move adsorbate along y.

Returns:

  • src: source binding site.

  • vectors: direction of adsorbate.

get_hollow_sites(self, x_shift=0.0, y_shift=0.0)

Find hollow sites for placing adsorbate.

Parameters:
  • x_shift (float) – move adsorbate along x.

  • y_shift (float) – move adsorbate along y.

Returns:

  • ccoords: Cartesian coordinates

  • an array of None with the same length of ccords.

fractional2cartesian(self, vector_tmp, D_coord_tmp)

Convert fractional coordinates to Cartesian coordinates. Source code:

def fractional2cartesian(self, vector_tmp, D_coord_tmp):
    C_coord_tmp = np.dot(D_coord_tmp, vector_tmp)
    return C_coord_tmp
Parameters:
  • vector_tmp (numpy.ndarray) – cell vectors.

  • D_coord_tmp (numpy.ndarray) – direct (fractional or scaled) coordinates.

Returns:

Cartesian coordinates.

Return type:

numpy.ndarray

cartesian2fractional(self, vector_tmp, C_coord_tmp)

Convert Cartesian coordinates to fractional coordinates. Source code:

def cartesian2fractional(self, vector_tmp, C_coord_tmp):
    vector_tmp = np.mat(vector_tmp)
    D_coord_tmp = np.dot(C_coord_tmp, vector_tmp.I)
    D_coord_tmp = np.array(D_coord_tmp, dtype=float)
    return D_coord_tmp
Parameters:
  • vector_tmp (numpy.ndarray) – cell vectors.

  • C_coord_tmp (numpy.ndarray) – Cartesian coordinates.

Returns:

direct (fractional or scaled) coordinates.

Return type:

numpy.ndarray

write_file_with_adsorption_sites(self, adsorbate_poscar, calculation_index=0)

Write adsorption structures to disk.

Parameters:
  • adsorbate_poscar (str) –

    POSCAR of adsorbate.

    Note

    the POSCAR of adsorbate is read by StringIO.

  • calculation_index (int/str) – index of calculations. Use this to differentiate outputs of high-throughput predictions.

adsorbate_poscar

Structural positions with VASP format.

Type:

dict

Value:
{'O':
'''O
   1.000000000000000
 10.0000000000000000  0.0000000000000000  0.0000000000000000
  0.0000000000000000 10.0000000000000000  0.0000000000000000
  0.0000000000000000  0.0000000000000000 10.0000000000000000
   1
Direct
0.0 0.0 0.0
''',

'OH':
'''O H
   1.000000000000000
 10.0000000000000000  0.0000000000000000  0.0000000000000000
  0.0000000000000000 10.0000000000000000  0.0000000000000000
  0.0000000000000000  0.0000000000000000 10.0000000000000000
   1 1
C
0.0 0.0 0.0
0.6 0.0 0.7
''',

'H':
'''H
   1.000000000000000
 10.0000000000000000  0.0000000000000000  0.0000000000000000
  0.0000000000000000 10.0000000000000000  0.0000000000000000
  0.0000000000000000  0.0000000000000000 10.0000000000000000
   1
C
0.0 0.0 0.0
''',

'OOH':
'''O H
   1.000000000000000
 10.0000000000000000  0.0000000000000000  0.0000000000000000
  0.0000000000000000 10.0000000000000000  0.0000000000000000
  0.0000000000000000  0.0000000000000000 10.0000000000000000
   2 1
C
0.0 0.0 0.0
1.290 0.0  0.733
1.290 0.985 0.733
'''
}

Hint

You can add your own adsorbate.