Skip navigation links

Package etomica.atom

Provides classes that define and organize atoms and the information related to them.

See: Description

Package etomica.atom Description

Provides classes that define and organize atoms and the information related to them. The physical atoms that are manipulated in a simulation are represented by instances of the class Atom. Atom plays a larger role than this, however. Instances of Atom are arranged into a tree structure, through which they organize atoms into molecules, species, and boxs.

This "Atom tree" may be understood as follows:

The tree structure is implemented by the etomica.atom.AtomTreeNode AtomTreeNode class, which is held as a field by each Atom. AtomTreeNode is subclassed into AtomTreeNodeLeaf and AtomTreeNodeGroup, respectively, for Atoms that are leaf atoms in the species hierarchy, and atom groups, which include everything else.

Information about an Atom's position in the atom hierarchy is coded in an integer index, which can be interpreted using the methods of AtomIndexManger. The appropriate instance of AtomIndexManager for this purpose is held by the Atom's AtomType instance (discussed below).

The state of an Atom -- usually its position and perhaps velocity (but more general definitions are possible) -- is held by a Coordinate field (defined in etomica.space) which is made by the governing Space and which is provided to the Atom at construction. The conduct of the simulation primarily entails the manipulation of the fields of the Atom Coordinates.

The AtomType class is used to hold information that is common to many Atom instances. Each Atom has a final AtomType field that is specifed at construction. Atoms that that are group atoms (having AtomTreeNodeGroup as their node field) have types that are (or extend) AtomTypeGroup. Leaf atoms have types that extend AtomTypeLeaf. Instances of AtomType are arranged in a hierarchy that parallels that Atom hierarchy. Important features are as follows:

AtomTypes are very important in defining the interactions between Atoms, as developed in the etomica.potential package.

Each Atom instance at or below the molecule layer is constructed by an AtomFactory. Complicated molecules are constructed by piecing together groups of atoms constructed by subfactories. Thus the AtomFactories can be viewed in a hierarchy that mimicks the AtomType hierarchy; accordingly there is a one-to-one correspondence between the AtomTypes and the AtomFactories. The key AtomFactories are:

This package also defines data structures used to collect Atom instances. These include: AtomSet, and AtomPair in particular, are the expected arguments of Potential classes when calculating interatomic interactions. Iteration over Atoms, AtomPairs and AtomSets is provided by the classes of etomica.atom.iterator.

Atom groups hold their child Atoms in an AtomList. The AtomLinkers used to form this list are referable directly as fields of their corresponding Atoms; access to this linker is needed for iterations that begin with a specific Atom.

The Parameter classes are not carefully developed are subject to substantial change or elimination in the near future.

Skip navigation links