text:
Solubility Product and Buffers

The ionization constant of benzoic acid is $6.46 \times 10^{-5}$ and solubility product for silver benzoate is $2.5 \times 10^{-13}$. How many times silver benzoate is more soluble in a buffer of $\mathrm{pH}$ 3.19 compared to its solubility in pure water?

Equation used to calculate solubility of silver benzoate in water:
$$\ce{C6H5COOAg <=> C6H5COO- + Ag+}$$
I've calculated the solubility of silver benzoate in water , it is $5 \times 10^{-7} \pu{mol/L}$ (since that is all I calculated, this is the only equilibrium equation I know).
But I cannot understand what to do next.

Ok, the answer is in three parts. Let's use $B^-$ to represent the benzoate anion.
(1) Solubility of Silver Benzoate in pure Water
$\ce{AgB_{(s)} <-> Ag+_{(aq)} + B^−_{(aq)}} \quad\quad K_{sp} = 2.5 * 10^{-13}$
thus:
$\ce{[Ag^+] [B^-]} = 2.5 * 10^{-13}$
assume $\ce{[Ag^+] = [B^{-}]}$ then
$[Ag^+] = [B^-] = \sqrt{2.5 * 10^{-13}} \text{m/l}  = 5.0 * 10^{-7} \text{m/l}$
!! Check !!

We want to check if $\ce{[B^{-}] >> [HB]}$ so that $[B^{−}_{(aq)}] + [HB_{(aq)}] \approx 5.0 * 10^{-7}$ and that the pH will stay at 7.
We know that:
(a) $\ce{HB_{(aq)} <-> H^{+}_{(aq)} + B−_{(aq)}}$
(b) $\frac{[H+][B−]}{[HB]}=K_a=6.46∗10−5$
(c) pH for pure water is 7
So rearrange (b) and plug in our assumptions
$ [HB] = \dfrac{[H+][B−]}{6.46∗10^{−5}} =  \dfrac{(1*10^{-7})(5.0*10^{-7})}{6.46∗10^{−5}} = 7.7 * 10^{-10}$
Since $7.7 * 10^{-10} << 5.0 * 10^{-7} $ we can safely ignore protonation of $\ce{B^-}$ to $\ce{HB}$.

(2)Solubility of Silver Benzoate in a buffer of pH 3.19
(a) $\frac{[H+][B−]}{[HB]}=K_a=6.46∗10^{−5}$
(b) pH for buffer is 3.19 therefore $\ce{[H^+]}$ = 6.45 * $10^{-4}$
(c) $\ce{AgB_{(s)} <-> Ag+_{(aq)} + B^−_{(aq)}} \quad\quad K_{sp} = 2.5 * 10^{-13}$
So rearrange (a) and plug in $\ce{[H^+]}$
$\dfrac{[B−]}{[HB]}= \dfrac{6.46∗10^{−5}}{6.45 * 10^{-4}} = 0.10 $
Thus in this acid solution we must consider the protonation of $\ce{B^{-}}$ to $\ce{HB}$ when solving for the solubility of silver benzoate.
so we another equation.
(d) $\ce{AgB_{(s)} <-> Ag+_{(aq)} + B^{−}_{(aq)} + HB_{(aq)}}$
but we know that $\ce{[Ag+_{(aq)}] = [B^{−}_{(aq)}] + [HB_{(aq)}] = [B^{−}_{(aq)}] (1 + $\dfrac{\ce{[HB_{(aq)}]}}{\ce{[B^{−}_{(aq)}]}}$) = 11 [B^{−}_{(aq)}]}$
so from (c) we get:
$\ce{11[B^{−}]^2} = 2.5 * 10^{-13}$
$\ce{[B^{−}]}^2 = \dfrac{2.5 * 10^{-13}}{11} = 2.27 * 10^{-14}$
$\ce{[B^{−}]} = 1.51 * 10^{-7}$
and thus
$\ce{[HB]} = 10 \ce{[B^{−}]} = 1.51 * 10^{-6}$
$\ce{[Ag^+]} = 11 \ce{[B^{-}]} = 11 * 1.51 * 10^{-7} = 1.66 * 10^{-6}$
!! CHECK !!

$[\ce{HB}] + \ce{[B^{-}]} = 1.51 * 10^{-6} + 1.51 * 10^{-7} = 1.66 * 10^{-6}$
$[\ce{Ag^+}] [\ce{B^{-}}] = (1.66 * 10^{-6})(1.51 * 10^{-7}) = 2.51 * 10^{-13}$

(3) Ratio of Solubilities of Silver Benzoate
$\text{Ratio} = \dfrac{\text{solubility in buffer}}{\text{solubility in water}} = \dfrac{1.66 * 10^{-6}}{5.0 * 10^{-7}} = 3.3 $

Great ! But why would I want to check if [B-] >> [HB] ? And , in both the cases , why would I want to add the concentrations of [B-] and [HB] ? Aren't they two different things ?

In the first solution in pure water you want to check for the protonation of B− to HB. That would cause more silver benzoate to dissolve as it does in the buffer solution. There is "some" HB in pure water but the quantity is minuscule to the B- species.

Re adding [B-] and [HB] - There were no B species in solution before the solid sodium benzoate was added. So $\ce{[Ag^{+}]  =  [B^{-}] + [HB]}$. in other words all the B species had to come from silver benzoate that dissolved.

So we are adding them because both of them are B species. And in the first case as [HB] is negligible , the concentration of [B-] + [HB] is considered to be the concentration of [B-] alone , but in the second case , as [HB] is not negligible , we have to consider it in the total concentration [B-] + [HB]...Right ?

Yes. Both [B−] and [HB] are "b species" which were from silver benzoate.

Also , will the reaction between B- and H2O look like this : B- + H2O <--> HB + OH- ?

Yes. In the pure water system if there had been significant protonation the pH would have risen. In the buffer solution the pH is nailed to the wall.

In fact its "as easy as pie". But I know its always easy to think about things like it was an evidence. I will give my approach to solve this kind of problems. Obviously you can do the same with complexation, liquid/liquid extraction and so on.
Fisrt you have $$\ce{BzOAg}\leftrightharpoons \ce{BzO^-}+\ce{Ag^+} \text{ with the constant }\ce{K_s}$$
But you also have a second possible reaction which is $$\ce{BzO^-}+\ce{H_2O}\leftrightharpoons \ce{BzOH}+\ce{HO^-} \text{ with the constante }\ce{K_b}$$
You know that $$\ce{K_s}=[\ce{Ag^+}]_i[\ce{BzO^-}]_i$$
At any time $[\ce{Ag^+}]_i=[\ce{Ag^+}]$ and
$$\begin{align}[\ce{BzO^-}]_i&=[\ce{BzOH}]+[\ce{BzO^-}]\\&=[\ce{BzO^-}]\left(1+\frac{[\ce{H_3O^+}]}{\ce{K_a}}\right)\end{align}$$
Then you have $$\ce{s^2}=\ce{K_s}\times \left(1+\frac{[\ce{H_3O^+}]}{\ce{K_a}}\right)$$
Now you also know that $[\ce{H_3O^+}]=\ce{10^{-pH}}$ you have:
$$\ce{s}=\sqrt{\ce{K_s}\times\left(1+\frac{10^{-pH}}{\ce{K_a}}\right)}$$
I hope it will help you. Ask me if you have questions. Have a nice day.
Friendly

Thanks ! I have 2 questions , the answers of which will for sure solve my problem. 1)What is [Ag+]i and [BzO-]i ? 2)For the expression of [BzO-]i , why have you added [BzOH] and [BzO-] ?

They are the initial quantity. And for the second question it is because we need to take all the species containing BzO- :)

Just for clarification , BzO- is benozate ion , right ?

Yes of course ;)

$$\ce{s^2}=\ce{K_s}\times \left(1+\frac{[\ce{H_3O^+}]}{\ce{K_a}}\right)$$, how did you get this?

As ion benzoate is a base in the couple $\ce{C6H5COOH /C6H5COO- }$, we can write
$$s=\ce{[Ag+] =[C6H5COO- ] + [C6H5COOH ]}$$
$$s=\ce{[Ag+] =[C6H5COO- ] (1+\frac{[C6H5COOH ]}{[C6H5COO- ] })}$$
$$s=\ce{[Ag+] =[C6H5COO- ]} (1+\frac{[\ce{H3O+} ]}{K_\mathrm{a} })$$
On the other hand,$$K_\mathrm{sp}=\ce{[Ag+] \times [C6H5COO- ]} $$
$$K_\mathrm{sp}=\frac{s^2}{(1+\frac{[\ce{H3O+} ]}{K_\mathrm{a} })} $$
$$s=\sqrt{K_\mathrm{sp}} \times \sqrt{{(1+\frac{[\ce{H3O+} ]}{K_\mathrm{a} })}} $$
So, the solubility in the acidic buffer solution is increased by the factor:$\sqrt{1+\frac{[\ce{H3O+} ]}{K_\mathrm{a} }}$

Why have you added the concentrations of Benzoate Ion and Benzoic acid in your expression for 's' ?

Of course, when bonzoate ion is in aqueous solution, it reacts with water to form its conjugated acid. This reaction is not quantitative. It's  an equilibrium. So, the initial concentration of bonzoate ion, i.e. (s) becomes the sum of the remaining concentration of bonzoate ion and the concentration of the formed benzoic acid. This equation is also known under the name: conservation of matter (benzoic ion here).


text:
Which bond angle will be larger in a compound like CH2X2?
Just thought of a certain situation.Say for example in a compound like difluoromethane $\ce{CH2F2}$ or $\ce{CH2Cl2}$ obviously the tetrahedral structure will be distorted.
But my question is which bond angle will be larger: the angle between halogen-halogen, halogen-hydrogen or hydrogen-hydrogen? Why?

Hint: Think in terms of electronegativity of the atoms.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Are adamantane crystals covalently bonded?
I'm writing a report and need one thing clarified after reading the Wikipedia article on adamantane:
'All the above methods yield adamantane in the form of polycrystalline powder. Using this powder, single crystals can be grown from the melt, solution or vapor phase (e.g. with the Bridgman–Stockbarger technique). Melt growth result in the worst crystalline quality with a mosaic spread in the X-ray reflection of about 1°. Best crystals are obtained from the liquid phase, but the growth is inpracticably slow – several months for a 5–10 mm crystal. Growth from the vapor phase is a reasonable compromise in terms of speed and quality.[2] Adamantane is sublimated in a quartz tube placed in a furnace, which is equipped with several heaters maintaining a certain temperature gradient (about 10 °C/cm for adamantane) along the tube. Crystallization starts at one end of the tube which is kept near the freezing point of adamantane. Slow cooling of the tube, while maintaining the temperature gradient, gradually shifts the melting zone (rate ~2 mm/hour) producing a single-crystal boule.[16]
Would I be write in thinking that these crystals are not randomly shaped diamond structures you would get if the adamantanes covalently fused with eachother? In other words, are the crystals formed from polycrystalline adamantanes (with different numbers of basic ten carbon adamantanes in one derivative crystal) bonding together without covalent bonds? Or perhaps without many covalent bonds? For example, one C-C bond between two crystals? What other type of bonding could be at work here? Is the macro-crystal structurally weak as a result?

Adamantane is a molecular compound, much like naphthalene, paraffin, and many, many others. Molecular compounds consist of molecules, which stay pretty much the same in the gas and solid states. A molecule has certain molecular formula. Each carbon in a molecule is linked to a certain number of hydrogens and other carbons. There are no dangling covalent bonds to be formed between molecules, let alone between crystals. Consequently, you can't just take some adamantanes and covalently fuse them; some people would discuss diamond crystal structure in such terms, but only in a metaphorical sense.
Adamantane molecules in a crystal (being non-polar molecules without any specific interactions) are held together only by the weak van der Waals forces. Because of that, yes, the crystal is not mechanically strong at all (again, think of paraffin wax).

