seams_c Module

Thin iso_c_binding image of include/seams.h.

Every procedure is bind(C) to the C symbol of the same name, except the string helpers at the bottom, which only pack Fortran strings. Lengths that the C header types as size_t stay integer(c_size_t). A null pointer is c_null_ptr. This module does not allocate result arrays and does not own handles: the caller creates, sizes, and destroys them. The seams module is the Fortran API.



Variables

Type Visibility Attributes Name Initial
integer(kind=c_int), public, parameter :: SEAMS_OK = 0

The call succeeded.

integer(kind=c_int), public, parameter :: SEAMS_ERR_NULL = 1

A required pointer is null.

integer(kind=c_int), public, parameter :: SEAMS_ERR_RANGE = 2

A number is outside the accepted range.

integer(kind=c_int), public, parameter :: SEAMS_ERR_BOX = 3

The cell is missing or has no volume.

integer(kind=c_int), public, parameter :: SEAMS_ERR_ARG = 4

A caller argument is the wrong shape.

integer(kind=c_int), public, parameter :: SEAMS_ERR_STATE = 5

The handle has no frame yet.

integer(kind=c_int), public, parameter :: SEAMS_ERR_NOMEM = 6

An allocation failed.

integer(kind=c_int), public, parameter :: SEAMS_ERR_INTERNAL = 7

The library hit an internal failure.

integer(kind=c_int), public, parameter :: SEAMS_CHILL_PUBLISHED = 0

CHILL+ rule from Nguyen and Molinero, 2015. Inclusive c_ij edges.

integer(kind=c_int), public, parameter :: SEAMS_CHILL_OVITO = 1

CHILL+ rule used by OVITO. The same thresholds, open edges.

integer(kind=c_int), public, parameter :: SEAMS_GRAPH_CUTOFF = 0

Neighbour graph of every pair inside the cutoff.

integer(kind=c_int), public, parameter :: SEAMS_GRAPH_MUTUAL = 1

Mutual four-nearest neighbour graph.

integer(kind=c_int), public, parameter :: SEAMS_GRAPH_SEEDED = 2

Cage graph: mutual seeds and union completions.

integer(kind=c_int), public, parameter :: SEAMS_LABEL_CUBIC = 0

CHILL+ cubic-ice label.


Interfaces

interface

  • public function seams_version_string() bind(C, name="seams_version_string")

    Version text, for example 2.14.0. The pointer is static; the caller does not free it.

    Arguments

    None

    Return Value type(c_ptr)

interface

  • public function seams_last_error() bind(C, name="seams_last_error")

    Thread-local detail of the last failing call on this thread. Never NULL.

    Arguments

    None

    Return Value type(c_ptr)

interface

  • public function seams_set_num_threads(n) bind(C, name="seams_set_num_threads")

    Set the OpenMP team used by later analysis. Zero restores the saved default.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), value :: n

    Return Value integer(kind=c_int)

interface

  • public function seams_get_num_threads() bind(C, name="seams_get_num_threads")

    Team width the next analysis call will request.

    Arguments

    None

    Return Value integer(kind=c_int)

interface

  • public function seams_system_create() bind(C, name="seams_system_create")

    Allocate an empty frame. NULL means allocation failed.

    Arguments

    None

    Return Value type(c_ptr)

interface

  • public function seams_system_set_ortho(sys, xyz, n, ox, oy, oz, lx, ly, lz, types, ids) bind(C, name="seams_system_set_ortho")

    Store points and an orthorhombic cell. types and ids may be c_null_ptr.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), intent(in) :: xyz(*)
    integer(kind=c_int), value :: n
    real(kind=c_double), value :: ox
    real(kind=c_double), value :: oy
    real(kind=c_double), value :: oz
    real(kind=c_double), value :: lx
    real(kind=c_double), value :: ly
    real(kind=c_double), value :: lz
    type(c_ptr), value :: types
    type(c_ptr), value :: ids

    Return Value integer(kind=c_int)

interface

  • public function seams_system_set_frame(sys, xyz, n, box9, types, ids) bind(C, name="seams_system_set_frame")

    Store points and a nine-number LAMMPS cell.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), intent(in) :: xyz(*)
    integer(kind=c_int), value :: n
    real(kind=c_double), intent(in) :: box9(*)
    type(c_ptr), value :: types
    type(c_ptr), value :: ids

    Return Value integer(kind=c_int)

