22
33"""Methods to add atoms/adsorbates to surfaces."""
44
5- #| - Import Modules
5+ # | - Import Modules
66import numpy as np
77import copy
88import math
99
1010from operator import itemgetter
1111from ase .build import add_adsorbate
1212from misc_modules .numpy_methods import angle_between
13- #__|
13+ # __|
1414
1515def add_adsorbate_centered (active_element , slab , adsorbate , ads_height = 2.5 ):
1616 """Add adsorbate to surface.
@@ -25,7 +25,7 @@ def add_adsorbate_centered(active_element, slab, adsorbate, ads_height=2.5):
2525 adsorbate: ASE atoms object
2626 ads_height: Float
2727 """
28- #| - add_adsorbate_centered
28+ # | - add_adsorbate_centered
2929 center = (sum (slab .cell )) / 2
3030 act_metals = []
3131 for atom in slab :
@@ -40,7 +40,7 @@ def add_adsorbate_centered(active_element, slab, adsorbate, ads_height=2.5):
4040 add_adsorbate (slab , adsorbate , ads_height , position = ads_pos )
4141
4242 return slab
43- #__|
43+ # __|
4444
4545
4646def add_graphene_layer (
@@ -58,7 +58,7 @@ def add_graphene_layer(
5858 graph_surf_d:
5959 graph_bond_d_real:
6060 """
61- #| - add_graphene_layer
61+ # | - add_graphene_layer
6262 slab = copy .deepcopy (slab )
6363
6464 # num_graph_units = graphene_units + 1
@@ -91,11 +91,11 @@ def add_graphene_layer(
9191 y_unit_v = y_unit_v / np .linalg .norm (y_unit_v )
9292
9393
94- #| - STRAIN
94+ # | - STRAIN
9595 tmp = mag1 / num_graph_bond_lengths
9696 strain = 100. * (graph_bond_d_real - tmp ) / graph_bond_d_real
9797 print ("Strain: " + str (strain ))
98- #__|
98+ # __|
9999
100100 patt_cnt_x = 0
101101 patt_cnt_y = 0
@@ -144,4 +144,4 @@ def add_graphene_layer(
144144 C_pos_lst = np .array (C_pos_lst )
145145
146146 return (slab )
147- #__|
147+ # __|
0 commit comments