Reference for Module MMTK

MMTK is the base module of the Molecular Modelling Toolkit. It contains the most common objects and all submodules. As a convenience to the user, it also imports some commonly used objects from other libraries:


Functions

Submodules:


Class ParticleScalar: Scalar property defined for each particle

A subclass of MMTK.ParticleProperties.ParticleProperty.

ParticleScalar objects can be added to each other and multiplied with scalars.

Methods:

Class ParticleVector: Vector property defined for each particle

A subclass of MMTK.ParticleProperties.ParticleProperty.

ParticleVector objects can be added to each other and multiplied with scalars or MMTK.ParticleScalar objects; all of these operations result in another ParticleVector object. Multiplication with a vector or another ParticleVector object yields a MMTK.ParticleScalar object containing the dot products for each particle. Multiplications that treat ParticleVectors as vectors in a 3N-dimensional space are implemented as methods.

Methods:

Class Configuration: Configuration of a universe

A subclass of MMTK.ParticleVector.

Its instances represent a configuration of a universe, consisting of positions for all atoms (like in a ParticleVector) plus the geometry of the universe itself, e.g. the cell shape for periodic universes.


Class ParticleTensor: Rank-2 tensor property defined for each particle

A subclass of MMTK.ParticleProperties.ParticleProperty.

ParticleTensor objects can be added to each other and multiplied with scalars or MMTK.ParticleScalar objects; all of these operations result in another ParticleTensor object.


Class Atom: Atom

A subclass of MMTK.ChemicalObjects.ChemicalObject.

Constructor: Atom(element, **|properties|)

element

a string (not case sensitive) specifying the chemical element

properties

optional keyword properties:

Methods:

Class Collection: Collection of chemical objects

A subclass of MMTK.Collection.GroupOfAtoms and MMTK.Visualization.Viewable.

Collections permit the grouping of arbitrary chemical objects (atoms, molecules, etc.) into one object for the purpose of analysis or manipulation.

Constructor: Collection(objects=None)

objects

a chemical object or a sequence of chemical objects that define the initial content of the collection.

Collections permit length inquiry, item extraction by indexing, and iteration, like any Python sequence object. Two collections can be added to yield a collection that contains the combined elements.

Methods:

Class Molecule: Molecule

A subclass of MMTK.ChemicalObjects.ChemicalObject.

Molecules consist of atoms and groups linked by bonds.

Constructor: Molecule(species, **|properties|)

species

a string (not case sensitive) that specifies the molecule name in the chemical database

properties

optional keyword properties:

Methods:

Class PartitionedCollection: Collection with cubic partitions

A subclass of MMTK.Collection.

A PartitionedCollection differs from a plain Collection by sorting its elements into small cubic cells. This makes adding objects slower, but geometrical operations like selectShell become much faster for a large number of objects.

Constructor: PartitionedCollection(partition_size, objects=None)

partition_size

the edge length of the cubic cells

objects

a chemical object or a sequence of chemical objects that define the initial content of the collection.

Methods:

Class PartitionedAtomCollection: Partitioned collection of atoms

A subclass of MMTK.PartitionedCollection.

PartitionedAtomCollection objects behave like PartitionedCollection atoms, except that they store only atoms. When a composite chemical object is added, its atoms are stored instead.

Constructor: PartitionedAtomCollection(partition_size, objects=None)

partition_size

the edge length of the cubic cells

objects

a chemical object or a sequence of chemical objects that define the initial content of the collection.


Class InfiniteUniverse: Infinite (unbounded and nonperiodic) universe.

A subclass of MMTK.Universe.Universe.

Constructor: InfiniteUniverse(forcefield=None)

forcefield

a force field object, or None for no force field


Class Complex: Complex

A subclass of MMTK.ChemicalObjects.ChemicalObject.

A complex is an assembly of molecules that are not connected by chemical bonds.

Constructor: Complex(species, **|properties|)

species

a string (not case sensitive) that specifies the complex name in the chemical database

properties

optional keyword properties:


Class AtomCluster: An agglomeration of atoms

A subclass of MMTK.ChemicalObjects.ChemicalObject.

An atom cluster acts like a molecule without any bonds or atom properties. It can be used to represent a group of atoms that are known to form a chemical unit but whose chemical properties are not sufficiently known to define a molecule.

Constructor: AtomCluster(atoms, **|properties|)

atoms

a list of atom objects

properties

optional keyword properties:


Class OrthorhombicPeriodicUniverse: Periodic universe with orthorhombic elementary cell.

A subclass of MMTK.Universe.Universe.

Constructor: OrthorhombicPeriodicUniverse(shape, forcefield=None)

shape

a sequence of length three specifying the edge lengths along the x, y, and z directions

forcefield

a force field object, or None for no force field

Methods:

Class CubicPeriodicUniverse: Periodic universe with cubic elementary cell.

A subclass of MMTK.Universe.Universe.

shape

a number specifying the edge length along the x, y, and z directions

forcefield

a force field object, or None for no force field Constructor: CubicPeriodicUniverse(shape, forcefield=None)