interface

  • public function seams_chill_plus(sys, cutoff, typ, graph, rule, labels, counts) bind(C, name="seams_chill_plus")

    CHILL+ labels and nine population counts. counts is label order, 1-based in Fortran.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: cutoff
    integer(kind=c_int), value :: typ
    integer(kind=c_int), value :: graph
    integer(kind=c_int), value :: rule
    integer(kind=c_int), intent(out) :: labels(*)
    integer(kind=c_int), intent(out) :: counts(*)

    Return Value integer(kind=c_int)

interface

  • public function seams_q4q6(sys, cutoff, typ, q4, q6) bind(C, name="seams_q4q6")

    Local q4 and q6 on the cutoff shell.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: cutoff
    integer(kind=c_int), value :: typ
    real(kind=c_double), intent(out) :: q4(*)
    real(kind=c_double), intent(out) :: q6(*)

    Return Value integer(kind=c_int)

interface

  • public function seams_neighbours_build(sys, cutoff, typ, graph, out) bind(C, name="seams_neighbours_build")

    Build a cutoff or mutual neighbour list. out receives the handle.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: cutoff
    integer(kind=c_int), value :: typ
    integer(kind=c_int), value :: graph
    type(c_ptr), intent(out) :: out

    Return Value integer(kind=c_int)

interface

  • public function seams_neighbours_csr(nb, offsets, n_offsets, cols, nnz) bind(C, name="seams_neighbours_csr")

    Borrow the neighbour CSR. The pointers are owned by the handle.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: nb
    type(c_ptr), intent(out) :: offsets
    integer(kind=c_int), intent(out) :: n_offsets
    type(c_ptr), intent(out) :: cols
    integer(kind=c_int), intent(out) :: nnz

    Return Value integer(kind=c_int)

interface

  • public function seams_rings_find(sys, cutoff, typ, graph, max_depth, out) bind(C, name="seams_rings_find")

    Primitive rings up to max_depth. out receives the handle.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: cutoff
    integer(kind=c_int), value :: typ
    integer(kind=c_int), value :: graph
    integer(kind=c_int), value :: max_depth
    type(c_ptr), intent(out) :: out

    Return Value integer(kind=c_int)

interface

  • public function seams_rings_histogram(rings, counts, counts_len) bind(C, name="seams_rings_histogram")

    Count rings by size. counts(k) is the number of rings of size k-1 when the array is 1-based; a 0-based array stores size k at index k.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: rings
    integer(kind=c_int), intent(out) :: counts(*)
    integer(kind=c_int), value :: counts_len

    Return Value integer(kind=c_int)

interface

  • public function seams_rings_fraction(rings, size, fraction) bind(C, name="seams_rings_fraction")

    Fraction of atoms that sit on a ring. size 0 counts every ring.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: rings
    integer(kind=c_int), value :: size
    real(kind=c_double), intent(out) :: fraction

    Return Value integer(kind=c_int)

interface

  • public function seams_handle_error(handle) bind(C, name="seams_handle_error")

    Detail string stored on a handle. Survives a later call on another handle.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: handle

    Return Value type(c_ptr)

interface

  • public function seams_system_count(sys) bind(C, name="seams_system_count")

    Number of points in the frame, or 0 when the handle is empty.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys

    Return Value integer(kind=c_int)

interface

  • public function seams_system_read(sys, path, frame, type_filter) bind(C, name="seams_system_read")

    Read one 1-based frame. type_filter negative keeps every atom.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    character(kind=c_char, len=1), intent(in) :: path(*)
    integer(kind=c_int), value :: frame
    integer(kind=c_int), value :: type_filter

    Return Value integer(kind=c_int)

interface

  • public function seams_chill(sys, cutoff, typ, graph, rule, labels, labels_len, counts) bind(C, name="seams_chill")

    Original CHILL labels. labels_len is at least the frame count.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: cutoff
    integer(kind=c_int), value :: typ
    integer(kind=c_int), value :: graph
    integer(kind=c_int), value :: rule
    integer(kind=c_int), intent(out) :: labels(*)
    integer(kind=c_size_t), value :: labels_len
    integer(kind=c_int), intent(out) :: counts(*)

    Return Value integer(kind=c_int)

