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

CHILL and CHILL+ structure classification. More...

Classes

struct  AnalysisPhases
 Rebuild, local kernel, halo exchange, and the write-back to the frame. More...
struct  BondClassifier
 One rule set for classifying bond correlations \(c_{ij}\). More...
struct  BondOrder
struct  ChillPlusResult
struct  LinearClassifier
 One-versus-rest ridge classifier on a dense feature matrix. More...
struct  QlCutoffStages
struct  QlmAtom
 This is the local orientational bond order parameter \(q_{lm}\), of length \(2l+1\). More...
struct  SteinhardtQl
 Per-particle Steinhardt order parameters of a single degree \(l\). More...
struct  TemplateHit
struct  VoronoiWeights
 The Voronoi facet neighbours of one particle and their area weights. More...
struct  YlmAtom
 This contains a complex vector of length \(2l+1\). More...

Enumerations

enum class  ChillPlusRule { Published , Ovito }
enum class  CrystalKind {
  other = 0 , sc , fcc , hcp ,
  bcc
}

Functions

molSys::bond_type classifyBond (double cij, const BondClassifier &rule, bool closed=true)
BondClassifier chillRule ()
BondClassifier chillPlusRule ()
BondClassifier bondClassifier (const std::string &name)
void registerBondClassifier (const std::string &name, const BondClassifier &rule)
std::vector< std::string > bondClassifierNames ()
 Names of every registered rule set.
void classifyBonds (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, const BondClassifier &rule, bool isSlice=false)
void classifyBonds (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, const BondClassifier &rule, bool isSlice, bool closed)
void classifyBondsCsr (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< int > &offsets, const std::vector< int > &cols, const BondClassifier &rule, bool isSlice=false)
 CHILL/CHILL+ bonds from a CSR of cloud indices.
int chillPlusFromCsr (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< int > &offsets, const std::vector< int > &cols, bool keepBonds=true)
int chillPlusOvitoFromCsr (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< int > &offsets, const std::vector< int > &cols)
int chillFromCsr (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< int > &offsets, const std::vector< int > &cols)
void bondOrder (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, const BondClassifier &rule, BondOrder &order, const std::vector< char > *which, bool fresh=true)
void correlFromOrder (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const BondOrder &order, const BondClassifier &rule, bool isSlice, const std::vector< char > *which, bool closed=true)
void getCorrel (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, bool isSlice=false, int coordinationNumber=4)
 Function for getting the bond order correlations \(c_{ij}\) (or \(a_{ij}\) in some treatments) according to the CHILL algorithm.
void getIceTypeNoPrint (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, bool isSlice=false)
 Function that classifies every particle's molSys::atom_state_type ice type, according to the CHILL algorithm.
void getIceType (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, std::string path, int firstFrame, bool isSlice=false, std::string outputFileName="chill.txt")
 Function that classifies every particle's molSys::atom_state_type ice type, according to the CHILL algorithm.
void getCorrelPlus (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, bool isSlice=false, int coordinationNumber=4)
void getCorrelPlus (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, bool isSlice, int coordinationNumber, bool closedBounds)
 Same classification. closedBounds false uses the open OVITO edges.
bool chillPlusPublishedCutoff (molSys::PointCloud< molSys::Point< double >, double > &yCloud, double cutoff, int typeI)
bool q4q6ChillPlus (molSys::PointCloud< molSys::Point< double >, double > &yCloud, double cutoff, int typeI, std::vector< double > &q4, std::vector< double > &q6, std::vector< double > &q4bar, std::vector< double > &q6bar)
bool chillPlusSymbolicPrefilter (molSys::PointCloud< molSys::Point< double >, double > &yCloud, double cutoff, int typeI)
void getIceTypePlus (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, std::string path, int firstFrame, bool isSlice=false, std::string outputFileName="chillPlus.txt")
void getIceTypePlus (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, std::string path, int firstFrame, bool isSlice, std::string outputFileName, bool neighbourTest)
 neighbourTest false is the OVITO interfacial rule.
