seams-core v2.14.0
libyodaLib, the C++ engine of d-SEAMS
Loading...
Searching...
No Matches
C++ API

Move-only handles and value results over seams.h. More...

Files

file  include/seams.hpp
 Idiomatic C++ for the d-SEAMS C API.

Classes

class  seams::Error
 Failure from the C API, or from a rejected argument. More...
struct  seams::Classification
 CHILL or CHILL+ labels and the nine population counts. More...
struct  seams::Steinhardt
 Local Steinhardt parameter, and the average when it was asked for. More...
struct  seams::Q4Q6
 Local q4 and q6 on the cutoff shell. More...
struct  seams::Q6Bar
 Lechner-Dellago q6-bar and the ice count above a cut. More...
struct  seams::Distribution
 Partial radial distribution. More...
struct  seams::RunningCoordination
 Running coordination number along a partial RDF. More...
struct  seams::CageCounts
 Disjoint cage populations. More...
struct  seams::SignatureMatch
 Closed cages whose ring census matches a signature. More...
struct  seams::Contacts
 Mutual nearest unlike contacts of a site table. More...
struct  seams::DomainReport
 Largest polar or apolar domain. More...
struct  seams::PrismCensus
 Perfect and imperfect prism counts by ring size. More...
struct  seams::DensityProfile
 Number density along one cell axis. More...
struct  seams::BrineFronts
 The two planar crossings of an ice slab. More...
struct  seams::Rejection
 Molal rejection coefficient. More...
struct  seams::BrineProfile
 Concentration profile along the brine axis. More...
struct  seams::Pockets
 Brine pockets trapped in the ice. More...
struct  seams::ChillOptions
 Knobs for CHILL and CHILL+. More...
struct  seams::SteinhardtOptions
 Knobs for a local Steinhardt parameter on the cutoff shell. More...
struct  seams::OrderOptions
 Knobs for q_l on a named graph. More...
struct  seams::Q6BarOptions
 Knobs for the q6-bar ice summary. More...
struct  seams::NeighbourOptions
 Knobs for a neighbour list. More...
struct  seams::KnnOptions
 Knobs for a k-nearest neighbour list. More...
struct  seams::RingOptions
 Knobs for primitive rings. More...
struct  seams::CageOptions
 Knobs for hexagonal and double-diamond cages. More...
struct  seams::SignatureOptions
 Knobs for a signature cage census. More...
struct  seams::DistributionOptions
 Knobs for a partial RDF, its running coordination, or the integral. More...
struct  seams::BondOptions
 Knobs for a hydrogen-bond count. More...
struct  seams::DensityOptions
 Knobs for the axial number density. More...
struct  seams::FingerprintOptions
 Knobs for a topological fingerprint. More...
struct  seams::DomainOptions
 Knobs for a domain search. More...
struct  seams::PrismOptions
 Knobs for prism stacks. More...
struct  seams::SheetOptions
 Knobs for a monolayer ring histogram. More...
struct  seams::BrineOptions
 Knobs for a planar ice front. More...
struct  seams::ChordlessCycles
 Chordless cycles of one length. More...
class  seams::Neighbours
 Owned neighbour list. More...
class  seams::Rings
 Owned primitive-ring set. More...
class  seams::Cages
 Owned hexagonal and double-diamond membership. More...
class  seams::Fingerprint
 Owned topological fingerprint. More...
class  seams::Brine
 Owned planar ice-front measurement. More...
class  seams::System
 One frame: coordinates, a cell, and the analyses that read them. More...

Enumerations

enum class  seams::Status : int {
  seams::Status::Ok = SEAMS_OK , seams::Status::Null = SEAMS_ERR_NULL , seams::Status::Range = SEAMS_ERR_RANGE , seams::Status::Cell = SEAMS_ERR_BOX ,
  seams::Status::Argument = SEAMS_ERR_ARG , seams::Status::State = SEAMS_ERR_STATE , seams::Status::Memory = SEAMS_ERR_NOMEM , seams::Status::Internal = SEAMS_ERR_INTERNAL
}
 Status codes. More...
