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

Classes

struct  BrinePocket
struct  ConcentrationBin
struct  ConcentrationProfile
struct  DensityZ
struct  FrontLayerReport
 Waters within halfWidth of either front, their primitive-ring census, and the coordination defects (a water whose oxygen neighbour count is not 4). More...
struct  FrontOptions
struct  FrontPair
 Two planar fronts of one ice slab in a periodic box. More...
struct  FrontSnapshot
struct  GuestOccupancy
 Guests read against enumerated cages. More...
struct  IceClusterIons
 Connected components of ice atoms on the water graph, and the ion count per component: each ion is assigned to the cluster of the nearest ice atom within cutoff. More...
struct  InsideTrace
struct  IonEnvironment
struct  LinearFit
struct  PocketCensus
struct  RejectionCoefficient
 k = c_ice / c_liquid, both molalities of formula units. More...
struct  Table
struct  TrapEvent

Enumerations

enum class  Kind {
  unspecified , cationHead , anion , tail ,
  donorH , acceptor , polar , apolar ,
  waterO , waterH , solvent
}
enum class  Family {
  waterIce , ionicLiquid , moltenSalt , des ,
  electrolyte , confinedIL , confinedWater , networkFormer
}
enum class  IonState { liquid = 0 , front = 1 , ice = 2 }
 Ions read against a per-atom ice assignment. More...

Functions

ConcentrationProfile concentrationProfile (const molSys::PointCloud< molSys::Point< double >, double > &cloud, const std::vector< bool > &iceFlag, const std::vector< int > &waterIndices, const std::vector< int > &ionIndices, int nBins, int axis=2, int ionsPerFormula=2)
FrontPair locateFronts (const ConcentrationProfile &profile, double cut=0.5)
RejectionCoefficient rejectionCoefficient (const ConcentrationProfile &profile, double bulkIce=0.85, double bulkLiquid=0.15)
LinearFit linearFit (const std::vector< double > &time, const std::vector< double > &value)
PocketCensus brinePockets (const molSys::PointCloud< molSys::Point< double >, double > &cloud, const std::vector< bool > &iceFlag, const std::vector< int > &waterIndices, const std::vector< int > &ionIndices, double cutoff)
FrontLayerReport frontLayer (const molSys::PointCloud< molSys::Point< double >, double > &cloud, const std::vector< int > &waterIndices, const FrontPair &fronts, double halfWidth, double cutoff, int maxRing, int axis=2)
std::vector< TrapEvent > trappingTransitions (const IonEnvironment &before, const IonEnvironment &after)
 A trapping event is a change of IonState into ice.
FrontSnapshot analyseFront (const molSys::PointCloud< molSys::Point< double >, double > &cloud, const std::vector< bool > &iceFlag, const std::vector< int > &waterIndices, const std::vector< int > &ionIndices, const FrontOptions &options={})
DensityZ densityZ (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int typeI, int nbin, int axis)
 Histogram Point::{x,y,z} for typeI (0 = every atom). axis is 0, 1, or 2.
DensityZ densityZ (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const Table &table, Kind kind, int nbin, int axis)
 Same histogram, restricted to atoms whose Table kind matches.
bool iceScoreAllowed (Family f)
const char * refuseIceScore (Family f)
const char * familyName (Family f)
Family parseFamily (std::string_view name)
std::vector< int > indicesOf (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const Table &table, Kind kind)
int lammpsTypeOfKind (const Table &table, Kind kind)
molSys::PointCloud< molSys::Point< double >, double > ionCloud (const molSys::PointCloud< molSys::Point< double >, double > &src, const Table &table)
Table parseSiteSpec (std::string_view spec)
IonEnvironment ionEnvironment (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< bool > &iceFlag, const std::vector< int > &ionIndices, const std::vector< int > &waterTypes, double cutoff)
 iceFlag is indexed like yCloud.pts.
IonEnvironment ionEnvironment (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< bool > &iceFlag, const std::vector< int > &ionIndices, int waterType, double cutoff)
 waterType 0 accepts every non-ion. Any other value is that one type.
