Models

Elements

NESSie.ElementType
abstract type Element{T <: AbstractFloat} end
abstract type SurfaceElement{T} <: Element{T} end
abstract type VolumeElement{T}  <: Element{T} end

Abstract base types for all elements.

source
NESSie.TriangleType
struct Triangle{T} <: SurfaceElement{T}
    v1      ::Vector{T}   # position of the first node
    v2      ::Vector{T}   # position of the second node
    v3      ::Vector{T}   # position of the third node
    center  ::Vector{T}   # centroid of the triangle
    normal  ::Vector{T}   # normal vector of the triangle
    area    ::T           # area of the triangle
    distorig::T           # distance to the origin
end

Representation of a single surface triangle.

Special constructors

Triangle(
    v1  ::Vector{T},
    v2  ::Vector{T},
    v3  ::Vector{T}
)

Most commonly used constructor variant for creating a triangle by only specifying its nodes. The remaining member variables will automatically be computed via props.

source
NESSie.TetrahedronType
struct Tetrahedron{T} <: VolumeElement{T}
    v1::Vector{T}       # position of the first node
    v2::Vector{T}       # position of the second node
    v3::Vector{T}       # position of the third node
    v4::Vector{T}       # position of the fourth node
    domain::Symbol      # element domain (solvent :Σ, solute :Ω, or :none)
end

Representation of a single tetrahedron.

Special constructors

Tetrahedron(
    v1::Vector{T},
    v2::Vector{T},
    v3::Vector{T},
    v4::Vector{T}
)

Sets domain to :none.

source

Charge models

NESSie.ChargeType
struct Charge{T <: AbstractFloat}
    pos::Vector{T}  # position of the charge
    val::T          # charge value
end

Representation of a single point charge.

Special constructors

Charge(
    posx::T,
    posy::T,
    posz::T,
    val ::T
)

Constructor variant with flat argument list for pos.

source

System models

NESSie.ModelType
mutable struct Model{T, E <: Element{T}}
    nodes   ::Vector{Vector{T}  = Vector{T}[]    # mesh nodes
    elements::Vector{E}         = E[]            # mesh elements
    charges ::Vector{Charge{T}} = Charge{T}[]    # point charges in the molecule
    params  ::Option{T}         = defaultopt(T)  # system constants
end

System model representing a biomelecule in solvation, including a collection of point charges in the molecule and a set of system constants. The system can either be represented as a surface model (e.g., a collection of molecule surface triangles) or as a volume model (e.g., a collection of tetrahedra for the molecule and its surrounding space).

source

Test models

NESSie.TestModel.BornIonType
struct BornIon{T <: AbstractFloat}
    charge::Charge{T}  # point charge at the sphere's center
    radius::T          # sphere radius in Å
end

Single Born ion, that is, a monoatomic ion represented as a spherically symmetric domain with a single point charge located at its center ($ε_Ω = 1$).

Special constructors

BornIon(charge::T, radius::T)

Centers the sphere at $(0, 0, 0)^T$.

source
NESSie.TestModel.bornionFunction
bornion(name::String, ::Type{Float64} = Float64)
bornion(name::String, ::Type{Float32})

Generator function for built-in Born ions:

NameChargeRadius [Åqv90]
Li+10.645
Na+11.005
K+11.365
Rb+11.505
Cs+11.715
Mg+20.615
Ca+21.015
Sr+21.195
Ba+21.385

Return type

BornIon

source
NESSie.TestModel.XieModelType
mutable struct XieModel{T}
    radius ::T                                 # radius of the origin-centered sphere
    charges::Vector{Charge{T}}                 # point charges in the sphere
    params ::Option{T}         = defaultopt(T) # system constants
end

System model of a dielectric sphere containing multiple point charges. On construction, the given point charge model will be translated and rescaled to fit inside an origin-centered sphere with the specified radius.

Special contructors

XieModel(
    radius ::T,
    charges::Vector{Charge{T}},
    params ::Option{T}          = defaultopt(T);
    # kwargs
    compat ::Bool               = false
)

compat enables the compatibility mode and scales the model exactly like the reference implementation ([Xie16]). Use this flag if you intend to compare the results to the reference.

source
NESSie.TestModel.NonlocalXieModel1Type
struct NonlocalXieModel1{T}
    radius ::T                 # radius of the origin-centered sphere
    charges::Vector{Charge{T}} # point charges in the sphere
    params ::Option{T}         # system constants
    len    ::Int               # number of terms to be computed
    A₁     ::Array{T, 2}       # coefficients A₁ for each charge
    A₂     ::Array{T, 2}       # coefficients A₂ for each charge
    A₃     ::Array{T, 2}       # coefficients A₃ for each charge
end

Representation of the first nonlocal Poisson dielectric model described in [Xie16]. This model comprises a full XieModel and the coefficients $A_{in}$ with $i = 1, 2, 3$ (cf. Eqs. (20a-c)) for each point charge in the model, which are used in the computation of the electrostatic potentials.

Note

This type does not provide a trivial constructor.

Constructor

NonlocalXieModel1(
    model::XieModel{T},
    len  ::Int
)

The model is created solely from the given XieModel and the number of terms to be used to approximate the original infinite sum (Eq. 18). The coefficient vectors are computed automatically via coefficients.

source