Finally, we install the replacement fragment on the parent crystal structure by (i) removing the substructure of the parent that matched the query fragment, then (ii) augmenting the parent with the replacement fragment at its aligned coordinates in eqn. . We also introduce bonds between the installed replacement fragment and the parent structure: if we removed a bond {v p , v p } ∈ E p such that v p ∈ V p \ V p and v p ∈ V p , we may introduce a new edge {v p , v r = φ -1 (θ(v p ))} with the installed replacement fragment.