Package schrodinger :: Package application :: Package desmond :: Package packages :: Package msys :: Class TermTable
[hide private]
[frames] | no frames]

Class TermTable

object --+
         |
        TermTable

Each TermTable is intended to describe a specific type of interaction, e.g. stretch, angle, Lennard-Jones, constraint_hoh, etc. A TermTable has an arity (given by the natoms property) which specifies how many atoms are involved in each interaction: one for nonbonded terms, two for stretch terms, etc. Each interaction instance is described by a `Term`. Each Term references the appropriate number of atoms, and exactly one Param, which lives in a ParamTable owned (or possible shared) by the TermTable.

The functional form described by a TermTable is not part of msys; all msys does is represent the forcefield parameters in a generic way.

Instance Methods [hide private]
 
__init__(self, _ptr)
Construct from TermTablePtr.
 
__eq__(self, x)
 
__ne__(self, x)
 
__hash__(self)
hash(x)
 
remove(self)
Remove this table from its parent system
 
coalesce(self)
Reassign param for each Term in this Table to a member of the distinct set of Params used by those Terms.
 
__repr__(self)
repr(x)
 
delTermsWithAtom(self, atom)
remove all terms whose atoms list contains the given Atom
 
findWithAll(self, atoms)
return the terms that contain all the given atoms in any order
 
findWithAny(self, atoms)
return the terms that contain at least one of the given atoms
 
findWithOnly(self, atoms)
return the terms that contain only the given atoms
 
findExact(self, atoms)
return the terms that contain precisely the given atoms in the given order.
 
term(self, id)
returns the Term in the table with the given id
 
hasTerm(self, id)
Does a Term with the given id exist in the table?
 
addTermProp(self, name, type)
add a custom Term property of the given type
 
delTermProp(self, name)
remove the custom Term property
 
termPropType(self, name)
type of the given Term property
 
addTerm(self, atoms, param=None)
Add a Term to the table, with given initial param.
 
overrides(self)
return a mapping from pairs of Params in self.params to a Param in self.override_params.
 
setOverride(self, pi, pj, op)
override the interaction between params pi and pj with the interaction given by op.
 
getOverride(self, pi, pj)
get override for given pair of params, or None if not present.

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  props
Table properties
  name
name of this table
  params
The ParamTable for terms in this table.
  system
The System whose atoms are referenced by this table.
  term_props
names of the custom properties
  natoms
number of atoms in each term
  category
A string describing what kind of TermTable this is.
  nterms
number of terms
  terms
returns a list of all the Terms in the table
  override_params
parameter table containing override values
  noverrides
number of parameter overrides
  _ptr

Inherited from object: __class__

Method Details [hide private]

__init__(self, _ptr)
(Constructor)

 

Construct from TermTablePtr. Do not invoke directly; use System.addTable or System.table instead

Overrides: object.__init__

__hash__(self)
(Hashing function)

 

hash(x)

Overrides: object.__hash__
(inherited documentation)

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

addTerm(self, atoms, param=None)

 

Add a Term to the table, with given initial param. The atoms list must have natoms elements, and each Atom must belong to the same System as the TermTable. If param is not None, it must belong to the ParamTable held by the TermTable.

setOverride(self, pi, pj, op)

 

override the interaction between params pi and pj with the interaction given by op. pi and pj must be Params from self.params; op must be a param from self.override_params, or None to remove the override.


Property Details [hide private]

props

Table properties

Get Method:
unreachable.props(self) - Table properties

name

name of this table

Get Method:
unreachable.name(self) - name of this table
Set Method:
unreachable.name(self, newname)

params

The ParamTable for terms in this table.

Get Method:
unreachable.params(self) - The ParamTable for terms in this table.
Set Method:
unreachable.params(self, p)

system

The System whose atoms are referenced by this table.

Get Method:
unreachable.system(self) - The System whose atoms are referenced by this table.

term_props

names of the custom properties

Get Method:
unreachable.term_props(self) - names of the custom properties

natoms

number of atoms in each term

Get Method:
unreachable.natoms(self) - number of atoms in each term

category

A string describing what kind of TermTable this is. Possibilities are: *bond*, *constraint*, *virtual*, *polar*, *nonbonded*, and *exclusion*.

Get Method:
unreachable.category(self) - A string describing what kind of TermTable this is.
Set Method:
unreachable.category(self, val)

nterms

number of terms

Get Method:
unreachable.nterms(self) - number of terms

terms

returns a list of all the Terms in the table

Get Method:
unreachable.terms(self) - returns a list of all the Terms in the table

override_params

parameter table containing override values

Get Method:
unreachable.override_params(self) - parameter table containing override values

noverrides

number of parameter overrides

Get Method:
unreachable.noverrides(self) - number of parameter overrides