add negative water check
This commit is contained in:
parent
35090dedcd
commit
32e6a23e65
1 changed files with 6 additions and 9 deletions
15
PLUV.jl
15
PLUV.jl
|
@ -285,7 +285,10 @@ function intensity(P::AbstractArray{Float64}, q)
|
||||||
I = vec(sum(Am .^ 2 .* Normal'; dims=2)) * integration_step
|
I = vec(sum(Am .^ 2 .* Normal'; dims=2)) * integration_step
|
||||||
|
|
||||||
alp = Rm / (Z + 1)
|
alp = Rm / (Z + 1)
|
||||||
return @. (Norm * nv * 1e-6) * I * (16 * pi^2 * mu4(q, Z, alp)) + Con * (0.99 * (1.0 / (1 + exp(-8 * (q - 1.0)))) + 0.01)
|
|
||||||
|
neg_H20 = negative_water(P)
|
||||||
|
|
||||||
|
return @. ((Norm * nv * 1e-6) * I * (16 * pi^2 * mu4(q, Z, alp)) + Con * (0.99 * (1.0 / (1 + exp(-8 * (q - 1.0)))) + 0.01), neg_H20)
|
||||||
end
|
end
|
||||||
|
|
||||||
##################
|
##################
|
||||||
|
@ -310,7 +313,6 @@ function negative_water(P::AbstractArray{Float64})
|
||||||
V_PCN = CONST_V_HL_PC * r_PCN # Volume of PCN group
|
V_PCN = CONST_V_HL_PC * r_PCN # Volume of PCN group
|
||||||
V_Chol = CONST_V_HL_PC * (1 - r_PCN - r_CG) # Volume of CholCH3 group
|
V_Chol = CONST_V_HL_PC * (1 - r_PCN - r_CG) # Volume of CholCH3 group
|
||||||
|
|
||||||
check = 0
|
|
||||||
z_array = range(0.0, 4.0, length=81)
|
z_array = range(0.0, 4.0, length=81)
|
||||||
|
|
||||||
CG = Gauss.(z_array, V_CG, D_C + d_CG / 2.0, s_CG, A_L)
|
CG = Gauss.(z_array, V_CG, D_C + d_CG / 2.0, s_CG, A_L)
|
||||||
|
@ -319,13 +321,8 @@ function negative_water(P::AbstractArray{Float64})
|
||||||
TRIS = Gauss.(z_array, n_TR * CONST_V_tris, D_C + d_TR / 2.0, s_TR, A_L)
|
TRIS = Gauss.(z_array, n_TR * CONST_V_tris, D_C + d_TR / 2.0, s_TR, A_L)
|
||||||
BW = Slab.(z_array, D_C + (d_CG + d_PCN + d_Chol + CONST_d_shl) / 2.0, d_CG + d_PCN + d_Chol + CONST_d_shl, s_CH2) - CG - PCN - Chol - TRIS
|
BW = Slab.(z_array, D_C + (d_CG + d_PCN + d_Chol + CONST_d_shl) / 2.0, d_CG + d_PCN + d_Chol + CONST_d_shl, s_CH2) - CG - PCN - Chol - TRIS
|
||||||
|
|
||||||
for i in (BW)
|
# return the number of points where BW < -1e-3
|
||||||
if i < -1e-3
|
return count(<(-1e-3), BW)
|
||||||
check += 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return check
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function get_free_parameters_idx(metadata::Dict)
|
function get_free_parameters_idx(metadata::Dict)
|
||||||
|
|
Loading…
Reference in a new issue