The **Model** type contains all the information describing a single model within Aten, including bonds, grid data, measurements, etc..

Member | Type | RW | Description |
---|---|---|---|

angles | Measurement[] |
List of current angle measurements in the model | |

atoms | Atom[] |
Array of atoms in the model | |

bonds | Bond[] |
Array of bonds defined in the model | |

cell | UnitCell |
• | The model’s unit cell |

componentDensity | double |
• | Requested density of the model |

componentPartition | int |
• | The integer index of the partition which this model will be added to in the disordered builder |

componentPolicy | string |
• | Insertion policy for this model |

componentPopulation | int |
• | The number of times this model will be added to the specified partition in the disordered builder |

distances | Measurement[] |
List of current distance measurements in the model | |

eigenvectors | Eigenvector[] |
List of current eigenvectors stored in the model | |

energy | EnergyStore |
The model’s energy store, containing the total calculated energy and all associated contributions | |

ff | Forcefield |
• | Forcefield associated to the model (if any) |

ffAngles | FFBound[] |
List of unique forcefield angle terms in the model | |

ffBonds | FFBound[] |
List of unique forcefield bond terms in the model | |

ffMass | double |
Forcefield mass of the current model, which can differ from the actual mass if united-atom types have been assigned | |

ffTorsions | FFBound[] |
List of unique forcefield torsion terms in the model | |

ffTypes | FFAtom[] |
Array of unique atom types used in the model | |

frame | Model |
The current frame in the model's trajectory (if it has one) | |

frames | Model[] |
Array of trajectory frame pointers (only if the trajectory is cached) | |

glyphs | Glyph[] |
List of glyphs owned by the model | |

grids | Grid[] |
List of grids owned by the model | |

id | int |
The index of the model in Aten's internal list of loaded models | |

mass | double |
Mass of the current model | |

name | string |
• | Name of the model |

nAngles | int |
Number of angle measurements in the model | |

nAtoms | int |
Number of atoms in the model | |

nBasisCartesians | int |
Number of cartesian basis functions defined in stored basis shells | |

nBasisShells | int |
Number of basis shells defined in the model | |

nBonds | int |
Number of bonds in the model | |

nDistances | int |
Number of distance measurements in the model | |

nFFAngles | int |
Number of unique angle terms used in the model | |

nFFBonds | int |
Number of unique bond terms used in the model | |

nFFTorsions | int |
Number of unique torsion terms used in the model | |

nFFTypes | int |
Number of unique atom types used in the model | |

nFrames | int |
Number of frames in associated trajectory | |

nGlyphs | int |
Number of glyphs owned by the model | |

nGrids | int |
Number of grids owned by the model | |

nPatterns | int |
Number of patterns defined for the model | |

nSelected | int |
Number of atoms selected in the model | |

nTorsions | int |
Number of torsion angle measurements in the model | |

nUnknown | int |
Number of atoms in the model that are of unknown element | |

patterns | Pattern[] |
Array of patterns currently defined for the model | |

selection | Atom[] |
A list of atoms in representing the current atom selection of the model | |

torsions | Measurement[] |
List of current torsion angle measurements in the model |

*Syntax:*

**Atom** **atomWithBit** ( **int** *bit* )

Returns the first **Atom** in the **Model** which has the specified value of bit (see the relevant accessor above).

*Syntax:*

**void** **copy** ( **Model** *source* )

Copy all information from the source **Model** into this **Model**.

*Syntax:*

**void** **addHydrogen** ( )

Hydrogen satisfy all atoms in the model. See the **addHydrogen** command for more details.

*Syntax:*

**double** **angleEnergy** ( )

Calculates and returns the total angle energy for the current model.

*Syntax:*

**void** **augment** ( )

Automatically detect and add multiple bonds in the system. See the **augment** command for more details.

*Syntax:*

**double** **bondEnergy** ( )

Calculates and returns the total bond energy (including Urey-Bradley contributions) for the current model.

*Syntax:*

**void** **charge** ( )

Assign charges to the model from the current forcefield. See the **chargeFF** command for more details.

*Syntax:*

**void** **clearBonds** ( )

Remove all bonds from the model. See the **clearBonds** command for more details.

*Syntax:*

**void** **clearCharges** ( )

Remove al charges from the model, setting them to zero. See the **clearCharges** command for more details.

*Syntax:*

**void** **clearSelectedBonds** ( )

Remove all bonds from the current atom selection. See the **clearSelectedBonds** command for more details.

*Syntax:*

**void** **copy** ( )

Copy the current atom selection to the clipboard. See the **copy** command for more details.

*Syntax:*

**void** **cut** ( )

Cut the current atom selection to the clipboard. See the **cut** command for more details.

*Syntax:*

**void** **delete** ( )

Delete the current atom selection. See the **delete** command for more details.

*Syntax:*

**double** **elecEnergy** ( )

Calculates and returns the total electrostatic energy for the current model, using the calculation method specified in the preferences.

*Syntax:*

**void** **expand** ( )

Expand the current atom selection along bonds. See the **expand** command for more details.

*Syntax:*

**void** **finalise** ( )

