BioSimSpace._SireWrappers.Bond

class BioSimSpace._SireWrappers.Bond(bond)[source]

A class for storing a bond.

__init__(bond)[source]

Constructor.

Parameters:

bond (Sire.MM.Bond, Bond) – A Sire or BioSimSpace Bond object.

Methods

__init__(bond)

Constructor.

atom0()

Return the first atom in the bond.

atom1()

Return the first atom in the bond.

charge([property_map, is_lambda1])

Return the charge.

coordinates([property_map])

Return the coordinates of the atoms in the bond.

copy()

Return a copy of this object.

energy()

Return the energy of the bond.

getAtoms()

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

getAxisAlignedBoundingBox([property_map])

Get the axis-aligned bounding box enclosing the object.

length()

Return the length of the bond.

moleculeNumber()

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

nAtoms()

Return the number of atoms in the bond.

name()

Return the name of the bond.

save(filebase)

Stream a wrapped Sire object to file.

search(query[, property_map])

Search the bond for atoms and bonds.

smiles()

Return the SMILES string representation of this object.

toMolecule()

Convert a single Residue to a Molecule.

translate(vector[, property_map])

Translate the object.

atom0()[source]

Return the first atom in the bond.

Returns:

atom – The atom

Return type:

Atom

atom1()[source]

Return the first atom in the bond.

Returns:

atom – The atom

Return type:

Atom

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={})[source]

Return the coordinates of the atoms in the bond.

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

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:

object – A copy of the object.

Return type:

Atom, Residue, Molecule, Molecules, System

energy()[source]

Return the energy of the bond. This assumes that an energy expression has been assigned to this bond.

Returns:

energy – The energy of the bond

Return type:

Energy

getAtoms()[source]

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

Returns:

atoms – The list of atoms in the bond.

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.

length()[source]

Return the length of the bond.

Returns:

length – The length of the bond

Return type:

Length

moleculeNumber()[source]

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

Returns:

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

Return type:

int

nAtoms()[source]

Return the number of atoms in the bond.

Returns:

num_atoms – The number of atoms in the system.

Return type:

int

name()[source]

Return the name of the bond.

Returns:

name – The name of the bond.

Return type:

str

save(filebase)

Stream a wrapped Sire object to file.

Parameters:
  • sire_object (System) – A wrapped Sire object.

  • filebase (str) – The base name of the binary output file.

search(query, property_map={})[source]

Search the bond for atoms and bonds.

Parameters:
  • query (str) – The search query.

  • 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:

results – A list of objects matching the search query.

Return type:

[Atom]

Examples

Search for all oxygen or hydrogen atoms.

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

Search for atom index 23.

>>> result = bond.search("atomidx 23")
smiles()

Return the SMILES string representation of this object.

Returns:

smiles – The SMILES string representation of the object(s).

Return type:

str, [str]

toMolecule()[source]

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” }