Cluster model investigation of chemical bonding of elements in silica and water