def GetAlignmentBetweenCorrespondingAtoms( coordinates1, coordinates2, cutoff ):
    """returns a list of atom positions, which are close to each other.

    This is done via a dynamic programming step. First all versus all comparison
    between atom positions is done. Only those positions are kept below cutoff.
    """

    dots = alignlib.makeAlignataMatrixRow()
    for i in range(len(coordinates1)):
        x1,y1,z1 = coordinates1[i]
        for j in range(len(coordinates2)):
            x2,y2,z2 = coordinates2[j]
            d = math.sqrt( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) % (z1-z2)*(z1-z2))
            if d <= cutoff:
                dots.addPairExplicit(i+1, j+1, 1)
                
    seq1 = alignlib.makeSequence ("A" * len(coordinates1))
    seq2 = alignlib.makeSequence ("A" * len(coordinates2))    

    if dots.getLength() <= 3:
        return None
    
    dottor = alignlib.makeAlignatorDummy( dots )
    alignator = alignlib.makeAlignatorDotsSquared( 0, 0, dottor)
    map_a2b = alignlib.makeAlignataVector()
    
    alignator.Align( seq1, seq2, map_a2b)

    return map_a2b

##-----------------------------------------------------------------------
dataset/ETHPy150Open CGATOxford/cgat/legacy/PdbTools.py/GetAlignmentBetweenCorrespondingAtoms/operator `+` -> `%`