seams Module

Fortran API for d-SEAMS.

A program uses this module. Handles are derived types. The last finalizer, or an explicit close, destroys the C object. Assignment shares the handle. Coordinates are real(seams_real) with shape (3, n), x/y/z down the first index, which is the same memory order as the C array. A missing stat and a missing errmsg make a failed call error stop with the library message. Present stat receives the seams.h code and errmsg receives the detail. Working precision. It is real64 and it matches C double. Integer kind for labels, counts, and stat. It is int32.

Empty frame. The caller owns the result. Library version text. Set the OpenMP width. Zero restores the default. Width the next analysis will request. Name of a CHILL label code. Name of a status code. Number of frames in a trajectory path.


Uses

Used by


Variables

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

The call succeeded.

integer(kind=seams_int), public, parameter :: SEAMS_ERR_NULL = 1_seams_int

A required pointer is null.

integer(kind=seams_int), public, parameter :: SEAMS_ERR_RANGE = 2_seams_int

A number is outside the accepted range.

integer(kind=seams_int), public, parameter :: SEAMS_ERR_BOX = 3_seams_int

The cell is missing or has no volume.

integer(kind=seams_int), public, parameter :: SEAMS_ERR_ARG = 4_seams_int

A caller argument is the wrong shape.

integer(kind=seams_int), public, parameter :: SEAMS_ERR_STATE = 5_seams_int

The handle has no frame yet.

integer(kind=seams_int), public, parameter :: SEAMS_ERR_NOMEM = 6_seams_int

An allocation failed.

integer(kind=seams_int), public, parameter :: SEAMS_ERR_INTERNAL = 7_seams_int

The library hit an internal failure.

integer(kind=seams_int), public, parameter :: SEAMS_CHILL_PUBLISHED = 0_seams_int

Published CHILL+ rule. Inclusive c_ij edges.

integer(kind=seams_int), public, parameter :: SEAMS_CHILL_OVITO = 1_seams_int

OVITO CHILL+ rule. Open c_ij edges.

integer(kind=seams_int), public, parameter :: SEAMS_GRAPH_CUTOFF = 0_seams_int

Pairs inside the cutoff.

integer(kind=seams_int), public, parameter :: SEAMS_GRAPH_MUTUAL = 1_seams_int

Mutual four-nearest neighbours.

integer(kind=seams_int), public, parameter :: SEAMS_GRAPH_SEEDED = 2_seams_int

Cage graph of mutual seeds and union completions.

integer(kind=seams_int), public, parameter :: SEAMS_LABEL_CUBIC = 0_seams_int

CHILL cubic ice. Population counts use this index plus one.

integer(kind=seams_int), public, parameter :: SEAMS_LABEL_HEXAGONAL = 1_seams_int

CHILL hexagonal ice.

integer(kind=seams_int), public, parameter :: SEAMS_LABEL_WATER = 2_seams_int

CHILL liquid water.

integer(kind=seams_int), public, parameter :: SEAMS_LABEL_INTERFACIAL = 3_seams_int

CHILL interfacial ice.

integer(kind=seams_int), public, parameter :: SEAMS_LABEL_CLATHRATE = 4_seams_int

CHILL clathrate. The population count is counts(5).

integer(kind=seams_int), public, parameter :: SEAMS_LABEL_INTERCLATHRATE = 5_seams_int

CHILL interfacial clathrate.

integer(kind=seams_int), public, parameter :: SEAMS_LABEL_UNCLASSIFIED = 6_seams_int

CHILL atom that matched no class.

integer(kind=seams_int), public, parameter :: SEAMS_LABEL_RECUBIC = 7_seams_int

CHILL reclassified cubic ice.

integer(kind=seams_int), public, parameter :: SEAMS_LABEL_REHEX = 8_seams_int

CHILL reclassified hexagonal ice.

integer(kind=seams_int), public, parameter :: SEAMS_CAGE_WATER = 0_seams_int

Atom in neither cage.

integer(kind=seams_int), public, parameter :: SEAMS_CAGE_HEX = 1_seams_int

Hexagonal cage only.

integer(kind=seams_int), public, parameter :: SEAMS_CAGE_CUBIC = 2_seams_int

Double-diamond cage only.

integer(kind=seams_int), public, parameter :: SEAMS_CAGE_BOTH = 3_seams_int

Both cages.


Interfaces

public interface assignment(=)

  • private subroutine frame_assign(lhs, rhs)

    Share the C frame. The last finalizer destroys it.

    Arguments

    Type IntentOptional Attributes Name
    type(seams_frame), intent(inout) :: lhs
    type(seams_frame), intent(in) :: rhs
  • private subroutine neighbour_assign(lhs, rhs)

    Share the neighbour list.

    Arguments

    Type IntentOptional Attributes Name
    type(seams_neighbours), intent(inout) :: lhs
    type(seams_neighbours), intent(in) :: rhs
  • private subroutine ring_assign(lhs, rhs)

    Share the ring set and its maximum depth.

    Arguments

    Type IntentOptional Attributes Name
    type(seams_rings), intent(inout) :: lhs
    type(seams_rings), intent(in) :: rhs
  • private subroutine cage_assign(lhs, rhs)

    Share the cage set and the atom count it was built for.

    Arguments

    Type IntentOptional Attributes Name
    type(seams_cages), intent(inout) :: lhs
    type(seams_cages), intent(in) :: rhs
  • private subroutine topo_assign(lhs, rhs)

    Share the fingerprint.

    Arguments

    Type IntentOptional Attributes Name
    type(seams_topo), intent(inout) :: lhs
    type(seams_topo), intent(in) :: rhs
  • private subroutine brine_assign(lhs, rhs)

    Share the brine front.

    Arguments

    Type IntentOptional Attributes Name
    type(seams_brine), intent(inout) :: lhs
    type(seams_brine), intent(in) :: rhs

