BioSimSpace._SireWrappers.Residue

class BioSimSpace._SireWrappers.Residue(residue)

A class for storing a residue.

__init__(residue)

Constructor.

Parameters

residue (Sire.Mol.Residue, Residue) – A Sire or BioSimSpace Residue object.

Methods

__init__(residue)

Constructor.

charge([property_map, is_lambda1])

Return the charge.

coordinates([property_map])

Return the coordinates of the atoms in the residue.

copy()

Return a copy of this object.

getAtoms()

Return a list containing all of the atoms in the residue.

getAxisAlignedBoundingBox([property_map])

Get the axis-aligned bounding box enclosing the object.

index()

Return the index of the residue.

moleculeNumber()

Return the number of the molecule to which this residue belongs.

nAtoms()

Return the number of atoms in the residue.

name()

Return the name of the residue.

search(query)

Search the residue for atoms and residues.

toMolecule()

Convert a single Residue to a Molecule.

translate(vector[, property_map])

Translate the object.

charge(property_map={}, is_lambda1=False)

Return the charge.

Parameters
  • property_map (dict) – A dictionary that maps system “properties” to their user defined values. This allows the user to refer to properties with their own naming scheme, e.g. { “charge” : “my-charge” }

  • is_lambda1 (bool) – Whether to use the charge at lambda = 1 if the object is peturbable.

Returns

charge – The charge.

Return type

Charge

coordinates(property_map={})

Return the coordinates of the atoms in the residue.

Parameters

property_map (dict) – A dictionary that maps system “properties” to their user defined values. This allows the user to refer to properties with their own naming scheme, e.g. { “charge” : “my-charge” }

Returns

[coordinates] – The coordinates of the atoms in the residue.

Return type

[class:Coordinate]

copy()

Return a copy of this object. The return type is same as the object on which copy is called.

Returns

system – A copy of the object.

Return type

Atom, Residue, Molecule, Molecules, System

getAtoms()

Return a list containing all of the atoms in the residue.

Returns

atoms – The list of atoms in the residue.

Return type

[Atoms]

getAxisAlignedBoundingBox(property_map={})

Get the axis-aligned bounding box enclosing the object.

Parameters

property_map (dict) – A dictionary that maps system “properties” to their user defined values. This allows the user to refer to properties with their own naming scheme, e.g. { “charge” : “my-charge” }

Returns

  • box_min ([Length]) – The minimum coordinates of the axis-aligned bounding box in each dimension.

  • box_max ([Length]) – The minimum coordinates of the axis-aligned bounding box in each dimension.

index()

Return the index of the residue.

Returns

index – The index of the residue.

Return type

int

moleculeNumber()

Return the number of the molecule to which this residue belongs.

Returns

number – The number of the molecule to which the residue belongs.

Return type

int

nAtoms()

Return the number of atoms in the residue.

Returns

num_atoms – The number of atoms in the system.

Return type

int

name()

Return the name of the residue.

Returns

name – The name of the residue.

Return type

str

search(query)

Search the residue for atoms and residues.

Parameters

query (str) – The search query.

Returns

results – A list of objects matching the search query.

Return type

[Atom]

Examples

Search for all oxygen or hydrogen atoms.

>>> result = residue.search("element oxygen or element hydrogen")

Search for atom index 23.

>>> result = residue.search("atomidx 23")
toMolecule()

Convert a single Residue to a Molecule.

Returns

system

Return type

Molecule

translate(vector, property_map={})

Translate the object.

Parameters
  • vector ([Length]) – The translation vector in Angstroms.

  • property_map (dict) – A dictionary that maps system “properties” to their user defined values. This allows the user to refer to properties with their own naming scheme, e.g. { “charge” : “my-charge” }