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()

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

OEAtomMatchResidueID(OEChem::OEResidue res)

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

std::string GetName() const

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

GetResidueNumber

std::string GetResidueNumber() const

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

GetInsertCode

std::string GetInsertCode() const

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

GetChainID

std::string GetChainID() const

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

GetFragmentNumber

std::string GetFragmentNumber() const

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

GetAlternateLocation()

std::string GetAlternateLocation() const

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

SetName

void SetName(const std::string& n)

See also OEResidue::SetName method.

SetResidueNumber

void SetResidueNumber(const std::string& n)

See also OEResidue::SetResidueNumber method.

SetInsertCode

void SetInsertCode(const std::string& i)

See also OEResidue::SetInsertCode method.

SetChainID

void SetChainID(const std::string& c)

See also OEResidue::SetChainID method.

SetFragmentNumber

void SetFragmentNumber(const std::string& f)

See also OEResidue::SetFragmentNumber method.

SetAlternateLocation

void SetAlternateLocation(const std::string& f)

See also OEResidue::SetAlternateLocation method.