std::vector< int > shellRingCensus (const std::vector< std::vector< int > > &rings, const std::vector< int > &shell, int maxRingSize)
 Rings of the water network that pass through a first shell: the census by size of every ring with at least one vertex in shell.
std::vector< std::vector< int > > cappedRings (const std::vector< std::vector< int > > &rings, const std::vector< int > &shell, int maxRingSize)
 Capped rings: the water-only primitive rings of rings (the ring network of the water graph, ions not vertices) of at most maxRingSize members, every member of which lies in shell.
std::vector< std::vector< int > > brokenRings (const std::vector< std::vector< int > > &nList, const std::vector< int > &shell, int maxRingSize)
 Broken rings: the primitive rings, of at most maxRingSize members, of the water graph nList (by index, leading self entry, ions not bonded) plus one virtual ion vertex bonded to every water of shell, that contain the ion.
GuestOccupancy guestOccupancy (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &cages, const std::vector< int > &guestIndices, double radius)
 cages are vertex index lists into yCloud.pts; radius in the cloud's length unit (half the cage diameter, about 4 A for a 5^12 cage).
std::array< double, 3 > periodicCentroid (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< int > &atoms)
 Periodic centroid of a set of atoms: every atom is unwrapped to its minimum image about the first, and the mean is taken there.
const std::vector< std::array< double, 3 > > & insideRayDirections ()
 The fixed, ordered unit directions the inside test casts rays along.
InsideTrace pointInFacesTrace (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &rings, const std::vector< int > &faces, const std::array< double, 3 > &guest, const std::array< double, 3 > *center=nullptr)
 The inside predicate for one cage.
bool pointInFaces (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &rings, const std::vector< int > &faces, const std::array< double, 3 > &guest, const std::array< double, 3 > *center=nullptr)
GuestOccupancy guestOccupancyInside (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &rings, const std::vector< std::vector< int > > &cageFaces, const std::vector< int > &guestIndices)
 Occupancy by the inside predicate (pointInFaces) on every cage.
IceClusterIons iceClusterIonCensus (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< bool > &ice, const std::vector< std::vector< int > > &nListByIndex, const std::vector< int > &ionIndices, double cutoff)

Variables

constexpr double kWaterMolarMassKg = 0.01801528
constexpr double kInsideRelTol = 1e-9
 Relative tolerance of the inside test, in units of the largest distance from c_F to a cage vertex.

Enumeration Type Documentation

◆ Family

enum class site::Family
strong
Enumerator
waterIce 
ionicLiquid 
moltenSalt 
des 
electrolyte 
confinedIL 
confinedWater 
networkFormer 

Definition at line 41 of file site.hpp.

41 {
42 waterIce, // default; CHILL/TUM allowed
43 ionicLiquid, // CHILL/TUM refused
44 moltenSalt, // CHILL/TUM refused
45 des, // CHILL/TUM refused
46 electrolyte, // CHILL/TUM only if the caller also names a waterIce subset
47 confinedIL, // CHILL/TUM refused
48 confinedWater, // 2D RDF / monolayer rings; bulk CHILL refused
49 networkFormer // silica / BeF2; Franzblau yes, CHILL no
50};
@ electrolyte
Definition site.hpp:46
@ confinedWater
Definition site.hpp:48
@ ionicLiquid
Definition site.hpp:43
@ networkFormer
Definition site.hpp:49

◆ IonState

enum class site::IonState
strong

Ions read against a per-atom ice assignment.

Ions are not part of the hydrogen-bond network; the assignment is computed on the water and each ion is classed by its first water shell: every shell molecule labeled is ice, none is liquid, otherwise front. An ion with an empty shell is liquid.

Enumerator
liquid 
front 
ice 

Definition at line 86 of file site.hpp.

86{ liquid = 0, front = 1, ice = 2 };

◆ Kind

enum class site::Kind
strong
Enumerator
unspecified 
cationHead 
anion 
tail 
donorH 
acceptor 
polar 
apolar 
waterO 
waterH 
solvent 

Definition at line 27 of file site.hpp.

