def METHOD_NAME(solver, mol_NaX, mol_NH4):
    # Initial values of the carbonates and mass of water
    m0Calcite = 10.0
    # Define initial equilibrium state
    state = ChemicalState(system)
    state.temperature(25.0, "celsius")
    state.pressure(1, "atm")
    # Seawater
    state.set("H2O" , 1.0, "kg")
    state.set("Na+" , 1.10, "mmol")
    state.set("Mg+2", 0.48, "mmol")
    state.set("Ca+2", 1.90, "mmol")
    state.set("NH4+", mol_NH4, "mmol")
    # Ammonia
    state.set("Calcite", m0Calcite, "mol")
    # Calculate chemical state corresponding to the seawater
    solver.solve(state)
    # Update aqueous properties
    aqprops.update(state)
    pH = aqprops.pH()[0]
    # Exchanger
    state.set("NaX" , mol_NaX, "mol")
    # Equilibrate the seawater with carbonates
    solver.solve(state)
    # Update xchange and aqueous properties
    exprops.update(state)
    aqprops.update(state)
    mCalcite = state.speciesAmount("Calcite")
    return [mol_NH4,
            pH,
            aqprops.ionicStrength()[0],
            state.speciesAmount("Ca+2")[0],
            m0Calcite - mCalcite[0],
            state.speciesAmount("CaX2")[0]]