def prepare_molecules(mol1, mol2, aligned_suffix='', save_aligned=False,
    align=True):
    """Prepare two molecules for the scanning procedure. First, align mol1
    and mol2 with their centers to org and their third and second main
    axes with [1,0,0] and [0,1,0], respectively.  Then, append mol2 to mol1 and
    enable tagging to allow easily moving mol2 with one command.  The
    OBAggregate object is returned.

    Args:
        mol1: (object of type ManipulateAggregates.aggregate.agg) the molecule
            that is to be kept fixed during the scan
        mol2: (object of type ManipulateAggregates.aggregate.agg) the molecule
            that is to be moved around during the scan
        aligned_suffix: (string) add this to the original file names to get
            the files to which the aligned geometries shall be saved
        save_aligned: (bool) whether or not to save the aligned geometries
        align: (bool) whether or not to perform the alignment procedure

    Returns:
        an OBAggregate object that contains mol1 and mol2
    """
    nr_scan_mols = mol2.obmol.GetNrMolecules()
    nr_fix_mols = mol1.obmol.GetNrMolecules()
    if align:
        mol1.align([0, 0, 0], [1, 0, 0], [0, 1, 0])
        mol2.align([0, 0, 0], [1, 0, 0], [0, 1, 0])
        if save_aligned:
            mol1.write(mol1.info['name'] + aligned_suffix)
            mol2.write(mol2.info['name'] + aligned_suffix)
    else:
        mol1.obmol.Center()
        mol2.obmol.Center()
    mol1.append(mol2)
    obmol = mol1.obmol
    obmol.EnableTags()
    tag = obmol.CreateTag(nr_scan_mols)
    for i in range(nr_fix_mols, nr_fix_mols + nr_scan_mols):
        obmol.AddToTag(i, tag)
    return obmol