I did mean it in a metaphorical sense! But thanks, you've confirmed my suspicion.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Ratios and mass; reaction calculation problem
I have come across the following problem:

One method used to inflate air bags in cars is to use nitrogen produced chemically from the decomposition of sodium azide. The sodium formed reacts with potassium nitrate to give more nitrogen.
$$\ce{2NaN3(s) -> 2Na(s) + 3N2(g)}$$
$$\ce{10Na(s) + 2KNO3(s) -> K2O(s) + 5Na2O(s) + N2(g)}$$
a) In what ratio by mass must the sodium azide and potassium nitrate be mixed in order that no metallic sodium remains after the reaction?
b) Calculate the total mass of the solid mixture needed to inflate a $60.0\ \mathrm{dm^3}$ air bag at room temperature and atmospheric pressure.

I have a solution to part a), which is 1:0.311, but this differs from the given answer (1:3.11). Here is my solution:
For every 10 moles of $\ce{NaN3}$, 2 moles of $\ce{KNO3}$ is needed i.e. ratio in moles is 5:1. Mass of $5\ \mathrm{mol}$ of $\ce{NaN3}$ is $5 \times 65.0 = 325$ and mass of 1 mol of $\ce{KNO3}$ is 101.1. So, ratio = 325:101.1 = 1:0.311. Is this incorrect?
I also have a solution to part b), but again this differs from the given answer $(40.9\ \mathrm g)$. Here is my solution:
Using ideal gas law to find how many moles of $\ce{N2}$ needed to inflate air bag: $n=\frac{PV}{RT}=\frac{101000\times 0.06}{8.31\times293}=2.49\ \mathrm{mol}$ If the first equation is rewritten as $\ce{10NaN3(s) -> 10Na(s) + 15N2(g)}$, then there are $\frac{15}{16}\times2.49=2.33$ moles of $\ce{N2}$ from the decomposition of sodium azide, and $\frac{1}{16}\times2.19=0.156$ moles of $\ce{N2}$ from the second reaction. Using these values gives $101\ \mathrm g$ of $\ce{NaN3}$ and $31.5\ \mathrm g$ of $\ce{KNO3}$, which clearly does not give the answer. What's incorrect here?

I suspect you're using the wrong gas equation. There is a much simpler one relating the number of moles of a gas directly to the volume.

@Beerhunter, I assume your referring to the fact that 1 mole of gas always has a volume of 24 decimetres cubed at rtp, but this gives the same value as mine for the number of moles of nitrogen .


text:
How is the Activation Energy of the Arrhenius equation related to the exponents in rate laws?
I know that activation energy for a particular reaction does not depend on the stoichiometry of the reaction.But how can that be justified from Arrhenius Equation ?Doesnt 'k' change with stoichiometry?Or am I going wrong?
Because we know that in all the kinetics equations, when  the reaction stoichiometry changes the rate constant in the equations have to be altered accordingly.

Rate Law
For the reaction:
$\ce{aA + bB -> cP}$
The rate law is as follows:
$R = k[A]^x[B]^y$
where:

$a$,$b$,and $c$ are stoichiometric constants which have integer values
   $[A]$ is the concentration of species A
   $x$ is the order with respect to species A
   $[B]$ is the concentration of species B
   $y$ is the order with respect to species B
   $k$ is the rate constant.

(1) Neither $x$ nor $y$ depend on $a$, $b$, or $c$.
(2) Neither $x$ nor $y$ is required to be an integer value.
(3) k is measured for a specific temperature. The Arrhenius Equation would predict how k would change with temperature. So k does not depend on any of $x$, $y$, $a$, $b$, or $c$.
Say the reaction was for some sort of gas reaction. I now add a catalyst. I get a new rate:
$R_2 = k_2[A]^{x_2}[B]^{y_2}$
There isn't any way to use the first rate equation to predict what the second rate equation will be. (You could of course try to analyze the function of the catalyst to make predictions on what the best catalyst would be...)

There is a way to think about the problem that will give you an intuition about the key relationships and why they are the way they are. Think about the individual molecular interactions that have to occur for a reaction to happen.
For example, consider some reaction where two molecules have to bang together to cause some chemical change. In many reactions they have to bang together with enough energy for the reaction to actually occur. This is the reason there is an activation energy. Too little energy in the collision and there isn't enough to initiate the chemical change (perhaps a bond needs to be stretched or a repulsive barrier has to be overcome). From this perspective it is easy to see that the activation energy doesn't depend on the concentration.
But the concentration of the molecules does influence the probability that a collision will occur. If there are a lot more of the relevant molecules around, collisions are far more likely and the rate of the reaction will be faster. But concentration doesn't influence the barrier to the reaction for individual collisions.
The high level equations for rates of reaction are, essentially, an embodiment of these ideas. But thinking one molecular collision at a time will give you the correct intuition about the factors that matter in the equation and how they interact.


text:
Can the compounds NOF3 and POF3 both exist?Why?
Today I came across a question (in one of my books) like

Can the compounds $\ce{NOF3}$ and $\ce{POF3}$ both exist? Why?

After some googling I found that both of them do indeed exist. I can understand that $\ce{P}$ can extend its octet due to empty d orbitals. But $\ce{N}$ can't do so. So how can it possibly exist?

Think of $\ce{HNO3}$; it should be pretty much the same.

@IvanNeretin is it because of a coordinate covalent bond?

I am not getting.Moreover say NCl5 does not exist.

Well, yes, you may think of it as a coordinate bond $\ce{N-O}$, or a structure with charges like $\ce{N+-O-}$, which is the same. It's been discussed before, maybe a dozen times. http://chemistry.stackexchange.com/questions/7174/the-lewis-structure-of-hno3

$\ce{P}$ cannot extend its octet either; the d-orbitals are too far removed in energy. In fact, the creation process of both from atoms is identical.

Note that $\ce{NCl5}$ does not exist because $\ce{N-Cl}$ bonds are polarised towards nitrogen as can be shown experimentally for $\ce{NCl3}$.

Both molecules can be considered the acid (hydrate) trifluoride of the respective acid (phosphoric acid or nitric acid). In the case of phosphoric acid, this is immediately obvious: Just replace the three hydroxide groups with a fluorine atom, each. For the nitrogen compound, you initially need to (formally) add water before you can do the substitution:
$$\ce{O=N+(OH)-O- + H2O -> [(HO)3-N+-O- ] -> F3N+-O-}$$
(Note: this is not a proper chemical reaction, merely an illustration of the thought processes.)
You could also approach this compound from the ammonium cation $\ce{NH4+}$ by replacing three hydrogen atoms with fluorine and the fourth with oxygen. Or you start off with $\ce{NF3}$ (isoelectronic to $\ce{PF3}$ and then oxidise the nitrogen by adding a single oxygen atom much in the same way you would oxidise from $\ce{HNO2}$ to $\ce{HNO3}$.
In fact, for many of the compounds traditionally explained with d-orbital participation for main-group elements, an explanation adhering to the octet rule (no more than eight valence electrons per main-group atom; two for hydrogen/helium) is often closer to the truth. This includes, but is not limited to $\ce{OPF3, SO4^2-}$, sulphonic acids and many more.

Yes, trifluoramine oxide, $\ce{\overset{-}{O}–\overset{+}{N}F3}$, does exist.
The structure written above is the "conventional" structure with sigma bonds indicated between all four directly connected pairs of atoms. It thus appears that there can be only sigma bonds. Yet the length and spectrometric chatacteristics on the nitrogen-oxygen interaction seem to indicate multiple-bond character.
What happens is explained by molecular orbital theory involving only the usual $s$ and $p$ valence orbitals contributing. The $\ce{\overset{-}{O}}$ function described above is a powerful $\pi$ electron donor; its lone pairs with the proper symmetry can actually overlap with the otherwise antibonding components of the $\ce{N–F}$ bonds. This loses some of the $\ce{N–F}$ bonding, but strengthens the $\ce{O–N}$ bonding giving that interaction some $\pi$ bonding character. The latter effect is stronger given the right combination of input atomic orbitals.
We can think of this as a form of resonance hybridization and bond delocalization, in which nitrogen-fluorine sigma bonds are exchanged for nitrogen-oxygen pi bonds:
$\ce{\overset{-}{O}–\overset{+}{N}F3<-> [O=\overset{+}{N}F2]F^-}$
Note the role of the electronegativity of the fluorine, both stabilizing the negative charge imparted by the $\pi$-acceptance and placing more of the antibonding-orbital electron density on the nitrogen where it overlaps the $\pi$-donor oxygen.
This type of bond delocalization may also be rendered with later-period elements, as in the phosphate or sulfate ion where it occurs simultaneously along all four bond axes; the fact that this model also covers $\ce{NOF3}$ is one reason it has displaced the "outer-$d$ orbital" theory.

There is also trimethylamin oxide, present in fish bodies.

True. But without the strong electronegativity of the proposed acceptor lifands noted above, TMAO lacks the nitrogen-oxygen bond character noted here for the fluorine compound. The nitrogen-oxygen bond is much longer and the oxygen itself much more basic in the methyl compound.

I was focused on electronic structure rather than on electronegativities and bond polarities.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Is the P-Cl bond energy same in PCl5 and PCl3?
Is the $\ce{P-Cl}$ bond energy same in $\ce{PCl5}$ and $\ce{PCl3}$? Why?
According to wolfram alpha both have $\pu{326 kJ mol-1}$ energy. But my study material says that they are not same. I'm confused. Can someone clarify?

Wolfram Alpha does not know apples from oranges when it comes to chemistry. Also, we don't use mathjax in the title.

Hehe :-P!Ok! @IvanNeretin .Do tell your answer also...

Of course they are different. I expect the bond in $\ce{PCl3}$ to be stronger.

@IvanNeretin why is it so?And in PCl5 itself are all the bond lengths same or different?

They can’t be the same, because $\ce{PCl5}$ (in gas phase) has two different $\ce{P-Cl}$ bonds while $\ce{PCl3}$ only has one.

Mind that Bond Energy and Bond Dissociation Energy are different.
Check the wikipedia pages for both.
Co-incidentally they might be similar in terms of bond energy.

The $\ce{P-Cl}$ bond in $\ce{PCl3}$ is stronger ($\pu{322 kJ/mol}$) than that in $\ce{PCl5}\ (\pu{260 kJ/mol})$. However the $\pu{326 kJ/mol}$ value comes from the average of all $\ce{P-Cl}$ bonds found in all known molecules containing $\ce{P-Cl}$ bonds (including but not limited to $\ce{PCl3}$ and $\ce{PCl5}$).


text:
dsp3 and sp3d hybridization — what is the difference and which applies to square pyramidal?
What is the difference between $\mathrm{dsp^3}$ and $\mathrm{sp^3d}$ hybridization?
Are they one in the same?
Also, I have a book that says that in compounds where the central atom is $\mathrm{dsp^3}$ hybridized, it's shape is square pyramidal, like that of $\ce{BrF5},$ but the hybridization of $\ce{Br}$ in $\ce{BrF5}$ is $\mathrm{sp^3d^2}.$ Why is it so? Is my book wrong or am I missing something?

$dsp^3$ hybridization cannot result from square pyramidal geometry because it only produces five hybrid orbitals whereas square pyramidal requires six. $sp^3d^2$ is a possible hybridization for square pyramidal geometry.

So , my book was wrong and I was right , right ? Even if so , then what is the difference between dsp3 and sp3d , if there is one ?

Well, your book is wrong. Both hybridisations don’t really exist. Main group elements only hybridise s and p-orbitals.

So there are no sp3d , sp3d2 or sp3d3 hybridizations ?

Yes,  they exist. XeF2, for example, exhibits sp3d hybridization on the Xe.

@quintopia No it doesn’t. Xenon is essentially unhybridised as is fluorine. Xenon’s $\mathrm{p}_z$ orbital forms a four-electron-three-centre bond with the two fluorine atoms. Xenon’s 4d orbitals are fully populated and belong to the core orbitals; they won’t participate in bonding. Xenon’s 5d orbitals are empty and energetically remove; the 6s orbitals are closer. Thus, xenon has no available d electrons for ‘hybridisation’.

@Jan there are indeed sources, albeit outdated, claiming that the hybridization of S in SF6 is sp3d2. Those sources would be referencing the expanded-octet model of hypervalence. Nowadays, of course we know that this model is flawed and superseded. However, the model is not wrong...

@DHMO There are also sources (albeit even more dated) on the positive effects of smoking on health, so … ;)