27 {
30 anion,
31 tail,
32 donorH,
34 polar,
35 apolar,
36 waterO,
37 waterH,
39};
@ cationHead
Definition site.hpp:29
@ acceptor
Definition site.hpp:33
@ solvent
Definition site.hpp:38
@ unspecified
Definition site.hpp:28

Function Documentation

◆ analyseFront()

FrontSnapshot site::analyseFront ( const molSys::PointCloud< molSys::Point< double >, double > & cloud,
const std::vector< bool > & iceFlag,
const std::vector< int > & waterIndices,
const std::vector< int > & ionIndices,
const FrontOptions & options = {} )

◆ brinePockets()

PocketCensus site::brinePockets ( const molSys::PointCloud< molSys::Point< double >, double > & cloud,
const std::vector< bool > & iceFlag,
const std::vector< int > & waterIndices,
const std::vector< int > & ionIndices,
double cutoff )

◆ brokenRings()

std::vector< std::vector< int > > site::brokenRings ( const std::vector< std::vector< int > > & nList,
const std::vector< int > & shell,
int maxRingSize )

Broken rings: the primitive rings, of at most maxRingSize members, of the water graph nList (by index, leading self entry, ions not bonded) plus one virtual ion vertex bonded to every water of shell, that contain the ion.

These are the rings the water-only network lost. Each ring is in ring order and writes the virtual ion as static_cast<int>(nList.size()).

◆ cappedRings()

std::vector< std::vector< int > > site::cappedRings ( const std::vector< std::vector< int > > & rings,
const std::vector< int > & shell,
int maxRingSize )

Capped rings: the water-only primitive rings of rings (the ring network of the water graph, ions not vertices) of at most maxRingSize members, every member of which lies in shell.

The ion sits above a complete water ring.

◆ concentrationProfile()

ConcentrationProfile site::concentrationProfile ( const molSys::PointCloud< molSys::Point< double >, double > & cloud,
const std::vector< bool > & iceFlag,
const std::vector< int > & waterIndices,
const std::vector< int > & ionIndices,
int nBins,
int axis = 2,
int ionsPerFormula = 2 )

◆ densityZ() [1/2]

DensityZ site::densityZ ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const Table & table,
Kind kind,
int nbin,
int axis )

Same histogram, restricted to atoms whose Table kind matches.

◆ densityZ() [2/2]

DensityZ site::densityZ ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
int typeI,
int nbin,
int axis )

Histogram Point::{x,y,z} for typeI (0 = every atom). axis is 0, 1, or 2.

◆ familyName()

const char * site::familyName ( Family f)

◆ frontLayer()

FrontLayerReport site::frontLayer ( const molSys::PointCloud< molSys::Point< double >, double > & cloud,
const std::vector< int > & waterIndices,
const FrontPair & fronts,
double halfWidth,
double cutoff,
int maxRing,
int axis = 2 )

◆ guestOccupancy()

GuestOccupancy site::guestOccupancy ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & cages,
const std::vector< int > & guestIndices,
double radius )

cages are vertex index lists into yCloud.pts; radius in the cloud's length unit (half the cage diameter, about 4 A for a 5^12 cage).

◆ guestOccupancyInside()

GuestOccupancy site::guestOccupancyInside ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & rings,
const std::vector< std::vector< int > > & cageFaces,
const std::vector< int > & guestIndices )

Occupancy by the inside predicate (pointInFaces) on every cage.

Among cages that contain the guest the nearest centroid wins. rings is the ring list the cage faces index; cageFaces[c] is the face indices of cage c.

◆ iceClusterIonCensus()

IceClusterIons site::iceClusterIonCensus ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< bool > & ice,
const std::vector< std::vector< int > > & nListByIndex,
const std::vector< int > & ionIndices,
double cutoff )

◆ iceScoreAllowed()

bool site::iceScoreAllowed ( Family f)

◆ indicesOf()

std::vector< int > site::indicesOf ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const Table & table,
Kind kind )

◆ insideRayDirections()