void getIceTypePlusNoPrint (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, bool isSlice=false)
void getIceTypePlusNoPrint (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, bool isSlice, bool neighbourTest)
void clearIceTypesExcept (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< int > &types)
std::vector< double > getq6 (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, bool isSlice=false)
void reclassifyWater (molSys::PointCloud< molSys::Point< double >, double > &yCloud, std::vector< double > &q6)
int printIceType (molSys::PointCloud< molSys::Point< double >, double > &yCloud, std::string path, int firstFrame, bool isSlice=false, std::string outputFileName="superChill.txt")
 Prints out the iceType for a particular frame onto the terminal.
bool isInterfacial (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, int iatom, int num_staggrd, int num_eclipsd, bool chillPlus=false)
int numStaggered (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, int jatom)
 Finds the number of staggered bonds for a given atom of index jatom.
SteinhardtQl steinhardtQl (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, int orderL)
SteinhardtQl steinhardtQlCutoff (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, double cutoff, int orderL, int typeI, bool average, bool invariants=false)
QlCutoffStages & lastQlCutoffStages ()
bool localCutoffQ4Q6 (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, double cutoff, int typeI, std::vector< double > &q4, std::vector< double > &q6)
bool steinhardtQ4Q6Cutoff (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, double cutoff, int typeI, bool average, SteinhardtQl &q4, SteinhardtQl &q6)
SteinhardtQl steinhardtQlMutual (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int k, double candidateCutoff, int typeI, int orderL)
void setSteinhardtAtomSplit (bool split)
AnalysisPhases lastChillPhases ()
AnalysisPhases lastSteinhardtPhases ()
int steinhardtQlmWidth (int orderL)
 Width of one atom's interleaved q_lm: real, imaginary, m = -l..l.
void writeSteinhardtQlm (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, int orderL, std::vector< double > &qlm, const std::vector< char > *which)
 q_lm for atoms which selects. Other atoms are left zero.
void readSteinhardtQl (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, int orderL, const std::vector< double > &qlm, std::vector< double > &ql, std::vector< double > &qlBar, const std::vector< char > *which)
 ql and qlBar for atoms which selects, reading q_lm of their neighbours.
bool preferOffload ()
ChillPlusResult hostChillPlus (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList)
 Host CHILL+ (classifyBonds + getIceTypePlusNoPrint).
ChillPlusResult specializedChillPlus (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList)
 Flattened CHILL+.
ChillPlusResult chillPlus (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList)
int cutoffShellCount (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, int iatom)
ChillPlusRule chillPlusRule (std::string_view spec)
ChillPlusRule chillPlusRuleFromFile (const std::string &spec)
const char * chillPlusRuleName (ChillPlusRule rule)
void applyChillPlus (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, ChillPlusRule rule, bool isSlice=false)
std::vector< TemplateHit > classifyTemplates (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, int kNeigh=12)
std::vector< TemplateHit > classifyTemplates (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< int > &offsets, const std::vector< int > &cols, int kNeigh=12)
 Same overlay, reading a CSR of cloud indices.
std::vector< double > soapSpectrum (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int iatom, const std::vector< std::vector< int > > &nList, int nMax, int lMax, double rcut)
std::vector< std::vector< double > > soapSpectrumAll (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< std::vector< int > > &nList, int nMax, int lMax, double rcut)
std::vector< double > voronoiFeature (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int iatom, double candidateCutoff)
 [q4, q6, q8] from the Voronoi-weighted Steinhardt path (Mickel).
std::vector< std::vector< double > > voronoiFeatures (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, double candidateCutoff)
 [q4, q6, q8] for every particle. One tessellation per order (l = 4, 6, 8).
std::vector< VoronoiWeights > voronoiFacetWeights (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, double candidateCutoff)
 Facet neighbours and area weights for every particle, with an a posteriori exactness certificate.
SteinhardtQl steinhardtQlVoronoi (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, double candidateCutoff, int orderL)
SteinhardtQl steinhardtQlVoronoi (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::vector< VoronoiWeights > &cells, int orderL)

Detailed Description

CHILL and CHILL+ structure classification.

