httk quickstart: structures

Load a cif file or poscar

With httk-io and httk-atomistic installed, httk.core.load loads CIF, POSCAR, and CONTCAR files directly into httk₂ Structure objects.

Create structures in code

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:

Running this generates the output:

Species: ['Na', 'Cl']
Number of sites: 8
Atomic numbers: (11, 11, 11, 11, 17, 17, 17, 17)