enum class  seams::Graph : int { seams::Graph::Cutoff = SEAMS_GRAPH_CUTOFF , seams::Graph::Mutual = SEAMS_GRAPH_MUTUAL , seams::Graph::Seeded = SEAMS_GRAPH_SEEDED }
 Neighbour graph. More...
enum class  seams::ChillRule : int { seams::ChillRule::Published = SEAMS_CHILL_PUBLISHED , seams::ChillRule::Ovito = SEAMS_CHILL_OVITO }
 CHILL+ threshold table. More...
enum class  seams::Label : int {
  seams::Label::Cubic = SEAMS_LABEL_CUBIC , seams::Label::Hexagonal = SEAMS_LABEL_HEXAGONAL , seams::Label::Water = SEAMS_LABEL_WATER , seams::Label::Interfacial = SEAMS_LABEL_INTERFACIAL ,
  seams::Label::Clathrate = SEAMS_LABEL_CLATHRATE , seams::Label::Interclathrate = SEAMS_LABEL_INTERCLATHRATE , seams::Label::Unclassified = SEAMS_LABEL_UNCLASSIFIED , seams::Label::Recubic = SEAMS_LABEL_RECUBIC ,
  seams::Label::Rehex = SEAMS_LABEL_REHEX
}
 CHILL and CHILL+ atom label. More...
enum class  seams::RingSymmetry : int {
  seams::RingSymmetry::Unclassified = SEAMS_RING_UNCLASSIFIED , seams::RingSymmetry::Ddc = SEAMS_RING_DDC , seams::RingSymmetry::HcBasal = SEAMS_RING_HC_BASAL , seams::RingSymmetry::HcPrismatic = SEAMS_RING_HC_PRISMATIC ,
  seams::RingSymmetry::BothBasal = SEAMS_RING_BOTH_BASAL , seams::RingSymmetry::BothPrismatic = SEAMS_RING_BOTH_PRISMATIC , seams::RingSymmetry::Prism = SEAMS_RING_PRISM , seams::RingSymmetry::DeformedPrism = SEAMS_RING_DEFORMED_PRISM ,
  seams::RingSymmetry::MixedPrism = SEAMS_RING_MIXED_PRISM , seams::RingSymmetry::Pentagon = SEAMS_RING_PENTAGON , seams::RingSymmetry::Hexagon = SEAMS_RING_HEXAGON , seams::RingSymmetry::Other = SEAMS_RING_OTHER
}
 Primitive-ring symmetry class. More...
enum class  seams::CageLabel : int { seams::CageLabel::Water = SEAMS_CAGE_WATER , seams::CageLabel::Hex = SEAMS_CAGE_HEX , seams::CageLabel::Cubic = SEAMS_CAGE_CUBIC , seams::CageLabel::Both = SEAMS_CAGE_BOTH }
 Per-atom cage membership. More...
enum class  seams::SiteKind : int {
  seams::SiteKind::Unspecified = SEAMS_SITE_UNSPECIFIED , seams::SiteKind::Cation = SEAMS_SITE_CATION , seams::SiteKind::Anion = SEAMS_SITE_ANION , seams::SiteKind::Tail = SEAMS_SITE_TAIL ,
  seams::SiteKind::DonorH = SEAMS_SITE_DONOR_H , seams::SiteKind::Acceptor = SEAMS_SITE_ACCEPTOR , seams::SiteKind::Polar = SEAMS_SITE_POLAR , seams::SiteKind::Apolar = SEAMS_SITE_APOLAR ,
  seams::SiteKind::WaterO = SEAMS_SITE_WATER_O , seams::SiteKind::WaterH = SEAMS_SITE_WATER_H , seams::SiteKind::Solvent = SEAMS_SITE_SOLVENT
}
 Site-table kind. More...
enum class  seams::Axis : int { seams::Axis::X = 0 , seams::Axis::Y = 1 , seams::Axis::Z = 2 }
 Cell axis. More...
enum class  seams::DomainSubset : int { seams::DomainSubset::Apolar = 0 , seams::DomainSubset::Polar = 1 }
 Domain subset. More...

Functions

std::string seams::version ()
 Library version text, for example 2.14.0.