This namespace contains functions that are used in the CHILL/CHILL+ classification scheme, as well as a yodaCloud struct to hold all the information.

Both the CHILL and CHILL+ methods are based on the local bond order parameter method, developed by ten Wolde et al. for the identification of crystal nuclei in Lennard-Jones systems. The local order parameter method is based on order parameters introduced by Steinhardt et al.

The local environment of the water molecules is classified using an algorithm based on spherical harmonics, which is independent of the specific crystal structure and does not require the definition of a reference frame. The local order around each water molecule \(i\) is described by a local orientational bond order parameter \(q_{lm}(i)\), with \( 2l+1 \) complex components:

\[ q_{lm}(i) = @frac{1}{N_b(i)} \Sigma_{j=1}^{N_b(i)} Y_{lm}(r_{ij}) \]

Here, \(N_b(i)=4\) is the number of nearest neighbours for water molecule \(i\), \(l\) is a free integer parameter, \(m\) is an integer such that \(m \in [-l,l]\). The functions \(Y_{lm}(r_{ij})\) are the spherical harmonics and \(r_{ij}\) is the distance vector between molecule \(i\) and each one of its four nearest neighbours \(j\).

The alignment of the orientation of the local structures is measured by the normalized dot product of the local orientational bond order parameter, \(q_l(i)\), between each pair of neighbor molecules \(i\) and \(j\), given by:

\[ a(i,j) = \frac{\sum_{m=-l}^{l} q_{lm}(i)\, q_{lm}^*(j)} {|q_l(i)|\,|q_l(j)|} \]

where, \(q_{lm}^*\) is the complex conjugate of \(q_{lm}\).

Depending on the values of \(a(i,j)\), the bond between each pair of molecules \(i\) and \(j\) is classified as being either staggered or eclipsed.

Algorithm Eclipsed bonds Staggered bonds
CHILL -0.05 >= a(i,j) >= -0.2 a(i,j) <= -0.8
CHILL+ 0.25 >= a(i,j) >= -0.35 a(i,j) <= -0.8

Since each molecule \(i\) in deeply supercooled water has four nearest neighbours, the type of the resultant four bonds is used to identify phases according to the CHILL and CHILL+ algorithms.

The CHILL algorithm can classify water molecules as belonging to the cubic, hexagonal, interfacial or liquid (amorphous) phase:

Phase E S Neighbours Description
Cubic 0 4 4 All 4 neighbours are staggered.
Hexagonal 1 3 4 3 staggered and 1 eclipsed bond.
Interfacial any 2 4 Belongs to the ice phase, but does not satisfy strict criteria of cubic and hexagonal.
0 3 4
Liquid N/A N/A any Classification by exclusion.
Functions for bond-related analyses.
Definition bond.hpp:73

Here, E and S refer to eclipsed and staggered bonds. The neighbours column contains the number of nearest neighbours.

The CHILL+ algorithm, which is a modified version of CHILL, additionally identifies clathrate and interfacial clathrate phases. The criteria are enumerated in the table below:

Phase E S Neighbours Description
Cubic 0 4 4 no change was made to the staggered bond criterion from CHILL
Hexagonal 1 3 4 wider eclipsed range compared to CHILL; identifies 99% hexagonal ice up to 270 K
Interfacial any 2 4 must have at least one first neighbor water with more than two staggered bonds
0 3 4 must have at least one first neighbor water with more than one staggered bond
Clathrate 4 0 4 bulk clathrate and part of the interface of clathrates can be identified with four eclipsed bonds
Interfacial clathrate 3 any 4 partial clathrate cages and threads of clathrate-like order
Liquid N/A N/A any classifies as liquid if none of the above criteria are fulfilled
Water-oxygen selection for a mixed frame.

Although both the CHILL and CHILL+ classification schemes take into account the local order of the environment of each particle, both schemes output a per-particle classification.

Changelog

Enumeration Type Documentation

◆ ChillPlusRule

enum class chill::ChillPlusRule
strong
Enumerator
Published 
Ovito 

Definition at line 43 of file chill_plus_scheme.hpp.

◆ CrystalKind

