@@ -51,16 +51,15 @@ function ESElectrolyte(solvents,ions;
5151 verbose = false ,
5252 reference_state = nothing )
5353
54- components = deepcopy (ions)
55- prepend! (components,solvents)
56-
54+ raw_components = vcat (solvents,ions)
55+ formatted_components = format_components (raw_components)
5756
5857 if isnothing (charge)
59- charge_params = getparams (components , [" Electrolytes/properties/charges.csv" ]; verbose= verbose)
58+ charge_params = getparams (formatted_components , [" Electrolytes/properties/charges.csv" ]; verbose= verbose)
6059 init_charge = charge_params[" charge" ]. values
6160
6261 elseif charge isa Vector{String}
63- charge_params = getparams (components , [" Electrolytes/properties/charges.csv" ]; userlocations= charge, verbose= verbose)
62+ charge_params = getparams (formatted_components , [" Electrolytes/properties/charges.csv" ]; userlocations= charge, verbose= verbose)
6463 init_charge = charge_params[" charge" ]. values
6564 else
6665 init_charge = charge
@@ -69,20 +68,20 @@ function ESElectrolyte(solvents,ions;
6968 # path0 = default_locations(neutralmodel)
7069 # remove unused datapaths
7170 # neutral_path = joinpath.(DB_PATH,filter(∉(("properties/molarmass.csv","properties/molarmass_groups.csv,properties/critical_csv")),path0))
72- init_idealmodel = init_model (idealmodel,components ,ideal_userlocations,verbose)
71+ init_idealmodel = init_model (idealmodel,raw_components ,ideal_userlocations,verbose)
7372 init_RSP = @initmodel RSPmodel (solvents,ions,userlocations = RSPmodel_userlocations,verbose = verbose)
7473 if has_sites (neutralmodel)
75- init_neutralmodel = neutralmodel (components ;userlocations= neutralmodel_userlocations,verbose,assoc_options)
74+ init_neutralmodel = neutralmodel (raw_components ;userlocations= neutralmodel_userlocations,verbose,assoc_options)
7675 else
77- init_neutralmodel = neutralmodel (components ;userlocations= neutralmodel_userlocations,verbose)
76+ init_neutralmodel = neutralmodel (raw_components ;userlocations= neutralmodel_userlocations,verbose)
7877 end
7978
8079 init_ionmodel = @initmodel ionmodel (solvents,ions;RSPmodel= init_RSP,userlocations= ionmodel_userlocations,verbose= verbose)
8180
82- components = init_neutralmodel. components
81+ # components = init_neutralmodel.components
8382
8483 references = String[]
85- model = ESElectrolyte (components ,init_charge,init_idealmodel,init_neutralmodel,init_ionmodel,references)
84+ model = ESElectrolyte (formatted_components ,init_charge,init_idealmodel,init_neutralmodel,init_ionmodel,references)
8685 set_reference_state! (model,reference_state;verbose)
8786 return model
8887end
0 commit comments