The goal in the "replace" stage is to align a replacement fragment with a targeted substructure of the parent crystal structure matching the query fragment, remove this substructure, then install the replacement fragment on the parent in its place to give the child crystal structure (e.g., in At this juncture, we have identified a subgraph G p of the graph of the parent crystal structure that is isomorphic to the graph of the query G q via the bijection θ : V p → V q . Now, to translate and align the replacement fragment onto this substructure of the parent crystal, we must find an injective mapping from a subset of the nodes on the graph of the replacement fragment G r to corresponding nodes of the parent subgraph G p .