Molecular abundances in stellar atmospheres. II