% Gender neutral or male specific values, except for female BTW and fat available
% Set sex=1 to access female parameters



SPECIES=1;


% Gompertz BWT Parameters (Luecke 2007)
B1=3.42826;B2=2.188189;B3=1.506303;B5=34.35453;B6=0.179781;B7=0.221175;
B4=2.462428;B8=-0.0911; AGE0=30;
AGE1=2.949004;AGE2=11;AGE3=21.66022;

if(SEX==1)
% set Female BWT Parameters
B1=3.4;B2=2.07402;B3=1.504154;B5=34.8806;B6=0.2120837;B7=0.443786;
B4=2.672665;B8=0.31127;
AGE1=2.949004;AGE2=11;AGE3=21.86533;
end

% Dynamic organ volumes
% VBrC Parameters (Refit Valentine 2002 & Young 2009)
VB6=0;VB5=0;VB4=5.132e-22;VB3=-2.463e-16;VB2=4.354e-11;
VB1=-3.465e-6;VB0=1.216e-1;
% VLC (Refit Valentine 2002 & Young 2009)
VH4=1.701E-22;VH3=-7.393E-17;VH2=1.082E-11;VH1=-6.789E-7;VH0=3.917E-2;  
% VBL (Young 2009)
VBL2=6.54E-13;VBL1=-3.50E-7;VBL0=8.97E-2;
% VFC (Refit, JNS w/ Valentin 2002 & Lafortuna 2005)
VF6=-2.036e-30;VF5=1.203e-24;VF4=-2.718e-19;VF3=2.892e-14;VF2=-1.422e-09;
VF1=2.803e-05;VF0=3.484e-02;
if(SEX==1)
% set Female VFC
VF6=-1.273e-30;VF5=7.249e-25;VF4=-1.558e-19;VF3=1.540e-14;VF2=-6.787e-10;
VF1=1.401e-05;VF0=9.217e-02;
end
% VAC (Fit, JNS w/ Valentin 2002 & Lafortuna 2005 fat/.8)
VA6=-2.353e-30;VA5=1.387e-24;VA4=-3.116e-19;VA3=3.268e-14;VA2=-1.542e-9;VA1=2.617e-05;
VA0=2.044e-01;
% VLC (Young 2009)
VL2=0;VL1=-4.55e-8;VL0=1.86e-2;
% VKC (Young 2009)
VK2=3.33e-13;VK1=-6.69e-8;VK0=7.26e-3;
% VSPC (Young 2009)
VSP2=0;VSP1=-5.57e-9;VSP0=3.12e-3;
% VGIC (Brown 1997, sum of stom and both intestines)
VGI3=0;VGI2=0;VGI1=0;VGI0=0.0165;
% VMC (Refit, JNS w/ Valentin 2002 & Janssen 2000)
VM4=-5.061e-21;VM3=2.052e-15;VM2=-2.865e-10;VM1=1.436e-5;VM0=1.268e-1;
% VSKC (Young 2009)
VSK5=-1.1e-27;VSK4=8.62e-22;VSK3=-2.58e-16;VSK2=3.68e-11;
VSK1=-2.56e-6;VSK0=1.03e-1;


% Constant organ volumes
VBMC=0.021;	  % Brown 1997 (red only, yellow is in adipose)
VPC=0.00148; 	% Young 2009, Brown 1997
VINTC=0.0091;	% Just small intestine (Brown 1997)


% Clear doses
DT=ones(size(DT))*1E6;     	  % Sets all oral dose times to a long time
DORAL=zeros(size(DORAL));	    % Sets all oral dose amounts to zero
DORALO=zeros(size(DORALO));
AMTODOSE=zeros(size(AMTODOSE));	% Sets all oral dose amounts to zero
AMTMDOSE=zeros(size(AMTMDOSE));	% Sets all oral dose amounts to zero
CONCPPM=0.0;
CONCMGM=0.0;

DERM=0.0;
ORALMAL=0.0;
ORALMOX=0.0;

SAF=1.0                        % fraction of total skin surface area exposed
VLIQ=1; 			                 % Volume of dose applied to skin (L)
TSA=20466;			               % Total surface area (SQ CM), human value
TCHNG=5e55;			              % Time to stop dermal exposure


% Blood flows (L/h/kg tissue)
QBRC=30.6;	% Price 2003
QDC=85.2;	% Luecke 2007
QFC=1.45;	% Luecke 2007, Cowles 1971, Price 2003
QHC=50.4;	% Hepatic art, Price 2003
QSC=1.8;	 % Bone marrow, Price 2003
QRC=61.8;	% Adrenal/spleen mean, Luecke 2007
QKC=200;   % Luecke 2007 and Brown 1997
HCT=0.45;

%molecular weights
MWMAL=330.358;     %molecular wt of malathion (g/mol)
MWMOX=314.292;     %molecular wt of malaoxon (g/mol)