int seams::abi ()
 ABI number compiled into this library.
void seams::set_num_threads (int n)
 Set the OpenMP width for the next call.
int seams::num_threads ()
 OpenMP width the next call will use.
std::size_t seams::nframes (std::string_view path)
 Count frames in a trajectory path.
std::string_view seams::label_name (Label label)
 Short name of a CHILL+ label.
std::string_view seams::ring_symmetry_name (RingSymmetry symmetry)
 Short name of a ring-symmetry code.

Detailed Description

Move-only handles and value results over seams.h.

Enumeration Type Documentation

◆ Axis

enum class seams::Axis : int
strong

Cell axis.

Zero is x, one is y, two is z.

Enumerator
X 

First cell edge.

Y 

Second cell edge.

Z 

Third cell edge.

Definition at line 155 of file seams.hpp.

155 : int {
156 X = 0,
157 Y = 1,
158 Z = 2
159};
@ X
First cell edge.
Definition seams.hpp:156
@ Z
Third cell edge.
Definition seams.hpp:158
@ Y
Second cell edge.
Definition seams.hpp:157

◆ CageLabel

enum class seams::CageLabel : int
strong

Per-atom cage membership.

The four codes are disjoint.

Enumerator
Water 

In neither cage.

Hex 

Hexagonal cage only.

Cubic 

Double-diamond cage only.

Both 

Both cages.

Definition at line 126 of file seams.hpp.

126 : int {
131};
@ SEAMS_CAGE_CUBIC
Double-diamond cage only.
Definition seams.h:221
@ SEAMS_CAGE_HEX
Hexagonal cage only.
Definition seams.h:220
@ SEAMS_CAGE_WATER
In neither cage.
Definition seams.h:219
@ SEAMS_CAGE_BOTH
Both cages.
Definition seams.h:222
@ Both
Both cages.
Definition seams.hpp:130
@ Hex
Hexagonal cage only.
Definition seams.hpp:128
@ Cubic
Cubic ice.
Definition seams.hpp:92

◆ ChillRule

enum class seams::ChillRule : int
strong

CHILL+ threshold table.

Published edges are inclusive. OVITO edges are open.

Enumerator
Published 

Nguyen and Molinero, 2015.

Ovito 

OVITO Chill+ modifier.

Definition at line 80 of file seams.hpp.

80 : int {
83};
@ SEAMS_CHILL_OVITO
OVITO Chill+ modifier, every neighbour in the cutoff.
Definition seams.h:203
@ SEAMS_CHILL_PUBLISHED
Nguyen and Molinero, four closest neighbours.
Definition seams.h:202

◆ DomainSubset

enum class seams::DomainSubset : int
strong

Domain subset.

Apolar is 0 and polar is 1, matching the C API.

Enumerator
Apolar 

Apolar site subset.

Polar 

Polar site subset.

Definition at line 165 of file seams.hpp.

165 : int {
166 Apolar = 0,
167 Polar = 1
168};
@ Apolar
Apolar atom.
Definition seams.hpp:145
@ Polar
Polar atom.
Definition seams.hpp:144

◆ Graph

enum class seams::Graph : int
strong

Neighbour graph.

Cutoff keeps every pair inside the cutoff. Mutual keeps the four nearest neighbours inside the cutoff plus 1.5 Angstrom, and only the pairs that name each other. Seeded is the cage graph: mutual seeds and union completions.

Enumerator
Cutoff 

Every pair inside the cutoff.

Mutual 

Mutual four-nearest neighbours.

Seeded 

Cage graph of seeds and completions.

Definition at line 68 of file seams.hpp.

68 : int {
72};
@ SEAMS_GRAPH_CUTOFF
Every neighbour inside the cutoff.
Definition seams.h:208
@ SEAMS_GRAPH_SEEDED
Mutual seeds with union completions, for cages only.
Definition seams.h:210
@ SEAMS_GRAPH_MUTUAL
Mutual four nearest inside cutoff + 1.5.
Definition seams.h:209
@ Mutual
Mutual four-nearest neighbours.
Definition seams.hpp:70
@ Seeded
Cage graph of seeds and completions.
Definition seams.hpp:71

