def __init__(self, map_data, xray_structure, ncs_restraints_group_list, real_space_gradients_delta, refine_selection=None, use_ncs_constraints=True, restraints_manager=None, data_weight=None, refine_sites=False, refine_transformations=False): adopt_init_args(self, locals()) self.refine_selection = nu.get_refine_selection( refine_selection=self.refine_selection, number_of_atoms=self.xray_structure.sites_cart().size()) self.extended_ncs_selection = nu.get_extended_ncs_selection( ncs_restraints_group_list=ncs_restraints_group_list, refine_selection=self.refine_selection) self.unit_cell = self.xray_structure.unit_cell() # get selection to refine asu_size = xray_structure.scatterers().size() if refine_sites: # Use all atoms to refine self.selection = flex.bool(asu_size, refine_selection) elif refine_transformations: # use only NCS related atoms (Without the Master NCS copy) self.selection = nu.get_ncs_related_selection( ncs_restraints_group_list=ncs_restraints_group_list, asu_size=asu_size)
def __init__( self, map_data, xray_structure, ncs_restraints_group_list, real_space_gradients_delta, refine_selection=None, use_ncs_constraints=True, restraints_manager=None, data_weight=None, refine_sites=False, refine_transformations=False): adopt_init_args(self, locals()) self.refine_selection = nu.get_refine_selection( refine_selection=self.refine_selection, number_of_atoms=self.xray_structure.sites_cart().size()) self.extended_ncs_selection = nu.get_extended_ncs_selection( ncs_restraints_group_list=ncs_restraints_group_list, refine_selection=self.refine_selection) self.unit_cell = self.xray_structure.unit_cell() # get selection to refine asu_size = xray_structure.scatterers().size() if refine_sites: # Use all atoms to refine self.selection = flex.bool(asu_size, refine_selection) elif refine_transformations: # use only NCS related atoms (Without the Master NCS copy) self.selection = nu.get_ncs_related_selection( ncs_restraints_group_list=ncs_restraints_group_list, asu_size=asu_size)
def test_ncs_related_selection(self): # print sys._getframe().f_code.co_name result = nu.get_ncs_related_selection( ncs_restraints_group_list=self.ncs_restraints_group_list, asu_size=25) # ASU length is set to 25 (not 21) expected = [True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, False, False, False, False] assert list(result) == expected
def test_ncs_related_selection(self): # print sys._getframe().f_code.co_name result = nu.get_ncs_related_selection( ncs_restraints_group_list=self.ncs_restraints_group_list, asu_size=25) # ASU length is set to 25 (not 21) expected = [ True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, False, False, False, False ] assert list(result) == expected