Technical Documentation
ATOM DIRECTORY: Introduction

The AtomMap module provides an object to represent atoms and groups of atoms. Atoms and Groups can be organized into a hierarchy of any shape; the only limitation is that each node can have no more than one parent. Both are modeled with the AtomGroup object. Atoms are AtomGroup nodes where atom properties can be stored. Groups are AtomGroup nodes where Atoms and other Groups can be stored. Thus, Atoms resemble Files and Groups resemble Directories in the UNIX filing system. There is a significant difference though. The order in which the contents of a Group is inserted is significant and is remembered.

In the following pages, references are made to Atom and Group nodes or objects. These are in fact AtomGroup objects.

The properties that are stored within Group nodes are the number of immediate descendants and pointers to these descendants. Descendants may be either Atom or Group objects. Descendent nodes are ordered according to the order that they are inserted.

The atomic properties that are stored in each Atom node include the Atomic Mass, the Atomic Charge, the Atom Inclusion and Exclusion Types and the Selection Mask. The Atom Types are two properties that correspond to the single atom type in other modeling packages. The hierarchy that can be built using the AtomGroup object provides a natural way of selecting portions of a model. For example, each branch forms a selection and a selection may overlap another selection. The Selection Mask provides a different way of dividing the model that is independent of the hierarchy.

Atoms can be identified by a pathname which can be absolute or relative to the current AtomGroup model. Internally, atoms are indexed or numbered consecutively. The index number for an atom is not fixed. An atom is also given a reference number which corresponds to the order in which the atom was inserted. The reference number is fixed.

The AtomMap module is located in the Taro subdirectory of the Yup package. The import statement will be some variant of: from Yup.Taro.AtomMap import *.

The AtomMap module defines the AtomGroup object. To create a hierarchy it is necessary to first create the top or root node. [Top] To the top of the hierarchy, other AtomGroup objects can be attached by applying the group() [Group] and atom() [Atom] methods. The data attributes of every AtomGroup object can be examined but not modified. [Data] The entire hierarchy or any part of the hierarchy can be printed. [Print] The hierarchy or any sub-hierarchy can be represented by a string. This representation can be stored, viewed, read from a file and used to recreate a hierarchy. [String] Hierarchies can be compared with one another and with sub-hierarchies. However, the only meaningful comparison is whether two hierarchies are equal. [Compare] Ten methods are defined for the AtomGroup object: setmask(), unpack(), transfer(), findatom(), group(), atom(), modify(), clear(), delete(), index(). These methods can be used to construct and modify the hierarchy. [Methods] Two mapping methods are defined: len and subscript. Subscripting has been implemented but subscript assignment has not. [Mapping]

The C API should be documented in the Programming Manual but is available from this page for now.

The discussions in the following pages cite an example which you can view in a separate window by pressing the following link: [Example]

Intro
Top
Group
Atom
Data
Print
String
Compare
Methods
Mapping
Example

Technical
Introduction
Directory
Vectors
Energy
Model
Assembly
Methods
FPF
FFF
AVF
TaroScript
YammpScript
Python
Utilities

Home
Information
News
User
Technical
Programmer
iYup
Download
Showcase
ETC