NOVELTY - An alloy composition comprises several templates, each template having at least one first binding site with a specific binding affinity for a first nanoparticle of a first material, and at least one second binding site with a specific binding affinity for a second nanoparticle of a second material. The first nanoparticles and second naoparticles are bound to respective first and second binding sites; where the ratio of number of first binding sites to second binding sites is selected so that templates can assemble the first and second materials into an alloy.    USE - As alloy composition (e.g. gallium-indium-arsenic-phosphide (GaInAsP), gallium indium nitride (GaInN), gallium indium phosphide (GaInP), and aluminum indium phosphide (AlInP) alloys) useful in an optoelectronic device, a solar cell structure, a lithium-ion battery and a structure (claimed); useful as digital alloys in devices such as phototransistors, lasers, fiber optics and light-emitting diodes.    ADVANTAGE - Alloys with versatile compositions can be achieved by selecting the appropriate nanocrystal components and by controlling the relative amount of the corresponding binding sites on the templates. The semiconductor alloys provide tunable bandgaps through compositional control in the presence of templates, without he concerns of lattice and polarity match. It is possible to create alloy compositions with bandgaps that correspond to the entire range of the solar radiation. The incorporation of digital alloy having a highly conductive metal into to the cathode and/or anode in lithium-ion battery, drastically improves the conductivity, the current production and the operating lifetime of the lithium-ion battery. The incorporation of nanoparticles with the appropriate composition that are localized appropriately within the microstructure of the interconnection can also improve the long-term stability of the interconnect bond through stress relief and prevention of dislocations at the grain boundaries.    DETAILED DESCRIPTION - A composition comprises several templates, each template having at least one first binding site with a specific binding affinity for a first nanoparticle of a first material, and at least one second binding site with a specific binding affinity for a second nanoparticle of a second material. The first nanoparticles bound to respective first binding sites and the second nanoparticles bound to respective second binding sites. The templates are selected to include, in percentages, x first binding sites and y second binding sites. The templates are assembled such that the first material and the second material form an alloy at a stoichiometric ratio of x:y. The first and second materials comprise semiconductor elements and or metallic elements, selected from Group IIA, IIB, VA and VIA elements. The alloy is a quaternary alloy (preferably GaxIn1-xAsyP1-y), ternary alloy (preferably GaxIn1-xN, GaxIn1-xP, and AlxIn1-xP) or binary alloy. The template is a biological template such as protein and a biological scaffold. The first binding site is a first peptide sequence, and the second binding site is a second peptide sequence. The template is engineered such that the first binding sites and the second binding sites are distributed on the template at controllable number and distance from each other. INDEPENDENT CLAIMS are included for the following:    (1) forming an alloy involving forming at least one biological template having at least one first binding site and at least one second binding site; controlling the template such that the first binding sites and the second binding sites have a number ratio of x:y (where x and y are equal to 0-1); binding the first nanoparticles to respective first binding sites; binding the second nanoparticles to respective second binding sites; and forming the alloy containing the first material and the second material;    (2) an optoelectronic device comprising an alloy including several templates;    (3) a solar cell structure comprising a semiconductor substrate; a light sensitive layer coupled to the semiconductor substrate, where the light sensitive layer comprises an alloy including several templates;    (4) a lithium-ion battery comprising an anode that includes cobalt, oxygen and a low resistivity metal selected from gold, copper and silver, where the ratio of the low resistivity metal to the cobalt is selectively controlled to be less than 4 and positioned within the anode to reduce the cell resistance of the battery; a cathode; and an electrolyte fluid positioned between the anode and the cathode to transfer lithium ions, where the cobalt and low resistivity metals are formed in several templates; and    (5) a structure comprising a first conductive layer; a second conductive layer; and an intermetallic layer positioned between the first conductive layer and the second conductive layer, where the intermetallic layer is formed by forming at least one biological template.