enum class chill::CrystalKind
strong
Enumerator
other 
sc 
fcc 
hcp 
bcc 

Definition at line 21 of file structure_desc.hpp.

Function Documentation

◆ applyChillPlus()

void chill::applyChillPlus ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
ChillPlusRule rule,
bool isSlice = false )

Published or OVITO CHILL+ on one cloud. The neighbour list is the cutoff shell the rule counts.

◆ bondClassifier()

BondClassifier chill::bondClassifier ( const std::string & name)
nodiscard

Look up a registered rule set by name. "CHILL" and "CHILL+" are always present; registerBondClassifier adds more. Throws std::out_of_range for unknown names.

◆ bondClassifierNames()

std::vector< std::string > chill::bondClassifierNames ( )
nodiscard

Names of every registered rule set.

◆ bondOrder()

void chill::bondOrder ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
const BondClassifier & rule,
BondOrder & order,
const std::vector< char > * which,
bool fresh = true )

◆ chillFromCsr()

int chill::chillFromCsr ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< int > & offsets,
const std::vector< int > & cols )

Published CHILL labels from a cutoff CSR. Correlations are the four nearest neighbours in the list. Bond vectors are not stored. Returns the cubic count. Thresholds are chillRule().

◆ chillPlus()

ChillPlusResult chill::chillPlus ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList )
nodiscard

◆ chillPlusFromCsr()

int chill::chillPlusFromCsr ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< int > & offsets,
const std::vector< int > & cols,
bool keepBonds = true )

Bonds and CHILL+ labels from a cutoff CSR. Returns the cubic count. keepBonds false still writes iceType and skips the per-atom bond vectors. The labels are the same either way. The vectors are what a caller that reads c_ij needs.

◆ chillPlusOvitoFromCsr()

int chill::chillPlusOvitoFromCsr ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< int > & offsets,
const std::vector< int > & cols )

OVITO Chill+ from a cutoff CSR. q_lm is the sum over every neighbour in the row, not the four closest. Edges are open and the Table 1 neighbour test is off, which is the Chill+ modifier. A crystal row still needs exactly four neighbours. Bond vectors are not stored. Returns the cubic count.

◆ chillPlusPublishedCutoff()

bool chill::chillPlusPublishedCutoff ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
double cutoff,
int typeI )

Published CHILL+ on the cutoff shell. The pair rows are read inside this call; the shared neighbour-list builder is not modified. Returns false when that search is not available.

◆ chillPlusRule() [1/2]

BondClassifier chill::chillPlusRule ( )
nodiscard

The CHILL+ rule set (Nguyen and Molinero, JPCB 119, 9369, 2015): wider eclipsed band for interfacial and clathrate recognition

◆ chillPlusRule() [2/2]

ChillPlusRule chill::chillPlusRule ( std::string_view spec)
nodiscard

chill+, ovito-chill+, a YAML document with rule: or chill-plus:, or a Lua table fragment rule = "...". An empty string is the published rule. Anything else throws.

◆ chillPlusRuleFromFile()

ChillPlusRule chill::chillPlusRuleFromFile ( const std::string & spec)
nodiscard

Read spec as a rule name. If spec names a readable file, the file is scanned for a rule or chill-plus key. Comments are skipped. The file is not executed as Lua or YAML.

◆ chillPlusRuleName()

const char * chill::chillPlusRuleName ( ChillPlusRule rule)
nodiscard

◆ chillPlusSymbolicPrefilter()

bool chill::chillPlusSymbolicPrefilter ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
double cutoff,
int typeI )

Cubic pre-filter from discovery/pysr_prefilter.py. The selected expression is cmean^4. It writes cubic and returns true only when every atom has a cutoff shell of four and a negative mean correlation whose fourth power sits above the highest non-cubic score in that search. That forces every bond below -0.84, which the published rule labels staggered, so the atom is cubic. Otherwise it returns false and leaves the cloud unchanged. The default published call does not use it.

◆ chillRule()

BondClassifier chill::chillRule ( )
nodiscard

The CHILL rule set (Moore et al., PCCP 12, 4124, 2010): strict staggered bound, narrow eclipsed band, four nearest neighbours

