Python#

The pages below are dseams, generated by autodoc and numpydoc. Set DSEAMS_DOC_BUILD=1 to import the package without the extension module. The census doctest calls the real library through core_counts.check in examples/python; tests/dseams/test_doc_snippets.py runs it.

d-SEAMS from the stable C API.

Positions are Angstrom, C-contiguous, and are not copied on the way in. box is three edge lengths or the nine LAMMPS numbers ox, oy, oz, lx, ly, lz, xy, xz, yz.

Ice Ih (input/traj/ice1h.lammpstrj, every atom) is 128 hexagonal waters and 256 primitive six-rings. core_counts.check asserts both.

dseams.version()#

Engine version string.

Returns:

Version reported by the C library.

Return type:

str

dseams.set_num_threads(n)#

Request worker threads.

Parameters:

n (int) – Thread count.

dseams.num_threads()#

Worker threads the engine is using.

Return type:

int

class dseams.Frame#

A frame whose box may be three lengths, nine LAMMPS numbers, or an array.

set_frame(positions, box)#

Store positions and a cell.

Parameters:
  • positions (array_like) – Coordinates, shape (n, 3), in angstrom.

  • box (array_like) – Three edge lengths or nine LAMMPS cell numbers.

dseams.chill_plus(positions, box, rule=0, graph=0, cutoff=3.5)#

CHILL+ labels and the nine population counts.

rule is paper (PUBLISHED, the default) or ovito. Paper averages q_lm over the four closest neighbours. Ovito averages q_lm over every neighbour inside the cutoff.

dseams.q4q6(positions, box, cutoff=3.5)#

Local q4 and q6 on the cutoff shell.

Parameters:
  • positions (array_like) – Coordinates, shape (n, 3), in angstrom.

  • box (array_like) – Three edge lengths or nine LAMMPS cell numbers.

  • cutoff (float) – Neighbour cutoff in angstrom.

Returns:

Local q4, local q6, and the Lechner-Dellago averages.

Return type:

tuple

dseams.neighbours(positions, box, cutoff=3.5, graph=0)#

CSR neighbour list, self entries omitted.

dseams.rings(positions, box, cutoff=3.5, max_depth=6)#

Ring sizes, symmetry labels, size histogram, and the six-ring atom fraction.

dseams.from_ase(atoms)#

Positions and a LAMMPS cell from an ASE Atoms object.

dseams.from_mdanalysis(universe, select='all')#

Positions and a LAMMPS cell from an MDAnalysis universe or atom group.

Ice Ih census#

input/traj/ice1h.lammpstrj is 128 hexagonal waters and 256 six-rings. sII is 136 clathrate waters, 144 five-rings and 16 six-rings.

>>> from core_counts import check
>>> check()
hexagonal 128
rings6 256
clathrate 136
rings5 144