#/usr/bin/env python

from pNbody import *
from pNbody import ptreelib

from Gtools import io

params = io.read_params("params")
params['OutputInfo'] = 1
params['ComovingIntegrationOn'] = 1
params['PeriodicBoundariesOn'] = 1
params['Boxsize'] = 20000

nb = Nbody('disk.dat',ftype='gadget')
Tree = ptreelib.Tree(nb.npart,nb.pos,nb.vel,nb.mass,nb.num,nb.tpe,params)

# set parameters
#params = io.read_params("params")
#Tree.SetParameters(params)

#params = {'DesNumNgb':64}
#Tree.SetParameters(params)


params =  Tree.GetParameters()
print params['SofteningBndryMaxPhys']
print params['DesNumNgb']
print params['TypeOfOpeningCriterion']
