schrodinger.protein.pdbname module

Uses MacroModel substructure definitions 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.

class schrodinger.protein.pdbname.Substructure(definition, restype, atom_types)

Bases: object

Holds the information about a substructure

__init__(definition, restype, atom_types)

Create a Substructure object

Parameters:
  • definition (str) – MacroModel-style substructure expression.
  • restype (str) – 4-letter residue type (“ALA “, “VAL “, etc).
  • data – PDB atom names separated by “;” for example: ” H ; N “. The order of the PDB names must match the order of the atoms in the substructure definition.
getMatches(struct)

Return a list of lists of atoms that match this substructure.

Return type:list
Returns:Each item of the returned list is a list of atom indexes that match this substructure.
extendToIncludeSideChainAtoms(st, match)

For the given UNK residue match, add all atoms bound to the beta carbon (side-chain) that are not part of the backbone (known substructure).

fixResName(struct, atoms)

Update the residue name of the matching atoms.

Parameters:
  • struct (schrodinger.structure.Structure) – The structure to operate on. This structure is modified in-place.
  • atoms (int) – List of atoms from this match
Return type:

list[int]

Returns:

Each item of the returned list is a list of atom indexes that match this substructure.

fixAtomNames(struct, atoms)

Update the matching atoms to the proper PDB atom names.

Parameters:
  • struct (list[schrodinger.structure.Structure]) – The structure to operate on. This structure is modified in-place.
  • atoms (list[int]) – List of atoms from this match
Return type:

list[int]

Returns:

Each item of the returned list is a list of atom indexes that match this substructure.

__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.protein.pdbname', '__doc__': '\n Holds the information about a substructure\n ', '__init__': <function Substructure.__init__>, 'getMatches': <function Substructure.getMatches>, 'extendToIncludeSideChainAtoms': <function Substructure.extendToIncludeSideChainAtoms>, 'fixResName': <function Substructure.fixResName>, 'fixAtomNames': <function Substructure.fixAtomNames>, '__dict__': <attribute '__dict__' of 'Substructure' objects>, '__weakref__': <attribute '__weakref__' of 'Substructure' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.protein.pdbname'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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.

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.assign_pdb_names(struct, res_names=True, atom_names=True, atoms=None)

Assign PDB residue and/or atom names to struct. This is based on substructure definitions for standard residues. Anything not in the substructure database is left untouched.

Parameters:
  • struct (schrodinger.structure.Structure) – The structure to operate on. This structure is modified in-place.
  • res_names (bool) – If True (default), rename matching residues, if False, do not.
  • atom_names (bool) – If True (default), rename matching atoms to the proper PDB atom type, if False, do not.
  • atoms (list(int)) – list of atoms to operate on, otherwise this function operates on the entire structure
schrodinger.protein.pdbname.renumber_residues(struct, chains)

Renumber all residues to have a unique residue number and have residue numbers that are contiguous.

Parameters:
  • struct (list[schrodinger.structure.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, renumber_chains=None, assign_bond_orders=False)