schrodinger.protein.nonstandard_residues module

class schrodinger.protein.nonstandard_residues.StructureSource(value)

Bases: str, enum.Enum

An enumeration.

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.


Return the path to the default user DB file.


Default path to user DB file.

Return type



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.,


Saved DB filepath to be used

Return type



Strip any ACE & NMA caps, and add an OXT cap.

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.


Invert the isomerism of the alpha carbon. So D residue gets converted to L and vice versa.


Return a list of AminoAcid objects from the specified built-in database file. :param db_type: the source database type

schrodinger.protein.nonstandard_residues.generate_smiles(st, use_annotations=False)

Generate the SMILES string for the given structure.


use_annotations (bool) – Whether to use annotations instead of 3D geometry (set if the structure is 2D).

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.


Retrieve an amino acid by PDB residue name


name (str) – PDB residue name


Amino acid object

Return type


property amino_acids
classmethod get_built_in_residues()

Return a list of built-in residues AminoAcid objects from the installation.


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.

saveDatabase(amino_acids, db_file=None)
static exportDatabase(amino_acids, db_file)

Export the amino acids database.

  • amino_acids (list[AminoAcid]) – Amino acids to export.

  • db_file (str) – Database file path.

blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
inherits(self, classname: str) bool
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str

objectNameChanged(self, objectName: str) [signal]

parent(self) QObject
property(self, name: str) Any

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
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 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.


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.


residues (list[non_standard_residues.AminoAcid]) – a list of residues


the elements of residues that are non-standard and for which “mutate to” has been enabled

Return type



a list of residues from the non-standard residue database

Return type



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.


st (_structure.Structure) – a residue structure


a copy of st that has been prepared for use in Prime

Return type



Generate three-letter residue names starting with a letter and ending with a two-digit number from 01 to 99


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
  1. Modify the CT: Add hydrogens, assign PDB names, and minimize.

  2. 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.


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.


ValueError – if the structure has any unexpected bonds for an alpha amino acid