def get_rcut(self): if not self.log: return None; # go through the list of only the active particle types in the sim ntypes = hoomd.context.current.system_definition.getParticleData().getNTypes(); type_list = []; for i in range(0,ntypes): type_list.append(hoomd.context.current.system_definition.getParticleData().getNameByType(i)); # update the rcut by pair type r_cut_dict = nl.rcut(); r_max_dict = {typ: sqrt(max(sum(p*p for p in point) for point in self.vertices[typ])) for typ in self.vertices}; for i in range(ntypes): for j in range(i, ntypes): (typei, typej) = type_list[i], type_list[j]; r_cut_dict.set_pair(typei, typej, r_max_dict.get(typei, 0) + r_max_dict.get(typej, 0) + self.radius*2*2.0**(1./6) + self.d_max - 1); r_cut_dict.fill(); return r_cut_dict;
def get_rcut(self): # go through the list of only the active particle types in the simulation ntypes = hoomd.context.current.system_definition.getParticleData().getNTypes() type_list = [] for i in range(0, ntypes): type_list.append(hoomd.context.current.system_definition.getParticleData().getNameByType(i)) # update the rcut by pair type r_cut_dict = nl.rcut() for i in range(0, ntypes): for j in range(i, ntypes): # get the r_cut value r_cut_dict.set_pair(type_list[i], type_list[j], self.r_cut_new) return r_cut_dict
def get_rcut(self): # go through the list of only the active particle types in the sim ntypes = hoomd.context.current.system_definition.getParticleData().getNTypes() type_list = [] for i in range(0, ntypes): type_list.append(hoomd.context.current.system_definition.getParticleData().getNameByType(i)) my_typeid = type_list.index(self.type) # update the rcut by pair type r_cut_dict = nl.rcut() for i in range(0, ntypes): for j in range(i, ntypes): # interaction only for one particle type pair if i == my_typeid and j == my_typeid: # get the r_cut value r_cut_dict.set_pair(type_list[i], type_list[j], self.r_cut) else: r_cut_dict.set_pair(type_list[i], type_list[j], -1.0) return r_cut_dict
def get_rcut(self): # go through the list of only the active particle types in the sim ntypes = hoomd.context.current.system_definition.getParticleData( ).getNTypes() type_list = [] for i in range(0, ntypes): type_list.append(hoomd.context.current.system_definition. getParticleData().getNameByType(i)) my_typeid = type_list.index(self.type) # update the rcut by pair type r_cut_dict = nl.rcut() for i in range(0, ntypes): for j in range(i, ntypes): # interaction only for one particle type pair if i == my_typeid and j == my_typeid: # get the r_cut value r_cut_dict.set_pair(type_list[i], type_list[j], self.r_cut) else: r_cut_dict.set_pair(type_list[i], type_list[j], -1.0) return r_cut_dict