Skip to content

Commit 08568f4

Browse files
authored
Merge pull request #6 from raulf2012/dev
Merging all changes up to PROJ_irox publication
2 parents 7b22ba8 + 98a7aed commit 08568f4

69 files changed

Lines changed: 3289 additions & 2833 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

__misc__/sc_temp_methods.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def color_scale_interp(
1414
):
1515
"""
1616
"""
17-
#| - color_scale_interp
17+
# | - color_scale_interp
1818
# cl.scales["8"]["seq"]["Purples"]
1919

2020
black_white_cs = [
@@ -69,4 +69,4 @@ def clamp(x):
6969

7070
return(color_out)
7171

72-
#__|
72+
# __|

ase_modules/add_adsorbate.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
"""Methods to add atoms/adsorbates to surfaces."""
44

5-
#| - Import Modules
5+
# | - Import Modules
66
import numpy as np
77
import copy
88
import math
99

1010
from operator import itemgetter
1111
from ase.build import add_adsorbate
1212
from misc_modules.numpy_methods import angle_between
13-
#__|
13+
# __|
1414

1515
def 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

4646
def 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+
# __|

ase_modules/adsorbates.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
"""Adsorbate related methods."""
44

5-
#| - IMPORT MODULES
5+
# | - IMPORT MODULES
66
from ase import Atoms
77
from ase.build import molecule
88

99
import numpy as np
10-
#__|
10+
# __|
1111

1212
class Adsorbate:
1313
"""Adsorbate atoms object class."""
1414

15-
#| - Adsorbate ************************************************************
15+
# | - Adsorbate ************************************************************
1616

1717
def __init__(self):
1818
"""Initialize Adsorbate class instance."""
19-
#| - __init__
19+
# | - __init__
2020
self.tmp = 42
21-
#__|
21+
# __|
2222

2323
def ooh(self,
2424
OO_bl=1.359,
@@ -36,7 +36,7 @@ def ooh(self,
3636
OO_angle:
3737
H_up_down:
3838
"""
39-
#| - ooh
39+
# | - ooh
4040
O_1_x = OO_bl * np.sin(np.radians(OO_angle))
4141
O_1_y = OO_bl * np.cos(np.radians(OO_angle))
4242

@@ -62,19 +62,19 @@ def ooh(self,
6262
)
6363

6464
return(ooh_mol)
65-
#__|
65+
# __|
6666

6767
def o(self):
6868
"""*O adsorbate."""
69-
#| - o
69+
# | - o
7070
o_mol = Atoms(['O'],
7171
positions=[
7272
(0, 0, 0),
7373
]
7474
)
7575

7676
return(o_mol)
77-
#__|
77+
# __|
7878

7979
def oh(self,
8080
OH_bl=0.978,
@@ -85,15 +85,15 @@ def oh(self,
8585
OH_bl:
8686
O-H bond length
8787
"""
88-
#| - oh
88+
# | - oh
8989
oh_mol = Atoms(["O", "H"],
9090
positions=[
9191
(0, 0, 0),
9292
(0, 0, OH_bl),
9393
]
9494
)
9595
return(oh_mol)
96-
#__|
96+
# __|
9797

9898
def h2o(self,
9999
H_up_down="up",
@@ -104,7 +104,7 @@ def h2o(self,
104104
H_up_down:
105105
Hydrogen atom pointing up or down
106106
"""
107-
#| - h2o
107+
# | - h2o
108108
h2o_mol = molecule("H2O")
109109

110110
if H_up_down == "up":
@@ -113,7 +113,7 @@ def h2o(self,
113113
pass
114114

115115
return(h2o_mol)
116-
#__|
116+
# __|
117117

118118
def get_adsorbate(self, adsorbate, **kwargs):
119119
"""
@@ -123,10 +123,10 @@ def get_adsorbate(self, adsorbate, **kwargs):
123123
adsorbate:
124124
kwargs:
125125
"""
126-
#| - get_adsorbate
126+
# | - get_adsorbate
127127
ads = getattr(self, adsorbate)(**kwargs)
128128

129129
return(ads)
130-
#__|
130+
# __|
131131

132-
#__| **********************************************************************
132+
# __| **********************************************************************

0 commit comments

Comments
 (0)