◆ classifyBond()

molSys::bond_type chill::classifyBond ( double cij,
const BondClassifier & rule,
bool closed = true )
inline

Staggered, eclipsed, or out of range. closed selects inclusive edges (c <= staggeredMax, eclipsedMin <= c <= eclipsedMax), the Nguyen and Molinero rule and the 2.13 behavior. Open edges match OVITO 3.17.2 (c < staggeredMax, eclipsedMin < c < eclipsedMax). The flag is an argument so BondClassifier stays three doubles and one int. A caller that passes the struct by value does not carry a fifth field.

Definition at line 193 of file bop.hpp.

194 {
195 const bool staggered = closed ? cij <= rule.staggeredMax : cij < rule.staggeredMax;
196 if (staggered) {
198 }
199 const bool eclipsed =
200 closed ? (cij >= rule.eclipsedMin && cij <= rule.eclipsedMax)
201 : (cij > rule.eclipsedMin && cij < rule.eclipsedMax);
202 if (eclipsed) {
204 }
206}
@ eclipsed
The bond is an eclipsed bond.
Definition mol_sys.hpp:69
@ out_of_range
The bond cannot be classified as either staggered or eclipsed.
Definition mol_sys.hpp:69
@ staggered
The bond is a staggered bond, according to the or value.
Definition mol_sys.hpp:69
double eclipsedMin
Inclusive staggered edge, c_ij <= staggeredMax.
Definition bop.hpp:181
double eclipsedMax
Inclusive lower edge of the eclipsed band.
Definition bop.hpp:182

◆ classifyBonds() [1/2]

void chill::classifyBonds ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
const BondClassifier & rule,
bool isSlice,
bool closed )

Same classification as the four-argument form. closed false uses the open OVITO edges. The four-argument form stays the 2.13 symbol and keeps inclusive edges.

◆ classifyBonds() [2/2]

void chill::classifyBonds ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
const BondClassifier & rule,
bool isSlice = false )

Compute and classify the bond correlations c_ij under an arbitrary rule set, filling yCloud.pts[i].c_ij. getCorrel and getCorrelPlus are this engine under their canonical water rules.

◆ classifyBondsCsr()

void chill::classifyBondsCsr ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< int > & offsets,
const std::vector< int > & cols,
const BondClassifier & rule,
bool isSlice = false )

CHILL/CHILL+ bonds from a CSR of cloud indices.

◆ classifyTemplates() [1/2]

std::vector< TemplateHit > chill::classifyTemplates ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< int > & offsets,
const std::vector< int > & cols,
int kNeigh = 12 )
nodiscard

Same overlay, reading a CSR of cloud indices.

◆ classifyTemplates() [2/2]

std::vector< TemplateHit > chill::classifyTemplates ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
int kNeigh = 12 )
nodiscard

Overlay the k nearest neighbours of each particle onto FCC, HCP, BCC and SC shells. Uses IRA when linked; otherwise Horn on a distance-sorted correspondence (high-symmetry shells only).

◆ clearIceTypesExcept()

void chill::clearIceTypesExcept ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< int > & types )

Set iceType to unclassified for atoms whose LAMMPS type is not in types. Empty types leaves the cloud unchanged. Used after a water-type k-NN so substrate and ions are not scored as water.

◆ correlFromOrder()

void chill::correlFromOrder ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const BondOrder & order,
const BondClassifier & rule,
bool isSlice,
const std::vector< char > * which,
bool closed = true )

c_ij for atoms which selects, from a bond-order vector that already holds every neighbour the bond reads. Atoms outside which are left untouched, including a ghost's bond list.

◆ cutoffShellCount()

int chill::cutoffShellCount ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
int iatom )
nodiscard

Neighbours in one cutoff row, ignoring the leading atom id and any id that is not in the cloud. This is the Table 1 shell count.

◆ getCorrel()

void chill::getCorrel ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
bool isSlice = false,
int coordinationNumber = 4 )

Function for getting the bond order correlations \(c_{ij}\) (or \(a_{ij}\) in some treatments) according to the CHILL algorithm.

