class seams::System¶
Overview¶
One frame: coordinates, a cell, and the analyses that read them. More…
#include <include/seams.hpp>
class System: public seams::detail::Handle {
public:
// construction
System();
// methods
void set_ortho(std::span<const double> xyz, double lx, double ly, double lz);
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 = {});
void set_frame(std::span<const double> xyz, std::span<const double, 9> box9, std::span<const int> types = {}, std::span<const int> ids = {});
std::pair<std::vector<int>, std::vector<int>> chill(double cutoff, int type, int graph, int rule);
std::pair<std::vector<double>, std::vector<double>> steinhardt(double cutoff, int order, bool average);
void read(std::string_view path, int frame, int type_filter);
int count() const;
Classification chill(const ChillOptions& options);
Classification chill_plus(const ChillOptions& options);
Steinhardt steinhardt(const SteinhardtOptions& options);
Steinhardt ql(const OrderOptions& options);
Q4Q6 q4q6(double cutoff, int species = 0);
Q6Bar q6bar(const Q6BarOptions& options);
Neighbours neighbours(const NeighbourOptions& options);
ChordlessCycles rings_chordless(const NeighbourOptions& options, int size);
Neighbours knn(const KnnOptions& options);
std::vector<int> neighbour_degree(double cutoff, int species = 0);
Rings rings(const RingOptions& options);
Cages cages(const CageOptions& options);
SignatureMatch signature_cages(const SignatureOptions& options);
Distribution rdf(const DistributionOptions& options);
RunningCoordination running_cn(const DistributionOptions& options);
double coordination(const DistributionOptions& options);
int hbonds(const BondOptions& options);
DensityProfile density(const DensityOptions& options);
Fingerprint fingerprint(const FingerprintOptions& options);
Contacts contact_pairs(std::string_view spec);
DomainReport domains(const DomainOptions& options);
PrismCensus prisms(const PrismOptions& options);
std::vector<int> monolayer(const SheetOptions& options);
std::vector<int> site_table(std::string_view spec);
std::vector<int> symmetry(double shell_rmsd);
Brine brine(std::span<const int> ice, const BrineOptions& options);
};
Inherited Members¶
Detailed Documentation¶
One frame: coordinates, a cell, and the analyses that read them.
Move-only. The destructor frees the C handle. Methods that read the frame require exclusive use of this object. The Steinhardt scratch inside the library is process-global, so two frames must not run steinhardt, ql, q4q6, or q6bar at the same time. set_num_threads is also process-global.
Construction¶
System()
Allocate an empty frame.
Parameters:
Error |
with status |
Methods¶
void set_ortho(std::span<const double> xyz, double lx, double ly, double lz)
Store points in an orthorhombic cell whose origin is zero.
Parameters:
xyz |
Interleaved x, y, z. Length is a multiple of 3. Angstrom. |
lx |
Edge length along x, Angstrom. |
ly |
Edge length along y, Angstrom. |
lz |
Edge length along z, Angstrom. |
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.
Parameters:
xyz |
Interleaved x, y, z. Length is a multiple of 3. Angstrom. |
origin |
Cell origin, Angstrom. |
lengths |
Edge lengths, Angstrom. Each must be positive. |
types |
One species per atom, or an empty span. |
ids |
One id per atom, or an empty span. |
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.
Parameters:
xyz |
Interleaved coordinates, Angstrom. |
box9 |
|
types |
One species per atom, or empty. |
ids |
One id per atom, or empty. |
void read(std::string_view path, int frame, int type_filter)
Read one frame from a trajectory path.
Parameters:
path |
XYZ, CON, chemfiles, or a LAMMPS dump. |
frame |
1-based frame index. |
type_filter |
Species to keep. Negative keeps every atom. |
int count() const
Number of points in the frame.
Returns:
The atom count. An empty frame returns 0.
Classification chill(const ChillOptions& options)
Original CHILL labels and nine population counts.
Classification chill_plus(const ChillOptions& options)
CHILL+ labels and nine population counts.
Steinhardt steinhardt(const SteinhardtOptions& options)
Local q_l on the cutoff shell.
Parameters:
options |
Cutoff, species, degree, and whether to average. |
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.
Q6Bar q6bar(const Q6BarOptions& options)
q6-bar, its mean and median, and the ice count above the cut.
Neighbours neighbours(const NeighbourOptions& options)
Cutoff or mutual neighbour list.
ChordlessCycles rings_chordless(const NeighbourOptions& options, int size)
Chordless cycles of one length on a neighbour graph.
Parameters:
options |
Graph of the cycles. |
size |
Cycle length, from 3 through 12. |
Returns:
Neighbours::chordless on that graph.
Neighbours knn(const KnnOptions& options)
k-nearest neighbour list.
std::vector<int> neighbour_degree(double cutoff, int species = 0)
Degree of each atom on the cutoff graph.
Parameters:
cutoff |
Positive cutoff, Angstrom. |
species |
Species filter. Zero keeps every atom. |
Rings rings(const RingOptions& options)
Primitive rings up to a maximum size.
Cages cages(const CageOptions& options)
Hexagonal and double-diamond cage membership.
SignatureMatch signature_cages(const SignatureOptions& options)
Closed cages of one ring census.
Distribution rdf(const DistributionOptions& options)
Partial radial distribution and the cell volume.
RunningCoordination running_cn(const DistributionOptions& options)
Running coordination number along the partial RDF.
double coordination(const DistributionOptions& options)
Coordination number integrated to rmax.
int hbonds(const BondOptions& options)
Hydrogen-bond count.
DensityProfile density(const DensityOptions& options)
Number density along one cell axis.
Fingerprint fingerprint(const FingerprintOptions& options)
Topological fingerprint of the bonded graph.
Contacts contact_pairs(std::string_view spec)
Mutual nearest unlike contacts.
spec is site-table text.
DomainReport domains(const DomainOptions& options)
Largest polar or apolar domain.
PrismCensus prisms(const PrismOptions& options)
Perfect and imperfect prism counts by ring size.
std::vector<int> monolayer(const SheetOptions& options)
Primitive-ring histogram of a monolayer.
Returns:
counts[k] is the number of rings of size k.
std::vector<int> site_table(std::string_view spec)
Per-atom site kind.
Parameters:
spec |
Site-table text, for example |
Returns:
One kind code per atom.
std::vector<int> symmetry(double shell_rmsd)
Per-atom ice-shell label.
Parameters:
shell_rmsd |
Positive residual ceiling, or a non-positive value for the library ceiling. |
Returns:
0 ice Ih, 1 ice Ic, 2 stacking disorder, or -1 when the shell does not match.
Brine brine(std::span<const int> ice, const BrineOptions& options)
Planar ice front from an ice assignment.
Parameters:
ice |
Non-zero when the atom is ice. Length must equal |
options |
Water species, ion species, bins, and axis. |