interface

  • public function seams_steinhardt(sys, cutoff, typ, order_l, ql, ql_len, qlbar, qlbar_len) bind(C, name="seams_steinhardt")

    Local q_l and the Lechner-Dellago average on the cutoff shell.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: cutoff
    integer(kind=c_int), value :: typ
    integer(kind=c_int), value :: order_l
    real(kind=c_double), intent(out) :: ql(*)
    integer(kind=c_size_t), value :: ql_len
    real(kind=c_double), intent(out) :: qlbar(*)
    integer(kind=c_size_t), value :: qlbar_len

    Return Value integer(kind=c_int)

interface

  • public function seams_cages(sys, cutoff, typ, graph, k, complete, out) bind(C, name="seams_cages")

    Hexagonal and double-diamond cage membership.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: cutoff
    integer(kind=c_int), value :: typ
    integer(kind=c_int), value :: graph
    integer(kind=c_int), value :: k
    integer(kind=c_int), value :: complete
    type(c_ptr), intent(out) :: out

    Return Value integer(kind=c_int)

interface

  • public function seams_cages_counts(cages, n_hex, n_cubic, n_water, n_both) bind(C, name="seams_cages_counts")

    Disjoint cage population counts. The four counts sum to the atoms the search kept.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: cages
    integer(kind=c_int), intent(out) :: n_hex
    integer(kind=c_int), intent(out) :: n_cubic
    integer(kind=c_int), intent(out) :: n_water
    integer(kind=c_int), intent(out) :: n_both

    Return Value integer(kind=c_int)

interface

  • public function seams_signature_cages(sys, cutoff, typ, graph, spec, n_cages, n_atoms) bind(C, name="seams_signature_cages")

    Closed cages whose ring census matches spec, for example 512.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: cutoff
    integer(kind=c_int), value :: typ
    integer(kind=c_int), value :: graph
    character(kind=c_char, len=1), intent(in) :: spec(*)
    integer(kind=c_size_t), intent(out) :: n_cages
    integer(kind=c_size_t), intent(out) :: n_atoms

    Return Value integer(kind=c_int)

interface

  • public function seams_neighbours_knn(sys, k, cutoff, typ, mutual, out) bind(C, name="seams_neighbours_knn")

    k-nearest neighbour list. mutual nonzero keeps the mutual graph.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    integer(kind=c_int), value :: k
    real(kind=c_double), value :: cutoff
    integer(kind=c_int), value :: typ
    integer(kind=c_int), value :: mutual
    type(c_ptr), intent(out) :: out

    Return Value integer(kind=c_int)

interface

  • public function seams_rdf(sys, rmax, bins, type_i, type_j, r, g, count, cap, n_out, volume) bind(C, name="seams_rdf")

    Partial radial distribution. A null column queries the length.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: rmax
    integer(kind=c_int), value :: bins
    integer(kind=c_int), value :: type_i
    integer(kind=c_int), value :: type_j
    type(c_ptr), value :: r
    type(c_ptr), value :: g
    type(c_ptr), value :: count
    integer(kind=c_size_t), value :: cap
    integer(kind=c_size_t), intent(out) :: n_out
    type(c_ptr), value :: volume

    Return Value integer(kind=c_int)

interface

  • public function seams_running_cn(sys, rmax, bins, type_i, type_j, r, cn, cap, n_out) bind(C, name="seams_running_cn")

    Running coordination number along the partial RDF.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: rmax
    integer(kind=c_int), value :: bins
    integer(kind=c_int), value :: type_i
    integer(kind=c_int), value :: type_j
    type(c_ptr), value :: r
    type(c_ptr), value :: cn
    integer(kind=c_size_t), value :: cap
    integer(kind=c_size_t), intent(out) :: n_out

    Return Value integer(kind=c_int)

interface

  • public function seams_coordination(sys, rmax, bins, type_i, type_j, cn) bind(C, name="seams_coordination")

    Coordination number integrated to rmax.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: rmax
    integer(kind=c_int), value :: bins
    integer(kind=c_int), value :: type_i
    integer(kind=c_int), value :: type_j
    real(kind=c_double), intent(out) :: cn

    Return Value integer(kind=c_int)

