From 807d1d1a6455632282bc54fe7a46976287bcc9a3 Mon Sep 17 00:00:00 2001 From: Gaspard Jankowiak Date: Tue, 5 Mar 2024 11:13:14 +0100 Subject: [PATCH] comments --- Minimization/PLUV.py | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/Minimization/PLUV.py b/Minimization/PLUV.py index 47cf31a..64bc7bf 100644 --- a/Minimization/PLUV.py +++ b/Minimization/PLUV.py @@ -119,11 +119,13 @@ def water_volume(T) : ######################################################### #@njit(parallel=True) def FTreal_erf(q, mu, d, sig) : + """ FTreal_erf(q, mu, d, sig) """ return np.where(q==0, 1, np.sin(q*d/2.)/(q*d/2.) * np.exp(-(q*sig)**2/2.) * np.cos(q*mu) ) ######################################################### #@njit(parallel=True) def FTreal_gauss(q, mu, sig) : + """ FTreal_gauss(q, mu, sig) """ return np.exp(-(q*sig)**2/2.) * np.cos(q*mu) ######################################################### @@ -275,11 +277,23 @@ class SDP_POPC_RecBuf: self.T, self.V_BW, self.Con] = PAR + # [Example 1], fixed parameters: + # Norm 1e5 # Normalization + # n_TR 0.0 # Tris fraction + # d_TR 1.0 # Tris width (nm) + # s_TR 0.29 # Tris position (nm) + # d_CH 0.90 # CH position (nm) + # s_CH 0.305 # CH width (nm) + # r12 0.81 # V_CH/V_CH2 + # T 37 # Temperature (°C) + + # [example 1] fixed Cw = CONST_p0_Cw + CONST_p1_Cw*self.T + CONST_p2_Cw*self.T**2 + CONST_p3_Cw*self.T**3 xtris = CONST_ctris / Cw # mole fraction of free TRIS in bulk xEDTA = CONST_cEDTA / Cw # mole fraction of free EDTA in bulk # Volumes + # [example 1] fixed self.V_L = lipid_volume(self.T) V_HW = water_volume(self.T) V_HC = self.V_L - ( (1-CONST_x_PG) * CONST_V_HL_PC + CONST_x_PG * CONST_V_HL_PG ) @@ -288,6 +302,7 @@ class SDP_POPC_RecBuf: self.D_C = V_HC / self.A_L # Quasi-molecular volumes + # [example 1] r12 fixed V_CH2 = V_HC / ( CONST_n_CH2 + CONST_n_CH*self.r12 + CONST_n_CH3*self.r32 ) # Volume of CH2 groups V_CH = V_CH2 * self.r12 # Volume of CH groups V_CH3 = V_CH2 * self.r32 # Volume of CH3 groups @@ -296,13 +311,15 @@ class SDP_POPC_RecBuf: self.V_PCN = CONST_V_HL_PC * self.r_PCN # Volume of PCN group self.V_Chol = CONST_V_HL_PC * (1-self.r_PCN-self.r_CG) # Volume of CholCH3 group - V_PG1 = CONST_V_HL_PG * 0.16 # Kucerka 2012 - V_PG2 = CONST_V_HL_PG * ( 1 - 0.51 - 0.16) # Kucerka 2012 + # CONST + CONST_V_PG1 = CONST_V_HL_PG * 0.16 # Kucerka 2012 + CONST_V_PG2 = CONST_V_HL_PG * ( 1 - 0.51 - 0.16) # Kucerka 2012 ############### X-ray scattering lengths (nm) + # [example 1] rho_sol fixed rho_sol = ( CONST_b_HW + xtris*CONST_b_tris + xEDTA*CONST_b_EDTA ) / V_HW - drho_Chol = ( (1-CONST_x_PG)*CONST_b_Chol/self.V_Chol + CONST_x_PG*CONST_b_PG2/V_PG2 ) - rho_sol - drho_PCN = ( (1-CONST_x_PG)*CONST_b_PCN/self.V_PCN + CONST_x_PG*CONST_b_PG1/V_PG1 ) - rho_sol + drho_Chol = ( (1-CONST_x_PG)*CONST_b_Chol/self.V_Chol + CONST_x_PG*CONST_b_PG2/CONST_V_PG2 ) - rho_sol + drho_PCN = ( (1-CONST_x_PG)*CONST_b_PCN/self.V_PCN + CONST_x_PG*CONST_b_PG1/CONST_V_PG1 ) - rho_sol drho_CG = CONST_b_CG / self.V_CG - rho_sol drho_TR = CONST_b_tris/ CONST_V_tris - rho_sol drho_CH = CONST_b_CH / V_CH - rho_sol @@ -321,8 +338,8 @@ class SDP_POPC_RecBuf: c_CH3 = np.zeros(HC_array.shape[0],dtype=float) ############### c-prefactors - c_Chol = ( (1-CONST_x_PG)*self.V_Chol + CONST_x_PG*V_PG2 ) / self.A_L - c_PCN = ( (1-CONST_x_PG)*self.V_PCN + CONST_x_PG*V_PG1 ) / self.A_L + c_Chol = ( (1-CONST_x_PG)*self.V_Chol + CONST_x_PG*CONST_V_PG2 ) / self.A_L + c_PCN = ( (1-CONST_x_PG)*self.V_PCN + CONST_x_PG*CONST_V_PG1 ) / self.A_L c_CG = self.V_CG / self.A_L c_TR = CONST_V_tris*self.n_TR / self.A_L