def additional_setup_when_reading_input_file(self): """Generate interaction map and charge centers.""" # if a group is coupled and we are reading a .propka_input file, then # some more configuration might be needed map_ = make_interaction_map( 'Covalent coupling map for {0:s}'.format(str(self)), self.get_covalently_coupled_groups(), lambda g1, g2: g1 in g2.covalently_coupled_groups) info(map_) # check if we should set a common charge centre as well if self.parameters.common_charge_centre: self.set_common_charge_centres()
def print_out_swaps(self, conformation): """Print out something having to do with coupling interactions. Args: conformation: conformation to print """ map_ = make_interaction_map( 'Non-covalent coupling map for {0:s}'.format(str(conformation)), conformation.get_non_covalently_coupled_groups(), lambda g1, g2: g1 in g2.non_covalently_coupled_groups) _LOGGER.info(map_) for system in conformation.get_coupled_systems( conformation.get_non_covalently_coupled_groups(), Group.get_non_covalently_coupled_groups): self.print_system(conformation, list(system))
def find_covalently_coupled_groups(self): """Find covalently coupled groups and set common charge centres.""" for group in self.get_titratable_groups(): # Find covalently bonded groups bonded_groups = self.find_bonded_titratable_groups( group.atom, 1, group.atom) # coupled groups for bond_group in bonded_groups: if bond_group in group.covalently_coupled_groups: continue if bond_group.atom.sybyl_type == group.atom.sybyl_type: group.couple_covalently(bond_group) # check if we should set a common charge centre as well if self.parameters.common_charge_centre: self.set_common_charge_centres() # print coupling map map_ = make_interaction_map( 'Covalent coupling map for {0:s}'.format(str(self)), self.get_covalently_coupled_groups(), lambda g1, g2: g1 in g2.covalently_coupled_groups) _LOGGER.info("Coupling map:\n%s", map_)