  We introduce a new generalization of Gompf nuclei and give applications. We
construct infinitely many exotic smooth structures for a large class of compact
4-manifolds with boundary, regarding topological invariants. We prove that a
large class of closed 3-manifolds (including disjoint unions of Stein fillable
3-manifolds) bound compact connected oriented 4-manifolds which admit
infinitely many smooth structures. To detect smooth structures, we introduce a
relative genus function. As a side result, we show that log transform and knot
surgery of 4-manifolds do not admit any Stein structure, under a mild
condition. Applying these results together with corks, we construct arbitrary
many compact Stein 4-manifolds and infinitely many non-Stein 4-manifolds which
are all homeomorphic but mutually non-diffeomorphic.
