Technical Documentation
Utilities: Chemical Names

The ChemNames module defines several dictionaries of the names, symbols and properties of atoms and compounds.

The ChemNames module is located in Yup.Tools. Thus, the required import statement is some variant of: from Yup.Tools.ChemNames import *.

This module contains several lists:

List

Contents

Nucleotides

Uppercase, single letter code of the standard nucleotides and multi-letter codes of some modified or unusual nucleotides

AminoAcids

Uppercase, three-letter codes for the twenty standard amino acids

StandardResidues

Uppercase, three-letter codes for the twenty standard amino acids and single-letter code for the five standard nucleotides.

and dictionaries:

Dictionary

Key

Value

A1_A3

uppercase three-letter code for the twenty standard amino acids

upper case one-letter code

A3_A1

uppercase one-letter code for the twenty standard amino acids

uppercase three-letter code

FULL_A1

uppercase one-letter code for the twenty standard amino acids

lower case full name

FULL_B1

uppercase one-letter code for the standard bases

lower case full name

B3_B1

uppercase one-letter code for the five standard bases

uppercase three-letter code

B1_B3

uppercase three-letter code for the five standard bases

uppercase one-letter code

MASK_A3B1

three-letter code for the twenty standard amino acids or one-letter code for the five standard bases or two or three-letter codes for modified bases; all codes are uppercase only

standard mask value.

A3B1_MASK

standard mask value

three-letter code for the twenty standard amino acids or one-letter code for the five standard bases or two or three-letter codes for modified bases; all codes are uppercase only

AtomicMass All keys are uppercase only. Element names; names of extended atoms contain the plus sign, e.g. "O+H" for the OH group; basepairs are prefixed with "#", e.g. "#A" for the A:T basepair, single stranded RNA and other groups are prefixed with "@", e.g. "@PRO" for proline. Atomic or molecular mass. (This dictionary is not complete and many entries contain only placeholder values.)
Element Uppercase atom name as found in PDB files. The corresponding uppercase element or extended atom name. (This dictionary is not complete and it returns only element names.)

For example: A1_A3["TRP"] yields the value "W".

Example

>>> from Yup.Tools.ChemNames import *
>>> A1_A3["GLU"]
'E'
>>> A3_A1["Y"]
'TYR'
>>> B3_B1["G"]
'GUA'
>>> B1_B3["URA"]
'U'
>>> FULL_A1["F"]
'phenylalanine'
>>> FULL_B1["C"]
'cytosine'
>>> MASK_A3B1["2MG"]
57
>>> A3B1_MASK[19]
'MET'
>>>

If you want to work in a different case, use the upper() and lower() functions from the Python string module to convert either the key or the value.


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