#!/usr/bin/python

from numpy import *
import string
import int_values
import takeinp
import abstracts


def same_cell(x, y):
    r = 0.0
    for i in range(len(x)):
        for j in range(len(x[0])):
            while (x[i][j]-y[i][j]) > 0.5:
                x[i][j] -= 1
            while (x[i][j]-y[i][j]) <= -0.5:
                x[i][j] += 1
    return x


inpt = takeinp.TakeInput('POSCAR')
lattmat = inpt.lattmat

coord = abstracts.Coordinates()
coord.getDefinition("ICOORD", inpt)
# coord.readInput("INPFILE")
coord.detect2(inpt)
