Public API#

View Module Index

class sire.system.ForceFieldInfo(val, map=None)[source]#
class sire.system.System(system=None)[source]#

This class holds a complete system of molecules. This is normally created by reading in molecules from an input file.

This provides a “MoleculeView”-style interface to the molecules, acting very similarly to a sire.mol.SelectorMol object.

You can convert this to a sire.mol.SelectorMol object by calling the System.molecules() function.

angle(*args, **kwargs)[source]#

Return the angle that matches the passed index/search

angles(*args, **kwargs)[source]#

Return all angles in this System (or those that match the passed index, if supplied)

apply(*args, **kwargs)[source]#

Apply (perform / map) the passed function (with associated arguments) on all of the molecules in this System

apply_reduce(*args, **kwargs)[source]#

Apply (perform / map) the passed function (with associated arguments) on all of the molecules in this System, reducing the result using the passed reduction function

atom(*args, **kwargs)[source]#

Return the atom that matches the passed index/search

atoms(*args, **kwargs)[source]#

Return all atoms in this System (or those that match the passed index, if supplied)

bond(*args, **kwargs)[source]#

Return the bond that matches the passed index/search

bonds(*args, **kwargs)[source]#

Return all bonds in this System (or those that match the passed index, if supplied)

chain(*args, **kwargs)[source]#

Return the chain that matches the passed index/search

chains(*args, **kwargs)[source]#

Return all chains in this System (or those that match the passed index, if supplied)

charge(*args, **kwargs)[source]#

Return the total charge of this System (or of the matching index/search subset of this System)

clone()[source]#

Return a copy (clone) of this System

coordinates(*args, **kwargs)[source]#

Return the center of geometry of this System (or of the matching index/search subset of this System)

count()[source]#

Return the number of items in this System

cursor()[source]#

Return a sire.mol.Cursor that can be used to edit the molecules in this System

delete_frame(i)[source]#

Delete the ith frame from the trajectory

dihedral(*args, **kwargs)[source]#

Return the dihedral that matches the passed index/search

dihedrals(*args, **kwargs)[source]#

Return all dihedrals in this System (or those that match the passed index, if supplied)

dynamics(*args, **kwargs)[source]#

Return a Dynamics object that can be used to perform dynamics of the molecule(s) in this view

energies(*args, **kwargs)[source]#

Calculate and return the individual energies of the contents of this System (or of the matching index/search subset of this System)

energy(*args, **kwargs)[source]#

Calculate and return the energy of this System (or of the matching index/search subset of this System)

evaluate(*args, **kwargs)[source]#

Return an evaluator for this Systme (or of the matching index/search subset of this System)

find(views)[source]#

Return the index(es) of the molecule(s) that are in views

improper(*args, **kwargs)[source]#

Return the improper that matches the passed index/search

impropers(*args, **kwargs)[source]#

Return all impropers in this System (or those that match the passed index, if supplied)

static is_system(obj)[source]#

Return whether the passed object is a System class (either a new or legacy System)

load_frame(i)[source]#

Load the ith frame into this System

mass(*args, **kwargs)[source]#

Return the total mass of this System (or of the matching index/search subset of this System)

minimisation(map=None)[source]#

Return a Minimisation object that can be used to minimise the energy of the molecule(s) in this view.

molecule(*args, **kwargs)[source]#

Return the molecule that matches the passed index/search

molecules(*args, **kwargs)[source]#

Return this System converted to a sire.mol.SelectorMol. You can pass in arguments to search or index so that you limit the number of molecules returned.

names()[source]#

Return the names of all of the molecules in this System

num_atoms()[source]#

Return the number of atoms in this System

num_chains()[source]#

Return the number of chains in this System

num_frames()[source]#

Return the number of trajectory frames for this System

num_molecules()[source]#

Return the number of molecules in this System

num_residues()[source]#

Return the number of residues in this System

num_segments()[source]#

Return the number of segments in this System

numbers()[source]#

Return the numbers of all of the molecules in this System

properties()[source]#

Return all of the System-level properties of this System

property(*args, **kwargs)[source]#

Return the System property that matches the passed key/arguments

property_keys()[source]#

Return the keys (IDs) of all of the System-level properties of this System

residue(*args, **kwargs)[source]#

Return the residue that matches the passed index/search

residues(*args, **kwargs)[source]#

Return all residues in this System (or those that match the passed index, if supplied)

save_frame(i=None, map=None)[source]#

Save the current coordinates to the ith frame of this System. If i is not specfied then this adds the frame onto the end of the trajectory

segment(*args, **kwargs)[source]#

Return the segment that matches the passed index/search

segments(*args, **kwargs)[source]#

Return all segments in this System (or those that match the passed index, if supplied)

set_property(*args, **kwargs)[source]#

Set the System property according to the passed arguments

size()[source]#

Return the number of items in this System

smiles(*args, **kwargs)[source]#

Return the molecule views in this container as smiles strings. Include hydrogens in ‘include_hydrogens’ is True. This returns a list of smiles strings, in the same order as the views in the container

to_molecule_group()[source]#

Return this System converted to a sire.mol.MoleculeGroup

trajectory()[source]#

Return an iterator over the trajectory of frames for this System

update(value)[source]#

Update the molecules in this system so that they have the same versions and data as the new molecules contained in ‘value’

view(*args, **kwargs)[source]#

View this System (or the matching index/search subset) via a nglview viewer. Only works in an interactive notebook session, e.g. in a Jupyter notebook

view2d(*args, **kwargs)[source]#

Create a 2D representation of the molecules in this system. If ‘filename’ is set then this will be written to that file. Otherwise this will be returned for visualisation in a jupyter notebook.