A method includes chemically bonding a polymeric material to a
self-assembled molecular film that is chemically bonded to a surface of a
substrate. The self-assembled molecular film includes one or more defect
sites and a plurality of active device molecules, each of the plurality
of active device molecules including a molecular switching moiety having
a self-assembling connecting group at one end of the moiety and a linking
group at an opposed end of the moiety. The polymeric material chemically
bonds to at least some of the linking groups of the plurality of active
device molecules, causing the formation of the self-assembled molecular
layer covering the plurality of active device molecules and the defect
site(s).