interface

  • public function seams_hbonds(sys, cutoff, oxygen_type, hydrogen_type, dist_cutoff, angle_cutoff, n_bonds) bind(C, name="seams_hbonds")

    Hydrogen-bond count. dist_cutoff is angstrom and angle_cutoff is degrees.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: cutoff
    integer(kind=c_int), value :: oxygen_type
    integer(kind=c_int), value :: hydrogen_type
    real(kind=c_double), value :: dist_cutoff
    real(kind=c_double), value :: angle_cutoff
    integer(kind=c_int), intent(out) :: n_bonds

    Return Value integer(kind=c_int)

interface

  • public function seams_density_axis(sys, typ, bins, axis, z, rho, cap, n_out) bind(C, name="seams_density_axis")

    Number density along one cell axis. axis is 0, 1, or 2.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    integer(kind=c_int), value :: typ
    integer(kind=c_int), value :: bins
    integer(kind=c_int), value :: axis
    type(c_ptr), value :: z
    type(c_ptr), value :: rho
    integer(kind=c_size_t), value :: cap
    integer(kind=c_size_t), intent(out) :: n_out

    Return Value integer(kind=c_int)

interface

  • public function seams_fingerprint(sys, cutoff, typ, k, graph, hops, color_types, out) bind(C, name="seams_fingerprint")

    Topological fingerprint of the bonded graph.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: cutoff
    integer(kind=c_int), value :: typ
    integer(kind=c_int), value :: k
    integer(kind=c_int), value :: graph
    integer(kind=c_int), value :: hops
    integer(kind=c_int), value :: color_types
    type(c_ptr), intent(out) :: out

    Return Value integer(kind=c_int)

interface

  • public function seams_fingerprint_key(fp, buf, cap, n_out) bind(C, name="seams_fingerprint_key")

    Frame key text. A null buffer queries the length without the terminating NUL.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: fp
    type(c_ptr), value :: buf
    integer(kind=c_size_t), value :: cap
    integer(kind=c_size_t), intent(out) :: n_out

    Return Value integer(kind=c_int)

interface

  • public function seams_fingerprint_rings(fp, counts, counts_len) bind(C, name="seams_fingerprint_rings")

    Primitive-ring census stored on the fingerprint. counts(k) is size k for a 0-based buffer.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: fp
    integer(kind=c_int), intent(out) :: counts(*)
    integer(kind=c_size_t), value :: counts_len

    Return Value integer(kind=c_int)

interface

  • public function seams_contact_pairs(sys, spec, n_pairs, n_cation, n_anion) bind(C, name="seams_contact_pairs")

    Mutual nearest unlike contacts of a site table.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    character(kind=c_char, len=1), intent(in) :: spec(*)
    integer(kind=c_size_t), intent(out) :: n_pairs
    integer(kind=c_int), intent(out) :: n_cation
    integer(kind=c_int), intent(out) :: n_anion

    Return Value integer(kind=c_int)

interface

  • public function seams_domains(sys, cutoff, spec, subset, n_subset, largest, percolation) bind(C, name="seams_domains")

    Largest polar or apolar domain. subset 0 is apolar and 1 is polar.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: cutoff
    character(kind=c_char, len=1), intent(in) :: spec(*)
    integer(kind=c_int), value :: subset
    integer(kind=c_int), intent(out) :: n_subset
    integer(kind=c_int), intent(out) :: largest
    real(kind=c_double), intent(out) :: percolation

    Return Value integer(kind=c_int)

interface

  • public function seams_prisms(sys, cutoff, typ, perfect, imperfect, len) bind(C, name="seams_prisms")

    Perfect and imperfect prism counts by ring size.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: cutoff
    integer(kind=c_int), value :: typ
    integer(kind=c_int), intent(out) :: perfect(*)
    integer(kind=c_int), intent(out) :: imperfect(*)
    integer(kind=c_size_t), value :: len

    Return Value integer(kind=c_int)

