There are a lot of electrolyte models that are salt-based instead of ion-based. Before, we had some problems on that part, but i have some new insights:
- for ion-based models, we don't actually care of the salts (except inside the methods)
- for salt-based models, we don't actually care of the ions (except inside the methods)
- We only care about a correct stoichiometric matrix, that has to have a rank of
nions-1, for salt-based models, we can check that invariant at construction time, for ion-based models, we can construct an arbitrary salt basis of the size we want.
- if we add the electroneutrality constraint to the stoichiometric matrix, we actually have a matrix of size
(nions,nions). Furthermore, neutral components are just diagonal elements, so we can create a matrix of size (nc,nc) that returns a vector of size nc. this matrix can be used to transform between salt-based compositions and ion-based compositions relatively cheaply.
- the neutral model inside an Explicit-solvent model is in Explicit-solvent basis. the neutral model inside a Implicit-solvent model should be in a Implicit-solvent basis
There are a lot of electrolyte models that are salt-based instead of ion-based. Before, we had some problems on that part, but i have some new insights:
nions-1, for salt-based models, we can check that invariant at construction time, for ion-based models, we can construct an arbitrary salt basis of the size we want.(nions,nions). Furthermore, neutral components are just diagonal elements, so we can create a matrix of size(nc,nc)that returns a vector of sizenc. this matrix can be used to transform between salt-based compositions and ion-based compositions relatively cheaply.