@Jan Indeed, the model of sp3d2 is inaccurate, but the current model which classifies every element as sp3/sp2/sp/no hybridization is not more correct. It is still inaccurate. But we still teach our students that our carbon in ethane is sp3-hybridized.

[VOCl4]2-  has dsp3

We can split this into two cases: main group elements and transition elements.
Main group elements do not use their d-orbitals for bonds and thus cannot be hybridised in any d-containing way. Bromine in $\ce{BrF5}$, to cite your example, is unhybridised. The $\mathrm{p}_z$ orbital forms a traditional two-electron-two-centre bond with one of the fluorines. The $\mathrm{p}_x$ and $\mathrm{p}_y$ orbitals each form a four-electron-three-centre bond with two additional fluorines for a total count of five fluorines. The bond order of these four-electron-three-centre bonds is $\frac12$.
Bromine’s 3d orbitals are completely populated and effectively belong to the core orbitals. They do not participate in bonding. Bromine’s 4d orbitals are energetically even further removed than the 5s orbital is — remember the aufbau principle. Thus, neither the lower nor the higher d-orbitals can participate in bonding to any notable extent.
This extends well to all main group elements as hinted above. Practically no main group element compounds will include d-orbitals.

For transition metals the case is slightly different since we are in the midst of the d-block where d-orbitals can play a role. However, invoking hybridisation for transition metals puts a big blanket over the bonding situation declaring things equal which really aren’t. A much better description for transition metals would be to use a molecular orbital scheme as I have done in countless answers of mine. Most importantly, the bonding situation can, in my opinion, not be understood without this depiction.
Additionally, many transition metal geometries provide unintuitive ‘hybridisation’ solutions — octahedral being the notable exception which actually hybridises six orbitals (three d-orbitals are nonbonding). For example, a tetrahedral metal complex should be understood as using all orbitals for bonding. Likewise, the square-planar ligand arrangement only has one nonbonding d-orbital.
My suggestion is never to use hybridisation approaches for transition metal complexes.

Formally, one may say that putting the d before s and p implies a lower-shell d-orbital. That would be the transition metal case above. And placing the d behind s and p would use d-orbitals from the same shell. That would be the main group case. Thus, the difference between the two (tl;dr) is:
The first is very strongly discouraged, the second is wrong.

@Jan While your answer is technically correct and is the method that would most likely be used in an upper division/graduate inorganic or physical chemistry course, I think the OP's question was from the perspective of general chemistry where things are kept a bit more simplified. For example, in the general chemistry textbook I use by Petrucci, et.al., they discuss the hybridization model for both main group and transition metal chemistry. They also point out that experimental data indicates difficulties with $\ce{sp^3d^2}$ hybridization for $\ce{SF6}$ and suggest an alternative which involves 4 covalent bonds to the sulfur and 2 ionic bonds, i.e. $\ce{SF4^2+(F^-)2}$. No general chemistry textbook that I have seen (and I have seen quite a few) discusses 4-electron-3-center bonds because it becomes too complicated at the general chemistry level and not necessary for those students who are not chemistry majors. MO theory is discussed at the general chemistry level but only for diatomic molecules and ions from the second period, again because more atoms or higher periods makes it more complicated and it's just meant to give them a taste of what it is.

While this is possibly true, it is also supposed to be a comment and not an answer.

But the OP's question remains unanswered it would be really helpful if you explain the difference between the $SP^{3}D$ and $DSP^{3}$ hybridization. Because no reference websites seem to touch that point.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
In molecular orbital theory when two different atoms are combined, how do you tell which one is higher energy?

So in the picture above, see that there is an Atom A and Atom B and they combine. Notice that Atom A is higher in energy than Atom B (as indicated by how the 2s and 2p lines are drawn higher). Suppose I say that this is the diagram for NO. How would I tell which atom and which is O? What determines which atom has higher energy in the orbitals?
Thanks.

Welcome Pallas to Chemistry Stack Exchange. Generally the more electronegative atom will be lower in energy. So in your example atom A would be nitrogen and atom B would be oxygen.

Think about ionisation energies as well. A higher IE must mean that the AOs are lower in energy (since it requires more energy to remove electrons).


text:
Why is [PdCl4]2- square planar whereas [NiCl4]2- is tetrahedral?
The molecule $\ce{[PdCl4]^2-}$ is diamagnetic, which indicates a square planar geometry as all eight d electrons are paired in the lower-energy orbitals.
However, $\ce{[NiCl4]^2-}$ is also $\mathrm{d^8}$ but has two unpaired electrons, indicating a tetrahedral geometry.
Why is $\ce{[PdCl4]^2-}$ square planar if $\ce{Cl}$ is not a strong-field ligand?

The geometry of the complex changes going from $\ce{[NiCl4]^2-}$ to $\ce{[PdCl4]^2-}$. Clearly this cannot be due to any change in the ligand since it is the same in both cases. It is the other factor, the metal, that leads to the difference.
Consider the splitting of the $\mathrm{d}$ orbitals in a generic $\mathrm{d^8}$ complex. If it were to adopt a square planar geometry, the electrons will be stabilised (with respect to a tetrahedral complex) as they are placed in orbitals of lower energy. However, this comes at a cost: two of the electrons, which were originally unpaired, are now paired:
$\hspace{30 mm}$
(source: Wikipedia)
and on top of that, there are additional steric repulsions introduced by moving the ligands closer together. (This is, to some extent, a throwback to VSEPR theory, which simply says that the ligands would rather adopt a tetrahedral arrangement because of their mutual repulsion.)
We can label these two factors as $\Delta E$ (stabilisation derived from occupation of lower-energy orbitals) and $P + S$ (pairing energy + steric repulsions) respectively. One can see that:

If $\Delta E > P + S$, then the complex will be square planar;
If $\Delta E < P + S$, then the complex will be tetrahedral.

This is analogous to deciding whether an octahedral complex adopts a high- or low-spin configuration; where the crystal field splitting parameter $\Delta_\mathrm{O}$, also called $10~\mathrm{Dq}$ in older literature, plays the same role as $\Delta E$ does above. (However, unlike $\Delta_\mathrm{O}$, there is no simple graphical way to represent $\Delta E$ on a diagram since multiple orbitals are changed in energy.)
The two main factors that differentiate the Ni(II) complex from the Pd(II) complex are therefore:

The $\mathrm{4d}$ orbitals of $\ce{Pd^2+}$ are more radially diffuse (i.e. bigger) and therefore form stronger overlap with the orbitals on $\ce{Cl-}$, as compared to the $\mathrm{3d}$ orbitals of $\ce{Ni^2+}$. This leads to larger splitting of the $\mathrm{d}$ orbitals - or the relevant MOs (I'm too lazy to check their symmetry labels) - and hence a larger $\Delta E$.
Again because the $\mathrm{d}$ orbitals are more diffuse, the pairing energy $P$ is smaller in the palladium complex (it basically costs less energy to stuff them into the same orbital).

Together, these two factors ensure that practically all $\mathrm{4d}$ and $\mathrm{5d}$ $\mathrm{d^8}$ $\ce{ML4}$ complexes adopt a square planar geometry, even if the ligand is not a strong-field ligand. Other examples of such square planar complexes are $\ce{[PtCl4]^2-}$ and $\ce{[AuCl4]^-}$.
In fact, I am digressing here, but the same factors also cause the octahedral complexes to be almost invariably low-spin. For example, the $\mathrm{d^5}$ complex $\ce{[Fe(ox)3]^3-}$ has five unpaired electrons, indicating a high-spin configuration, $\mathrm{(t_{2g})^3(e_g)^2}$. However, $\ce{[Ru(ox)3]^3-}$ has one unpaired electron, which implies a low-spin configuration $\mathrm{(t_{2g})^5}$.

On  a somewhat unrelated note: I find it interesting that this effect is also present in d9 transition metals. The Jahn-Teller effect is like if this orbital energy inversion happened but not quite all the way... like it was getting halfway to becoming square planar. And what you get is a distorted octahedron where two "axial" ligands have extra long bond lengths compared to the other four "equatorial" ones... like it was halfway to becoming square planar.

@orthocresol Are the steric repulsions included in the splitting diagramms? I mean do they just change the absolute value of the energy of the system but not the difference $ΔE$?


text:
Is aluminium hydroxide a strong base?
Is $\ce{Al(OH)3}$ in a very dilute solution deemed as a strong base? Are there any actual experimental data for it?

$\ce{Al(OH)3}$ is all but insoluble in water (though you may call that "a very dilute solution", if you like), and most certainly is not a strong base.

No, it is not a strong base.
It is a weak acid with pKa of 5
See DISSOCIATION CONSTANTS OF INORGANIC ACIDS AND BASES IN AQUEOUS SOLUTION at the page numbered 143 (page 12 of the file).


text:
Computing two-electron integrals with an STO-3G basis set
I am trying to implement a restricted Hartree-Fock calculation using an STO-3G basis set, for fun. I managed to perform this calculation where only $\mathrm{1s}$ orbitals are present ($\ce{H2}$ and $\ce{HeH+}$) as explained in Szabo and Ostlund's book. In this book, authors give explicit formulas for overlap, kinetic, nuclear-electron, and electron-electron integrals for $\mathrm{1s}$ orbitals and they work correctly.
In order to generalize my calculation to systems containing $\mathrm{2s}$ and $\mathrm{2p}$ orbitals (for $\ce{H2O}$ and $\ce{N2}$), I used the general formulas I found in Cook's book for the electron-nuclear and electron-electron integrals. In this case, I obtain results that are slightly different from Szabo's book:
$$E_\text{tot}(\ce{H2O}) = -74.4442002765 \text{ a.u.}$$
instead of
$$E_\text{tot}^\text{Szabo}(\ce{H2O}) = -74.963 \text{ a.u.}$$
This is obviously problematic since orbital energies suffer from the same error and this leads to an erroneous ionization potential (0.49289045 a.u. instead of 0.391 a.u., a difference of approximately 63 kcal$\cdot$mol$^{-1}$).
Since I checked my code multiple times and I wrote the two-electron computation code from scratch twice, I was wondering if there is a typo in Cook's book. Is there is a good reference where I can find the (correct) formula to compute two-electron integrals of gaussian functions (in Cartesian coordinates) with arbitrary angular momenta? At the moment I am not looking for a very efficient (recursive) algorithm to perform this task, I only need an exact formula like the one proposed in Cook's book.
Sources:
[1] Szabo and Ostlund, Modern Quantum Chemistry, Dover, 1989.
[2] Cook, Handbook of Computational Chemistry, Oxford University Press, 1998.

Can you put your code on github?  Difficult to answer the question without seeing your formulae.  Your result could be due to a floating point error ... I've found this when reproducing the computations of other scientists.

@user1945827 I was thinking about the same thing, but many calculations (see Geoff's answer) gives a value of -74.96(...). My code is already on GitHub (https://github.com/RMeli/Hartree-Fock) but I didn't gave the link because I didn't wanted too much help! ;) The routine computing the integrals is the ELECTRONIC in INTEGRALS.PY (the program is in Python because I can code fast, but I will migrate it to fortran when it works fine).

consider https://scholar.google.ru/scholar?q=computing+gaussian+function+integrals&btnG=&hl=en&as_sdt=0%2C5

@permeakra I spent much time using Google and Google Scholar. However, Google Scholar results are normally about very efficient algorithms to compute two-electron integrals. What I would like to implement at first is an exact formula (like the one proposed in Cook's book or in Szabo's book for 1s orbitals).

@R.M. This article is on the first page of the google scholar link from above.... I dunno, seems suspiciously like what your want. http://rspa.royalsocietypublishing.org/content/royprsa/258/1294/412.full.pdf

Actually there is a mistake in the analtical expression in Cook's Book. On his web page he has a pdf with the corrected verison
http://spider.shef.ac.uk/
Maybe this solves your problem, but I would also recommend to implement the Obara-Saika Scheme or rys-Quadrature since they are really much more efficient. If your are programming in Python, you might have a look at the PyQuante project, which implements all this stuff.
Concerning Obara-Saika you might also read about the Head-Gordon Pople Scheme. It is in principial an adapted version of Obara-Saika which reduces the FLOP count.

This DO solve my problem!!! Thank you!!! I will certainly look to Obara-Saika or other efficient schemes, but for the time being the goal is to implement BO-MD and not to have an efficient code! ; )

My advice is to implement the Obara-Saika recurrence formulae that are outlined in "Molecular Electronic-Structure Theory" by Helgakar, et al. I would stick with Cartesian functions, since a) they are easier and b) spherical harmonics don't matter for molecules anyway.
I did this years ago (in Mathematica) when I was in a similar place -- having completed Szabo and Ostlund and wanting an arbitrary "angular momentum" code.
The book will cost you a small fortune, but if you can borrow it through Interlibrary Loan, it is a phenomenal text.