interface

  • public function seams_monolayer(sys, cutoff, typ, max_depth, sheet_area, counts, counts_len) bind(C, name="seams_monolayer")

    Primitive-ring histogram of a monolayer.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: cutoff
    integer(kind=c_int), value :: typ
    integer(kind=c_int), value :: max_depth
    real(kind=c_double), value :: sheet_area
    integer(kind=c_int), intent(out) :: counts(*)
    integer(kind=c_size_t), value :: counts_len

    Return Value integer(kind=c_int)

interface

  • public function seams_rings_count(rings) bind(C, name="seams_rings_count")

    Number of primitive rings.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: rings

    Return Value integer(kind=c_int)

interface

  • public function seams_rings_vertices(rings, index, atoms, cap, n_out) bind(C, name="seams_rings_vertices")

    Atom indices of one ring. index is 0-based. A null buffer queries the length.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: rings
    integer(kind=c_int), value :: index
    integer(kind=c_int), intent(out) :: atoms(*)
    integer(kind=c_size_t), value :: cap
    integer(kind=c_size_t), intent(out) :: n_out

    Return Value integer(kind=c_int)

interface

  • public function seams_site_table(sys, spec, kinds, len) bind(C, name="seams_site_table")

    Per-atom site kind from a site-table spec.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    character(kind=c_char, len=1), intent(in) :: spec(*)
    integer(kind=c_int), intent(out) :: kinds(*)
    integer(kind=c_size_t), value :: len

    Return Value integer(kind=c_int)

interface

  • public function seams_abi() bind(C, name="seams_abi")

    ABI number compiled into this library. It is 1.

    Arguments

    None

    Return Value integer(kind=c_int)

interface

  • public function seams_version() bind(C, name="seams_version")

    Packed release number, (major << 16) | (minor << 8) | patch.

    Arguments

    None

    Return Value integer(kind=c_int)

interface

  • public function seams_version_major() bind(C, name="seams_version_major")

    Major version.

    Arguments

    None

    Return Value integer(kind=c_int)

interface

  • public function seams_version_minor() bind(C, name="seams_version_minor")

    Minor version.

    Arguments

    None

    Return Value integer(kind=c_int)

interface

  • public function seams_version_patch() bind(C, name="seams_version_patch")

    Patch version.

    Arguments

    None

    Return Value integer(kind=c_int)

interface

  • public function seams_status_string(status) bind(C, name="seams_status_string")

    Short name of a status code. The pointer is static.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), value :: status

    Return Value type(c_ptr)

interface

  • public function seams_label_name(label) bind(C, name="seams_label_name")

    Name of a CHILL label. Unknown codes return “unknown”.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), value :: label

    Return Value type(c_ptr)

interface

  • public function seams_ring_symmetry_name(symmetry) bind(C, name="seams_ring_symmetry_name")

    Name of a ring-symmetry code.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=c_int), value :: symmetry

    Return Value type(c_ptr)

interface

  • public function seams_system_set_atoms(sys, xyz, n, box9, box_len, types, ids) bind(C, name="seams_system_set_atoms")

    Store points and a cell. n and box_len are size_t. box_len must be 9.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), intent(in) :: xyz(*)
    integer(kind=c_size_t), value :: n
    real(kind=c_double), intent(in) :: box9(*)
    integer(kind=c_size_t), value :: box_len
    type(c_ptr), value :: types
    type(c_ptr), value :: ids

    Return Value integer(kind=c_int)

interface

  • public function seams_path_nframes(path, nframes) bind(C, name="seams_path_nframes")

    Number of frames in a trajectory path.

    Arguments

    Type IntentOptional Attributes Name
    character(kind=c_char, len=1), intent(in) :: path(*)
    integer(kind=c_size_t), intent(out) :: nframes

    Return Value integer(kind=c_int)

interface

  • public function seams_neighbours_count(nb) bind(C, name="seams_neighbours_count")

    Number of neighbour rows.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: nb

    Return Value integer(kind=c_int)

interface

  • public function seams_neighbours_copy(nb, offsets, offsets_cap, n_offsets, cols, cols_cap, nnz) bind(C, name="seams_neighbours_copy")

    Copy the neighbour CSR into caller buffers. A null buffer queries the length.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: nb
    type(c_ptr), value :: offsets
    integer(kind=c_size_t), value :: offsets_cap
    integer(kind=c_size_t), intent(out) :: n_offsets
    type(c_ptr), value :: cols
    integer(kind=c_size_t), value :: cols_cap
    integer(kind=c_size_t), intent(out) :: nnz

    Return Value integer(kind=c_int)