Finalise the current model. See the **finaliseModel** command for more details.

*Syntax:*

**double** **interEnergy** ( )

Calculates and returns the total intermolecular (i.e. combined van der Waals and electrostatic) energy for the current model.

*Syntax:*

**double** **intraEnergy** ( )

Calculates and returns the total intramolecular (i.e. combined bond, angle, and torsion) energy for the current model.

*Syntax:*

**int** **isPeriodic** ( )

Returns **1** if the model has some kind of unit cell, or **0** if it is non-periodic.

*Syntax:*

**void** **matrixConvertSelection** ( **int** _i*sx*, **int** _j*sx*, **int** _i*sy*, **int** _j*sy*, **int** _i*sz*, **int** _j*sz*, **int** _i*tx*, **int** _j*tx*, **int** _i*ty*, **int** _j*ty*, **int** _i*tz*, **int** _j*tz* )

**void** **matrixConvertSelection** ( **int** _i*sx*, **int** _j*sx*, **int** _i*sy*, **int** _j*sy*, **int** _i*sz*, **int** _j*sz*, **int** _i*tx*, **int** _j*tx*, **int** _i*ty*, **int** _j*ty*, **int** _i*tz*, **int** _j*tz*, **double** *ox*, **double** *oy*, **double** *oz* )

**void** **matrixConvertSelection** ( **double** _s*ax*, **double** _s*ay*, **double** _s*az*, **double** _s*bx*, **double** _s*by*, **double** _s*bz*, **double** _s*cx*, **double** _s*cy*, **double** _s*cz*, **double** _t*ax*, **double** _t*ay*, **double** _t*az*, **double** _t*bx*, **double** _t*by*, **double** _t*bz*, **double** _t*cx*, **double** _t*cy*, **double** _t*cz* )

**void** **matrixConvertSelection** ( **double** _s*ax*, **double** _s*ay*, **double** _s*az*, **double** _s*bx*, **double** _s*by*, **double** _s*bz*, **double** _s*cx*, **double** _s*cy*, **double** _s*cz*, **double** _t*ax*, **double** _t*ay*, **double** _t*az*, **double** _t*bx*, **double** _t*by*, **double** _t*bz*, **double** _t*cx*, **double** _t*cy*, **double** _t*cz*, **double** *ox*, **double** *oy*, **double** *oz* )

Performs a matrix conversion on the current atom selection of the model. See the matrixConvert() function reference for a full description.

*Syntax:*

**void** **matrixTransformSelection** ( **double** *ax*, **double** *ay*, **double** *az*, **double** *bx*, **double** *by*, **double** *bz*, **double** *cx*, **double** *cy*, **double** *cz* )

**void** **matrixTransformSelection** ( **double** *ax*, **double** *ay*, **double** *az*, **double** *bx*, **double** *by*, **double** *bz*, **double** *cx*, **double** *cy*, **double** *cz*, **double** *ox*, **double** *oy*, **double** *oz* )

Performs a matrix transformation on the current atom selection of the model. See the matrixTransform() function reference for a full description.

*Syntax:*

**void** **mirrorSelection** ( **string** *axis* )

Mirror the current atom selection in the model in the specified plane about its geometric centre.

*Syntax:*

**void** **movePen** ( **double** *dx*, **double** *dy*, **double** *dz* )

Move the drawing pen by the specified distances.

*Syntax:*

**void** **moveToEnd** ( )

Move the current atom selection to the bottom (highest IDs) of the atom list. See the **moveToEnd** command for more details.

*Syntax:*

**void** **moveToStart** ( )

Move the current atom selection to the top (lowest IDs) of the atom list. See the **moveToStart** command for more details.

*Syntax:*

**Atom** **newAtom** ( **int|string** *el*, **double** *x* = 0.0, **double** *y* = 0.0, **double** *z* = 0.0, **double** *vx* = 0.0, **double** *vy* = 0.0, **double** *vz* = 0.0, **double** *fx* = 0.0, **double** *fy* = 0.0, **double** *fz* )

Create a new atom in the model. See the **newAtom** command for more details.

*Syntax:*

**Atom** **newAtomFrac** ( **int|string** *el*, **double** *x*, **double** *y*, **double** *z*, **double** *vx* = 0.0, **double** *vy* = 0.0, **double** *vz* = 0.0, **double** *fx* = 0.0, **double** *fy* = 0.0, **double** *fz* )

Create a new atom in the model, in fractional coordinates. See the **newAtomFrac** command for more details.

*Syntax:*

**BasisShell** **newBasisShell** ( **Atom**|**int** *i*, **string** *type* )

Create a new basis shell definition in the model, centred on the specified atom/id, and of the given shell type. See the **newBasisShell** command for more details.

*Syntax:*

**Bond** **newBond** ( **Atom**|**int** *i*, **Atom**|**int** *j*, **string|int** *bondtype* = "" )

Create a new bond between atoms in the model. See the **newBond** command for more details.

*Syntax:*

**Bond** **newBondId** ( **int** _id*i*, **int** _id*j*, **string|int** *bondtype* = "" )

