Technical Documentation
The HookeFFA Module

The HookeFFA module provides a class to add the Hooke term to a model, and a method to add interactions to this term. It is not necessary to use this class in order to use the Hooke term; use it only if the method is useful and only if the model uses PDB naming conventions (see the PDBPartMap module). This module is located in Yup/Models/Null/. The import statement is some variant of: from Yup.Models.Null.HookeFFA import HookeFFA.

The HookeFFA Class

The HookeFFA module defines a class HookeFFA and the constructor function is:

Name

Arguments

Return

HookeFFA

required: label, quantum

-
Argument Type Preset

label

A string to identify this term, used to label simulation output.

-

quantum

Number of slots to be allocated initially, also the number of additional slots to allocate when the table of interactions fills up.

-

This class must be mixed with the FFA class from the Yup.Models.Null.FFA module.

Constants

The following constants are defined:

HOOKE_ANY
HOOKE_C_C
HOOKE_P_P

HOOKE_001
HOOKE_002

HOOKE_003

Method

The SetupHookeTerm() method is used to register the interactions of a Hooke term, based on the prevailing pair distances.

Name

Arguments

Return

SetupHookeTerm

required: atoms, coords; optional: option, cutoffs, hooke, bounds

-
Argument Type Preset

atoms

Tuple of Atom AtomMaps

-
coords Corresponding tuple of coordinate tuples of any dimensionality -
option Selects how parameters are assigned, acceptable values are 0, 1, 2 and 3. 0
cutoffs A dictionary of cutoff distances based on the atom types of each pair. {...}
hooke A dictionary of interaction types {...}
bounds A dictionary of distances (for option = 2 or 3) {...}

Pairs of atom AtomMaps are generated from the atoms tuple. For each pair, coordinates are obtained from the corresponding coords tuple to calculate their distance apart, and if within the cutoff value appropriate for the atom types of the pair as specified in the cutoffs dictionary, the pair of atoms are added to the Hooke term with the force constant chosen from the hooke dictionary and according to the option selected.

When the option argument equals 0, as in the default, or any unrecognized value, the same force constants will be assigned to every bond. This constant is specified in the hooke dictionary under the key HOOKE_ANY. With option equal to 1, pseudoatoms that are contiguous along the primary sequence are assigned specific force constants from the hooke dictionary under the keys HOOKE_C_C or HOOKE_P_P depending on whether it is a polypeptide or a nucleic acid chain. If option equals 2, force constants are assigned according to the distance: hooke[HOOKE_ANY] if the distance is less than bounds[HOOKE_001], hooke[HOOKE_001] if the distance is between bounds[HOOKE_001] and bounds[HOOKE_002], hooke[HOOKE_002] if between bounds[HOOKE_002] and bounds[HOOKE_003] and hooke[HOOKE_003] if the distance is larger than bounds[HOOKE_003]. Finally, option 3 is just like option 2, except that all pairs that are in non-adjacent residues are assigned a force constant hooke[HOOKE_003].

The cutoffs argument is a dictionary of dictionaries of cutoff distances. The keys are the PDB names of the atoms, assumed to be encoded in columns 6 to 9 (base 1) of the nodename attribute of the Atom AtomMap. The values are the cutoff distances for the pair of atoms; pairs that are within these distances are added to the Hooke term. It is necessary to provide a symmetrical dictionary: cutoffs['A']['B'] should yield the same value as cutoffs['B']['A'] for example. Default values must also be provided under the blank string ('') key, i.e. cutoffs[''][*], cutoffs[*][''] and cutoffs[''][''], where * denotes a non-blank string.

The hooke argument is a dictionary of hooke interaction types. The keys are the six constants defined in this module. Each value is a tuple of two strings. These interaction types must be defined in the parameter library. Note that hooke[HOOKE_ANY] is taken to be a default hooke interaction type.

The bounds argument is a dictionary of distances that form ranges. The keys are the constants: HOOKE_001, HOOKE_002 and HOOKE_003. The corresponding values must be in increasing order.

To see the default values, type the following in a Python interpreter:

>>> from Yup.Models.Null import HookeFFA
>>> help( HookeFFA )

Function

The RedoHooke() function takes one argument, a Model object. The Hooke term is reconfigured, using the options specified for the original model. The reconfiguration uses the coordinates that are current.


Development
FFA
HookeFFA
NonbondXFFA PDBPartMap Chains
Worm
Environment


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