namespace site

Overview

namespace site {
 
// enums
 
enum Family;
enum IonState;
enum Kind;
 
// structs
 
struct DensityZ;
struct GuestOccupancy;
struct IceClusterIons;
struct InsideTrace;
struct IonEnvironment;
struct Table;
 
// global variables
 
double kInsideRelTol = 1e-9;
 
// global functions
 
DensityZ densityZ(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, int typeI, int nbin, int axis);
DensityZ densityZ(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const Table& table, Kind kind, int nbin, int axis);
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, int waterType, double cutoff);
std::vector<int> shellRingCensus(const std::vector<std::vector<int>>& rings, const std::vector<int>& shell, int maxRingSize);
std::vector<std::vector<int>> cappedRings(const std::vector<std::vector<int>>& rings, const std::vector<int>& shell, int maxRingSize);
std::vector<std::vector<int>> brokenRings(const std::vector<std::vector<int>>& nList, const std::vector<int>& shell, int maxRingSize);
GuestOccupancy guestOccupancy(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<std::vector<int>>& cages, const std::vector<int>& guestIndices, double radius);
std::array<double, 3> periodicCentroid(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<int>& atoms);
const std::vector<std::array<double, 3>>& insideRayDirections();
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>* centre = nullptr);
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>* centre = 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);
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);
 
} // namespace site

Detailed Documentation

Global Variables

double kInsideRelTol = 1e-9

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

Global Functions

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.

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

iceFlag is indexed like yCloud.pts; waterType selects the water oxygens (0 accepts every atom that is not an ion); cutoff is the first shell radius in the cloud’s length unit.

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.

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.

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.

The ion sits above a complete water ring.

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.

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()).

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>* centre = nullptr)

The inside predicate for one cage.

The face vertices and the guest are unwrapped about c_F (centre, 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.

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.

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.