BioSimSpace._SireWrappers.Molecule

class BioSimSpace._SireWrappers.Molecule(molecule)

A container class for storing a molecule.

__init__(molecule)

Constructor.

Parameters:molecule (Sire.Mol.Molecule, Molecule Molecule) – A Sire or BioSimSpace Molecule object.

Methods

__init__(molecule) Constructor.
charge([property_map, is_lambda1]) Return the total molecular charge.
copy() Create a copy of this molecule.
isMerged() Whether this molecule has been merged with another.
isWater() Whether this is a water molecule.
molecule0() Return the component of the merged molecule at lambda = 0.
molecule1() Return the component of the merged molecule at lambda = 1.
nAtoms() Return the number of atoms in the molecule.
nChains() Return the number of chains in the molecule.
nResidues() Return the number of residues in the molecule.
toSystem() Convert a single Molecule to a System.
translate(vector[, property_map]) Translate the molecule.
charge(property_map={}, is_lambda1=False)

Return the total molecular 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 molecule is merged.
Returns:

charge – The molecular charge.

Return type:

Charge

copy()

Create a copy of this molecule.

molecule : Molecule
A copy of the molecule.
isMerged()

Whether this molecule has been merged with another.

Returns:is_merged – Whether the molecule has been merged.
Return type:bool
isWater()

Whether this is a water molecule.

Returns:is_water – Whether this is a water molecule.
Return type:bool
molecule0()

Return the component of the merged molecule at lambda = 0.

Returns:molecule – The component of the merged molecule at lambda = 0. Returns None if this isn’t a merged molecule.
Return type:Molecule
molecule1()

Return the component of the merged molecule at lambda = 1.

Returns:molecule – The component of the merged molecule at lambda = 1. Returns None if this isn’t a merged molecule.
Return type:Molecule
nAtoms()

Return the number of atoms in the molecule.

Returns:num_atoms – The number of atoms in the molecule.
Return type:int
nChains()

Return the number of chains in the molecule.

Returns:num_chains – The number of chains in the molecule.
Return type:int
nResidues()

Return the number of residues in the molecule.

Returns:num_residues – The number of residues in the molecule.
Return type:int
toSystem()

Convert a single Molecule to a System.

Returns:system
Return type:System
translate(vector, property_map={})

Translate the molecule.

Parameters:
  • vector ([Length]) – The translation vector.
  • 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” }