Ice and clathrate labels#

You label one frame two ways. CHILL+ reads a staggered or eclipsed star. A cage signature counts closed polyhedra of a given ring census. tests/dseams/test_doc_snippets.py runs the Python blocks on this page. Python is pip install 'pydseamslib==2.14.0'. The mixed-frame census uses pydseams; the signature cages use the 2.14 frame, dseams.userframe, which takes the edge window.

The mixed TIP4P frame#

input/traj/exampleTraj.lammpstrj has 750 atoms and 250 oxygens (LAMMPS type 2).

import pydseams as ds

frame = ds.read("input/traj/exampleTraj.lammpstrj", atom_type=2)
print(frame.chill_plus())
print(frame.cages())
assert str(frame.chill_plus()) == "IceCounts(interClathrate=9, water=241)"
assert str(frame.cages()) == "CageScore(n_ih=0, n_ic=0, n_water=250)"

Frame.chill_plus and seams chill-plus both use the cutoff neighbour list. IceCounts(interClathrate=9, water=241). CageScore(n_ih=0, n_ic=0, n_water=250). The CLI prints interClathrate 9 water 241. No cage is complete, so the cage score’s water count is 250.

frame.chill_plus(graph="mutual") and seams chill-plus --graph mutual use the mutual four-neighbour list and print clathrate 1 interClathrate 7 water 242.

Cubic ice and an sI cage#

input/traj/mW_cubic.lammpstrj frame 1 is 4096 mW sites. Both the cutoff list and the mutual four-neighbour list label every site cubic, and every site sits in a double-diamond cage.

input/traj/genice_sI.lammpstrj with cages_by_signature("512") returns 2 cages and 40 vertices.

The default face-edge window is 2.65,3.15 in the coordinate units of the file. These dumps are angstroms, and that window covers the oxygen-oxygen contacts of the reference cells. The CLI --cage-edge and seams_frame_signature_edge take that window. none turns the window off: every ring the neighbour list already accepted can be a face, and the cage bound is the face census alone. On sI, sII, the sI 2×2×2 cell and the sII 10×10×10 cell the default and none return the same cages. dseams.userframe.Frame.cages_by_signature takes the signature, an optional max_ring_size, and an optional edge. edge="none" is the CLI --cage-edge none. Lua passes cutoff, graph, and edge.

from dseams import userframe

frame = userframe.read("input/traj/genice_sI.lammpstrj", atom_type=1)
found = frame.cages_by_signature("512")
assert len(found) == 2 and found.n_atoms == 40
found = frame.cages_by_signature("512", edge="none")
assert len(found) == 2 and found.n_atoms == 40
found = frame.cages_by_signature("512", max_ring_size=6)
found = frame.cages_by_signature("51262", max_ring_size=8)
local dseams = require("dseams")
local found = dseams.cages_by_signature(frame, "512")
found = dseams.cages_by_signature(frame, "512", {cutoff = 3.5, graph = "cutoff", edge = "none"})
found = dseams.cages_by_signature(frame, "51262", {cutoff = 3.5, graph = "cutoff"})

The CLI spelling is --cage-edge and SEAMS_CAGE_EDGE. The C spelling is seams_frame_signature_edge; a null edge string keeps the default.