◆ Label

enum class seams::Label : int
strong

CHILL and CHILL+ atom label.

The nine codes are the population order in Classification::counts.

Enumerator
Cubic 

Cubic ice.

Hexagonal 

Hexagonal ice.

Water 

Liquid water.

Interfacial 

Interfacial ice.

Clathrate 

Clathrate.

Interclathrate 

Interfacial clathrate.

Unclassified 

No class matched.

Recubic 

Reclassified cubic.

Rehex 

Reclassified hexagonal.

Definition at line 91 of file seams.hpp.

91 : int {
101};
@ SEAMS_LABEL_INTERCLATHRATE
Interfacial clathrate.
Definition seams.h:171
@ SEAMS_LABEL_UNCLASSIFIED
Not classified, or dropped by the species filter.
Definition seams.h:172
@ SEAMS_LABEL_INTERFACIAL
Interfacial ice.
Definition seams.h:169
@ SEAMS_LABEL_WATER
Liquid water.
Definition seams.h:168
@ SEAMS_LABEL_RECUBIC
Cubic after reclassification.
Definition seams.h:173
@ SEAMS_LABEL_CUBIC
Cubic ice (Ic).
Definition seams.h:166
@ SEAMS_LABEL_HEXAGONAL
Hexagonal ice (Ih).
Definition seams.h:167
@ SEAMS_LABEL_REHEX
Hexagonal after reclassification.
Definition seams.h:174
@ SEAMS_LABEL_CLATHRATE
Clathrate.
Definition seams.h:170
@ Hexagonal
Hexagonal ice.
Definition seams.hpp:93
@ Unclassified
No class matched.
Definition seams.hpp:98
@ Recubic
Reclassified cubic.
Definition seams.hpp:99
@ Interclathrate
Interfacial clathrate.
Definition seams.hpp:97
@ Interfacial
Interfacial ice.
Definition seams.hpp:95
@ Clathrate
Clathrate.
Definition seams.hpp:96
@ Rehex
Reclassified hexagonal.
Definition seams.hpp:100

◆ RingSymmetry

enum class seams::RingSymmetry : int
strong

Primitive-ring symmetry class.

Enumerator
Unclassified 

No class yet.

Ddc 

Double-diamond six-ring.

HcBasal 

Basal face of a hexagonal cage.

HcPrismatic 

Prismatic face of a hexagonal cage.

BothBasal 

Basal face of both cage types.

BothPrismatic 

Prismatic face of both cage types.

Prism 

Prismatic six-ring.

DeformedPrism 

Deformed prismatic six-ring.

MixedPrism 

Prism mixing the two cage types.

Pentagon 

Five-membered ring.

Hexagon 

Six-ring that is not a cage face.

Other 

Neither a pentagon nor a hexagon face.

Definition at line 107 of file seams.hpp.

107 : int {
120};
@ SEAMS_RING_HEXAGON
Six-ring outside any cage.
Definition seams.h:189
@ SEAMS_RING_UNCLASSIFIED
No topology assigned.
Definition seams.h:179
@ SEAMS_RING_HC_PRISMATIC
Prismatic face of a hexagonal cage.
Definition seams.h:182
@ SEAMS_RING_MIXED_PRISM
Face of a mixed prism.
Definition seams.h:187
@ SEAMS_RING_DEFORMED_PRISM
Face of a deformed prism.
Definition seams.h:186
@ SEAMS_RING_BOTH_PRISMATIC
Shared by both cage kinds, prismatic.
Definition seams.h:184
@ SEAMS_RING_PENTAGON
Five-ring outside any cage.
Definition seams.h:188
@ SEAMS_RING_BOTH_BASAL
Shared by both cage kinds, basal.
Definition seams.h:183
@ SEAMS_RING_PRISM
Face of a perfect prism.
Definition seams.h:185
@ SEAMS_RING_HC_BASAL
Basal face of a hexagonal cage.
Definition seams.h:181
@ SEAMS_RING_OTHER
Any other size outside any cage.
Definition seams.h:190
@ SEAMS_RING_DDC
Face of a double-diamond cage.
Definition seams.h:180
@ Pentagon
Five-membered ring.
Definition seams.hpp:117
@ Hexagon
Six-ring that is not a cage face.
Definition seams.hpp:118
@ HcPrismatic
Prismatic face of a hexagonal cage.
Definition seams.hpp:111
@ BothPrismatic
Prismatic face of both cage types.
Definition seams.hpp:113
@ Other
Neither a pentagon nor a hexagon face.
Definition seams.hpp:119
@ DeformedPrism
Deformed prismatic six-ring.
Definition seams.hpp:115
@ HcBasal
Basal face of a hexagonal cage.
Definition seams.hpp:110
@ BothBasal
Basal face of both cage types.
Definition seams.hpp:112
@ Ddc
Double-diamond six-ring.
Definition seams.hpp:109
@ MixedPrism
Prism mixing the two cage types.
Definition seams.hpp:116
@ Prism
The ring belongs to a prism block, classified according to the prism identification scheme.
Definition ring.hpp:122