const std::vector< std::array< double, 3 > > & site::insideRayDirections ( )

The fixed, ordered unit directions the inside test casts rays along.

◆ ionCloud()

molSys::PointCloud< molSys::Point< double >, double > site::ionCloud ( const molSys::PointCloud< molSys::Point< double >, double > & src,
const Table & table )

◆ ionEnvironment() [1/2]

IonEnvironment site::ionEnvironment ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< bool > & iceFlag,
const std::vector< int > & ionIndices,
const std::vector< int > & waterTypes,
double cutoff )

iceFlag is indexed like yCloud.pts.

An empty waterTypes accepts every atom that is not an ion. A non-empty list keeps every named type, the same union cutoffWater uses. cutoff is the first shell radius in the cloud's length unit.

◆ ionEnvironment() [2/2]

IonEnvironment site::ionEnvironment ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< bool > & iceFlag,
const std::vector< int > & ionIndices,
int waterType,
double cutoff )

waterType 0 accepts every non-ion. Any other value is that one type.

◆ lammpsTypeOfKind()

int site::lammpsTypeOfKind ( const Table & table,
Kind kind )

◆ linearFit()

LinearFit site::linearFit ( const std::vector< double > & time,
const std::vector< double > & value )

◆ locateFronts()

FrontPair site::locateFronts ( const ConcentrationProfile & profile,
double cut = 0.5 )

◆ parseFamily()

Family site::parseFamily ( std::string_view name)

◆ parseSiteSpec()

Table site::parseSiteSpec ( std::string_view spec)

◆ periodicCentroid()

std::array< double, 3 > site::periodicCentroid ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< int > & atoms )

Periodic centroid of a set of atoms: every atom is unwrapped to its minimum image about the first, and the mean is taken there.

◆ pointInFaces()

bool site::pointInFaces ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & rings,
const std::vector< int > & faces,
const std::array< double, 3 > & guest,
const std::array< double, 3 > * center = nullptr )

◆ pointInFacesTrace()

InsideTrace site::pointInFacesTrace ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & rings,
const std::vector< int > & faces,
const std::array< double, 3 > & guest,
const std::array< double, 3 > * center = nullptr )

The inside predicate for one cage.

The face vertices and the guest are unwrapped about c_F (center, or the periodic centroid of the distinct face vertices when null) and each face is fan-triangulated from its own centroid. The guest is inside when it lies on a triangle within kInsideRelTol; otherwise a ray is cast along the first direction of insideRayDirections() that passes no triangle edge or vertex within that tolerance, and the guest is inside when the ray meets an odd number of triangles. When every direction grazes, the one with the widest clearance decides.

◆ refuseIceScore()

const char * site::refuseIceScore ( Family f)

◆ rejectionCoefficient()

RejectionCoefficient site::rejectionCoefficient ( const ConcentrationProfile & profile,
double bulkIce = 0.85,
double bulkLiquid = 0.15 )

◆ shellRingCensus()

std::vector< int > site::shellRingCensus ( const std::vector< std::vector< int > > & rings,
const std::vector< int > & shell,
int maxRingSize )

Rings of the water network that pass through a first shell: the census by size of every ring with at least one vertex in shell.

An ion is not a vertex of the network, so the rings it would have closed are gone and the rings its shell still carries measure how far the network survives around it (the hydration-shell ring census of a brine or an ionic solution). census[s] counts rings of size s up to maxRingSize.

◆ trappingTransitions()

std::vector< TrapEvent > site::trappingTransitions ( const IonEnvironment & before,
const IonEnvironment & after )

A trapping event is a change of IonState into ice.

A release is a change out of ice. Other changes are recorded as well; the caller filters on to.

Variable Documentation

◆ kInsideRelTol

double site::kInsideRelTol = 1e-9
inlineconstexpr

Relative tolerance of the inside test, in units of the largest distance from c_F to a cage vertex.

Definition at line 170 of file site.hpp.

◆ kWaterMolarMassKg

double site::kWaterMolarMassKg = 0.01801528
inlineconstexpr

Definition at line 33 of file brine_front.hpp.