import argparse
from .util import read_xyz
import os
 

def get_it():
    parser = argparse.ArgumentParser(description='A molecule utility that \
                                     read the xyz files.')
    
    pparser = argparse.ArgumentParser(description='A Molecule utility that reads XYZ files and calculates the distance between atoms at index1 and index2.')
    parser.add_argument('filename', type=str, help='The XYZ file to read.')
    parser.add_argument('index1', type=int, help='Index of the first atom.')
    parser.add_argument('index2', type=int, help='Index of the second atom.')
    
    args = parser.parse_args()

    print(args)
    dirname = os.path.dirname(os.path.abspath(__file__))
    filename  = os.path.join(dirname,'data',args.filename)
#    print (filename)
    mol = read_xyz(filename)
    print(mol)
#
#    print (mol['symbols'])
    
    print (mol['symbols'][args.index1]+'\n'+mol['symbols'][args.index2])