Skip to content

Commit 3e711c3

Browse files
author
Jacob Boes
authored
Revisions to readme (#20)
1 parent 992c298 commit 3e711c3

10 files changed

Lines changed: 31 additions & 1024 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
#*
55
.#*
66
*.pyc
7-
*.db
7+
*.db

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ install:
3838

3939

4040
script:
41-
- nosetests tests/* --with-coverage --cover-inclusive --cover-package=. --cover-erase
42-
- coverage report --omit 'images/*,tests/*' --show-missing
41+
- nosetests ./*/tests/* --with-coverage --cover-inclusive --cover-package=. --cover-erase
42+
- coverage report --omit 'images/*,./*/tests/*' --show-missing
4343

4444
after_success:
4545
- coveralls

catgen/readme.org

Lines changed: 27 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ The surface module is designed to leverage information about the bulk structure
2929
*** Slab enumeration:
3030
Example surface generation for the 2 terminations of a fcc(2, 1, 1) surface construction of an L1_{0} CuPd_{3} cubic alloy.
3131

32-
First termination of 9 layer slab of CuPd_{3}.
32+
#+CAPTION: First termination of 9 layer slab of CuPd_{3}.
3333
[[../images/CuPd3-term-0.png]] [[../images/CuPd3-term-0-top.png]]
3434

35-
Second termination of 9 layer slab of CuPd_{3}.
35+
#+CAPTION: Second termination of 9 layer slab of CuPd_{3}.
3636
[[../images/CuPd3-term-1.png]] [[../images/CuPd3-term-1-top.png]]
3737

3838
#+BEGIN_SRC python :results silent :exports code
@@ -61,20 +61,18 @@ for i, t in enumerate(terminations):
6161
img_name,
6262
slab,
6363
show_unit_cell=2,
64-
rotation='-90x',
65-
run_povray=True)
64+
rotation='-90x')
6665

6766
write(
6867
img_name.replace('.pov', '-top.pov'),
6968
slab,
70-
show_unit_cell=2,
71-
run_povray=True)
69+
show_unit_cell=2)
7270
#+END_SRC
7371

7472
*** Slab graph and surface atoms:
7573
One of the less visual features is the identification of the surface atoms and identification of nearest-neighbors which is subsequently used for creating graph edges. When performing more sophisticated operations, such as adsorption site identification, these functions are being called automatically.
7674

77-
Slab of hcp Pd with (1, 1, 0) miller index. Top surface atoms have been changed to Au.
75+
#+CAPTION: Slab of hcp Pd with (1, 1, 0) miller index. Top surface atoms have been changed to Au.
7876
[[../images/Pd-surface-atoms.png]]
7977

8078
#+BEGIN_SRC python :results output org drawer :exports both
@@ -107,8 +105,7 @@ write(
107105
'../images/Pd-surface-atoms.pov',
108106
atoms,
109107
show_unit_cell=2,
110-
rotation='-90x',
111-
run_povray=True)
108+
rotation='-90x')
112109
#+END_SRC
113110

114111
#+RESULTS:
@@ -162,8 +159,7 @@ for i, c in enumerate(coordinates):
162159
write(
163160
'../images/CuPd3_111-sites.pov',
164161
atoms,
165-
show_unit_cell=2,
166-
run_povray=True)
162+
show_unit_cell=2)
167163
#+END_SRC
168164

169165
** Adsorption module
@@ -182,6 +178,8 @@ Adsorption site enumeration in CatGen is solely dependent upon surface atom iden
182178
Here, we show how the surface sites can be assigned manually which is often convenient enough. Other means of surface site identification will be added in a future release.
183179

184180
Surface atoms are used to define top sites (green), which are then used to define remaining sites (red) via Delaunay triangulation symmetries.
181+
182+
#+CAPTION: Delaunay triangulation of surface atoms for fcc(111) structure.
185183
[[../images/Pd3Cu-adsorption-sites.png]]
186184

187185
#+BEGIN_SRC python :results silent :exports code
@@ -211,6 +209,8 @@ For more complex adsorption enumeration, we often require more detailed informat
211209
The =AdsorptionSite= class also produces an expanded unit cell which is useful for operations which require observation of periodic boundary conditions. This extended unit cell can be accessed by toggling the ``screen'' argument.
212210

213211
All possible adsorption sites of of CuPd_{3} (3, 2, 1). Site identifications are the same as above with the addition of blue which shows 4-fold hollow sites.
212+
213+
#+CAPTION: Delaunay triangulation of surface atoms for fcc(111) structure.
214214
[[../images/CuPd3_321-sites.png]]
215215

216216
#+BEGIN_SRC python :results output org drawer :exports code
@@ -264,8 +264,7 @@ for i, c in enumerate(coordinates):
264264
write(
265265
'../images/CuPd3_321-sites.pov',
266266
atoms,
267-
show_unit_cell=2,
268-
run_povray=True)
267+
show_unit_cell=2)
269268
#+END_SRC
270269

271270
#+RESULTS:
@@ -349,8 +348,7 @@ write(
349348
'../images/adsorption-vectors.pov',
350349
atoms * (1, 2, 1),
351350
show_unit_cell=2,
352-
rotation='-90x, 90y, 20z',
353-
run_povray=True)
351+
rotation='-90x, 90y, 20z')
354352
#+END_SRC
355353

356354
*** Adsorption structure builder
@@ -397,12 +395,11 @@ When a single atom of the molecule is considered bonded to the surface, the buil
397395

398396
In this example, the use of =-1= as a tag on the adsorbate is used to indicate it is bonded to the slab.
399397

400-
[[../images/CH3-ads.png]]
401-
402-
[[../images/CH3-ads-top.png]]
398+
#+CAPTION: Builder for a CH_{3} on a unique top site of a CuPd_{3} (1, 1, 1) surface.
399+
[[../images/CH3-ads.png]] [[../images/CH3-ads-top.png]]
403400

404401
#+BEGIN_SRC python :results silent :exports code
405-
from catgen.pathways import ReactionNetwork
402+
from catgen.molecules import get_topologies
406403
from catgen.surface import SlabGenerator
407404
from catgen.adsorption import Builder
408405
from ase.build import bulk
@@ -422,12 +419,8 @@ slab = gen.get_slab()
422419
surface_sites = gen.get_voronoi_surface_atoms(slab)[0]
423420
slab.set_surface_atoms(surface_sites)
424421

425-
with ReactionNetwork(db_name='C2H6-example.db') as rn:
426-
rn.molecule_search({'C': 2, 'H': 6})
427-
molecules = rn.load_molecules()
428-
429-
adsorbate = molecules[8]
430-
adsorbate.set_tags([0, -1, 0, 0])
422+
adsorbate = get_topologies('CH3')[0]
423+
adsorbate.set_tags([-1, 0, 0, 0])
431424

432425
builder = Builder(slab)
433426
ads_slab = builder.add_adsorbate(adsorbate, index=1)
@@ -452,11 +445,10 @@ The =Builder= class can also produce structures for species bonded in two locati
452445

453446
Also, using setting the =index= key to =-1= will return a list of all the possible adsorbed structures.
454447

455-
[[../images/CH2CH-ads.png]]
456-
457-
[[../images/CH2CH-ads-top.png]]
448+
#+CAPTION: Builder for a C_{2}H_{3} on a unique adsorption edge of a CuPd_{3} (1, 1, 1) surface.
449+
[[../images/CH2CH-ads.png]] [[../images/CH2CH-ads-top.png]]
458450

459-
#+BEGIN_SRC python :results output org drawer :exports code
451+
#+BEGIN_SRC python :results output org drawer :exports both
460452
from catgen.pathways import ReactionNetwork
461453
from catgen.surface import SlabGenerator
462454
from catgen.adsorption import Builder
@@ -521,23 +513,11 @@ write(
521513
*** Example usage:
522514
Below is an example script which generates some simple figures using [[https://networkx.github.io/documentation/networkx-1.10/index.html][NetworkX]] code for all molecules up to C_{2}H_{6}.
523515

524-
1 [[../images/molecule-1.png]]
525-
2 [[../images/molecule-2.png]]
526-
3 [[../images/molecule-3.png]]
527-
4 [[../images/molecule-4.png]]
528-
5 [[../images/molecule-5.png]]
529-
6 [[../images/molecule-6.png]]
530-
7 [[../images/molecule-7.png]]
531-
8 [[../images/molecule-8.png]]
532-
9 [[../images/molecule-9.png]]
533-
10 [[../images/molecule-10.png]]
534-
11 [[../images/molecule-11.png]]
535-
12 [[../images/molecule-12.png]]
536-
13 [[../images/molecule-13.png]]
537-
14 [[../images/molecule-14.png]]
538-
15 [[../images/molecule-15.png]]
539-
16 [[../images/molecule-16.png]]
540-
17 [[../images/molecule-17.png]]
516+
[[../images/molecule-1.png]] [[../images/molecule-2.png]] [[../images/molecule-3.png]] [[../images/molecule-4.png]]
517+
[[../images/molecule-5.png]] [[../images/molecule-6.png]] [[../images/molecule-7.png]] [[../images/molecule-8.png]]
518+
[[../images/molecule-9.png]] [[../images/molecule-10.png]] [[../images/molecule-11.png]] [[../images/molecule-12.png]]
519+
[[../images/molecule-13.png]] [[../images/molecule-14.png]] [[../images/molecule-15.png]] [[../images/molecule-16.png]]
520+
[[../images/molecule-17.png]]
541521

542522
#+BEGIN_SRC python :results output org drawer :exports both
543523
from catgen.pathways import ReactionNetwork
@@ -709,7 +689,7 @@ epsilon = np.array([
709689
])
710690

711691
terminal = [5, 6, 7, 8, 9, 10, 11]
712-
OR, species = get_response_reactions(epsilon, terminal, species=True)
692+
OR, selfpecies = get_response_reactions(epsilon, terminal, species=True)
713693

714694
print('Overall reaction routes:')
715695
print(OR, '\n')

0 commit comments

Comments
 (0)