schrodinger.protein.pdbname module¶
Uses SMARTS matching to set PDB atom and residue names for a structure. Also re-numbers residues, and optionally adds bond orders.
Copyright Schrodinger, LLC. All rights reserved.
- schrodinger.protein.pdbname.find_oxt_atom(atoms)¶
Given a list of atom objects, returns the OT atom (oxygen of the -COOH) bound to the C-termini atom of the group. If no such atom is found, None is returned.
TODO: Extend to include other termini atoms.
- schrodinger.protein.pdbname.find_n1_atom(atoms)¶
Given a list of atoms, returns the N1 atom (N-terminus backbone nitrogen). If no such atom is found, None is returned. This function only works when the atom pdbname is properly named.
- Parameters:
atoms (list[schrodinger.structure._StructureAtom]) – List of atoms in which to find N1
- Returns:
The N1 atom
- Return type:
schrodinger.structure._StructureAtom
- schrodinger.protein.pdbname.recurse_neighbors(at: StructureAtom, residue_atoms: set[StructureAtom], atoms_to_assign: set[StructureAtom], excluded_atoms: set[StructureAtom]) None¶
Recursively collect bonded neighbor atoms into
residue_atoms, traversing the molecular graph outward fromat. Neighbors are included only if they are inatoms_to_assignand not already inresidue_atomsorexcluded_atoms.- Parameters:
at – The atom from which to start traversal.
residue_atoms – The set of atoms collected so far; updated in place.
atoms_to_assign – The set of atoms eligible for assignment.
excluded_atoms – a set of atoms to exclude from traversal.
- schrodinger.protein.pdbname.find_ace_cap_atoms(mol: Mol, rdk_idx_to_st_atom: dict[int, StructureAtom], atoms_to_assign: set[StructureAtom], backbone_atoms: set[StructureAtom]) set[StructureAtom]¶
Find all ACE cap atoms in the given molecule.
- Parameters:
mol – The RDKit Mol on which to search for ACE cap atoms.
rdk_idx_to_st_atom – A mapping from RDKit atom index to structure atom.
atoms_to_assign – The set of structure atoms to consider.
backbone_atoms – The set of backbone atoms in the molecule.
- Returns:
The set of ACE cap atoms.
- schrodinger.protein.pdbname.assign_pdb_names(st, *, selected_residues=None, rename_residues=True, rename_atoms=True, resolve_his=False, backbone_detection_size=3)¶
Assign PDB residue and/or atom names to struct. This is based on substructure definitions for standard residues.
Notes:
Only residues attached to a backbone chain will be assigned names.
An attempt will be made to identify side chains for amino acids and peptoids not in the patterns list. These will be labeled “UNK “.
PDB atom names for multiple Hydrogens attached to the same heavy atom will not follow the pro-R numbering rule, but instead H numbers will follow atom index order.
- Parameters:
st (schrodinger.Structure) – structure on which to work.
selected_residues (list or None) – The list of Structure._Residue objects on which the assigning will take place. If None, all the structure will be used
rename_residues (bool) – Whether to assign PDB residue names.
rename_atoms (bool) – Whether to assign PDB atom names.
resolve_his (bool) – Whether HIS residues should be resolved into HID, HIE or HIP.
backbone_detection_size (int) – minimum number of consecutive residues to be considered a backbone. By default, mono and dipeptides will be ignored.
- schrodinger.protein.pdbname.renumber_residues(struct, chains, start_resnum=1)¶
Renumber all residues to have a unique residue number and have residue numbers that are contiguous.
- Parameters:
struct (list[Structure]) – The structure to operate on. This structure is modified in-place.
chains (list or 'all') – A list of chains to renumber, or the string ‘all’ if all chains should be fixed.
- schrodinger.protein.pdbname.process_structure(struct: Structure, renumber_chains: list[str] | str | None = None, assign_bond_orders: bool = False) None¶
High-level PDB processing workflow: add hydrogens and assign PDB names, optionally renumbering the residues and assigning bond orders.
- Parameters:
struct – structure to process; modified in-place.
renumber_chains – optional list of chain IDs to renumber, or the string “all” to renumber every chain.
assign_bond_orders – use this option when reading in a structure without bond orders, or when reading a PDB file with non-standard atom names that does not have CONNECT records for those atoms.