%partition coefficients (tissue:blood); from 2007 USEPA malathion lice assessment
%malathion
 PMALF = 10.;    %fat:bloor
 PMALR = 5.2;    %richly perfused:blood
 PMALL = 8.0;    %liver:blood
 PMALK = 4.9;    %kidney:blood
 PMALBR = 12.8;  %brain:blood
 PMALS = 5.0;    %slowly perfused:blood
 PLAIR = 7.6e5;  %lung:air 
 PSKL = 125;     %skin: blood; factor of both blood flow and partitioning
 
  
 %volumes of distribution for metabolite compartments (L)
 V1 = 3.6;      %MCA/DCA
 
%malaoxon
PMOXF = 0.63;      %fat:blood
PMOXR = 1.0;       %richly perfused:blood
PMOXL = 1.17;      %liver:blood
PMOXK = 1.04;      %kidney:blood
PMOXBR = 1.45;     %brain:blood
PMOXS = 1.02;      %slowly perfused: blood


%metabolism parameters
%maximum rates of metabolism (umol/hr/kg tissue)
%malathion detoxification
VMAXMALLC = 34848;                   %liver--CaE; based on in vitro data (Chambers & Meek 2017)
VMAXMALKC = 20909; %VMAXMALLC*0.6;           %kidney CaE--60% of liver, based on Talcott 1979
VMAXMALBLC = 25788; %VMAXMALLC*0.74;         %plasma--CaE(umol/hr/L plasma); CaE--74% of liver, based on Talcott 1979
VMAXMALBRC = 1742; %VMAXMALLC*0.05;         %brain--CaE; 5% of liver, based on Talcott 1979

%malathion oxidation--malathion to oxon
VMAXMALMOXC = 46314;     %liver--CYPs; based on in vitro data (Chambers & Meek 2017)

%oxon detox
VMOXDMPLC = 2000;                       %liver
VMOXDMPPC = 1480; %VMOXDMPLC*0.74;             %plasma
VMOXDMPBC = 100;  %VMOXDMPLC*0.05;             %brain
VMOXDMPKC = 1200; %VMOXDMPLC*0.60;             %kidney

%affinity constants (umol/L)
%malathion detoxification
KMMALL = 0.492;         %liver--CaE
KMMALK = 0.492;         %kidney--CaE
KMMALBL = 0.492;        %plasma--CaE
KMMALBR = 0.492;        %brain--CaE


%malathion oxidation--malathion to oxon
KMMALMOX = 2320;       %liver--CYPs; based on in vitro data (Chambers & Meek 2017)

%oxon detox
KMOXDMPL = 0.5;         %liver
KMOXDMPP = 0.5;         %plasma
KMOXDMPB = 0.5;         %brain
KMOXDMPK = 0.5;         %kidney
KI = 0.56;              %dissociation constant; from Krstic et al 2008 for AChE/malaoxon


%uptake parameters
%malathion
KAS=1.2;  		 %transfer stomach to liver (/h)
KSI=0.2;	     %transfer stomach to intestine (/h)
KAI=0.2;       %transfer intestine to liver (/h)
FA=1;          %Fractional oral Absorption
KMUC = 0.02;   %rate constant for swallowing part of an inhaled dose (/h)
FRACIN=0.047;  %fraction to deep lung

%oxon
KASO=1.5;		 %transfer stomach to liver (/h)
KSIO=0.3;	   %transfer stomach to intestine (/h)
KAIO=0.4;     %transfer intestine to liver (/h)
FAO=1;        %Fractional oral Absorption

%dermal
KPL=2.35e-06;   % permeability coefficient (cm/h); Bogen & Singhal 2017
FAD=1;         % FRACTIONAL DERMAL ABSORPTION 
%SA=100;				% Surface area exposed dermally (SQ CM)

%elimination rate constants for metabolite compartments (/h)
KE1 = 0.2; %MCA/DCA

%pharmacodynamic parameters

% AChE activity (umol/hr/kg tissue) 
BACHE=4.40e5;		 %brain; Maxwell 1987
BLACHE=1.0e-99;    %plasma; Timchalk 2002
DACHE=7.74e4;     %diaphragm; Maxwell 1987
HACHE=1.02e4;     %liver; Maxwell 1987
RBCHE=4.27e4;		 %RBCs; Timchalk 2002
KACHE=5.4e3;      %AChE; Maxwell 1987

% BuChE activity (umol/hr/kg tissue) 
BBUCE=4.68e4;		%brain; Maxwell 1987
DBUCE=2.64e4;    %diaphragm; Maxwell 1987
HBUCE=3.0e4;     %liver; Maxwell 1987
BLBUCE=2.63e5;	 %plasma; Timchalk 2002
KBUCE=1.02e4;    %kidney; Maxwell 1987

% CaE activity (umol/hr/kg tissue) 
BRCE=2.88e5;	 %brain; Timchalk 2002
DACE=3.18e5;   %diaphragm; Maxwell 1987
HECE=1.27e6;	 %liver; Timchalk 2002
PLOCE=1.0e-99;	 %plasma; Timchalk 2002
KECE=1.79e6;   %kidney CaE; Maxwell 1987