interface

  • public function seams_ql(sys, cutoff, typ, order_l, graph, ql, ql_len, qlbar, qlbar_len) bind(C, name="seams_ql")

    Local q_l and, on request, its neighbour average.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: cutoff
    integer(kind=c_int), value :: typ
    integer(kind=c_int), value :: order_l
    integer(kind=c_int), value :: graph
    type(c_ptr), value :: ql
    integer(kind=c_size_t), value :: ql_len
    type(c_ptr), value :: qlbar
    integer(kind=c_size_t), value :: qlbar_len

    Return Value integer(kind=c_int)

interface

  • public function seams_q6bar(sys, cutoff, typ, ice_cut, q6bar, q6bar_len, mean, median, n_ice) bind(C, name="seams_q6bar")

    Lechner-Dellago q6-bar and the ice count above ice_cut.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: cutoff
    integer(kind=c_int), value :: typ
    real(kind=c_double), value :: ice_cut
    type(c_ptr), value :: q6bar
    integer(kind=c_size_t), value :: q6bar_len
    type(c_ptr), value :: mean
    type(c_ptr), value :: median
    type(c_ptr), value :: n_ice

    Return Value integer(kind=c_int)

interface

  • public function seams_rings_labels(rings, sizes, symmetry) bind(C, name="seams_rings_labels")

    Size and symmetry of each ring. Either pointer may be c_null_ptr, not both.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: rings
    type(c_ptr), value :: sizes
    type(c_ptr), value :: symmetry

    Return Value integer(kind=c_int)

interface

  • public function seams_cages_labels(cages, per_atom, len) bind(C, name="seams_cages_labels")

    Per-atom cage code. len is at least the frame count stored on the handle.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: cages
    integer(kind=c_int), intent(out) :: per_atom(*)
    integer(kind=c_size_t), value :: len

    Return Value integer(kind=c_int)

interface

  • public function seams_system_symmetry(sys, shell_rmsd, labels, labels_len) bind(C, name="seams_system_symmetry")

    Per-atom ice shell label. A non-positive shell_rmsd selects the library ceiling.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    real(kind=c_double), value :: shell_rmsd
    integer(kind=c_int), intent(out) :: labels(*)
    integer(kind=c_size_t), value :: labels_len

    Return Value integer(kind=c_int)

interface

  • public function seams_brine_analyse(sys, ice, n_ice, water_type, ion_type, n_bins, axis, out) bind(C, name="seams_brine_analyse")

    Planar ice front. ice(i) nonzero means atom i is ice.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys
    integer(kind=c_int), intent(in) :: ice(*)
    integer(kind=c_size_t), value :: n_ice
    integer(kind=c_int), value :: water_type
    integer(kind=c_int), value :: ion_type
    integer(kind=c_int), value :: n_bins
    integer(kind=c_int), value :: axis
    type(c_ptr), intent(out) :: out

    Return Value integer(kind=c_int)

interface

  • public function seams_brine_fronts(front, z_enter, z_exit, thickness, found) bind(C, name="seams_brine_fronts")

    The two planar crossings of the ice slab. Lengths are angstrom.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: front
    type(c_ptr), value :: z_enter
    type(c_ptr), value :: z_exit
    type(c_ptr), value :: thickness
    type(c_ptr), value :: found

    Return Value integer(kind=c_int)

interface

  • public function seams_brine_rejection(front, c_ice, c_liquid, k, defined) bind(C, name="seams_brine_rejection")

    Molal rejection coefficient k = c_ice / c_liquid.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: front
    type(c_ptr), value :: c_ice
    type(c_ptr), value :: c_liquid
    type(c_ptr), value :: k
    type(c_ptr), value :: defined

    Return Value integer(kind=c_int)

interface

  • public function seams_brine_profile(front, z_mid, molality, ice_fraction, cap, n_out) bind(C, name="seams_brine_profile")

    Concentration profile. A null column is skipped. cap is the capacity of each column.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: front
    type(c_ptr), value :: z_mid
    type(c_ptr), value :: molality
    type(c_ptr), value :: ice_fraction
    integer(kind=c_size_t), value :: cap
    integer(kind=c_size_t), intent(out) :: n_out

    Return Value integer(kind=c_int)

