Skip to content

Commit 1338998

Browse files
committed
Update structure examples for the cell rename
1 parent d9ca4d1 commit 1338998

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/content/index.httkweb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ Loading a ``.cif`` file directly into an httk₂ ``Structure`` object is still u
6363
Create structures in code
6464
+++++++++++++++++++++++++
6565

66-
In httk₂, a ``Structure`` is created from an explicit basis, a list of sites in reduced coordinates, a list of species (given as OPTIMADE-style species dictionaries), and a per-site list naming the species at each site. Here is a conventional cubic rock-salt (NaCl) cell:
66+
In httk₂, a ``Structure`` is created from an explicit cell, a list of sites in reduced coordinates, a list of species (given as OPTIMADE-style species dictionaries), and a per-site list naming the species at each site. Here is a conventional cubic rock-salt (NaCl) cell:
6767

6868
.. code:: python
6969

7070
from httk.atomistic import Structure, StructurePrimitiveView
7171

72-
basis = [[5.64, 0.0, 0.0],
73-
[0.0, 5.64, 0.0],
74-
[0.0, 0.0, 5.64]]
72+
cell = [[5.64, 0.0, 0.0],
73+
[0.0, 5.64, 0.0],
74+
[0.0, 0.0, 5.64]]
7575

7676
sites = [[0.0, 0.0, 0.0], [0.5, 0.5, 0.0], [0.5, 0.0, 0.5], [0.0, 0.5, 0.5],
7777
[0.5, 0.5, 0.5], [0.0, 0.0, 0.5], [0.0, 0.5, 0.0], [0.5, 0.0, 0.0]]
@@ -83,7 +83,7 @@ In httk₂, a ``Structure`` is created from an explicit basis, a list of sites i
8383

8484
species_at_sites = ["Na", "Na", "Na", "Na", "Cl", "Cl", "Cl", "Cl"]
8585

86-
struct = Structure(basis=basis, sites=sites,
86+
struct = Structure(cell=cell, sites=sites,
8787
species=species, species_at_sites=species_at_sites)
8888

8989
print("Species:", [s.name for s in struct.species])

src/content/quickstart-structures.httkweb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ Loading a ``.cif`` file directly into an httk₂ ``Structure`` object is still u
1616
Create structures in code
1717
-------------------------
1818

19-
In httk₂, a ``Structure`` is created from an explicit basis, a list of sites in reduced coordinates, a list of species (given as OPTIMADE-style species dictionaries), and a per-site list naming the species at each site. Here is a conventional cubic rock-salt (NaCl) cell:
19+
In httk₂, a ``Structure`` is created from an explicit cell, a list of sites in reduced coordinates, a list of species (given as OPTIMADE-style species dictionaries), and a per-site list naming the species at each site. Here is a conventional cubic rock-salt (NaCl) cell:
2020

2121
.. code:: python
2222

2323
from httk.atomistic import Structure, StructurePrimitiveView
2424

25-
basis = [[5.64, 0.0, 0.0],
26-
[0.0, 5.64, 0.0],
27-
[0.0, 0.0, 5.64]]
25+
cell = [[5.64, 0.0, 0.0],
26+
[0.0, 5.64, 0.0],
27+
[0.0, 0.0, 5.64]]
2828

2929
sites = [[0.0, 0.0, 0.0], [0.5, 0.5, 0.0], [0.5, 0.0, 0.5], [0.0, 0.5, 0.5],
3030
[0.5, 0.5, 0.5], [0.0, 0.0, 0.5], [0.0, 0.5, 0.0], [0.5, 0.0, 0.0]]
@@ -36,7 +36,7 @@ In httk₂, a ``Structure`` is created from an explicit basis, a list of sites i
3636

3737
species_at_sites = ["Na", "Na", "Na", "Na", "Cl", "Cl", "Cl", "Cl"]
3838

39-
struct = Structure(basis=basis, sites=sites,
39+
struct = Structure(cell=cell, sites=sites,
4040
species=species, species_at_sites=species_at_sites)
4141

4242
print("Species:", [s.name for s in struct.species])

0 commit comments

Comments
 (0)