Ejemplo n.º 1
0
        b_flag = 0
        connected_atoms = protein.get_connected_atoms(se)
        proximal_oxygen = protein.get_proximal_atoms(se, "O", 7.0)
        proximal_nitrogen = protein.get_proximal_atoms(se, "N", 7.0)

        for oxygen in proximal_oxygen:

            if oxygen.occupancy != 1.00:
                continue

            connected_hydrogen = []
            connected_hydrogen.extend(protein.get_connected_hydrogens(oxygen))
            for hydrogen in connected_hydrogen:
                try:
                    for anti_antecedent in connected_atoms:
                        bond_angle = Atom.get_bond_angles(
                            se, hydrogen, anti_antecedent)
                        if bond_angle < numpy.pi / 2:
                            raise ContinueLabelled

                except ContinueLabelled:
                    continue

                if Atom.distance(hydrogen, oxygen) <= 1.1 and Atom.distance(
                        se, oxygen) >= 1.0:
                    bond_angle = Atom.get_bond_angles(hydrogen, se, oxygen)
                    if bond_angle >= numpy.pi / 19:
                        distances1.append(Atom.distance(se, oxygen))
                        angles1.append(degrees(bond_angle))

                if (Atom.distance(hydrogen, oxygen) <= 1.1
                        and Atom.distance(se, oxygen) <= 4.0