Graft part of one COORDS set onto another COORDS set

graft src <source COORDS> [srcframe <#>] 
                          [srcmask <srcmask> [srccharge <srccharge>]] 
                          tgt <target COORDS> [tgtframe <#>] 
                          [tgtmask <tgtmask> [tgtcharge <tgtcharge>]] 
                          {ic | [srcfitmask <srcmask>] 
                          [tgtfitmask <tgtmask>]} 
                          name <output COORDS> [bond <tgt>,<src> ...]

src <source COORDS> Source coordinates.
[srcframe <#>] Frame # from source coordinates to use (default 1).
[srccharge <maks>] If trimming atoms from source, ensure sum of charges on remaining atoms equals via scaling.
[srcfitmask <mask>] Atoms from source to use if RMS-fitting source onto target.
[srcmask <mask>] Atoms to keep from source (default all).
tgt <target COORDS> Target coordinates that will be grafted onto.
[tgtframe <#>] Frame # from target coordinates to use (default 1).
[tgtfitmask ] Atoms from target to use if RMS-fitting source onto target.
[tgtmask ] Atoms to keep from target (default all).
[ic] Connect source and target using internal coordinates.
name <output COORDS> Name of output COORDS set containing source grafted onto target.
[bond <tgt>,<src>] Create a bond between target atom selected by and source atoms selected by in the final structure. May be specified multiple times.

Graft one COORDS set onto another. If srcfitmask and/or tgtfitmask is specified, the source coordinates will be RMS best-fit onto target using the specified atoms. Only the atoms specified by srcmask and tgtmask will be kept. The bond keyword can be used to create bonds between target and source in the final structure. If using internal coordinates to connect the units, exactly one bond must be specified.

There is a recipe available that shows the use of this command to reorient small molecules