◆ SiteKind

enum class seams::SiteKind : int
strong

Site-table kind.

Enumerator
Unspecified 

The table did not name this atom.

Cation 

Cation head.

Anion 

Anion.

Tail 

Tail atom.

DonorH 

Donor hydrogen.

Acceptor 

Acceptor.

Polar 

Polar atom.

Apolar 

Apolar atom.

WaterO 

Water oxygen.

WaterH 

Water hydrogen.

Solvent 

Solvent atom.

Definition at line 137 of file seams.hpp.

137 : int {
149};
@ SEAMS_SITE_WATER_H
Water hydrogen.
Definition seams.h:236
@ SEAMS_SITE_WATER_O
Water oxygen.
Definition seams.h:235
@ SEAMS_SITE_CATION
Cation head.
Definition seams.h:228
@ SEAMS_SITE_DONOR_H
Hydrogen-bond donor hydrogen.
Definition seams.h:231
@ SEAMS_SITE_ACCEPTOR
Hydrogen-bond acceptor.
Definition seams.h:232
@ SEAMS_SITE_TAIL
Alkyl tail.
Definition seams.h:230
@ SEAMS_SITE_APOLAR
Other apolar site.
Definition seams.h:234
@ SEAMS_SITE_SOLVENT
Other solvent.
Definition seams.h:237
@ SEAMS_SITE_ANION
Anion.
Definition seams.h:229
@ SEAMS_SITE_UNSPECIFIED
Not named in the site table.
Definition seams.h:227
@ SEAMS_SITE_POLAR
Other polar site.
Definition seams.h:233
@ Solvent
Solvent atom.
Definition seams.hpp:148
@ WaterH
Water hydrogen.
Definition seams.hpp:147
@ Unspecified
The table did not name this atom.
Definition seams.hpp:138
@ WaterO
Water oxygen.
Definition seams.hpp:146
@ Acceptor
Acceptor.
Definition seams.hpp:143
@ DonorH
Donor hydrogen.
Definition seams.hpp:142
@ Cation
Cation head.
Definition seams.hpp:139
@ Anion
Anion.
Definition seams.hpp:140
@ Tail
Tail atom.
Definition seams.hpp:141

◆ Status

enum class seams::Status : int
strong

Status codes.

Zero is success.

The numeric values match seams_status.

Enumerator
Ok 

The call succeeded.

Null 

A required pointer is null.

Range 

A number is outside the accepted range.

Cell 

The cell is missing or has no volume.

Argument 

A caller argument is the wrong shape.

State 

The handle has no frame yet.

Memory 

An allocation failed.

Internal 

The library hit an internal failure.

Definition at line 48 of file seams.hpp.

