[Next] [Previous] [Up] [Top] [Contents] [Index]

13. Expressions

13. 2. Values

Depending on the context, an expression can use values of a data item. If an expression is evaluated for a data item, it can use the values of this item. E. g. an expression that is an argument of a command that operates on atoms can use the values of this atom, like its name. The following is a table of the values that are valid for each data item:

item

value

type

explanation

mol

num

integer

molecule number

mol

number

integer

molecule number

res

num

integer

residue number

res

number

integer

residue number

prim

num

integer

primary number

prim

number

integer

primary number

mol

name

string

molecule name

res

name

string

residue name

atom

name

string

atom name

angle

name

string

angle name

atom

shift

float

chemical shift of atom

atom

bfactor

float

B factor of atom

atom

vdw

float

van der Waals radius of atom

atom

charge

float

partial charge of atom

atom

heavycharge

float

charges on heavy atoms

atom

avgcharge

float

averaged charges on heavy atoms

atom

simplecharge

float

simple charges from setup file

atom

d

float

distance from reference atom(s)

angle

val

float

angle

dist

val

float

distance

dist

limit

float

limit of constraint

dist

viol

float

violation of constraint

dist

upl

bool

true if distance is upper limit

dist

lol

bool

true if distance is lower limit

dist

hbond

bool

true if distance is H-bond

atom

attr

integer

graphics attribute index

bond

attr

integer

graphics attribute index

dist

attr

integer

graphics attribute index

prim

attr

integer

graphics attribute index

Values of an item can be referenced by just using their name. It is also possible to access values of items that are higher in the data hierarchy. This is done in the form item.value, e. g. res.name in an expression that is evaluated for an atom. The following figure shows the data hierarchy:

Not all primitives belong to a molecule. For the ones that do not (titles), accessing molecule values will result in null values (0 for the number, empty string for the name).

For bonds, distances and angles, it is also possible to access the values of the atoms involved. For bonds this is done by using the items atom1 and atom2, for dihedral angles the 4 atoms defining it can be accessed over atom1, atom2, atom3, and atom4.

For bonds and distances, it is also possible to access the values of both residues involved. This is done by using the items res1 and res2.

For distances, it is also possible to access the values of both molecules involved. This is done by using the items mol1 and mol2.

Examples

Examples

MOLMOL Manual - 7 Oct 1997

[Next] [Previous] [Up] [Top] [Contents] [Index]

Generated with Harlequin WebMaker