function set_params_std()
% set_params_std

sigma = 0.05;  % %abs(nonzero u/ miu/ dmiudq)

% define foldername
modelfolder = getmodel;
fname = 'Umiu.mat';
fullname = strcat(modelfolder,fname);
load(fullname);

nTypes = length(UqType);

fullname = strcat(modelfolder,'params_std.txt');
fid = fopen(fullname,'w');
for i = 1:nTypes
    u = abs(UqType(i).u);
    if (u > 0), u = sigma*abs(u); end
    miu = UqType(i).miu;
    if isnan(miu), miu = 0; end
    if (abs(miu) > 0), miu = sigma*abs(miu); end
    dm1dq2 = UqType(i).dm1dq2;
    if isnan(dm1dq2), dm1dq2 = 0; end
    if (abs(dm1dq2) > 0), dm1dq2 = sigma*abs(dm1dq2); end
    dm2dq1 = UqType(i).dm2dq1;
    if isnan(dm2dq1), dm2dq1 = 0; end
    if (abs(dm2dq1) > 0), dm2dq1 = sigma*abs(dm2dq1); end
    fprintf(fid,'%9.5f %9.5f %9.5f %9.5f\n', u, miu, dm1dq2, dm2dq1);
end % i
fclose(fid);


% subfunctions ---------------------
function modelfolder = getmodel()
% gets model name in LevInfinite

filename = 'C:\LevInfinite\Config\Molecules.ini';
fid = fopen(filename,'rt');
molfolder = fgetl(fid);
fclose(fid);

filename = 'C:\LevInfinite\Config\ToCalculate.ini';
fid = fopen(filename,'rt');
modelname = fgetl(fid);
fclose(fid);

modelfolder = strcat(molfolder,modelname);
modelfolder = strcat(modelfolder,'\');