% Degradation of esterase (1/h)--Timchalk et al 2002
KDBBE=0.0024;                %BuChE (brain)
KDBCE=0.01;                  %AChE (brain)  
KDBCR=0.000754;              %CaE (brain)
KDBLBE=0.0024;               %BuChE (blood/plasma)
KDBLCE=0.01;                 %AChE (blood/plasma)
KDBLCR=0.001;                %CaE (blood/plasma)
KDDBE=0.0024;                %BuChE (diaphragm)
KDDCE=0.01;	                %AChE (diaphragm)
KDDCR=0.001;                 %CaE (diaphragm)
KDHBE=0.0024;                %BuChE (liver)
KDHCE=0.01;		              %AChE (liver)
KDHCR=0.001;                 %CaE (liver)
KDRBCE=0.01;                 %AChE (RBC)
KDKBE=0.0024;                %BuChE (kidney)
KDKCE=0.01;	                %AChE (kidney)
KDKCR=0.001;                 %CaE (kidney)


% Esterase aging rates (1/h)--chemical-specific.   
% AChE aging rate from Mason et al 2000 (human RBC AChE for dimethoxy OPs)
% BuChE aging rate from Mason et al 2000 (human plasma BuChE for dimethoxy OPs)
% CaE set to zero
KABBE=0.116;              %BuChE (brain)
KABCE=0.022;              %AChE (brain)
KABCR=0.00;               %CaE (brain)
KABLBE=0.116;             %BuChE (blood/plasma)
KABLCE=0.022;             %AChE (blood/plasma)
KABLCR=0.00;              %CaE (blood/plasma)
KAHBE=0.116;              %BuChE (liver)
KAHCE=0.022;              %AChE (liver)
KAHCR=0.00;               %CaE (liver)
KARBCE=0.022;             %AChE (RBC)
KAKBE=0.116;              %BuChE (kidney)
KAKCE=0.022;              %AChE (kidney)
KAKCR=0.00;               %CaE (kidney)


% Inhibition of esterase (L/umol/h)--chemical-specific. 
% AChE from Herzsprung 1992 for bovine RBC AChE
% BuChE from Herzsprung 1992 for human plasma BuChE
% CaE from Hassan 1968 and Main & Dautermann 1967 for rat liver CaE 
KIBBE=1.26;                   %BuChE (brain)
KIBCE=16.2;                   %AChE (brain)
KIBCR=1.02;                   %CaE (brain)--from Hassan 1968
KIBLBE=1.26;                  %BuChE (blood/plasma)
KIBLCE=16.2;                  %AChE (blood/plasma)
KIBLCR=1.02;                  %CaE (blood/plasma)
KIHBE=1.26;                   %BuChE (liver)
KIHCE=16.2;                   %AChE (liver)
KIHCR=1.02;                   %CaE (liver)
KIRBCE=16.2;                  %AChE (RBCs)
KIKBE=1.26;                   %BuChE (kidney)
KIKCE=16.2;                   %AChE (kidney)
KIKCR=1.02;                    %CaE (kidney)

% Reactivation of esterase (1/h)--chemical specific 
% AChE reactivation rate from Mason et al 2000 (human RBC AChE for dimethoxy OPs)
% BuChE reactivation rate from Mason et al 2000 (human plasma BuChE for dimethoxy OPs)
% CaE set to same value as AChE
KRBBE=0.03;                %BuChE (brain)
KRBCE=0.018;               %AChE (brain)
KRBCR=0.018;               %CaE (brain)
KRBLBE=0.03;               %BuChE (blood/plasma)
KRBLCE=0.018;              %AChE (blood/plasma)
KRBLCR=0.018;              %CaE (blood/plasma)
KRHBE=0.03;                %BuChE (liver)
KRHCE=0.018;               %AChE (liver)
KRHCR=0.018;               %CaE (liver)
KRRBCE=0.018;              %AChE (RBCs)
KRKBE=0.03;                %BuChE (kidney)
KRKCE=0.018;               %AChE (kidney)
KRKCR=0.018;               %CaE (kidney)


% Enzyme turnover rate (substrate hydrolysis/h/active site) (Maxwell 1987)
TRCE=1.17e7;      %AChE
TRCR=1.086e5;     %CaE
TRBE=3.66e6;      %BuChE

% turn off all model variability terms
VMLV=0.0;
VMBLV=0.0;
VMHCPV=0.0;
VMHHCOV=0.0;
VINTTV=0.0;
VINTOV=0.0;
KIRBCEV=0.0;
QHCV=0.0;
HCTV=0.0;
HECEV=0.0;
KRHCRV=0.0;
KRRBCEV=0.0;
VHCV=0.0;
KSIV=0.0;
KDRBCEV=0;
FATVAR=0.;
VBLV=0.0;
VHCV=0.0;


% Timing/Integration
MAXT=0.001;       %maximum time step
MINT=1.0e-4;      %minimum time step
REPTM=1.0e6;
IALG=2;		     % Integration algorithm--Gear
POINTS=1000;


prepare @clear @all