Create a new bond between atom IDs in the model. See the **newBond** command for more details.

*Syntax:*

**Eigenvector** **newEigenvector** ( **int** *size* = (auto) )

Create a new eigenvector in the model of the specified size. If the size is not specified, the vector length is set to match the number of cartesian basis functions store with the current basis shell definitions in the model. See the **newEigenvector** command for more details.

*Syntax:*

**Glyph** **newGlyph** ( **string** *style*, **string** *options* = "" )

Create a new glyph in the model. See the **newGlyph** command for more details.

*Syntax:*

**Grid** **newGrid** ( **string** *name* )

Create a new gridh in the model. See the **newGrid** command for more details.

*Syntax:*

**void** **paste** ( )

Paste the current clipboard contents into the model. See the **paste** command for more details.

*Syntax:*

**void** **rebond** ( )

Calculate bonds in the model. See the **rebond** command for more details.

*Syntax:*

**void** **rebondPatterns** ( )

Calculate bonds within patterns in the model. See the **rebondPatterns** command for more details.

*Syntax:*

**void** **rebondSelection** ( )

Calculate bonds in the current selection. See the **rebondSelection** command for more details.

*Syntax:*

**void** **redo** ( )

Redo the last undone change in the model. See the **redo** command for more details.

*Syntax:*

**void** **reorder** ( )

Reorder atoms so bound atoms have adjacent IDs. See the **reorder** command for more details.

*Syntax:*

**void** **resetPen** ( )

Resets the pen coordinates for the model to {0,0,0}.

*Syntax:*

**void** **reorientSelection** ( **Atom**|**int** _i*sx*, **Atom**|**int** _j*sx*, **Atom**|**int** _i*sy*, **Atom**|**int** _j*sy*, **Atom**|**int** _i*sz*, **Atom**|**int** _j*sz*, **double** _t*ax*, **double** _t*ay*, **double** _t*az*, **double** _t*bx*, **double** _t*by*, **double** _t*bz*, **double** _t*cx*, **double** _t*cy*, **double** _t*cz* )

**void** **reorientSelection** ( **Atom**|**int** _i*sx*, **Atom**|**int** _j*sx*, **Atom**|**int** _i*sy*, **Atom**|**int** _j*sy*, **Atom**|**int** _i*sz*, **Atom**|**int** _j*sz*, **double** _t*ax*, **double** _t*ay*, **double** _t*az*, **double** _t*bx*, **double** _t*by*, **double** _t*bz*, **double** _t*cx*, **double** _t*cy*, **double** _t*cz*, **double** *ox*, **double** *oy*, **double** *oz* )

Operates in exactly the same manner as matrixTransformSelection() except that the source matrix is defined from atoms (or their IDs) and the destination matrix is provided as a matrix.

*Syntax:*

**void** **rotatePenX** ( **double** *delta* )

Rotate the drawing pen for the current model *delta* degrees about the X axis.

*Syntax:*

**void** **rotatePenY** ( **double** *delta* )

*Syntax:*

**void** **rotatePenZ** ( **double** *delta* )

*Syntax:*

**void** **saveBitmap** ( **string** *format*, **string** *filename*, **int** *width* = (auto), **int** *height* = (auto), **int** *quality* = 100 )

Save a bitmap image of the current model view. See the **saveBitmap** command for more details.

*Syntax:*

**void** **selectAll** ( )

Select all atoms in the model. See the **selectAll** command for more details.

*Syntax:*

**void** **selectionAddHydrogen** ( )

Hydrogen satisfy all atoms in the current selection. See the **selectionAddHydrogen** command for more details.

*Syntax:*

**void** **selectNone** ( )

Deselect all atoms in the model. See the **selectNone** command for more details.

*Syntax:*

**int** **selectTree** ( **Atom** *i*, **Bond** *exclude* = **NULL** )

Select all atoms from atom *i* reachable by following any number of chemical bonds. See the **selectNone** command for more details.

*Syntax:*

**void** **shiftDown** ( **int** *n* = 1 )

Shift the current atom selection down one (or more) places in the atom list (towards higher IDs). See the **shiftDown** command for more details.

*Syntax:*

**void** **shiftUp** ( **int** *n* = 1 )

Shift the current atom selection up one (or more) places in the atom list (towards lower IDs). See the **shiftUp** command for more details.

*Syntax:*

**void** **showAll** ( )

Unhides any hidden atoms in the model. See the **showAll** command for more details.

*Syntax:*

**void** **toAngstroms** ( )

Converts cell specification and atomic coordinates in the model from (assumed units of) Bohr into Angstroms. No changes to associated trajectory frames or grid data is made.

*Syntax:*

**double** **torsionEnergy** ( )

Calculates and returns the total torsion energy (including improper terms) for the current model.

*Syntax:*

**void** **transmute** ( **int|string** el )

Transmute all selected atoms to the specified element. See the **transmute** command for more details.

*Syntax:*

**void** **undo** ( )

Undo the last change made to the model. See the **undo** command for more details.

*Syntax:*

**double** **vdwEnergy** ( )

Calculates and returns the total van der Waals energy for the current model.