interface

  • public function seams_brine_pockets(front, n_pockets, reservoir_waters) bind(C, name="seams_brine_pockets")

    Brine pockets trapped in the ice, excluding the liquid reservoir.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: front
    type(c_ptr), value :: n_pockets
    type(c_ptr), value :: reservoir_waters

    Return Value integer(kind=c_int)

interface

  • public function seams_fingerprint_atom(fp, index, buf, cap, n_out) bind(C, name="seams_fingerprint_atom")

    Local key of one atom. Same buffer rule as seams_fingerprint_key.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: fp
    integer(kind=c_int), value :: index
    type(c_ptr), value :: buf
    integer(kind=c_size_t), value :: cap
    integer(kind=c_size_t), intent(out) :: n_out

    Return Value integer(kind=c_int)

interface

  • public subroutine seams_system_destroy(sys) bind(C, name="seams_system_destroy")

    Free a frame. NULL is ignored. Neighbour and ring handles keep their own copies.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: sys

interface

  • public subroutine seams_neighbours_destroy(nb) bind(C, name="seams_neighbours_destroy")

    Free a neighbour list. NULL is ignored.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: nb

interface

  • public subroutine seams_rings_destroy(rings) bind(C, name="seams_rings_destroy")

    Free a ring set. NULL is ignored.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: rings

interface

  • public subroutine seams_cages_destroy(cages) bind(C, name="seams_cages_destroy")

    Free a cage-membership handle. NULL is ignored.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: cages

interface

  • public subroutine seams_fingerprint_destroy(fp) bind(C, name="seams_fingerprint_destroy")

    Free a fingerprint. NULL is ignored.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: fp

interface

  • public subroutine seams_brine_destroy(front) bind(C, name="seams_brine_destroy")

    Free a brine-front handle. NULL is ignored.

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: front

Functions

public function c_chars(text) result(buf)

Copy a Fortran string into a NUL-terminated C buffer.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: text

Return Value character(kind=c_char, len=1), allocatable, (:)

public function read_frame(sys, path, frame, type_filter) result(code)

Read one frame. path is a Fortran string.

Arguments

Type IntentOptional Attributes Name
type(c_ptr), value :: sys
character(len=*), intent(in) :: path
integer, intent(in) :: frame
integer, intent(in) :: type_filter

Return Value integer(kind=c_int)

public function signature_count(sys, spec, n_cages, n_atoms) result(code)

Count cages of spec on the cutoff graph at 3.5 angstrom.

Arguments

Type IntentOptional Attributes Name
type(c_ptr), value :: sys
character(len=*), intent(in) :: spec
integer(kind=c_size_t), intent(out) :: n_cages
integer(kind=c_size_t), intent(out) :: n_atoms

Return Value integer(kind=c_int)

public function site_kinds(sys, spec, kinds, n) result(code)

Per-atom site kinds for spec.

Arguments

Type IntentOptional Attributes Name
type(c_ptr), value :: sys
character(len=*), intent(in) :: spec
integer(kind=c_int), intent(out) :: kinds(*)
integer(kind=c_size_t), value :: n

Return Value integer(kind=c_int)

public function pair_count(sys, spec, n_pairs, n_cation, n_anion) result(code)

Contact-pair census for spec.

Arguments

Type IntentOptional Attributes Name
type(c_ptr), value :: sys
character(len=*), intent(in) :: spec
integer(kind=c_size_t), intent(out) :: n_pairs
integer(kind=c_int), intent(out) :: n_cation
integer(kind=c_int), intent(out) :: n_anion

Return Value integer(kind=c_int)

public function domain_size(sys, spec, n_subset, largest, percolation) result(code)

Apolar domain size for spec at 3.5 angstrom.

Arguments

Type IntentOptional Attributes Name
type(c_ptr), value :: sys
character(len=*), intent(in) :: spec
integer(kind=c_int), intent(out) :: n_subset
integer(kind=c_int), intent(out) :: largest
real(kind=c_double), intent(out) :: percolation

Return Value integer(kind=c_int)