import tooba_f as tbf

#P1=(0,1,0)
#P2=(1,1,0)
#print(tbf.angle_between3D(P1,P2))

#Read .trr file
data_all=tbf.fr_export(trajfile='traj.trr',num_frames=1)
#Read .gro file
_,data_num,_,res_num,res_type,atom_type,atom_num,_ = tbf.read_gro('initial.gro')
#Create subdomains coordinates
box_p=tbf.domain_decomposition(data=data_all,dx=2,dy=2,dz=2)
#Find atom type index in lists created above
group_ndx=tbf.resid_data(atom_type, group=['C1'])
#Assign desired atoms (from above function) to subdomains
box_res=tbf.res2grid(data_all,atom_num,box_p, group_ndx)


