177class Error :
public std::runtime_error {
185 : std::runtime_error(std::move(message)), code_(
status) {}
192 return static_cast<Status>(code_);
199 [[nodiscard]]
int code() const noexcept {
return code_; }
233 std::vector<double>
q4;
234 std::vector<double>
q6;
254 std::vector<double>
g;
557inline void check(
int status,
const void *handle) {
562 throw Error(status, text ==
nullptr ? std::string() : std::string(text));
565template <
class T,
void (*Destroy)(T *)>
574 if (
this != &other) {
576 ptr_ = std::exchange(other.ptr_,
nullptr);
582 [[nodiscard]]
explicit operator bool() const noexcept {
return ptr_ !=
nullptr; }
585 [[nodiscard]] T *
get() const noexcept {
return ptr_; }
588 if (
ptr_ !=
nullptr) {
597inline std::string
copy_text(Call call,
const void *handle) {
598 std::size_t n_out = 0;
599 check(call(handle,
nullptr, 0, &n_out), handle);
600 std::string text(n_out + 1,
'\0');
601 check(call(handle, text.data(), text.size(), &n_out), handle);
622 [[nodiscard]] std::size_t
count()
const {
623 return size > 0 ?
atoms.size() /
static_cast<std::size_t
>(
size) : 0;
626 [[nodiscard]] std::vector<int>
cycle(std::size_t index)
const {
628 atoms.begin() +
static_cast<std::ptrdiff_t
>(index *
static_cast<std::size_t
>(
size));
629 return std::vector<int>(first, first +
size);
648 [[nodiscard]] std::size_t
nnz()
const {
649 std::size_t n_offsets = 0;
650 std::size_t count = 0;
659 [[nodiscard]] std::vector<int>
degrees()
const {
660 std::size_t n_offsets = 0;
661 std::size_t count = 0;
663 std::vector<int> offsets(n_offsets);
664 std::vector<int> cols(count);
666 cols.data(), cols.size(), &count),
668 std::vector<int> degree;
670 degree.reserve(n_offsets - 1);
671 for (std::size_t i = 0; i + 1 < n_offsets; ++i) {
672 degree.push_back(offsets[i + 1] - offsets[i]);
682 [[nodiscard]] std::vector<std::pair<int, int>>
pairs()
const {
683 std::size_t n_offsets = 0;
684 std::size_t count = 0;
686 std::vector<int> offsets(n_offsets);
687 std::vector<int> cols(count);
689 cols.data(), cols.size(), &count),
691 std::vector<std::pair<int, int>> out;
693 for (std::size_t atom = 0; atom + 1 < n_offsets; ++atom) {
694 for (
int cursor = offsets[atom]; cursor < offsets[atom + 1]; ++cursor) {
695 const int neighbour = cols[
static_cast<std::size_t
>(cursor)];
696 if (neighbour !=
static_cast<int>(atom)) {
697 out.emplace_back(
static_cast<int>(atom), neighbour);
713 std::size_t count = 0;
717 out.
atoms.resize(count *
static_cast<std::size_t
>(size));
746 [[nodiscard]] std::vector<int>
vertices(
int index)
const {
747 std::size_t n_out = 0;
749 std::vector<int> atoms(n_out);
760 [[nodiscard]] std::vector<int>
histogram(
int up_to)
const {
761 std::vector<int> counts(
static_cast<std::size_t
>(up_to + 1));
771 [[nodiscard]]
double fraction(
int ring_size)
const {
792 const Rings *owner_ =
nullptr;
826 [[nodiscard]] std::vector<int>
labels(std::size_t n_atoms)
const {
827 std::vector<int> per_atom(n_atoms);
845 [[nodiscard]] std::string
key()
const {
847 [](
const void *handle,
char *buf, std::size_t cap, std::size_t *n_out) {
858 [[nodiscard]] std::string
atom(
int index)
const {
859 std::size_t n_out = 0;
861 std::string text(n_out + 1,
'\0');
871 [[nodiscard]] std::vector<int>
rings()
const {
872 std::vector<int> counts(13);
891 out.
found = found != 0;
906 std::size_t n_out = 0;
946 if (
get() ==
nullptr) {
958 void set_ortho(std::span<const double> xyz,
double lx,
double ly,
double lz) {
959 const double origin[3] = {0, 0, 0};
960 const double lengths[3] = {lx, ly, lz};
972 void set_ortho(std::span<const double> xyz, std::span<const double, 3> origin,
973 std::span<const double, 3> lengths, std::span<const int> types = {},
974 std::span<const int> ids = {}) {
975 if (xyz.size() % 3 != 0) {
976 throw Error(
SEAMS_ERR_ARG,
"coordinates are not a multiple of 3");
978 const auto n =
static_cast<int>(xyz.size() / 3);
980 lengths[0], lengths[1], lengths[2],
981 types.empty() ?
nullptr : types.data(),
982 ids.empty() ?
nullptr : ids.data()),
993 void set_frame(std::span<const double> xyz, std::span<const double, 9> box9,
994 std::span<const int> types = {}, std::span<const int> ids = {}) {
995 if (xyz.size() % 3 != 0) {
996 throw Error(
SEAMS_ERR_ARG,
"coordinates are not a multiple of 3");
998 const auto n =
static_cast<int>(xyz.size() / 3);
1000 types.empty() ?
nullptr : types.data(),
1001 ids.empty() ?
nullptr : ids.data()),
1005 std::pair<std::vector<int>, std::vector<int>>
chill(
double cutoff,
int type,
int graph,
1007 const int n =
count();
1008 std::vector<int> labels(
static_cast<std::size_t
>(std::max(n, 0)));
1011 static_cast<std::size_t
>(std::max(n, 0)), counts),
1013 return {labels, std::vector<int>(counts, counts + 9)};
1016 std::pair<std::vector<double>, std::vector<double>>
steinhardt(
double cutoff,
int order,
1018 const int n =
count();
1019 std::vector<double>
ql(
static_cast<std::size_t
>(std::max(n, 0)));
1020 std::vector<double> bar;
1021 double *bar_ptr =
nullptr;
1023 bar.resize(
static_cast<std::size_t
>(std::max(n, 0)));
1024 bar_ptr = bar.data();
1027 static_cast<std::size_t
>(std::max(n, 0)), bar_ptr,
1028 average ?
static_cast<std::size_t
>(std::max(n, 0)) : 0),
1039 void read(std::string_view path,
int frame,
int type_filter) {
1040 const std::string text(path);
1052 return classify(
false, options);
1057 return classify(
true, options);
1065 const auto n =
static_cast<std::size_t
>(
count());
1067 out.
local.resize(n);
1072 out.
local.data(), n,
1080 const auto n =
static_cast<std::size_t
>(
count());
1082 out.
local.resize(n);
1087 static_cast<int>(options.
graph), out.
local.data(), n,
1094 [[nodiscard]]
Q4Q6 q4q6(
double cutoff,
int species = 0) {
1095 const auto n =
static_cast<std::size_t
>(
count());
1105 const auto n =
static_cast<std::size_t
>(
count());
1118 static_cast<int>(options.
graph), &out),
1137 options.
mutual ? 1 : 0, &out),
1164 static_cast<int>(options.
graph), options.
k, options.
complete ? 1 : 0,
1174 static_cast<int>(options.
graph), options.
spec.c_str(),
1182 std::size_t n_out = 0;
1185 nullptr,
nullptr,
nullptr, 0, &n_out, &out.
volume),
1187 out.
radius.resize(n_out);
1188 out.
g.resize(n_out);
1189 out.
count.resize(n_out);
1191 out.
radius.data(), out.
g.data(), out.
count.data(), n_out, &n_out,
1194 out.
radius.resize(n_out);
1195 out.
g.resize(n_out);
1196 out.
count.resize(n_out);
1202 std::size_t n_out = 0;
1204 options.
type_j,
nullptr,
nullptr, 0, &n_out),
1207 out.
radius.resize(n_out);
1213 out.
radius.resize(n_out);
1238 std::size_t n_out = 0;
1240 static_cast<int>(options.
axis),
nullptr,
nullptr, 0, &n_out),
1247 out.
density.data(), n_out, &n_out),
1258 static_cast<int>(options.
graph), options.
hops,
1266 const std::string text(spec);
1297 std::vector<int> counts(
static_cast<std::size_t
>(options.
max_size + 1));
1299 options.
sheet_area, counts.data(), counts.size()),
1309 [[nodiscard]] std::vector<int>
site_table(std::string_view spec) {
1310 const std::string text(spec);
1311 std::vector<int> kinds(
static_cast<std::size_t
>(
count()));
1321 [[nodiscard]] std::vector<int>
symmetry(
double shell_rmsd) {
1322 std::vector<int> labels(
static_cast<std::size_t
>(
count()));
1336 static_cast<int>(options.
axis), &out),
1343 const auto n =
static_cast<std::size_t
>(
count());
1348 static_cast<int>(options.
graph),
1349 static_cast<int>(options.
rule), out.
labels.data(),
1354 static_cast<int>(options.
graph),
static_cast<int>(options.
rule),
1369 return text ==
nullptr ? std::string() : std::string(text);
1399[[nodiscard]]
inline std::size_t
nframes(std::string_view path) {
1400 const std::string text(path);
1401 std::size_t count = 0;
1414 return text ==
nullptr ? std::string_view() : std::string_view(text);
1425 return text ==
nullptr ? std::string_view() : std::string_view(text);
Owned planar ice-front measurement.
Rejection rejection() const
Molal rejection coefficient.
BrineProfile profile() const
Concentration profile along the front axis.
Pockets pockets() const
Pockets trapped in the ice, and the liquid reservoir.
BrineFronts fronts() const
The two planar crossings.
Owned hexagonal and double-diamond membership.
CageCounts counts() const
Disjoint population counts.
std::vector< int > labels(std::size_t n_atoms) const
One cage code per atom.
Failure from the C API, or from a rejected argument.
Status status() const noexcept
Status as the Status enumeration when the code is known.
int code() const noexcept
Status integer.
Error(int status, std::string message)
Build an error from a status and a message.
Owned topological fingerprint.
std::string atom(int index) const
Local key of one atom.
std::vector< int > rings() const
Primitive-ring census stored on the fingerprint.
std::string key() const
Frame fingerprint text.
ChordlessCycles chordless(int size) const
Chordless cycles of one length on this graph.
std::vector< int > degrees() const
Degree of each atom.
std::vector< std::pair< int, int > > pairs() const
Directed pairs (atom, neighbour).
std::size_t nnz() const
Number of neighbour pairs, omitting self.
std::vector< int > value_type
value_type operator*() const
bool operator!=(const iterator &other) const
std::ptrdiff_t difference_type
iterator(const Rings *owner, int index)
bool operator==(const iterator &other) const
Owned primitive-ring set.
std::vector< int > histogram(int up_to) const
Histogram of ring size.
iterator end() const
Past the last ring.
iterator begin() const
First ring.
int size() const
Number of primitive rings.
std::vector< int > vertices(int index) const
Atom indices of one ring.
double fraction(int ring_size) const
Fraction of atoms that sit on a ring of one size.
Rings rings(const RingOptions &options)
Primitive rings up to a maximum size.
Classification chill_plus(const ChillOptions &options)
CHILL+ labels and nine population counts.
SignatureMatch signature_cages(const SignatureOptions &options)
Closed cages of one ring census.
Q6Bar q6bar(const Q6BarOptions &options)
q6-bar, its mean and median, and the ice count above the cut.
RunningCoordination running_cn(const DistributionOptions &options)
Running coordination number along the partial RDF.
std::vector< int > neighbour_degree(double cutoff, int species=0)
Degree of each atom on the cutoff graph.
void set_ortho(std::span< const double > xyz, std::span< const double, 3 > origin, std::span< const double, 3 > lengths, std::span< const int > types={}, std::span< const int > ids={})
Store points in an orthorhombic cell.
Distribution rdf(const DistributionOptions &options)
Partial radial distribution and the cell volume.
PrismCensus prisms(const PrismOptions &options)
Perfect and imperfect prism counts by ring size.
Neighbours neighbours(const NeighbourOptions &options)
Cutoff or mutual neighbour list.
DensityProfile density(const DensityOptions &options)
Number density along one cell axis.
Steinhardt ql(const OrderOptions &options)
Local q_l on a named graph.
Q4Q6 q4q6(double cutoff, int species=0)
Local q4 and q6 on the cutoff shell.
Contacts contact_pairs(std::string_view spec)
Mutual nearest unlike contacts.
double coordination(const DistributionOptions &options)
Coordination number integrated to rmax.
int count() const
Number of points in the frame.
std::vector< int > site_table(std::string_view spec)
Per-atom site kind.
System()
Allocate an empty frame.
void read(std::string_view path, int frame, int type_filter)
Read one frame from a trajectory path.
Brine brine(std::span< const int > ice, const BrineOptions &options)
Planar ice front from an ice assignment.
Fingerprint fingerprint(const FingerprintOptions &options)
Topological fingerprint of the bonded graph.
Steinhardt steinhardt(const SteinhardtOptions &options)
Local q_l on the cutoff shell.
Cages cages(const CageOptions &options)
Hexagonal and double-diamond cage membership.
std::vector< int > monolayer(const SheetOptions &options)
Primitive-ring histogram of a monolayer.
std::pair< std::vector< double >, std::vector< double > > steinhardt(double cutoff, int order, bool average)
DomainReport domains(const DomainOptions &options)
Largest polar or apolar domain.
Neighbours knn(const KnnOptions &options)
k-nearest neighbour list.
int hbonds(const BondOptions &options)
Hydrogen-bond count.
ChordlessCycles rings_chordless(const NeighbourOptions &options, int size)
Chordless cycles of one length on a neighbour graph.
void set_ortho(std::span< const double > xyz, double lx, double ly, double lz)
Store points in an orthorhombic cell whose origin is zero.
std::pair< std::vector< int >, std::vector< int > > chill(double cutoff, int type, int graph, int rule)
Classification chill(const ChillOptions &options)
Original CHILL labels and nine population counts.
void set_frame(std::span< const double > xyz, std::span< const double, 9 > box9, std::span< const int > types={}, std::span< const int > ids={})
Store points and a general nine-number cell.
std::vector< int > symmetry(double shell_rmsd)
Per-atom ice-shell label.
Handle & operator=(const Handle &)=delete
Handle(Handle &&other) noexcept
Handle & operator=(Handle &&other) noexcept
Handle(const Handle &)=delete
SEAMS_API seams_status seams_brine_pockets(const seams_brine *front, int *n_pockets, int *reservoir_waters)
Brine pockets trapped in the ice, excluding the liquid reservoir.
SEAMS_API seams_status seams_brine_profile(const seams_brine *front, double *z_mid, double *molality, double *ice_fraction, size_t cap, size_t *n_out)
Concentration profile along the front axis.
SEAMS_API seams_status seams_brine_analyse(seams_system *sys, const int *ice, size_t n_ice, int water_type, int ion_type, int n_bins, int axis, seams_brine **out)
Planar ice/brine front from an ice assignment.
SEAMS_API seams_status seams_brine_fronts(const seams_brine *front, double *z_enter, double *z_exit, double *thickness, int *found)
The two planar crossings of the ice slab.
SEAMS_API void seams_brine_destroy(seams_brine *front)
Free a brine-front handle.
SEAMS_API seams_status seams_brine_rejection(const seams_brine *front, double *c_ice, double *c_liquid, double *k, int *defined)
Molal rejection coefficient k = c_ice / c_liquid.
SEAMS_API seams_status seams_system_symmetry(seams_system *sys, double shell_rmsd, int *labels, size_t labels_len)
Per-atom ice shell label.
SEAMS_API void seams_cages_destroy(seams_cage_set *cages)
Free a cage-membership handle.
SEAMS_API seams_status seams_cages_labels(const seams_cage_set *cages, int *per_atom, size_t len)
Per-atom cage code.
SEAMS_API seams_status seams_cages_counts(const seams_cage_set *cages, int *n_hex, int *n_cubic, int *n_water, int *n_both)
Disjoint cage population counts.
SEAMS_API seams_status seams_system_set_ortho(seams_system *sys, const double *xyz, int n, double ox, double oy, double oz, double lx, double ly, double lz, const int *types, const int *ids)
Store points and an orthorhombic cell.
SEAMS_API seams_status seams_path_nframes(const char *path, size_t *nframes)
Number of frames in a trajectory path.
SEAMS_API seams_status seams_system_set_frame(seams_system *sys, const double *xyz, int n, const double *box9, const int *types, const int *ids)
Store points and a general LAMMPS cell, with an int count.
SEAMS_API seams_status seams_system_read(seams_system *sys, const char *path, int frame, int type_filter)
Read one frame from a trajectory file.
SEAMS_API int seams_system_count(const seams_system *sys)
Number of points in the frame, as an int.
SEAMS_API seams_system * seams_system_create(void)
Allocate an empty frame.
SEAMS_API void seams_system_destroy(seams_system *sys)
Free a frame.
SEAMS_API seams_status seams_rdf(seams_system *sys, double rmax, int bins, int type_i, int type_j, double *r, double *g, int *count, size_t cap, size_t *n_out, double *volume)
Partial radial distribution.
SEAMS_API seams_status seams_cages(seams_system *sys, double cutoff, int type, int graph, int k, int complete, seams_cage_set **out)
Hexagonal and double-diamond cages.
SEAMS_API seams_status seams_hbonds(seams_system *sys, double cutoff, int oxygen_type, int hydrogen_type, double dist_cutoff, double angle_cutoff, int *n_bonds)
Hydrogen-bond count on one frame.
SEAMS_API seams_status seams_density_axis(seams_system *sys, int type, int bins, int axis, double *z, double *rho, size_t cap, size_t *n_out)
Number density along one cell axis.
SEAMS_API seams_status seams_fingerprint_key(const seams_topo *fp, char *buf, size_t cap, size_t *n_out)
Frame key text.
SEAMS_API seams_status seams_site_table(seams_system *sys, const char *spec, int *kinds, size_t len)
Per-atom site kind from a site-table spec.
SEAMS_API seams_status seams_fingerprint(seams_system *sys, double cutoff, int type, int k, int graph, int hops, int color_types, seams_topo **out)
Topological fingerprint of the bonded graph.
SEAMS_API seams_status seams_contact_pairs(seams_system *sys, const char *site_spec, size_t *n_pairs, int *n_cation, int *n_anion)
Mutual nearest unlike contacts of a site table.
SEAMS_API void seams_fingerprint_destroy(seams_topo *fp)
Free a fingerprint.
SEAMS_API seams_status seams_neighbours_knn(seams_system *sys, int k, double cutoff, int type, int mutual, seams_neighbours **out)
k-nearest neighbour list.
SEAMS_API seams_status seams_fingerprint_atom(const seams_topo *fp, int index, char *buf, size_t cap, size_t *n_out)
Local key of one atom.
SEAMS_API seams_status seams_running_cn(seams_system *sys, double rmax, int bins, int type_i, int type_j, double *r, double *cn, size_t cap, size_t *n_out)
Running coordination number along the partial RDF.
SEAMS_API seams_status seams_prisms(seams_system *sys, double cutoff, int type, int *perfect, int *imperfect, size_t len)
Perfect and imperfect prism counts by ring size.
SEAMS_API seams_status seams_domains(seams_system *sys, double cutoff, const char *site_spec, int subset, int *n_subset, int *largest, double *percolation)
Largest domain of a polar or apolar site subset.
SEAMS_API seams_status seams_monolayer(seams_system *sys, double cutoff, int type, int max_depth, double sheet_area, int *counts, size_t counts_len)
Primitive-ring histogram of a monolayer.
SEAMS_API seams_status seams_coordination(seams_system *sys, double rmax, int bins, int type_i, int type_j, double *cn)
Coordination number integrated to rmax.
SEAMS_API seams_status seams_signature_cages(seams_system *sys, double cutoff, int type, int graph, const char *spec, size_t *n_cages, size_t *n_atoms)
Closed cages of one ring census.
SEAMS_API seams_status seams_fingerprint_rings(const seams_topo *fp, int *counts, size_t counts_len)
Primitive-ring census stored on the fingerprint.
SEAMS_API seams_status seams_steinhardt(seams_system *sys, double cutoff, int type, int order_l, double *ql, size_t ql_len, double *qlbar, size_t qlbar_len)
Local Steinhardt q_l on the cutoff shell, and the average on request.
SEAMS_API int seams_neighbours_count(const seams_neighbours *nb)
Number of neighbour rows, as an int.
SEAMS_API void seams_neighbours_destroy(seams_neighbours *nb)
Free a neighbour list.
SEAMS_API seams_status seams_neighbours_copy(const seams_neighbours *nb, int *offsets, size_t offsets_cap, size_t *n_offsets, int *cols, size_t cols_cap, size_t *nnz)
Copy the neighbour CSR into caller buffers.
SEAMS_API seams_status seams_neighbours_build(seams_system *sys, double cutoff, int type, int graph, seams_neighbours **out)
Build a cutoff or mutual neighbour list.
SEAMS_API seams_status seams_chill(seams_system *sys, double cutoff, int type, int graph, int rule, int *labels, size_t labels_len, int counts9[9])
Original CHILL labels, published or OVITO edges.
SEAMS_API seams_status seams_chill_plus(seams_system *sys, double cutoff, int type, int graph, int rule, int *labels, int counts9[9])
CHILL+ labels, without a buffer length.
SEAMS_API seams_status seams_q6bar(seams_system *sys, double cutoff, int type, double ice_cut, double *q6bar, size_t q6bar_len, double *mean, double *median, int *n_ice)
Lechner-Dellago q6-bar and the ice count above a cut.
SEAMS_API seams_status seams_ql(seams_system *sys, double cutoff, int type, int order_l, int graph, double *ql, size_t ql_len, double *qlbar, size_t qlbar_len)
Local Steinhardt q_l, and the Lechner-Dellago average on request.
SEAMS_API seams_status seams_q4q6(seams_system *sys, double cutoff, int type, double *q4, double *q6)
Local q4 and q6 on the cutoff shell, without buffer lengths.
SEAMS_API seams_status seams_rings_chordless(const seams_neighbours *nb, int size, int *rings, size_t rings_len, size_t *n_rings, int *per_atom, size_t per_atom_len)
Chordless cycles of one size.
SEAMS_API void seams_rings_destroy(seams_rings *rings)
Free a ring set.
SEAMS_API int seams_rings_count(const seams_rings *rings)
Number of primitive rings, as an int.
SEAMS_API seams_status seams_rings_find(seams_system *sys, double cutoff, int type, int graph, int max_depth, seams_rings **out)
Primitive rings (Franzblau) up to a maximum size.
SEAMS_API seams_status seams_rings_histogram(const seams_rings *rings, int *counts, int counts_len)
Count primitive rings by size, with an int length.
SEAMS_API seams_status seams_rings_vertices(const seams_rings *rings, int index, int *atoms, size_t cap, size_t *n_out)
Atom indices of one ring.
SEAMS_API seams_status seams_rings_fraction(const seams_rings *rings, int size, double *fraction)
Fraction of atoms that sit on a ring.
struct seams_brine seams_brine
One planar ice/brine front measurement.
struct seams_cage_set seams_cage_set
Hexagonal and double-diamond membership.
struct seams_topo seams_topo
Topological fingerprint of one bonded frame.
struct seams_rings seams_rings
One primitive-ring set.
struct seams_neighbours seams_neighbours
One neighbour list.
struct seams_system seams_system
One frame.
@ SEAMS_SITE_WATER_H
Water hydrogen.
@ SEAMS_SITE_WATER_O
Water oxygen.
@ SEAMS_SITE_CATION
Cation head.
@ SEAMS_SITE_DONOR_H
Hydrogen-bond donor hydrogen.
@ SEAMS_SITE_ACCEPTOR
Hydrogen-bond acceptor.
@ SEAMS_SITE_TAIL
Alkyl tail.
@ SEAMS_SITE_APOLAR
Other apolar site.
@ SEAMS_SITE_SOLVENT
Other solvent.
@ SEAMS_SITE_UNSPECIFIED
Not named in the site table.
@ SEAMS_SITE_POLAR
Other polar site.
@ SEAMS_CAGE_CUBIC
Double-diamond cage only.
@ SEAMS_CAGE_HEX
Hexagonal cage only.
@ SEAMS_CAGE_WATER
In neither cage.
@ SEAMS_CAGE_BOTH
Both cages.
@ SEAMS_RING_HEXAGON
Six-ring outside any cage.
@ SEAMS_RING_UNCLASSIFIED
No topology assigned.
@ SEAMS_RING_HC_PRISMATIC
Prismatic face of a hexagonal cage.
@ SEAMS_RING_MIXED_PRISM
Face of a mixed prism.
@ SEAMS_RING_DEFORMED_PRISM
Face of a deformed prism.
@ SEAMS_RING_BOTH_PRISMATIC
Shared by both cage kinds, prismatic.
@ SEAMS_RING_PENTAGON
Five-ring outside any cage.
@ SEAMS_RING_BOTH_BASAL
Shared by both cage kinds, basal.
@ SEAMS_RING_PRISM
Face of a perfect prism.
@ SEAMS_RING_HC_BASAL
Basal face of a hexagonal cage.
@ SEAMS_RING_OTHER
Any other size outside any cage.
@ SEAMS_RING_DDC
Face of a double-diamond cage.
@ SEAMS_CHILL_OVITO
OVITO Chill+ modifier, every neighbour in the cutoff.
@ SEAMS_CHILL_PUBLISHED
Nguyen and Molinero, four closest neighbours.
@ SEAMS_ERR_RANGE
A number or a buffer length is outside the accepted range.
@ SEAMS_ERR_NOMEM
An allocation failed.
@ SEAMS_ERR_NULL
A required pointer is null.
@ SEAMS_ERR_STATE
The handle has no frame yet.
@ SEAMS_ERR_BOX
The cell is missing, non-finite, or has no volume.
@ SEAMS_ERR_INTERNAL
The library hit an internal failure.
@ SEAMS_ERR_ARG
A caller argument is the wrong shape, or a coordinate is not finite.
@ SEAMS_OK
The call succeeded.
@ SEAMS_LABEL_INTERCLATHRATE
Interfacial clathrate.
@ SEAMS_LABEL_UNCLASSIFIED
Not classified, or dropped by the species filter.
@ SEAMS_LABEL_INTERFACIAL
Interfacial ice.
@ SEAMS_LABEL_WATER
Liquid water.
@ SEAMS_LABEL_RECUBIC
Cubic after reclassification.
@ SEAMS_LABEL_CUBIC
Cubic ice (Ic).
@ SEAMS_LABEL_HEXAGONAL
Hexagonal ice (Ih).
@ SEAMS_LABEL_REHEX
Hexagonal after reclassification.
@ SEAMS_LABEL_CLATHRATE
Clathrate.
@ SEAMS_GRAPH_CUTOFF
Every neighbour inside the cutoff.
@ SEAMS_GRAPH_SEEDED
Mutual seeds with union completions, for cages only.
@ SEAMS_GRAPH_MUTUAL
Mutual four nearest inside cutoff + 1.5.
std::size_t nframes(std::string_view path)
Count frames in a trajectory path.
CageLabel
Per-atom cage membership.
int abi()
ABI number compiled into this library.
ChillRule
CHILL+ threshold table.
Label
CHILL and CHILL+ atom label.
std::string version()
Library version text, for example 2.14.0.
std::string_view label_name(Label label)
Short name of a CHILL+ label.
std::string_view ring_symmetry_name(RingSymmetry symmetry)
Short name of a ring-symmetry code.
RingSymmetry
Primitive-ring symmetry class.
DomainSubset
Domain subset.
void set_num_threads(int n)
Set the OpenMP width for the next call.
int num_threads()
OpenMP width the next call will use.
@ Hex
Hexagonal cage only.
@ Argument
A caller argument is the wrong shape.
@ Cell
The cell is missing or has no volume.
@ State
The handle has no frame yet.
@ Memory
An allocation failed.
@ Range
A number is outside the accepted range.
@ Internal
The library hit an internal failure.
@ Null
A required pointer is null.
@ Published
Nguyen and Molinero, 2015.
@ Ovito
OVITO Chill+ modifier.
@ Hexagonal
Hexagonal ice.
@ Unclassified
No class matched.
@ Recubic
Reclassified cubic.
@ Interclathrate
Interfacial clathrate.
@ Interfacial
Interfacial ice.
@ Rehex
Reclassified hexagonal.
@ Unspecified
The table did not name this atom.
@ Pentagon
Five-membered ring.
@ Hexagon
Six-ring that is not a cage face.
@ HcPrismatic
Prismatic face of a hexagonal cage.
@ BothPrismatic
Prismatic face of both cage types.
@ Other
Neither a pentagon nor a hexagon face.
@ Prism
Prismatic six-ring.
@ DeformedPrism
Deformed prismatic six-ring.
@ HcBasal
Basal face of a hexagonal cage.
@ BothBasal
Basal face of both cage types.
@ Ddc
Double-diamond six-ring.
@ MixedPrism
Prism mixing the two cage types.
@ Apolar
Apolar site subset.
@ Mutual
Mutual four-nearest neighbours.
@ Seeded
Cage graph of seeds and completions.
@ Cutoff
Every pair inside the cutoff.
void check(int status, const void *handle)
std::string copy_text(Call call, const void *handle)
Water-oxygen selection for a mixed frame.
d-SEAMS stable C API, ABI 1.
Knobs for a hydrogen-bond count.
double cutoff
Heavy-atom cutoff, Angstrom.
int hydrogen
Hydrogen species.
double angle
O-O-H angle, degrees.
int oxygen
Heavy-atom species.
double distance
Acceptor-H distance, Angstrom.
The two planar crossings of an ice slab.
bool found
Both crossings exist.
double exit
Crossing on leaving the ice, Angstrom.
double enter
Crossing on entering the ice, Angstrom.
double thickness
Ice run along the axis, Angstrom.
Knobs for a planar ice front.
int water_type
Species kept as water, or 0.
int bins
Bins along the axis.
int ion_type
Species kept as ions, or 0 for none.
Concentration profile along the brine axis.
std::vector< double > molality
mol/kg.
std::vector< double > ice_fraction
Dimensionless.
std::vector< double > coordinate
Bin centers, Angstrom.
Disjoint cage populations.
int cubic
Double-diamond cage only.
int hexagonal
Hexagonal cage only.
Knobs for hexagonal and double-diamond cages.
int species
Species filter.
double cutoff
Positive cutoff, Angstrom.
bool complete
Complete partial cages.
int k
Neighbour count used to seed the graph.
Knobs for CHILL and CHILL+.
ChillRule rule
Threshold table.
Graph graph
Neighbour graph.
double cutoff
Positive cutoff, Angstrom.
int species
Species filter.
Chordless cycles of one length.
std::size_t count() const
Number of cycles.
std::vector< int > per_atom
Cycles through each atom.
std::vector< int > cycle(std::size_t index) const
Atom indices of one cycle.
std::vector< int > atoms
count() rows of size indices.
CHILL or CHILL+ labels and the nine population counts.
std::vector< int > labels
One label code per atom.
std::array< int, 9 > counts
Population in label order.
Knobs for the axial number density.
int species
Species filter.
Number density along one cell axis.
std::vector< double > density
Number density.
std::vector< double > coordinate
Bin centers, Angstrom.
Knobs for a partial RDF, its running coordination, or the integral.
double rmax
Outer limit, Angstrom.
int type_j
Second species.
Partial radial distribution.
double volume
Cell volume, cubic Angstrom.
std::vector< double > radius
Bin centers, Angstrom.
std::vector< double > g
g(r), dimensionless.
std::vector< int > count
Pair count in each bin.
Knobs for a domain search.
double cutoff
Positive cutoff, Angstrom.
std::string spec
Site-table text, for example 1=waterO.
DomainSubset subset
Which subset to measure.
Largest polar or apolar domain.
int subset
Atoms in the requested subset.
double percolation
Percolation measure, dimensionless.
int largest
Largest connected component.
Knobs for a topological fingerprint.
bool color_types
Color vertices by LAMMPS type.
int k
Neighbour count on the bonded graph.
int species
Species filter.
Graph graph
Neighbour graph.
double cutoff
Positive cutoff, Angstrom.
int hops
Neighbourhood depth.
Knobs for a k-nearest neighbour list.
int k
Positive neighbour count.
double cutoff
Nominal cutoff, Angstrom.
int species
Species filter.
bool mutual
Keep only pairs that name each other.
Knobs for a neighbour list.
int species
Species filter.
double cutoff
Positive cutoff, Angstrom.
Graph graph
Cutoff or mutual.
Knobs for q_l on a named graph.
bool average
Also return the neighbour mean.
Graph graph
Cutoff or mutual.
double cutoff
Positive cutoff, Angstrom.
int species
Species filter.
Brine pockets trapped in the ice.
int pockets
Pocket count, excluding the reservoir.
int reservoir_waters
Waters in the liquid reservoir.
Perfect and imperfect prism counts by ring size.
std::array< int, 7 > imperfect
Imperfect stacks.
std::array< int, 7 > perfect
Perfect stacks.
int species
Species filter.
double cutoff
Positive cutoff, Angstrom.
Local q4 and q6 on the cutoff shell.
std::vector< double > q4
One local q4 per atom.
std::vector< double > q6
One local q6 per atom.
Knobs for the q6-bar ice summary.
double ice_cut
Finite threshold.
int species
Species filter.
double cutoff
Positive cutoff, Angstrom.
Lechner-Dellago q6-bar and the ice count above a cut.
std::vector< double > values
One q6-bar per atom.
double mean
Mean of the finite values.
double median
Median of the finite values.
int n_ice
Count strictly above the cut.
Molal rejection coefficient.
bool defined
The ratio is defined.
double ice
Bulk ice molality, mol/kg.
double k
Ratio of the two molalities.
double liquid
Bulk liquid molality, mol/kg.
Knobs for primitive rings.
int species
Species filter.
int max_size
Largest ring size, from 3 through 12.
Graph graph
Cutoff or mutual.
double cutoff
Positive cutoff, Angstrom.
Running coordination number along a partial RDF.
std::vector< double > coordination
Running coordination, dimensionless.
std::vector< double > radius
Bin centers, Angstrom.
Knobs for a monolayer ring histogram.
int species
Species filter.
int max_size
Largest ring size.
double cutoff
Positive cutoff, Angstrom.
double sheet_area
Sheet area, square Angstrom.
Closed cages whose ring census matches a signature.
std::size_t atoms
Distinct atoms in those cages.
std::size_t cages
Number of closed cages.
Knobs for a signature cage census.
int species
Species filter.
Graph graph
Neighbour graph.
double cutoff
Positive cutoff, Angstrom.
std::string spec
Ring census text, for example 512.
Knobs for a local Steinhardt parameter on the cutoff shell.
bool average
Also return the Lechner-Dellago mean.
int species
Species filter.
double cutoff
Positive cutoff, Angstrom.
Local Steinhardt parameter, and the average when it was asked for.
std::vector< double > average
Neighbour mean of q_lm.
std::vector< double > local
One local q_l per atom.