OEAtomMatchResidueID

class OEAtomMatchResidueID

The OEAtomMatchResidueID class stores residue properties, such as residue name, residue number, insertion code, chain ID, fragment number, and alternate location. It is used to construct an OEAtomMatchResidue predicate that provides a convenient way to iterate over atoms with specific residue information.

See also

Code Example

Constructors

OEAtomMatchResidueID() -> OEAtomMatchResidueID

Default constructor that initializes the object with fuzzy regex matches .* for each property.

OEAtomMatchResidueID(res: OEResidue) -> OEAtomMatchResidueID

Constructs an OEAtomMatchResidueID object with the given residue.

Note

There is a difference between using an OEResidue object retrieved from an existing atom, and a default constructed OEResidue object where the user has set a few variables. This is because the default constucted OEResidue object sets the residue name to UNL, residue number to 1, fragment number to 0, chainID, insert code, and alternate location to blank characters `` . Because of these defaults, when constructing from an OEResidue object, we convert fragment number ``0, to a fuzzy regex match .*, since it will be 1 or higher if it was read from a PDB file. In the same manner a blank `` `` character for the chainID is converted into a fuzzy regex match. However, since a blank character is allowed and the most common for an insertCode and alternate location, these are kept as is and not converted.

GetName

GetName() -> str

By default, it returns .* to match atoms with any residue name.

GetResidueNumber

GetResidueNumber() -> str

By default, it returns .* to match atoms with any residue number.

GetInsertCode

GetInsertCode() -> str

By default, it returns .* to match atoms with any residue insert code.

GetChainID

GetChainID() -> str

By default, it returns .* to match atoms with any residue chain ID.

GetFragmentNumber

GetFragmentNumber() -> str

By default, it returns .* to match atoms with any residue fragment number.

GetAlternateLocation()

GetAlternateLocation() -> str

By default, it returns .* to match atoms with any alternate location code.

SetName

SetName(n: str) -> None

See also OEResidue.SetName method.

SetResidueNumber

SetResidueNumber(n: str) -> None

See also OEResidue.SetResidueNumber method.

SetInsertCode

SetInsertCode(i: str) -> None

See also OEResidue.SetInsertCode method.

SetChainID

SetChainID(c: str) -> None

See also OEResidue.SetChainID method.

SetFragmentNumber

SetFragmentNumber(f: str) -> None

See also OEResidue.SetFragmentNumber method.

SetAlternateLocation

SetAlternateLocation(a: str) -> None

See also OEResidue.SetAlternateLocation method.