I will certainly look at this book, thank you!

Unfortunately your suggestions on Boys function does not solve this problem (as I hoped). The error should be directly in the computation of two-electron integrals. I will look to Obara-Saija recurrence.

Check normalizations of you basis functions

Why you suspect about normalization?

Did Sij evaluate to 1?

Yes, Sii = 1 (I print 5 decimal digits)

My suggestion would be to use another existing code and run the calculation.
For example, if I do an HF/STO-3G calculation on $\ce{H2O}$, I get:
$$E_\mathrm{H_2O}=-74.9659011\:\mathrm{a.u.}$$
I don't have Cook's book on hand, so I can't look for the error, but I'd suspect some error as you do.

It will help if I write down explicitly Cook's formulas? I already checked on internet for other HF/STO-3G results and all of them start with -74.96(...) a.u., this is why I am concerned.

@R.M. Just because other more modern techniques are efficient does not mean they are inexact. Feel free to post the formulas, but I'd adapt a different method.

@Goeff I know there are very good (and efficient) techniques, but this will be the next step in my project. At the beginning I just want to code the simplest algorithm possible, even if it is inefficient. Cook's analytical solution only imply a series of loop, which is extremely easy and straightforward to implement (in addition, this is how I implemented the other integrals). However, if I will not find an analytical solution quickly, I will certainly spend some time to implement a more difficult technique.


text:
Why is the acylium ion stable?
Why is the acylium ion stable? Doesn't the inductive effect of oxygen destabilize it? Compared to an alkyl cation, is an acylium ion more stable or less stable?

The acylium ion is stabilized by the positive mesomeric effect of the lone pair of electrons on the oxygen atom onto the empty p-orbital of the $\ce{C+}$. This helps achieve octet completion of the carbon atom, and thus imparts stability to the carbocation.

(Image by Jü CC BY-SA 4.0, from Wikimedia Commons)
Resonance effects mostly dominate the weak inductive effect, so here the destabilizing negative inductive effect of oxygen atom has only a negligible role.
An alkyl carbocation has no such positive stabilizing mesomeric effect, rather only hyperconjugative effects, which are not able to provide as much stability as is possible in the acylium ion.

In addition to what Gaurang already wrote, I would like to add another, not quite as popular, interpretation.
A case can be made to treat the $\ce{CO}$ moiety as a ligand to the (then positively charged) alkyl group $\ce{R}.$ The set of (major) resonance structures gains another member:
$$\ce{
R-C+=O <-> R-C#O+ <-> R+\bond{<-}^-C#O+
}$$
This should of course highlight the linear coordination of the carbon, and the importance of the two π bonds. Furthermore depending on $\ce{R}$ there will be additional stabilisation via hyperconjugation, and/ or conjugation.
A bent structure (as it is often depicted in the literature) of acylium ions is not stable, and does only exist as a transition or excited state.

authors: Сергей Егоров


