Models
Elements
NESSie.Element
— Typeabstract 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.
NESSie.Triangle
— Typestruct 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
.
NESSie.Tetrahedron
— Typestruct 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
.
Charge models
NESSie.Charge
— Typestruct 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
.
System models
NESSie.Model
— Typemutable 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).
Test models
NESSie.TestModel.BornIon
— Typestruct 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$.
NESSie.TestModel.bornion
— Functionbornion(name::String, ::Type{Float64} = Float64)
bornion(name::String, ::Type{Float32})
Generator function for built-in Born ions:
Name | Charge | Radius [Åqv90] |
---|---|---|
Li | +1 | 0.645 |
Na | +1 | 1.005 |
K | +1 | 1.365 |
Rb | +1 | 1.505 |
Cs | +1 | 1.715 |
Mg | +2 | 0.615 |
Ca | +2 | 1.015 |
Sr | +2 | 1.195 |
Ba | +2 | 1.385 |
Return type
BornIon
NESSie.TestModel.XieModel
— Typemutable 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.
NESSie.TestModel.NonlocalXieModel1
— Typestruct 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.
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
.