We present a general molecular framework assembly algorithm
that
takes a largely arbitrary molecular fragment database and a user-supplied
target template graph as input. Automatic assembly of molecular fragments
from the database, following a prescribed, user-supplied set of connection
rules, then turns the template graph into an actual, chemically reasonable
molecular framework. Assembly capabilities of our algorithm are tested
by producing several abstract, closed-loop shapes. To indicate a few
of many possible application areas we demonstrate a host–guest
complex and a road toward catalysis. Postassembly substituent exchange
can be used to produce electric fields of desired values at desired
points inside the framework or at its surface as a stepping stone
toward rationally designed, artificial heterogeneous catalysts.