text:
Boys function for Gaussian integrals in ab initio calculations
A few days ago I mentioned a problem with an Hartree-Fock program I am writing (HF using cartesian Pople's STO-3G basis set). I can reproduce overlap and kinetic integrals of some references for ($\ce{H2}$, $\ce{HeH+}$ and $\ce{H_2O}$). Things start to change (at the third/fourth decimal digits) in the nucleus-electron attraction integral. At the beginning I thought the error I get on the total energy was mainly caused by electron-electron repulsion integrals (as errors on nucleus-electron attraction seem minimal). But now I am quite convinced the problem comes from my calculation of the Boys function
$$
    F_n(x) = \int_0^1 t^{2n}e^{-xt^2}\, dt.
$$
A clue of this comes from the fact that for $\ce{H2}$ and $\ce{HeH+}$ everything works fine: in this case Boys function is only computed for $n = 0$.
In order to compute this function I used numerical integration routines of SciPy (Python library) or directly QUADPACK (I traduced my Python program into Fortran90). However, looking at the literature it seems that nobody compute Boys function via numerical integration. I tried to implement different versions (recursive, asymptotic values, ...) of Boys function but all of them eventually had problems (depending on the range of $x$ or on the value of $n$).
Since I am loosing too much time on this problem, which seems to be numerical, I was wondering if there is some standard implementation of Boys function that I can simply use in my code.
Do you know any Python or Fortran library containing a good (safe and efficient) implementation of Boys function? If not, there is a simple algorithm that works well in any range of $x$ and is not sensible to numerical errors?

I recommend asking questions about code and/or libraries at the computational science SE. I'm not saying is off topic, I just think it's better suited there.

I just found a library called "LibInt" for computing molecular integrals: http://sourceforge.net/projects/libint/ It contains a file 'Boys.h', so what you want seems to be implemented. I havn't tested it yet (I'm currently working on writing a Full CI code, so I keep running into problems similar to yours ^^), but it's used in several quantum chemistry packages, so I'm sure it'll give good results.

Thank you for the hint. I managed to implement this computation using the incomplete gamma function (as suggested in the answer) contained in SLATEC, but I will certainly give a look at the library!

As an insider to ORCA, I can state that the Boys function is computed by various methods depending on the argument and that higher orders are computed recursively. I can also recommend looking at open-source implementations such as NWChem for inspiration on this.

I am not aware of any existing Fortran code for direct numerical quadrature of this problem, but it is worth pointing out that Mathematica can perform this integral symbolically:
Integrate[t^(2 n) Exp[-x t^2], {t, 0, 1}]

(* 1/2 x^(-(1/2) - n) (Gamma[1/2 + n] - Gamma[1/2 + n, x]) *)

where the $\Gamma$ function can be computed by exponentiating easy-to-find $\ln \Gamma$ functions, often called lngamma().  (One of them is the Euler function $\Gamma(z)$ and the other incomplete $\Gamma(a,z)$ function).
As a check:
With[
  {x = 1, n = 2},
  1/2 x^(-(1/2) - n) (Gamma[1/2 + n] - Gamma[1/2 + n, x])
  ] // N

(* 0.100269  *)

and numerical quadrature yields:
With[
 {x = 1, n = 2},
 NIntegrate[t^(2 n) Exp[-x t^2], {t, 0, 1}]
 ]

(* 0.100269  *)

One has to be a little bit careful, as the $\Gamma$ function is closely related to the factorial, and it can explode as the arguments get too large.  I would experiment and see whether you can get by with this analytic solution, which essentially takes you from numerical quadrature into evaluation of special functions.
The $\Gamma$ function approach is faster by over two orders of magnitude  than the quadrature approach.  This is critical when evaluating molecular integrals.  I have seen implementations where the Boys function is actually interpolated rather than evaluated, and there is discussion about the error in interpolation being almost insignificant if suitable interpolation basis functions are used.

I already found this analytical formula in one publication, but the incomplete gamma function is not part of Fortran standard library. I will look for Python, though. The values of n I have at the moment range from 0 to 3, therefore I don't think an overflow will be a problem.

See: http://people.sc.fsu.edu/~jburkardt/f_src/asa032/asa032.html

I don't know how it is possible I did not saw it! Thank you very much!

Unfortunately this does not solve the mentioned total energy problem... =(. I will have to search elsewhere.

I know this is an old question, but I would like to give a small comparison regarding efficiency when evaluating the Boys function $F_n(x)$. Below are some implementations (in Julia) with simple benchmarks.
In the end, I also give some useful approximations to the Boys function, both for small and large values of $x$.

For benchmarking, I'll use BenchmarkTools to measure the average time it takes for a particular implementation to calculate $F_1(x)$ $\forall x \in \hat{x}$, where $\tilde{x}$ is the 10000-vector below:
using BenchmarkTools

n = 1
x̃ = range(1e-15, 15, length=10000)

Implementations are in order, from fastest to slowest. (Of course, benchmarks should be compared with each other; different computers will produce different results.)
Evaluations
Using the incomplete gamma function
As mentioned by Eric above, $F_n(x)$ can be written in terms of the incomplete gamma function as
$$\frac{1}{2 x^{\frac{1}{2} + n}} \Gamma \left( \frac{1}{2} + n \right) \gamma \left( \frac{1}{2} + n, x \right)$$
using SpecialFunctions

# Incomplete gamma function implementation.
boys2(n, x) = gamma(0.5 + n) * gamma_inc(0.5 + n, x, 0)[1] / (2x^(0.5 + n))
@benchmark boys2.(n, x̃)

BenchmarkTools.Trial:
  memory estimate:  406.52 KiB
  allocs estimate:  1005
  --------------
  minimum time:     1.317 ms (0.00% GC)
  median time:      1.345 ms (0.00% GC)
  mean time:        1.380 ms (0.33% GC)
  maximum time:     2.880 ms (0.00% GC)
  --------------
  samples:          3614
  evals/sample:     1

Using quadratures
The simplest option is a quadrature of
$$\int_0^1 t^{2n} e^{-x t^2} dt$$
using QuadGK

# Adaptive Gauss-Kronrod quadrature implementation.
boys1(n, x) = quadgk(t -> t^(2n) * exp(-x * t^2), 0.0, 1.0)[1]
@benchmark boys1.(n, x̃)

BenchmarkTools.Trial:
  memory estimate:  8.32 MiB
  allocs estimate:  326405
  --------------
  minimum time:     23.747 ms (0.00% GC)
  median time:      24.629 ms (0.00% GC)
  mean time:        25.839 ms (3.78% GC)
  maximum time:     45.680 ms (0.00% GC)
  --------------
  samples:          194
  evals/sample:     1

Using the confluent hypergeometric function
Yet another relation, mentioned by Joshua above, uses the Kummer confluent hypergeometric function in
$$F_n(x) = \frac{{_1}F_1 \left( \frac{1}{2} + n, \frac{3}{2} + n, -x \right)}{2n + 1}$$
using using HypergeometricFunctions

# Confluent hypergeometric function implementation.
boys3(n, x) = pFq([0.5 + n], [1.5 + n], -x) / (2n + 1)
@benchmark boys3.(n, x̃)

BenchmarkTools.Trial:
  memory estimate:  18.03 MiB
  allocs estimate:  162806
  --------------
  minimum time:     58.511 ms (0.00% GC)
  median time:      59.524 ms (0.00% GC)
  mean time:        60.007 ms (1.19% GC)
  maximum time:     65.223 ms (0.00% GC)
  --------------
  samples:          84
  evals/sample:     1

Approximations
Small values of $x$
We can expand the integrand $t^{2n} e^{-x t^2}$ as a series around $x = 0$ and obtain successive polynomial approximations to the Boys function. Below is a systematic way of doing that (using SymPy in Julia):
using SymPy

I = t^(2n) * exp(-x * t^2)

order = 2  # The order of the final polynomial.
I_taylor = series(I, x, 0, order)
B = SymPy.integrate(I_taylor, (t, 0, 1)) |> simplify

$$B^2_n(x) = \frac{3 + 2n - (2n + 1) x}{(2n + 1) (2n + 3)} + O(x^2)$$
Such approximations can be used for small values of $x$ (they are safer for $x \approx 0$ than some implementations above). An approximation of order 10 is compared below with a quadrature of the Boys function.

Large values $x$
Since the Boys function is decreasing, we could, for large $x$, approximate
$$\int_0^1 t^{2n} e^{-x t^2} \approx \int_0^\infty t^{2n} e^{-x t^2}
= \frac{1}{2x^{\frac{1}{2} + n}} \Gamma \left( \frac{1}{2} + n \right)
= \frac{(2n - 1)!!}{2^{n + 1}} \sqrt{\frac{\pi}{x^{2n + 1}}}$$
(I learned this trick here.) Compare this to the Boys function below.

Further reading
The above are obviously toy examples. Here are some nice reads:

Journal of Mathematical Chemistry 54, 2022-2047 (2016)
Journal of Computational Chemistry 36, 1390-1398 (2015)
Journal of Mathematical Chemistry 40, 179-183 (2006)

What a great response. Thank you!

@Rick glad it helped!

The Boys function is $F_n(x)$ a special case of the Kummer confluent hypergeometric function $M(a,b,x) = {_1}F_1(a,b,x)$, which can be found in many special function libraries, such as scipy.special. According to equation (9) of this paper, the relationship is
$F_n(x) = \frac{{_1}F_1(n+\frac{1}{2},n+\frac{3}{2},-x)}{2n +1}$
If you use scipy you can get ${_1}F_1$ here.
Otherwise, you can grab a FORTRAN implementation here. I believe the routine you want is CHGM. There are probably other implementations.

the leading subscript 1 in front of F appears to be a typo in the WIREs paper.  StackExchange does not allow me to correct this because the edit is less than 6 characters.

@Jeff Do you have a citation? I don't see any typo here. The relationship to Kummer's function 1F1 and the Boys function Fn is derived in Sec (9.8.6) of Helgaker, Jorgensen, and Olsen; Molecular electronic-structure theory; (2000).

I see now.  ${}{1}F{1}$ is a completely different $F$ from $F_{1}$.  How nice.

@Jeff Correct, $_1F_1$ is the Kummer confluent hypergeometric function, not the Boys function. The Boys function $F_n$ is a weighted version of $_1F_1$. I agree, the notation can be very confusing here.

I think that the CHGM have troubles calculating the Boys function for what is needed for Molecular Integrals. It performs well enough for H2O/6-31++G**. But for bigger molecules it seem to fail p-nitrophenolate/4-31G. Do you know any other implementations of Boys function in Fortran?

I published an implementation in C/C++ in http://vixra.org/abs/1709.0304 which uses Gauss-Jacobi quadratures. It is limited to quantum numbers of 130 and to real arguments; a relative accuracy near 1.e-15 is achieved. The source code is available in https://zenodo.org/record/3603249 .

While the asker may find this useful, note that the OP requests implementations of python and/or fortran specifically.

It is worth stating that it is roughly as easy to call C from Python as it is to call Fortran from Python, so this is useful in that regard. Less useful is source code embedded in a PDF.


text:
What is the molecular interpretation of Raoult's law?
I was reading about Raoult's law which states:

It states that the partial vapour pressure of each component of an ideal mixture of liquids is equal to the vapour pressure of the pure component multiplied by its mole fraction in the mixture.

Regarding the molecular origin of this law, Peter Atkins in his book writes:

The molecular origin of Raoult's law is the effect of the solute on the entropy of the solution. In the pure solvent, the molecules have a certain disorder & a corresponding entropy; the vapour pressure then represents the tendency of the system & its surroundings to reach a higher entropy.
[...] Because the entropy of the solution is higher than the pure solvent, the solution has a lower tendency to acquire an even high entropy by the solvent vaporising. In other words, the vapour pressure of the solvent in the solution is lower than that of the pure solvent.

I've not understood his explanation especially the bold lines above.
$\bullet$ Firstly, how could vapour pressure represent the tendency of the system & its surroundings to reach a higher entropy?
$\bullet$ Why does the solution has a lower tendency to acquire an even high entropy by the solvent vaporising ? After-all every system has greater tendency to acquire high entropy, isn't it? Is not this statement contradictory to the Second law by saying lower tendency to acquire high entropy?
Could anyone please explain that to me?

I believe what the quote is saying is that once equilibrium is reached between the vapor-liquid mixture, then there will be no tendency to increase entropy. This is because entropy is not the only factor to consider. In any system, one must always consider the interplay between both entropy and energy. For instance, at equilibrium, $$\Delta G=\Delta H-T\Delta S=0$$ which means that at equilibrium, $$\Delta H=T\Delta S$$So, while you raise a good point that in most cases, a system will tend to maximize entropy, in a closed system, one must consider the interplay between entropy and energy which in this case are exactly equal (technically they differ by a scaling factor which is the absolute temperature).
Additionally, what is meant by "vapour pressure represents the tendency of the system and its surroundings to reach a higher entropy" is that one can make an inference about the energetic and entropic properties of a solution based on the vapor pressure of that solution. For instance, if a system has a very low vapor pressure (consider a solid as an extreme example) then the solution is very energetically stable and thus it has a very low tendency to reach higher entropy. But, if you think about acetone, which has a vapor pressure of $30.6 ~\text{kPa}$ at $25^{\circ}~\text{C}$ (ten times that of water at the same temperature), one could say that this then has a strong tendency to increase its own entropy and the entropy of the surroundings.

Peter Atkins in his book writes:

The molecular origin of Raoult's law is the effect of the solute on
  the entropy of the solution. In the pure solvent, the molecules have a
  certain disorder & a corresponding entropy; the vapour pressure then
  represents the tendency of the system & its surroundings to reach a
  higher entropy.

What is meant by "vapour pressure represents the tendency of the system and its surroundings to reach a higher entropy" is that one can make an inference about the energetic and entropic properties of a solution based on the vapor pressure of that solution
Raoult's law states that the partial vapor pressure of each component of an ideal mixture of liquids is equal to the vapor pressure of the pure component multiplied by its mole fraction in the mixture
p=($\ce{pA^⋆}$) x ( $\ce{xA}$)

In this equation, $\ce{pA^⋆}$ is the vapor pressure of the pure
  solvent and $\ce{xA}$ is the mole fraction of the solvent. This law
  allows us to calculate the vapor pressure of a given solution, and
  shows the influence of all of the molecules in the solution.

Source: Boundless. “Vapor Pressure of Nonelectrolyte Solutions.” Boundless Chemistry. Boundless, 08 Aug. 2016. Retrieved 23 Oct. 2016 from https://www.boundless.com/chemistry/textbooks/boundless-chemistry-textbook/solutions-12/colligative-properties-of-nonelectrolyte-solutions-95/vapor-pressure-of-nonelectrolyte-solutions-406-7509/

I don't think the Atkins book's explanation is correct, but if I explain it locally, it's as follows.

The molecular origin of Raoult's law is the effect of the solute on the entropy of the solution. In the pure solvent, the molecules have a certain disorder & a corresponding entropy; the vapour pressure then represents the tendency of the system & its surroundings to reach a higher entropy.

Vapor pressure means the number of molecules in the vapor phase, and since gas phase generally has much higher entropy than liquid phase, large vapor pressure means that the entropy of the system is that high.

[...] Because the entropy of the solution is higher than the pure solvent, the solution has a lower tendency to acquire an even high entropy by the solvent vaporising. In other words, the vapour pressure of the solvent in the solution is lower than that of the pure solvent.

Assuming that the entropy $S$ is the same whether there is a solute or not, the existence of solute creates mixing entropy, which additionally contributes to $S$. In order for the $S$ value to be the same, the vapor pressure must be reduced, reducing what this contributes to $S$.
However, these arguments have one major problem and one minor problem. The state is different between the two systems with only pure solvent and when solute is added. Therefore, the second argument that the entropy $S$ should be constant for both cases is not valid.
In addition, according to Raoult's law (1), the more solute you add, the less mole fraction of the solvent and the less vapor pressure you should have.
$$ p_A = x_A p_A^* \tag{1}$$
This is qualitatively the same as the conclusion of the above argument, but quantitatively, it is not known why the changed vapor pressure should be multiplied by the mole fraction in the vapor pressure of the pure solvent.
The simple molecular interpretation of Raoult's law is as follows. Raoult's law is a law established in an ideal solution that is mixed with similar chemical species. In other words, both in liquid phase and in vapor phase, solvent A and solute B cannot distinguish each other.
Now suppose that system1 contains 100 solvent A and 10 vapor pressure (A) of these occurs. Let's also suppose that system 2 contains 50 solvent A and 50 solute B. At this time, A and B are not distinguished, so the total vapor pressure (A+B) of system2 will have to be generated by 10.
But how much of this should be the vapor pressure corresponding to "solvent A"? I hope the answer to this question will help you understand why (1) holds.


text:
When it is said 'at constant pressure, at constant pressure ', is it about pressure & temp. of the system or surroundings?
These are the following statements:

[...] the thermal decomposition of $1.0$ mole $\ce {CaCO3}(\text{s})$ at $1$ bar results in an increase of volume of nearly $90~\text{dm}^3$ at $800^\circ \text{C}$ on account of the carbon dioxide produced.

Is the system at $1$ bar or the surrounding exerts pressure of $1$ bar? Is $800^\circ \text{C}$ the temperature of the system or the surroundings?

The standard state of a pure substance is the pure substance exactly at $1$ bar & at $298.15~\text K$.

I think the pressure mentioned is of surroundings but the temperature? Is it of the system or he surroundings?

We see that at constant temperature & pressure, the change in Gibbs energy of a system is proportional to the overall change in entropy of the system plus its surroundings.

Now is the system at constant temperature & pressure or the surroundings?
Could anyone please explain me to clear this ambiguity?

When we say
$$\Delta G^\circ = \Delta H^\circ - T\Delta S^\circ$$
we are referring to $\Delta G^\circ$, $\Delta H^\circ$ and $\Delta S^\circ$ of the system. As such, the variable $T$ in the equation refers to the temperature of the system. The condition for constant pressure $p$ is implicit; the equation above does not directly show why $p$ has to be constant. For more information, refer to this question and answer.
The sentences that you have given are not the best examples to explain this, because they do not relate to Gibbs free energy. I will give you a different example:

When hydrochloric acid is added to sodium carbonate at atmospheric pressure, the standard enthalpy change $\Delta H^\circ$ and the standard entropy change $\Delta S^\circ$ are measured to be $x~\mathrm{kJ~mol^{-1}}$ and $y~\mathrm{J~K^{-1}~mol^{-1}}$ respectively. Calculate the Gibbs free energy of the reaction and hence determine the equilibrium constant. (The temperature at which the reaction is carried out is $25~\mathrm{^\circ C}$.)

The wording of the question may seem to imply that it is talking about the temperature and pressure of the surroundings, and that is probably not a coincidence. For a simple chemical reaction like the one above, we would probably carry it out in a beaker. We weigh out a certain mass of $\ce{Na2CO3}$, and add a certain volume of $\ce{HCl}$, and pour the acid into the beaker and watch the bubbles.
Under such conditions, we can speak of the system being at mechanical and thermal equilibrium. Without going into too much detail about reversible and irreversible processes (I know there are loopholes in the explanation):

Mechanical equilibrium, in general, means that the net force acting on the system is zero. Correspondingly, this must mean that the pressure of the system and the pressure of the surroundings are equal at all points in time. If, at any point in time, this was not the case, e.g. if we had $p_\mathrm{syst} < p_\mathrm{surr}$, then the surroundings would "push" on the system and cause the system to contract until it reaches the point where $p_\mathrm{syst} = p_\mathrm{surr}$.
Thermal equilibrium means that there is no heat transfer into, or out of, the system. Analogously to above, this must mean that the temperature of the system and the temperature of the surroundings are equal at all points in time. We conventionally assume the surroundings to be a "reservoir" which maintains a constant temperature, and this is pretty true as far as our simple example is concerned. Therefore $T_\mathrm{syst} = T_\mathrm{surr}$.

Does that mean all processes need to be isothermal & isobaric? The standard enthalpy of ionization of hydrogen is +1312 kJ . Does that mean this energy is to be supplied to ionize hydrogen which is at 1 bar & 298.15 K? Does that mean during the process, the temperature must remain same? If so, then how could even there be exchange of heat, if the hydrogen remained at the same temperature as that of the surroundings all the time during the process? Gibbs Free energy is applicable when the process is isothermal-isobaric. Is it so? This is what I'm not understanding. [contd.]

If the system & surroundings are at same temperature 298.15 K throughout the process, how could there be supply of heat after-all this requires temperature-gradient, isn't it? Do every chemical reactions happen in the same way where throughout the process, the system & surroundings remain at same temperature? Can you please clarify that?

Your first two statements mean that, if T and p are the temperature and pressure of your system in its initial thermodynamic equilibrium state, the surroundings will be maintained at the temperature T and the pressure p throughout the change from the initial thermodynamic equilibrium state to the final thermodynamic equilibrium state (say by using a constant temperature reservoir and an external gas pressure).  Thus, in the final thermodynamic equilibrium state of the system, the temperature and pressure will also be T and p.  However, during the change between the initial and final thermodynamic equilibrium states, the temperatures and pressures within the system can vary spatially and with time.  Only at the boundary with the surroundings will the temperature and pressure match that of the surroundings throughout the process.  For more details, see Section 2.4 Properties of the Gibbs Function, in Denbigh, Principles of Chemical Equilibrium.

So, throughout the process, the substances needs to be at the same temperature as that of the surroundings, ?I s it so? There should be no increase or decrease in temperature of the substances throughout the process. Is it so? But how could there be exchange of heat if the system & surroundings all remain at the same temperature throughout the process? There needs to be a temperature-gradient. Isn't it? Also, if heat is being supplied or taken away from the system, wouldn't its temperature increase or decrease & thus remaining at the same temperature as that of the surrounding? Confused.

What do the words "However, during the change between the initial and final thermodynamic equilibrium states, the temperatures and pressures within the system can vary spatially and with time" mean to you?

So, during the process, the temperature & pressure within the system doesn't remain uniform? I thought Gibbs energy is applicable only for isothermal-isobaric process. Also, the equation $$G= H- TS$$ is a state function which implies $T$ is the temperature of the system, isn't it? So, $$\Delta G = \Delta H-T\Delta S $$ doesn't imply the change in entropy at constant temperature $T$ of the state?

The statements I was addressing didn't say anything about the thermodynamic functions.  But, irrespective of how the process is carried out, the change in the thermodynamic functions depends only on the initial and final thermodynamic equilibrium states. So the Gibbs energy doesn't only apply to isothermal-isobaric processes.   For a process in which the pressure in the system doesn't remain uniform, even though it is held constant at the boundary, q is still equal to $\Delta H$.

Yes, they are state-functions. But could you tell why the site I linked wrote isothermal-isobaric system?

I need more context than this.

Have you not understood my query, sir?

Let us continue this discussion in chat.

It is important think of the thermodynamic functions U, H, S, G, and A as physical properties of the material(s) comprising the system, not determined by the path of any particular process.  But note that, since the only way we have of evaluating the change in S between two thermodynamic equilibrium states of a system is to calculate the integral of dq/T for a reversible path.  This is independent of the actual path that took the system from its initial state to its final state.  Since G and A are also functions of S, the only way we have of evaluating the changes G and A are also to determine them for a reversible path.  This too is also independent of the actual path that took the system from its initial state to its final state.

authors: кирилл баканов


text:
What is the meaning of ‘oxyphilic’?
I read in the paper that:

The reduction of diphenyl diselenide using lithium aluminum hydride generates a selenolate ion having Lewis acid character due to the oxygenophilic nature of the aluminium.

Can any one explain me the meaning of the bold expression, please

It likes to form bonds with oxygen.

Thank's Sir , but what is the type of these bonds , and which oxygen do they mean in this medium ???

Nadine if you want someone to get notified about your comment then you should add '@'  before their user id...for example @orthocresol

Ok, Sir, thank you for remarkable advice @Manshu

There is indeed no oxygen in this medium. To reveal its Lewis acid character, this compound must be transferred someplace else. Also, the word "oxygenophilic" sounds kind of old-fashioned to me.

I think it just means its attracted to oxygen, or oxygen-loving?


text:
nomenclature of some organoselenide moieties
what are the structures of these selenide moieties : selenenylate, selenolate ?
Can anyone tell the difference between the two in the terms of if they are anions or cations , electrophiles of nucleophiles.

Based on usage:

Selenenylate is a verb. It means to attach a selenium group to an organic compound - See this passage from Comprehensive Organic Synthesis: Selectivity, Strategy, and Efficiency in Modern Organic Chemistry, Volume VII

The analogous morphinoselenamide has been shown to selenenylate the $\alpha$-ketoester...

Selenolate is a noun. It is the $\ce{RSe-}$ anion, especially in ionic or coordination compounds. See various usage at the links in this Google search


text:
Gaussian09 vs home made Hartree-Fock implementation
I implemented a restricted Hartree-Fock (RHF) calculation in the STO-3G basis set, as described in Szabo and Ostlund's book [1]. I managed to reproduce the energies of all their calculations ($\ce{H_2}$, $\ce{HeH^+}$, $\ce{H_2O}$, $\ce{CO}$, $\ce{CH_4}$ and $\ce{FH}$) with precision. For example, for $\ce{N2}$ I found
$$
E_\text{tot}^\text{HM} = -107.49583784393724 \text{ a.u.}
$$
while in the book they report the following (p. 192)
$$
E_\text{tot}^\text{Szabo} = -107.496 \text{ a.u.}
$$
The situation is analogous for all other molecules I tested.
Now I am trying to implement the calculation of forces, in order to perform Born-Oppenheimer molecular dynamics. I will start to compute the gradient of the PES by finite differences (computationally costly but easy to implement). In order to check my implementation I wanted to use Gaussian09 (for the first time!) as a benchmark because we don't find many force calculations on standar books. In order to check that my input file is correct (i.e. the options can reproduce my "dumb" implementation) I performed a single point calculation for the $\ce{N2}$ dimer. Surprisingly I found
$$
E_\text{tot}^\text{G09} = -106.765838750 \text{ a.u.}
$$
which is quite different from my result. The input file I used is the following:
%NProcShared=2
%Mem=1GB
#P RHF/STO-3G SP Symmetry=None Units=Bohr Pop=None Guess=Core

RHF

0 1
N 2.074 0.000 0.000
N 0.000 0.000 0.000

I tested the same structure on the input file for $\ce{H2O}$:
%NProcShared=2
%Mem=1GB
#P RHF/STO-3G SP Symmetry=None Units=Bohr Pop=None Guess=Core

RHF

0 1
H +1.4305507125e+00 +0.0000000000e+00 +0.0000000000e+00
H -1.4305507125e+00 +0.0000000000e+00 +0.0000000000e+00
O +0.0000000000e+00 +1.1072513982e+00 +0.0000000000e+00

In this case I find
$$
E_\text{tot}^\text{G09} = -74.9629400524 \text{ a.u.}
$$
wigh Gaussian09, while with my program I have
$$
E_\text{tot}^\text{HM} = -74.962937313769473 \text{ a.u.} = E_\text{tot}^\text{Szabo}
$$
For $\ce{H2O}$ everything seems to work fine. In a similar way, I get matching results also for $\ce{CH_4}$, $\ce{FH}$ and $\ce{CO}$.
There is a problem with the $\ce{N2}$ molecule (or simply with the input file) I am not considering?
Which is the best set of options for Gaussian09 that can emulate a home-made Hartree-Fock program (written following closely Szabo's book [1])?
[1] A. Szabo and N. Ostlund, Modern Quantum Chemistry, Dover, 1996.

Diagonalization of the core Hamiltonian provides usually not the best guess for the SCF procedure to say the least, and thus, by default Gaussian uses a more sophisticated guess obtained by diagonalizing the Harris functional (Guess=Harris). With this default guess one get the same energy as OP reported:
 SCF Done:  E(RHF) =  -107.495842181     A.U. after    5 cycles

Now, Pop=None was a terrible idea, of course. It is always advisable to look at the final orbitals. Everything looks fine for the case of the default guess
 Alpha  occ. eigenvalues --  -15.51806 -15.51612  -1.44283  -0.72249  -0.57311
 Alpha  occ. eigenvalues --   -0.57311  -0.53949
 Alpha virt. eigenvalues --    0.28131   0.28131   1.12344

but results with the core Hamiltonian guess look suspicios
 Alpha  occ. eigenvalues --  -15.44896 -15.44853  -1.34440  -0.64250  -0.60670
 Alpha  occ. eigenvalues --   -0.52980  -0.16921
 Alpha virt. eigenvalues --   -0.07243   0.31047   1.20826

The energy of the first virtual orbital is negative which is odd. It is difficult to say what went wrong with the core Hamiltonian guess, but some clue can be provided if turning the symmetry back on (this is another very sensible default turning which off was a bad idea, I think).
The default guess yields the electronic state with a particular symmetry ($\sigma_{\mathrm{g}}$)
 Initial guess orbital symmetries:
       Occupied  (SGU) (SGG) (SGG) (SGU) (PIU) (PIU) (SGG)
       Virtual   (PIG) (PIG) (SGU)
 The electronic state of the initial guess is 1-SGG.

and converges within this symmetry
 Orbital symmetries:
       Occupied  (SGG) (SGU) (SGG) (SGU) (PIU) (PIU) (SGG)
       Virtual   (PIG) (PIG) (SGU)
 The electronic state is 1-SGG.

But the core Hamiltonian guess yields the electronic state with no symmetry
 Initial guess orbital symmetries:
       Occupied  (SGG) (SGU) (SGG) (SGU) (PIU) (PIU) (PIG)
       Virtual   (PIG) (SGG) (SGU)

and converges within this state with no symmetry
 Orbital symmetries:
       Occupied  (SGG) (SGU) (SGG) (SGU) (PIU) (PIU) (PIG)
       Virtual   (SGG) (PIG) (SGU)
 Unable to determine electronic state:  partially filled degenerate orbitals.

which is again suspicious.
So, there is something wrong with the core Hamiltonian guess for this system (I suspect the basis is too small for the core Hamiltonian guess to yield sensible results), thus, SCF spits out some "strange" numbers. Strictly, speaking there is nothing strange with the numbers. Remember that SCF usually converges to a local minimum, and which particular depends on which part of the wave function space the initial guess placed the system in. And besides, you're not even guaranteed to have a minimum, SCF might converge to a stationary point of any kind.

I know the options I choose are bad for an actual calculation. However, in this case the goal is to have Gaussian09 behave as close as possible to my implementation. In particular I don't use symmetry and I don't perform population analysis (but I agree that looking at least at the orbitals would have been useful!). I thought that the option Guess=Core corresponds to setting the density matrix elements to zero (approximate Fock's operator with the core Hamiltonian), which is what I do. This is not the case?

@R.M., yes, you're right, the core Hamiltonian guess ignores all the electron-electron interactions, and is thus physically terrible. For that reason it can lead to strange results.

It seemed strange to me that this guess works in my implementation (and apparently also in Szabo's one) and not in Gaussian09. In any case I will try to implement a better initial guess! Thank you.

@R.M., in your particular case the core Hamiltonian yields the electronic state that is too far away from the global minimum, so that SCF couldn't find it is way to the global minimum. Just increasing the basis set to 6-31G "fixes" the core Hamiltonian guess, so that it yields a much better starting point.

@R.M., that is a bit strange, I agree. But different implementations of the same algorithm could work differently. The devil, as usual, is in the details.

@R.M. I'm guessing that your HF uses direct  SCF, while gaussian09 by default uses an iterative (DIIS and EDIIS) procedure to find the minimum.  As previously noted, SCF is not guaranteed to find a global minimum, and different minimization procedures can end up in different minima, even starting from the same spot (Guess=Core).  I Recall this being an issue when I wrote an HF program last year in matlab and tried to benchmark results against gaussian.  You can definitely turn it off, I believe that SCF=(NoDIIS, DM) (I can never remember the exact gaussian synax) should make it more like your home written program

Direct SCF and DIIS/EDIIS are different things. Direct SCF refers to the way in which integrals are generated and stored. DIIS/EDIIS refers to how convergence of the SCF equations is achieved. They are completely independent of each other.


text:
Nomenclature of spiro compounds
Does the nomenclature of spiro compounds follow the same pattern as that for bicyclo compounds? That is, in absence of functional groups do we start form the largest chain to the smallest chain. What would be the case if there were functional groups?

No, according to the current version of Nomenclature of Organic Chemistry – IUPAC Recommendations and Preferred Names 2013 (Blue Book), numbering of spiro compounds starts in the smaller ring.

P-24.2.1 Monospiro alicyclic ring systems
Mono spiro parent hydrides consisting of two saturated cycloalkane rings are named by placing the nondetachable prefix ‘spiro’ before the name of the unbranched acyclic hydrocarbon with the same total number of skeletal atoms. The number of skeletal atoms linked to the spiro atom in each ring is indicated by arabic numbers separated by a full stop, cited in ascending order and enclosed in square brackets; this descriptor (called in these recommendations the ‘von Baeyer spiro descriptor’) is placed between the spiro prefix and the name of the acyclic alkane. Numbering starts in the smaller ring, if one is smaller, at a ring atom next to the spiro atom and proceeds first around that ring, then through the spiro atom and around the second ring.

The fixed numbering of the spiro hydrocarbon ring is not modified by the introduction of heteroatoms, double bonds, or functional groups. However, low locants must be attributed if there is a choice.

That is exactly what I needed, but is there a reason for this or is it just arbitrary?

In Spiro compounds its actually the opposite,we start from the smaller chain to the larger chain.
General Name structure:
Secondary Prefix Spiro [X,Y] Root word Primary Suffix Secondary Suffix
X,Y are the number of carbons present on both sides of bridge carbon.
X,Y should be written in ascending order.
Numbering should be started from carbon which is adjacent to fused/bridge carbon in the smaller ring and it should continue into bigger ring through the fused/bridge carbon.
Even if functional groups we will follow the same rules above (even if functional group is there in the bigger ring).
Example: spiro[3.4]octan-5-one


text:
Valency and chemical formula
If an element valency corresponds to the group number in the periodic table, oxygen would be 6 right?
The question states; Species: Li, O
I assume Li is 1 and O is 6, so my chemical formula is $\ce{Li6O}$ but the correct answer is $\ce{Li2O}$
Why is the valency of Oxygen 2?
similarly Pb(II) and Iodine, which iodine is in group 7 but just like the answer it said the valency is 1.
 If I drew the electron shells for oxygen I realize there are 2 electron spaces, if I did the same for Iodine there are 7 spaces. so this did not answer my question
then I saw number of bonds = (full valence shell) - (n. of valence electron)
for oxygen it returned 2, through: $8 - 6$
then it was the same for Iodine: $8- 7 $
This did not answer my question either, as Lithium and Sodium correspond with the group number. Am I missing something OR doing something wrong OR is there some sort of principle among this periodic table?

Then it asked, $\ce{Ag}$, $\ce{OH-}$. because Ag is a transition metal, so how do I find its valency? OH is a polyatomic ion, is there a way to find out the valency for polyatomic ion or am I suppose to memorize it for exams?
 The question in my book mostly gives 2 species then asked for the chemical formulas. I'm just very confused at the valency part.

In a chemical bond some elements like Li are electron donors, and some like oxygen are electron receptors.

Max's comment sums it up. Beware, I'm gonna have to use many simplifications in order to explain this.
A bit of introduction
The species you mentioned are ionic compounds. For your level it's useful to take ionic bonds as bonds between atoms that have such different electronegativities (ChemGuide typically provides useful introductions, I recommend clicking on that link and reading it carefully) that we can imagine them as different ions. Hence, this bond is the attraction between charged particles. What does that mean? It means that one of the species will have a positive charge and the other a negative charge.
Electronegativity increases in diagonally, as we move from bottom left to top right.
$\hspace{5ex}$
$\hspace{30ex}$ Electronegativity (Periodic Trend) – Source
For now just don't apply the electronegativity concept to noble gases. If you really want to know how their electronegativities are determined, take a look at interesting posts like this.
The more electronegative the atom, the less the chance that it'll bond by losing its electrons. Thus, we can conclude two important rules that occasionally become useful, while they're not highly accurate at higher levels:

Metals in general, and especially alkali and alkali earth metals, will bond ionically by losing their valence electrons.
Non-metals in general, and especially halogens, oxygen and nitrogen, will bond ionically by gaining electrons.

I repeat: The two bullet points above are just rules of thumb. Don't expect them to work all the time. But they're good starting points, so I included them in the answer. Don't hesitate to resort back to the first sentence whenever you ran into cases where you don't get a definitive answer by them.

Lithium oxide's case
So let's apply what we learnt to the $\ce{Li2O}$'s case. Lithium will lose its electrons in order to gain the configuration of a noble gases, in which case it would be helium.
$$\ce{Li(s)->Li(g)}^{~1}$$
$$\ce{Li(g)->Li+(g)}$$
Oxygen, however, doesn't favor losing its electrons at all. It will, instead, gain electrons and its electronic configuration would arbitrarily look like that of neon, a noble gas.
$$\ce{O2(g)->2O^2- (g)}$$
Finally, the two ions will form a lattice. Billions of billions of these ions form $\ce{Li2O}$.
$$\ce{Li+ (g) + O^2- (g) -> Li2O(s)}$$
Hence the overall reaction is
$$\ce{2Li (s) + O2 (g) -> 2Li2O(s)}$$
So let's review what we understood: In lithium oxide, oxygen will gain electrons while lithium will lose electrons, since their electronegativities differ greatly. So we should see how many electrons it will lose in order to get to the configuration of the previous noble gas in the periodic table, while oxygen will gain electrons to reach the configuration of the next noble gas in the periodic table. See this Q/A to gain more insight on how to figure this out using their electronic configuration or group number if you don't already know how.
Note that the formula for ionic compounds is the smallest relation between its ions. By $\ce{Li2O}$ we indicate that for every two lithium ions, one oxygen ion is present in the lattice, crudely, and assuming the crystal is without defect. Think of it like this: There was a need for two lithium ions to provide a single oxygen ion with the electrons it needed to fulfill its stable electronic configuration.
Silver hydroxide's case
Let's solve the case of silver and hydroxide.
The hydroxide ion has a charge of $-1$, hence the trouble of determining the charge it will have while bonded ionicallly with silver is gone! Unfortunately, for now, the best way to find the charge out is memorizing it. You may get some fuzzy speculations by drawing Lewis structures, but poly-atomic ions are sometimes exotic chemical species and unpredictable, since many effects are at play to determine the charge of the ion. You can find a list of them here, or more just with a simple Google search.
You have no choice but to memorize the charge of transition metals though, since they tend to assume abnormal electronic configurations. Over time, you'll face it so much you'll learn by heart that $\ce{Ag+}$ is silver's most stable ion.
Now try to apply the logic and reasoning we used back in $\ce{Li2O}$'s case. What would the formula be?

 $\ce{AgOH}$

Useful tips:

Don't forget, that if the poly-atomic ions are more than one in the ionic formula, you should indicate their number with them in parenthesis.
$\Longrightarrow \rm\color{red}{Wrong:} \quad \ce{(NH4)F,~Ca3PO42}$
$\Longrightarrow \rm\color{green}{Correct:} \quad \ce{NH4F,~Ca3(PO4)2}$
Beware of poly-atomic ions that only consist of one atom. These make for the biggest traps and confusions of the students. Good examples are peroxide, superoxide, and azide. Hence $\ce{Li2O2}$ and $\ce{LiO2}$ are correct! Simply because, the ions in them are not the oxide ion, $\ce{O^2-}$, but $\ce{O2^2-}$ and $\ce{O2^-}$, respectively. 2
The oxidation states of the elements, if mentioned, give clue as to what charge their corresponding ion will have. $\ce{Pb(II) \Longrightarrow Pb^2+ ,~Fe(II) \Longrightarrow Fe^2+ ,~Fe(III) \Longrightarrow Fe^3+}$ and so on.

1: It's simplified if I recall correctly, but we take the lattice as formed by ions in the gas state. It helps in defining lattice enthalpy, and I haven't read anywhere that it's not what's really happening.
2: Actually, you can't necessarily make any ionic compounds with any ions you want. Some of them are too unstable to reasonably exist, like lithium superoxide. But it seems the examiners want you to be a magician anyway.

Actually, even silver(I) hydroxide is not particularly stable; it loses water to giver silver(I) oxide. But that certainly does not detract from the answer at all. The only thing that makes me sad is the question, which is confusing at best...


text:
Initial guess for Unrestricted Hartree-Fock calculation
I am implementing an Unrestricted Hartree-Fock (UHF) calculation, following Ref. [1]. It works fine for a odd number of electrons ($N_\alpha\neq N_\beta$) since, despite the same initial guess for $\alpha$ and $\beta$ spins, the density matrices at the second step will be different and I get different orbital energies for different spin orbitals. The problem arises when I have an even number of electrons ($N_\alpha=N_\beta$) . Authors of Ref. [1] state that (p. 216)

When $N_\alpha=N_\beta$, a restricted solution of Roothaan equations is a solution to the unrestricted Pople-Nesbet equations. This restricted solution always exists and necessarily results if an initial guess $P_\alpha=P_\beta$ is used. [...] In seeking this second solution [the unrestricted one], it is imperative that an initial guess $P_\alpha \neq P_\beta$ be used or the equations will necessarily yield the restricted solution.

Unfortunately there is no clue on which initial guess should be taken. In fact in this book, for the restricted case, the Fock matrix is initially approximated by the core Hamiltonian (Guess=Core in Gaussian09), which consists in taking $P_\alpha=P_\beta=0$.
Since the core Hamiltonian guess cannot be differentiated for $\alpha$ and $\beta$ spins, I implemented Huckel guess (Guess=Huckel in Gaussian09) following Ref. [2] which consists in approximating the initial Fock matrix with the following:
$$
F_{ij} = KS_{ij}\frac{H_{ii}+H_{jj}}{2}
$$
$H$ is the core Hamiltonian, $S$ is the overlap matrix and $K$ is a constant. I tried to slightly change the coefficient $K$ (the suggested value is 1.75) for different spins in order to get a different initial guess. However, the SCF procedure converges towards a value that is higher in energy than the restricted solution. This should not be the case, in particular for a dissociating $\ce{H2}$ molecule (i.e. distance $R=4.4$ Bohr).
How I can properly differentiate the initial guess for $\alpha$ and $\beta$ spins?

EDIT
The reference of Gaussian09 states the following:

Requests that the HOMO and LUMO be mixed so as to destroy α-β and spatial symmetries. This is useful in producing UHF wavefunctions for singlet states. [...]

I belive that this is the solution to my problem, but what does actually means HOMO and LUMO be mixed in practice (i.e. before starting the calculation)?

[1] Szabo and Ostlund, Modern Quantum Chemistry, Dover, 1996.
[2] M. Lee et al., Extended Hückel and Slater’s rule initial guess for real space grid-based density functional theory, Computational and Theoretical Chemistry, 2015.

It only means spatial distribution of alpha and beta can be different, which is easiest to set up by mixing homo lumo levels

@Greg I tried to differentiate the spatial distribution by choosing a different coefficient for the Hückel guess, but apparently it does not work. In order to mix the orbitals I need to perform at least one SCF step (i.e. I need to compute HOMO and LUMO orbitals for my initial guess of Fock matrix). But I didn't find anywhere how to mix these orbitals in practice afterwards.

Generally you use a new HOMO = constant (old HOMO + old LUMO); new LUMO = constant (old HOMO - old LUMO). The trick is that you actually should know what you are doing, and choose a related pair of orbitals (i.e. sometimes you have to mix HOMO-1 or HOMO-2 .. instead of HOMO...). Note, it does not necessarily work out of the box. Present toolbox of  QChem is more about nice behaving closed shell molecules, open shell situations are often neglected as unimportant / difficult.

When $N_{\alpha} = N_{\beta}$, a restricted solution of Roothaan equations is a solution to the unrestricted Pople-Nesbet equations. This restricted solution always exists and necessarily results if an initial guess $P_{\alpha} = P_{\beta}$ is used. [...] In seeking this second solution [the unrestricted one], it is imperative that an initial guess $P_{\alpha} ≠ P_{\beta}$ be used or the equations will necessarily yield the restricted solution.

The quote you state from Szabo and Ostlund is not wrong, but isn't a practical quote in the sense that it helps to think about the different spin cases that one would want to handle. You already know how RHF/closed-shell calculations work in theory and in practice. I won't talk about restricted open-shell Hartree-Fock (ROHF), because it isn't relevant to this problem.
There are three UHF/open-shell scenarios, which will be considered in order:

Odd number of electrons
Even number of electrons, high spin
Even number of electrons, low spin

Odd number of electrons
For this case, take the copper(II) atom, which has a 3d$^{9}$ valence electron configuration; it is a doublet, so it has 1 more $\alpha$ electron than $\beta$ electron. There's no trouble here, because the indices for occupied orbitals run over different ranges; in the simplest case, the range for $\alpha$ spin will be 1 larger than for $\beta$ spin.
Even number of electrons, high spin
For this case, let's take triplet oxygen. In practice, this is actually identical to the above case, except we have 2 more $\alpha$ electrons than $\beta$ electrons. Again, we have differently-sized occupied blocks for each set of MO coefficients which will lead to different densities.
Even number of electrons, low spin
For this case, let's take singlet oxygen.
This is the difficult case, because the orbital degeneracy means for a proper qualitative description of the molecular orbitals, two determinants must be used, requiring a CAS(2,2) (at a minimum). Because this valence electron degeneracy isn't possible in a single determinant picture, the degenerate MOs will "split" into one lower in energy, the other higher. Requesting a singlet spin multiplicity means the two electrons will now occupy the same orbital; there's no reason for them to occupy different orbitals, at least for the initial guess. Hopefully it's (visually) clear that if the spatial components of $\alpha$ and $\beta$ spins are the same in this case, our guess is equivalent to the RHF guess. This means that for an open-shell singlet, one must break spatial symmetry in the initial guess, just as Szabo and Ostlund states. Since the RHF solution always exists as a local minimum on the "determinental" potential energy surface, whatever you choose as your SCF converger is most likely going to get stuck in this minimum.
This is a little hand-wavy, since we know that UHF calculations approximate two real determinants at the cost of spin contamination, but that isn't our goal.
Breaking spatial symmetry
How do we break spatial symmetry? Consider the initial steps of a typical RHF calculation that diagonalizes the one-electron (core) Hamiltonian:
$$\begin{align}
\mathbf{H}^{\text{core}} &= \mathbf{T}_{\text{e}} + \mathbf{V}_{\text{ne}} \\
\mathbf{F}^{0'} &= \tilde{\mathbf{S}}^{-1/2} \mathbf{H}^{\text{core}} \mathbf{S}^{-1/2} \\
\mathbf{F}^{0'} \mathbf{C}^{0'} &= \mathbf{\epsilon}^{0'} \mathbf{C}^{0'} \\
\mathbf{C}^{0} &= \mathbf{S}^{-1/2} \mathbf{C}^{0'} \\
P_{\mu\nu} &= \sum_{i}^{\text{occ}} C_{\mu i} C_{\nu i}
\end{align}$$
where the tick mark signifies a quantity is in the orthogonal AO basis, as opposed to the original (non-orthogonal) AO basis. Now assume we're doing a UHF calculation:
$$\begin{align}
\mathbf{H}^{\text{core}} &= \mathbf{T}_{\text{e}} + \mathbf{V}_{\text{ne}} \\
\mathbf{F}^{0'} &= \tilde{\mathbf{S}}^{-1/2} \mathbf{H}^{\text{core}} \mathbf{S}^{-1/2} \\
\mathbf{F}^{0'} \mathbf{C}^{\alpha, 0'} &= \mathbf{\epsilon}^{\alpha, 0'} \mathbf{C}^{\alpha, 0'} \\
\mathbf{F}^{0'} \mathbf{C}^{\beta, 0'} &= \mathbf{\epsilon}^{\beta, 0'} \mathbf{C}^{\beta, 0'} \\
\mathbf{C}^{\alpha, 0} &= \mathbf{S}^{-1/2} \mathbf{C}^{\alpha, 0'} \\
\mathbf{C}^{\beta, 0} &= \mathbf{S}^{-1/2} \mathbf{C}^{\beta, 0'} \\
P_{\mu\nu}^{\alpha} &= \sum_{i}^{\text{occ }\alpha} C_{\mu i}^{\alpha} C_{\nu i}^{\alpha} \\
P_{\mu\nu}^{\beta} &= \sum_{i}^{\text{occ }\beta} C_{\mu i}^{\beta} C_{\nu i}^{\beta}
\end{align}$$
This is misleading! Because we only have one initial Fock matrix, it will only have one set of eigenvectors, so $\mathbf{C}^{\alpha, 0'} \equiv \mathbf{C}^{\beta, 0'}$! If the ranges for forming the two densities are different (as it would be when $N_{\alpha} \neq N_{\beta}$), then having an initial pair of identical MO coefficient matrices is not an issue. For your Huckel guess (called the Generalized Wolfsberg-Helmholtz or GWH guess in Q-Chem, scf_guess = gwh), the initial MO coefficient matrices would still be identical, because you modify a quantity they have in common (the core Hamiltonian).
So, we must modify the MO coefficients (coefficient matrices) themselves. There are three options that I know of:

mixing
rotation
switching

These are variants of the same thing; rotation is the most general, since you can define switching or mixing of two orbitals via rotations.
Mixing
The most straightforward approach of the three that requires no prior knowledge of your system is mixing. The usual choice is to "mix" some amount of the HOMO with the LUMO of the same spin:
$$\begin{align}
C_{\mu,\text{HOMO}}^{\text{new}} &= \frac{1}{\sqrt{1 + k^{2}}} \left( C_{\mu,\text{HOMO}}^{\text{old}} + k C_{\mu,\text{LUMO}}^{\text{old}} \right) \\
C_{\mu,\text{LUMO}}^{\text{new}} &= \frac{1}{\sqrt{1 + k^{2}}} \left( -k C_{\mu,\text{HOMO}}^{\text{old}} + C_{\mu,\text{LUMO}}^{\text{old}} \right)
\end{align}$$
where $k = [0, 1]$. If $k = 0$, nothing happens; if $k = 1$, the HOMO and LUMO become the symmetric and antisymmetric linear combinations of the two, respectively. In theory, this doesn't need to be the HOMO and LUMO; any two MO indices could be chosen, as long as they will result in different densities. This is also only for a single $\mu$; because we want to work with matrices, we would be working with whole rows of the MO coefficient matrix. For Q-Chem, this is $\alpha$ spin only (scf_guess_mix = k); the Gaussian manual doesn't say which spin it takes.
Rotation
The most general form for operating on pairs of MOs is rotation. Recall the rotation matrix in two dimensions:
$$
R(\theta) = \begin{bmatrix}
\cos(\theta) & -\sin(\theta) \\
\sin(\theta) & \cos(\theta)
\end{bmatrix}
$$
This can be used to "rotate" two arbitrary molecular orbitals $i,j$ by an arbitrary angle:
$$
\begin{bmatrix}
C_{i}^{'} \\
C_{j}^{'}
\end{bmatrix}
= \begin{bmatrix}
\cos(\theta) & -\sin(\theta) \\
\sin(\theta) & \cos(\theta)
\end{bmatrix}
\begin{bmatrix}
C_{i} \\
C_{j}
\end{bmatrix}$$
where again each $C$ is a row vector. This can be expended into a set of 2 equations:
$$\begin{align}
C_{i}^{'} &= C_{i} \cos(\theta) - C_{j} \sin(\theta) \\
C_{j}^{'} &= C_{i} \sin(\theta) + C_{j} \cos(\theta)
\end{align}$$
There are a few interesting cases.
180 degree rotation: change phase
$$
R(180^{\circ}) = \begin{bmatrix}
-1 & 0 \\
0 & -1
\end{bmatrix}
$$
leads to
$$\begin{align}
C_{i}^{'} &= -C_{i} \\
C_{j}^{'} &= -C_{j}
\end{align}$$
This is kind of pointless, since the energy should be invariant to a phase swap.
90 degree rotation: interchange
$$
R(90^{\circ}) = \begin{bmatrix}
0 & -1 \\
1 & 0
\end{bmatrix}
$$
leads to
$$\begin{align}
C_{i}^{'} &= - C_{j} \\
C_{j}^{'} &= C_{i}
\end{align}$$
This is the usual case when "rotate orbitals" is seen. This is equivalent to switching orbitals. I don't know about other programs, but if you do this in ORCA, the orbital energies will be swapped as well.
45 degree rotation: symmetric and antisymmetric linear combinations
$$
R(45^{\circ}) = \begin{bmatrix}
1/\sqrt{2} & -1/\sqrt{2} \\
1/\sqrt{2} & 1/\sqrt{2}
\end{bmatrix}
$$
leads to
$$\begin{align}
C_{i}^{'} &= \frac{1}{\sqrt{2}} \left( C_{i} - C_{j} \right) \\
C_{j}^{'} &= \frac{1}{\sqrt{2}} \left( C_{i} + C_{j} \right)
\end{align}$$
This last example is identical to the $k = 1$ (100%) case from the mixing example shown earlier.
Switching
We could also alter occupation numbers, such as by placing the $\alpha$ (or $\beta$) HOMO electron into the same-spin LUMO, or some other occupied orbital, but this isn't an automated procedure like orbital rotation, because you need to know your occupied/virtual orbital indices prior to starting the calculation. This is equivalent to switching orbitals.
A short summary of program capabilities (to the best of my knowledge):

Q-Chem: mix, switch
Gaussian: mix, switch
GAMESS: mix, switch
DALTON: switch
MOLPRO: rotate
ORCA: rotate

An important note about mixing: it doesn't matter that choosing the HOMO and LUMO to permute may be incorrect. Programs that have baked-in support for symmetry (DALTON, MOLPRO, unsure about GAMESS) will only mix/switch/rotate orbitals within a symmetry unless symmetry is disabled, but the point is only to break symmetry in the initial guess so that the local RHF minimum is escaped. If you know beforehand that your system has particular symmetries that need to be preserved, then you would probably be doing something more complex than just mixing the HOMO and LUMO anyway.

So you start with $C^{\alpha}$ and $C^{\beta}$ as zeros, like in RHF calculation, then you apply mixing/rotation/switching during the SCF loop on one of the two density matrices?

@mle No, you typically only apply switching or mixing to the guess and not to further SCF iterations, since then you will almost certainly not obtain the minimized wavefunction according to the variational principle; you'll have some amount of "something else" added to your final MOs. Don't confuse this with damping or smearing, which you tend to apply in early iterations to overcome a bad guess, then turn off once you have more confidence SCF will converge to the right solution.