Parameters
[in,out]yCloudThe output molSys::PointCloud
[in]nListThe row-ordered neighbour list, by ID. The first element of each row is the particle ID, followed by the IDs of the neighbours
[in]isSliceThis decides whether there is a slice or not
[in]coordinationNumberHow many nearest neighbours the bond sum runs over. The default of four is the coordination CHILL is defined and validated against (tetrahedral water); other values reuse the c_ij machinery for differently coordinated systems, and a non-positive value gives each atom its own count from its neighbour-list row. The ice-classification tables in getIceType remain four-bond rules

◆ getCorrelPlus() [1/2]

void chill::getCorrelPlus ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
bool isSlice,
int coordinationNumber,
bool closedBounds )

Same classification. closedBounds false uses the open OVITO edges.

◆ getCorrelPlus() [2/2]

void chill::getCorrelPlus ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
bool isSlice = false,
int coordinationNumber = 4 )

Gets c_ij and then classifies bond types according to the CHILL+ algorithm. coordinationNumber as in getCorrel: four is the validated CHILL+ water scheme, non-positive keeps each atom's whole neighbour row. This is the 2.13 symbol: inclusive edges (closedBounds true).

◆ getIceType()

void chill::getIceType ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
std::string path,
int firstFrame,
bool isSlice = false,
std::string outputFileName = "chill.txt" )

Function that classifies every particle's molSys::atom_state_type ice type, according to the CHILL algorithm.

Parameters
[in,out]yCloudThe output molSys::PointCloud
[in]nListRow-ordered neighbour list by atom ID
[in]pathPath to the output directory to which ice types are written out to
[in]firstFrameFirst frame to be analyzed
[in]isSliceThis decides whether there is a slice or not
[in]outputFileNameName of the output file, to which the ice types will be written out.

◆ getIceTypeNoPrint()

void chill::getIceTypeNoPrint ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
bool isSlice = false )

Function that classifies every particle's molSys::atom_state_type ice type, according to the CHILL algorithm.

Does not print out the information.

Parameters
[in,out]yCloudThe output molSys::PointCloud
[in]isSliceThis decides whether there is a slice or not
[in]nListRow-ordered neighbour list by atom ID

◆ getIceTypePlus() [1/2]

void chill::getIceTypePlus ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
std::string path,
int firstFrame,
bool isSlice,
std::string outputFileName,
bool neighbourTest )

neighbourTest false is the OVITO interfacial rule.

◆ getIceTypePlus() [2/2]

void chill::getIceTypePlus ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
std::string path,
int firstFrame,
bool isSlice = false,
std::string outputFileName = "chillPlus.txt" )

Classifies each atom according to the CHILL+ algorithm. This is the 2.13 symbol: the published neighbour test stays on.

◆ getIceTypePlusNoPrint() [1/2]

void chill::getIceTypePlusNoPrint ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
bool isSlice,
bool neighbourTest )

neighbourTest false is the OVITO interfacial rule (two staggered bonds, or three staggered and no eclipsed bond, with no neighbour lookup). Either rule still requires a cutoff shell of four.

◆ getIceTypePlusNoPrint() [2/2]

void chill::getIceTypePlusNoPrint ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
bool isSlice = false )

CHILL+ ice types on the cloud. Does not write a file. This is the 2.13 symbol: the published neighbour test stays on.

◆ getq6()

std::vector< double > chill::getq6 ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
bool isSlice = false )

q6 can distinguish between water and ice. Use this for the largest ice cluster

◆ hostChillPlus()

ChillPlusResult chill::hostChillPlus ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList )
nodiscard

Host CHILL+ (classifyBonds + getIceTypePlusNoPrint).

◆ isInterfacial()

bool chill::isInterfacial ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
int iatom,
int num_staggrd,
int num_eclipsd,
bool chillPlus = false )

Interfacial ice. Moore CHILL uses a neighbour with exactly two staggered bonds; Nguyen CHILL+ uses a neighbour with more than one. Pass chillPlus=true for the latter.

◆ lastChillPhases()

