Source code for schrodinger.structutils.interactions.ssbond

from schrodinger.infra import mm
from schrodinger.structutils.analyze import evaluate_asl


[docs]def get_disulfide_bonds(ct): """ Find pairs of atoms involved in disulfide bonds. :param ct: structure :type ct: Structure :return: list of pairs of bonded atom CYS sulfur atoms in provided ct :rtype: list[tuple(structure._StructureAtom, structure._StructureAtom)] """ def bonded(atom1, atom2): """ Test if atom1 and atom2 are bonded """ return mm.mmct_is_atom_bonded(ct, atom1, atom2) == mm.TRUE asl = "protein and a.pt SG and (res. CYS or res. CYX)" s_atoms = evaluate_asl(ct, asl) bond_list = [] for atom1 in s_atoms: for atom2 in s_atoms: if atom1 < atom2 and bonded(atom1, atom2): bond_list.append((ct.atom[atom1], ct.atom[atom2])) return bond_list