48 : int {
49 Ok = SEAMS_OK,
57};
@ SEAMS_ERR_RANGE
A number or a buffer length is outside the accepted range.
Definition seams.h:156
@ SEAMS_ERR_NOMEM
An allocation failed.
Definition seams.h:160
@ SEAMS_ERR_NULL
A required pointer is null.
Definition seams.h:155
@ SEAMS_ERR_STATE
The handle has no frame yet.
Definition seams.h:159
@ SEAMS_ERR_BOX
The cell is missing, non-finite, or has no volume.
Definition seams.h:157
@ SEAMS_ERR_INTERNAL
The library hit an internal failure.
Definition seams.h:161
@ SEAMS_ERR_ARG
A caller argument is the wrong shape, or a coordinate is not finite.
Definition seams.h:158
@ SEAMS_OK
The call succeeded.
Definition seams.h:154
@ Argument
A caller argument is the wrong shape.
Definition seams.hpp:53
@ Cell
The cell is missing or has no volume.
Definition seams.hpp:52
@ State
The handle has no frame yet.
Definition seams.hpp:54
@ Memory
An allocation failed.
Definition seams.hpp:55
@ Range
A number is outside the accepted range.
Definition seams.hpp:51
@ Ok
The call succeeded.
Definition seams.hpp:49
@ Internal
The library hit an internal failure.
Definition seams.hpp:56
@ Null
A required pointer is null.
Definition seams.hpp:50

Function Documentation

◆ abi()

int seams::abi ( )
inlinenodiscard

ABI number compiled into this library.

Returns
SEAMS_ABI, which is 1.

Definition at line 1377 of file seams.hpp.

1377{ return seams_abi(); }
SEAMS_API int seams_abi(void)
ABI number compiled into this library.

◆ label_name()

std::string_view seams::label_name ( Label label)
inlinenodiscard

Short name of a CHILL+ label.

Parameters
labelLabel code.
Returns
A static name. The caller does not free it.

Definition at line 1412 of file seams.hpp.

1412 {
1413 const char *text = seams_label_name(static_cast<int>(label));
1414 return text == nullptr ? std::string_view() : std::string_view(text);
1415}
SEAMS_API const char * seams_label_name(int label)
Name of a CHILL label.

◆ nframes()

std::size_t seams::nframes ( std::string_view path)
inlinenodiscard

Count frames in a trajectory path.

Parameters
pathTrajectory path.
Returns
The frame count.

Definition at line 1399 of file seams.hpp.

1399 {
1400 const std::string text(path);
1401 std::size_t count = 0;
1402 detail::check(seams_path_nframes(text.c_str(), &count), nullptr);
1403 return count;
1404}
SEAMS_API seams_status seams_path_nframes(const char *path, size_t *nframes)
Number of frames in a trajectory path.
void check(int status, const void *handle)
Definition seams.hpp:557

◆ num_threads()

int seams::num_threads ( )
inlinenodiscard

OpenMP width the next call will use.

Returns
A positive thread count.

Definition at line 1391 of file seams.hpp.

1391{ return seams_get_num_threads(); }
SEAMS_API int seams_get_num_threads(void)
Team width the next analysis call will request.

◆ ring_symmetry_name()

std::string_view seams::ring_symmetry_name ( RingSymmetry symmetry)
inlinenodiscard

Short name of a ring-symmetry code.

Parameters
symmetrySymmetry code.
Returns
A static name.

Definition at line 1423 of file seams.hpp.

1423 {
1424 const char *text = seams_ring_symmetry_name(static_cast<int>(symmetry));
1425 return text == nullptr ? std::string_view() : std::string_view(text);
1426}
SEAMS_API const char * seams_ring_symmetry_name(int symmetry)
Name of a ring-symmetry code.

◆ set_num_threads()

void seams::set_num_threads ( int n)
inline

Set the OpenMP width for the next call.

Parameters
nThread count. Zero restores the library default.

Definition at line 1384 of file seams.hpp.

1384{ detail::check(seams_set_num_threads(n), nullptr); }
SEAMS_API seams_status seams_set_num_threads(int n)
Set the OpenMP team used by later analysis calls.

◆ version()

std::string seams::version ( )
inlinenodiscard

Library version text, for example 2.14.0.

Returns
A copy of the static version string.

Definition at line 1367 of file seams.hpp.

1367 {
1368 const char *text = seams_version_string();
1369 return text == nullptr ? std::string() : std::string(text);
1370}
SEAMS_API const char * seams_version_string(void)
Version text, for example "2.14.0".