AnalysisPhases chill::lastChillPhases ( )

◆ lastQlCutoffStages()

QlCutoffStages & chill::lastQlCutoffStages ( )

◆ lastSteinhardtPhases()

AnalysisPhases chill::lastSteinhardtPhases ( )

◆ localCutoffQ4Q6()

bool chill::localCutoffQ4Q6 ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
double cutoff,
int typeI,
std::vector< double > & q4,
std::vector< double > & q6 )

Local q4 and q6 from one cutoff list. Same values as two steinhardtQlCutoff calls with averaging off. Returns false when the shared shell cannot be built.

◆ numStaggered()

int chill::numStaggered ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
int jatom )
nodiscard

Finds the number of staggered bonds for a given atom of index jatom.

◆ preferOffload()

bool chill::preferOffload ( )
nodiscard

◆ printIceType()

int chill::printIceType ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
std::string path,
int firstFrame,
bool isSlice = false,
std::string outputFileName = "superChill.txt" )
nodiscard

Prints out the iceType for a particular frame onto the terminal.

◆ q4q6ChillPlus()

bool chill::q4q6ChillPlus ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
double cutoff,
int typeI,
std::vector< double > & q4,
std::vector< double > & q6,
std::vector< double > & q4bar,
std::vector< double > & q6bar )

One cutoff list and one bond pass for local q4, local q6, their Lechner-Dellago averages, and the published CHILL+ labels. The four q arrays match steinhardtQlCutoff with averaging on. Returns false when the atoms are not one type or the cutoff list is not available, and then writes nothing.

◆ readSteinhardtQl()

void chill::readSteinhardtQl ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
int orderL,
const std::vector< double > & qlm,
std::vector< double > & ql,
std::vector< double > & qlBar,
const std::vector< char > * which )

ql and qlBar for atoms which selects, reading q_lm of their neighbours.

◆ reclassifyWater()

void chill::reclassifyWater ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
std::vector< double > & q6 )

'Test' condition for classifying hexagonal ice using averaged q6 and q3 Checks water According to https://pubs.rsc.org/en/content/articlehtml/2011/cp/c1cp22167a Gets c_ij and then classifies bond types according to the CHILL+ algorithm

◆ registerBondClassifier()

void chill::registerBondClassifier ( const std::string & name,
const BondClassifier & rule )

Register (or replace) a named rule set at runtime, making the material's thresholds available to every front end by name

◆ setSteinhardtAtomSplit()

void chill::setSteinhardtAtomSplit ( bool split)

Whether steinhardtQl splits atoms over the ranks of an initialised MPI_COMM_WORLD (true unless set). A driver that gives each rank whole frames of its own turns it off.

◆ soapSpectrum()

std::vector< double > chill::soapSpectrum ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
int iatom,
const std::vector< std::vector< int > > & nList,
int nMax,
int lMax,
double rcut )
nodiscard

Bartok SOAP power spectrum for one particle (nMax radial Gaussians, spherical harmonics through lMax). Length is nMax*nMax*(lMax+1).

◆ soapSpectrumAll()

std::vector< std::vector< double > > chill::soapSpectrumAll ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
int nMax,
int lMax,
double rcut )
nodiscard

Bartok SOAP power spectrum for every particle. Length is nop; each row is nMax*nMax*(lMax+1).

◆ specializedChillPlus()

ChillPlusResult chill::specializedChillPlus ( molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList )
nodiscard

Flattened CHILL+.

Target device when compiled with offload.

◆ steinhardtQ4Q6Cutoff()

bool chill::steinhardtQ4Q6Cutoff ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
double cutoff,
int typeI,
bool average,
SteinhardtQl & q4,
SteinhardtQl & q6 )
nodiscard

q4 and q6 from one cutoff list. The bond vectors are wrapped once. Each degree then uses the same harmonic as steinhardtQlCutoff, so the values match two separate calls. Returns false when that list is not available; the outputs are left untouched.

◆ steinhardtQl()

SteinhardtQl chill::steinhardtQl ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
int orderL )
nodiscard

