schrodinger.protein.nonstandard_residues module¶
- class schrodinger.protein.nonstandard_residues.StructureSource(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
str
,enum.Enum
- Standard = 'standard built-in'¶
- Nonstandard = 'nonstandard built-in'¶
- Custom = 'nonstandard provided'¶
- schrodinger.protein.nonstandard_residues.get_residue_database(*, load_saved=True)¶
Get the global nonstandard residue database.
If there is an error loading the saved database file, an empty (default) database will be returned.
- schrodinger.protein.nonstandard_residues.get_default_user_dbfile()¶
Return the path to the default user DB file.
- Returns
Default path to user DB file.
- Return type
str
- schrodinger.protein.nonstandard_residues.get_enamine_dbfile()¶
- schrodinger.protein.nonstandard_residues.get_saved_db_file()¶
Return the path to the database file that is saved in Maestro’s prefs or, if no preference is specified, a default location in the user’s userdata directory.,
- Returns
Saved DB filepath to be used
- Return type
str
- schrodinger.protein.nonstandard_residues.get_mutate_to_filename(db_file: str) str ¶
get the path to the “.mutateto” file which lists the nonstandard residues from the database file that are enabled for mutation
- Parameters
db_file – the path to the database file
- Returns
the path to the “.mutateto” file
- schrodinger.protein.nonstandard_residues.strip_capping_groups(st, oxt_charge=- 1)¶
Strip any ACE & NMA caps, and add an OXT cap.
- schrodinger.protein.nonstandard_residues.add_oxt_cap(st, formal_charge=- 1)¶
- schrodinger.protein.nonstandard_residues.find_atom(st, name)¶
Find the atom with the given PDB name. None is returned if no such atom is present.
- schrodinger.protein.nonstandard_residues.flip_isomer(st)¶
Invert the isomerism of the alpha carbon. So D residue gets converted to L and vice versa.
- schrodinger.protein.nonstandard_residues.get_db_amino_acids(db_type)¶
Return a list of AminoAcid objects from the specified built-in database file. :param db_type: the source database type
- schrodinger.protein.nonstandard_residues.is_excluded_amino_acid(st)¶
- class schrodinger.protein.nonstandard_residues.ResidueDatabase(db_file=None)¶
Bases:
PyQt6.QtCore.QObject
A collection of AminoAcid objects. Included built-in residues. For now, just a collection of database-related functions.
- residuesChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- __init__(db_file=None)¶
- getAminoAcid(name)¶
Retrieve an amino acid by PDB residue name
- Parameters
name (str) – PDB residue name
- Returns
Amino acid object
- Return type
Optional[AminoAcid]
- property amino_acids¶
- classmethod get_built_in_residues()¶
Return a list of built-in residues AminoAcid objects from the installation.
- readDatabaseFile(db_file)¶
Read the specified database file, and return a ResidueDatabase (which is basically a list of AminoAcid objects, including built-in residues). Raises RuntimeError on failure.
- reset()¶
- saveDatabase(amino_acids, db_file=None)¶
- class schrodinger.protein.nonstandard_residues.AminoAcid(st, source=StructureSource.Custom)¶
Bases:
object
Class representing an amino acid (residue) row in the table.
- __init__(st, source=StructureSource.Custom)¶
- property name¶
AminoAcid.name will return the PDB residue name for this AA.
- property code¶
AminoAcid.code will return the 1-letter code for this residue.
- property built_in¶
AminoAcid.built_in will return whether this is a built-in residue.
- property standard¶
AminoAcid.standard will return whether this is a standard residue.
- property aligns_with¶
- property description¶
AminoAcid.description will return the title of the CT.
- property locked¶
AminoAcid.code will return whether the residue is locked from editing.
- property natural_analog_similarity: float | None¶
Get the similarity score for this residue relative to its natural analog.
- st_changed()¶
Must be called every time the structure is modified. Will update the SMILES string and the .isomer property.
- property identifier¶
Return an ID string for this residue, which includes the residue name, isomer, and description.
- is_editable()¶
- schrodinger.protein.nonstandard_residues.filter_residues_mutating_to_custom(residues)¶
- Parameters
residues (list[non_standard_residues.AminoAcid]) – a list of residues
- Returns
the elements of
residues
that are non-standard and for which “mutate to” has been enabled- Return type
list[non_standard_residues.AminoAcid]
- schrodinger.protein.nonstandard_residues.get_db_residues()¶
- Returns
a list of residues from the non-standard residue database
- Return type
list[non_standard_residues.AminoAcid]
- schrodinger.protein.nonstandard_residues.prepare_res_st_for_prime(st)¶
Create a copy of the specified residue structure that has been prepared for use in Prime.
This includes removing the OXT group (-OH), and setting the title of the CT to the 3-letter residue name.
- Parameters
st (_structure.Structure) – a residue structure
- Returns
a copy of
st
that has been prepared for use in Prime- Return type
- schrodinger.protein.nonstandard_residues.generate_custom_res_names()¶
Generate three-letter residue names starting with a letter and ending with a two-digit number from 01 to 99
- schrodinger.protein.nonstandard_residues.get_unique_res_name(used_names)¶
Return a unique residue name, one that doesn’t exist in the input list.
- schrodinger.protein.nonstandard_residues.fix_and_validate_res_structure(st: schrodinger.structure._structure.Structure, skip_minimization=False) schrodinger.structure._structure.Structure ¶
Modify the CT: Add hydrogens, assign PDB names, and minimize.
Validate to ensure #atoms < 300, backbone PDB atoms are present, minimization succeeded (valences are proper), and structure is not one of the 20 standard AAs.
- Raises
ValueError – if it is not possible to validate the structure as a non-standard amino acid
- schrodinger.protein.nonstandard_residues.validate_alpha_aa(st: schrodinger.structure._structure.Structure) None ¶
Validate that a structure is an alpha amino acid. Requires that the atom names be assigned.
- Raises
ValueError – if the structure has any unexpected bonds for an alpha amino acid