def is_hbond_donor(atom: Atom) -> int: """If the atom is a hydrogen bond donor (0 or 1). """ if not atom.HasProp('_Feature_Donor'): mol = atom.GetOwningMol() _ChemicalFeatureGenerator().assign_features(mol) return atom.GetIntProp('_Feature_Donor')
def _is_count_valid(self, atom: Chem.Atom) -> bool: """ Some atoms are not to be counted as they will be deleted. :param atom: :return: """ if atom.HasProp('DELETE'): return False elif atom.HasProp('_ori_i') and atom.GetIntProp('_ori_i') == -1: return False else: return True