Local and neighbour-averaged Steinhardt parameters of degree 3, 4, 6, 8, or 12. Local ql is Steinhardt, Nelson and Ronchetti; qlBar is the Lechner-Dellago average of q_lm over the particle and its neighbours. l=12 is host-only (associated Legendre, or sphericart when linked) for the Zeron hydrate pair with l=3; the device Ylm path has no l=12. Other degrees return zeros. The compute path flattens the neighbour list to CSR so the same kernel can run on the host (OpenMP), across MPI ranks (atom split plus Allgatherv of q_lm), or under OpenMP target offload when the build provides a device.

◆ steinhardtQlCutoff()

SteinhardtQl chill::steinhardtQlCutoff ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
double cutoff,
int orderL,
int typeI,
bool average,
bool invariants = false )
nodiscard

Local \(q_l\) on the cutoff list.

Neighbours are orthoFullCsr, not a four-nearest rebuild, and the kernel reads that CSR directly. Lechner-Dellago \(\bar{q}_l\) is filled only when average is true. Otherwise qlBar stays zero. invariants fills wl with the normalized Steinhardt \(\hat{w}_l\) for l = 4 or 6.

◆ steinhardtQlMutual()

SteinhardtQl chill::steinhardtQlMutual ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
int k,
double candidateCutoff,
int typeI,
int orderL )
nodiscard

Mutual k-nearest Steinhardt parameters. The coordinate buffer built for the nomination is the one the harmonics read, and the neighbour rows stay in one packed array. l is 3, 4 or 6; other degrees return the result of building the mutual graph and calling steinhardtQl.

◆ steinhardtQlmWidth()

int chill::steinhardtQlmWidth ( int orderL)
inline

Width of one atom's interleaved q_lm: real, imaginary, m = -l..l.

Definition at line 554 of file bop.hpp.

554{ return 2 * (2 * orderL + 1); }

◆ steinhardtQlVoronoi() [1/2]

SteinhardtQl chill::steinhardtQlVoronoi ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< VoronoiWeights > & cells,
int orderL )
nodiscard

◆ steinhardtQlVoronoi() [2/2]

SteinhardtQl chill::steinhardtQlVoronoi ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
double candidateCutoff,
int orderL )
nodiscard

Steinhardt parameters of degree orderL (3, 4, 6 or 8) with the bond sum weighted by Voronoi facet areas. qlBar averages the weighted q_lm over the particle and its facet neighbours, after Lechner and Dellago.

◆ voronoiFacetWeights()

std::vector< VoronoiWeights > chill::voronoiFacetWeights ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
double candidateCutoff )
nodiscard

Facet neighbours and area weights for every particle, with an a posteriori exactness certificate.

candidateCutoff seeds the bisector search; the cutoff is enlarged automatically until the certificate holds or the growth cap is reached.

Certificate. The cell of particle i clipped against every candidate within cutoff c is the true Voronoi cell whenever every vertex of the clipped cell lies within c/2 of i: a particle k beyond the cutoff has abs(d_k) > c, its bisector plane sits at distance abs(d_k)/2 > c/2 from i, and a half-space whose boundary is farther than c/2 cannot cut a region contained in the ball of radius c/2. An open or under-clipped cell keeps vertices on the seeding square at distance ~c and fails the certificate, which is exactly the failure the enlargement retries.

◆ voronoiFeature()

std::vector< double > chill::voronoiFeature ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
int iatom,
double candidateCutoff )
nodiscard

[q4, q6, q8] from the Voronoi-weighted Steinhardt path (Mickel).

◆ voronoiFeatures()

std::vector< std::vector< double > > chill::voronoiFeatures ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
double candidateCutoff )
nodiscard

[q4, q6, q8] for every particle. One tessellation per order (l = 4, 6, 8).

◆ writeSteinhardtQlm()

void chill::writeSteinhardtQlm ( const molSys::PointCloud< molSys::Point< double >, double > & yCloud,
const std::vector< std::vector< int > > & nList,
int orderL,
std::vector< double > & qlm,
const std::vector< char > * which )

q_lm for atoms which selects. Other atoms are left zero.