interface

  • public module function new_frame(stat, errmsg) result(self)

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=seams_int), intent(out), optional :: stat
    character(len=:), intent(out), optional, allocatable :: errmsg

    Return Value type(seams_frame)

interface

  • public module function version_text() result(text)

    Arguments

    None

    Return Value character(len=:), allocatable

interface

  • public module function num_threads() result(n)

    Arguments

    None

    Return Value integer(kind=seams_int)

interface

  • public module function label_name(code) result(text)

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=seams_int), intent(in) :: code

    Return Value character(len=:), allocatable

interface

  • public module function status_text(code) result(text)

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=seams_int), intent(in) :: code

    Return Value character(len=:), allocatable

interface

  • public module function path_nframes(path, stat, errmsg) result(nframes)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: path
    integer(kind=seams_int), intent(out), optional :: stat
    character(len=:), intent(out), optional, allocatable :: errmsg

    Return Value integer(kind=seams_int)

interface

  • public module subroutine set_num_threads(n, stat, errmsg)

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=seams_int), intent(in) :: n
    integer(kind=seams_int), intent(out), optional :: stat
    character(len=:), intent(out), optional, allocatable :: errmsg

Derived Types

type, public ::  seams_frame

One frame. The finalizer frees the C frame.

Finalizations Procedures

final :: frame_final

Type-Bound Procedures

procedure, public :: set_ortho => frame_set_ortho
procedure, public :: set_frame => frame_set_frame
procedure, public :: read => frame_read
procedure, public :: count => frame_count
procedure, public :: close => frame_close
procedure, public :: chill => frame_chill
procedure, public :: chill_plus => frame_chill_plus
procedure, public :: q4q6 => frame_q4q6
procedure, public :: ql => frame_ql
procedure, public :: steinhardt => frame_steinhardt
procedure, public :: q6bar => frame_q6bar
procedure, public :: neighbours => frame_neighbours
procedure, public :: knn => frame_knn
procedure, public :: rings => frame_rings
procedure, public :: cages => frame_cages
procedure, public :: signature => frame_signature
procedure, public :: rdf => frame_rdf
procedure, public :: running_cn => frame_running_cn
procedure, public :: coordination => frame_coordination
procedure, public :: hbonds => frame_hbonds
procedure, public :: density => frame_density
procedure, public :: fingerprint => frame_fingerprint
procedure, public :: contact_pairs => frame_contact_pairs
procedure, public :: domains => frame_domains
procedure, public :: prisms => frame_prisms
procedure, public :: monolayer => frame_monolayer
procedure, public :: site_kinds => frame_site_kinds
procedure, public :: symmetry => frame_symmetry
procedure, public :: brine => frame_brine

type, public ::  seams_neighbours

Cutoff or neighbour graph. offsets and columns allocate copies.

Finalizations Procedures

final :: neighbour_final

Type-Bound Procedures

procedure, public :: count => neighbour_count
procedure, public :: offsets => neighbour_offsets
procedure, public :: columns => neighbour_columns
procedure, public :: close => neighbour_close

type, public ::  seams_rings

Primitive rings. histogram is 0-based: index k is rings of size k.

Finalizations Procedures

final :: ring_final

Type-Bound Procedures

procedure, public :: count => ring_count
procedure, public :: histogram => ring_histogram
procedure, public :: fraction => ring_fraction
procedure, public :: sizes => ring_sizes
procedure, public :: symmetry => ring_symmetry
procedure, public :: vertices => ring_vertices
procedure, public :: close => ring_close

type, public ::  seams_cages

Hexagonal and double-diamond membership.

Finalizations Procedures

final :: cage_final

Type-Bound Procedures

procedure, public :: counts => cage_counts
procedure, public :: labels => cage_labels
procedure, public :: close => cage_close

type, public ::  seams_topo

Topological fingerprint.

Finalizations Procedures

final :: topo_final

Type-Bound Procedures

procedure, public :: key => topo_key
procedure, public :: atom_key => topo_atom_key
procedure, public :: rings => topo_rings
procedure, public :: close => topo_close

type, public ::  seams_brine

Planar ice/brine front.

Finalizations Procedures

final :: brine_final

Type-Bound Procedures

procedure, public :: fronts => brine_fronts
procedure, public :: rejection => brine_rejection
procedure, public :: profile => brine_profile
procedure, public :: pockets => brine_pockets
procedure, public :: close => brine_close