cutoff = KIM_API_get_data_double(pkim, "cutoff")
    energy = KIM_API_get_data_double(pkim, "energy")
    forces = KIM_API_get_data_double(pkim, "forces")
    virialGlobal = KIM_API_get_data_double(pkim, "virial")
    #virialPerAtom = KIM_API_get_data_double(pkim, "particleVirial")

    # Set values
    numberOfAtoms[0] = NCLUSTERATOMS
    numberContributingAtoms[0]=NCLUSTERATOMS
    numberAtomTypes[0] = ATYPES

    if KIM_STATUS_OK > status:
        raise kimservice.error("KIM_API_model_init")
#    status = kimneighborlist.set_kim_periodic_full_neigh(pkim)
#    status = kimneighborlist.set_kim_periodic_half_neigh(pkim)
    kimneighborlist.nbl_initialize(pkim)

    status = virial.virial_init(pkim)
    status = virial.set_virial(pkim)

    status = KIM_API_model_init(pkim)

    atypecode = KIM_API_get_partcl_type_code(pkim, "Ar")
    for i in range(numberOfAtoms[0]):
        atomTypes[i] = atypecode
    
    coordinates[:] = coords_dump.flatten()[:]

    KIM_API_print(pkim)

#    NNeighbors, HalfNNeighbors, neighborList, RijList = set_NeighborList(pkim, coordinates, numberOfAtoms[0], cutoff[0]*4)
    def init_kim(self, atoms):
        """ Initialize the KIM service for the current ASE atoms config """
        self.pbc = atoms.get_pbc()
        self.cell = atoms.get_cell()
        self.cell_orthogonal = orthogonal(self.cell)

        if self.kimfile:
            # initialize with the KIM file in a standard directory
            status, self.pkim = ks.KIM_API_file_init(self.kimfile,
                    self.modelname)
        elif self.teststring:
            # initialize with the string we found in our kim file
            status, self.pkim = ks.KIM_API_init_str(self.teststring,
                    self.modelname)
        else:
            # if we haven't found a kim file yet, then go ahead and make a
            # KIM string which describes the capabilities that we require
            self.make_test_string(atoms)
            status, self.pkim = ks.KIM_API_init_str(self.teststring,
                    self.modelname)

        if ks.KIM_STATUS_OK != status:
            ks.KIM_API_report_error('KIM_API_init', status)
            raise InitializationError(self.modelname)

        natoms = atoms.get_number_of_atoms()
        ntypes = len(set(atoms.get_atomic_numbers()))

        ks.KIM_API_allocate(self.pkim, natoms, ntypes)

        # set up the neighborlist as well, if necessary
        self.uses_neighbors = uses_neighbors(self.pkim)
        if self.uses_neighbors:
            kimnl.nbl_initialize(self.pkim)

        ks.KIM_API_model_init(self.pkim)

        # get pointers to model inputs
        self.km_numberOfAtoms = ks.KIM_API_get_data_ulonglong(self.pkim, "numberOfParticles")
        self.km_numberOfAtoms[0] = natoms
        self.km_numberAtomTypes = ks.KIM_API_get_data_int(self.pkim, "numberOfSpecies")
        self.km_numberAtomTypes[0] = ntypes
        self.km_atomTypes = ks.KIM_API_get_data_int(self.pkim, "particleSpecies")
        self.km_coordinates = ks.KIM_API_get_data_double(self.pkim, "coordinates")
        if checkIndex(self.pkim, "particleCharge") >= 0:
            self.km_particleCharge = ks.KIM_API_get_data_double(self.pkim, "particleCharge")
        if checkIndex(self.pkim, "particleSize") >= 0:
            self.km_particleSize = ks.KIM_API_get_data_double(self.pkim, "particleSize")

        # check what the model calculates and get model outputs
        if checkIndex(self.pkim, "energy") >= 0:
            self.km_energy = ks.KIM_API_get_data_double(self.pkim, "energy")
        if checkIndex(self.pkim, "forces") >= 0:
            self.km_forces = ks.KIM_API_get_data_double(self.pkim, "forces")
        if checkIndex(self.pkim, "particleEnergy") >= 0:
            self.km_particleEnergy = ks.KIM_API_get_data_double(self.pkim, "particleEnergy")
        if checkIndex(self.pkim, "virial") >= 0:
            self.km_virial = ks.KIM_API_get_data_double(self.pkim, "virial")
        if checkIndex(self.pkim, "particleVirial") >= 0:
            self.km_particleVirial = ks.KIM_API_get_data_double(self.pkim, "particleVirial")
        if checkIndex(self.pkim, "hessian") >= 0:
            self.km_hessian = ks.KIM_API_get_data_double(self.pkim, "hessian")
    atomTypes = KIM_API_get_data_int(pkim, "particleTypes")
    coordinates = KIM_API_get_data_double(pkim, "coordinates")
    cutoff = KIM_API_get_data_double(pkim, "cutoff")
    energy = KIM_API_get_data_double(pkim, "energy")
    forces = KIM_API_get_data_double(pkim, "forces")

    # Set values 
    numberOfAtoms[0] = NCLUSTERATOMS
    numberContributingAtoms[0]=NCLUSTERATOMS
    numberAtomTypes[0] = ATYPES

    status = KIM_API_model_init(pkim)
    if KIM_STATUS_OK > status:
        raise kimservice.error("KIM_API_model_init")
    import kimneighborlist
    status = kimneighborlist.nbl_initialize(pkim) 
    KIM_API_print(pkim)

    atypecode = KIM_API_get_partcl_type_code(pkim, "Ar")
    for i in range(numberOfAtoms[0]):
        atomTypes[i] = atypecode
    
    MiddleAtomId = create_FCC_configuration(FCCSPACING, NCELLSPERSIDE, 0, coordinates)
   
    NNeighbors, HalfNNeighbors, neighborList, RijList = set_NeighborList(pkim, coordinates, numberOfAtoms[0], cutoff[0]*2)
    kimneighborlist.nbl_set_neigh_object(pkim, NNeighbors, HalfNNeighbors, neighborList, RijList)

    KIM_API_model_compute(pkim)

except error:
    KIM_API_report_error(error.message,errno)