def calculatedistance(vector1, vector2):
    """
    Calculate the distance between two vectors (atoms)
    Returns the distance squared or None if vectors not aligned.
    
    :param vector1: First atom coordinate (x,y,z)
    :type vector1:  list
    :param vector2: Second atom coordinate (x,y,z)
    :type vector2:  list
    :return:        squared distance between two atoms
    """
    
    d= float(0)
    if len(vector1) == len(vector2):
        for i in range(len(vector1)):
            d=d+(vector1[i]-vector2[i])**2
        return d
    else:
        return None