def halogenbond_acceptor_halogen(mol1, mol2, base_angle_acceptor = 120, base_angle_halogen = 180, tolerance = 30, cutoff = 4):
    a, h = close_contacts(mol1.atom_dict[mol1.atom_dict['isacceptor']], mol2.atom_dict[mol2.atom_dict['ishalogen']], cutoff)
    #skip empty values
    if len(a) > 0 and len(h) > 0:
        angle1 = angle(h['coords'][:,np.newaxis,:],a['coords'][:,np.newaxis,:],a['neighbors'])
        angle2 = angle(a['coords'][:,np.newaxis,:],h['coords'][:,np.newaxis,:],h['neighbors'])
        a_neighbors_num = np.sum(~np.isnan(a['neighbors'][:,:,0]), axis=-1)[:,np.newaxis]
        h_neighbors_num = np.sum(~np.isnan(h['neighbors'][:,:,0]), axis=-1)[:,np.newaxis]
        strict = (((angle1>(base_angle_acceptor/a_neighbors_num-tolerance)) | np.isnan(angle1)) & ((angle2>(base_angle_halogen/h_neighbors_num-tolerance)) | np.isnan(angle2))).all(axis=-1)
        return a, h, strict
    else:
        return a, h, np.array([], dtype=bool)
print a dictionary
dataset/ETHPy150Open oddt/oddt/oddt/interactions.py/halogenbond_acceptor_halogen--crossover with--dataset/ETHPy150Open balajiln/mondrianforest/src/mondrianforest.py/MondrianTree.print_dict