clipper::MMonomer Class Reference

MiniMol monomer (e.g. residue) object. More...

#include <minimol.h>

Inheritance diagram for clipper::MMonomer:
clipper::PropertyManager

List of all members.

Public Types

enum  TYPE { Default, Dunbrack, Richardson }
 

Rotamer library type.


Public Member Functions

const Stringid () const
 get monomer ID
void set_id (const String &s)
 set monomer ID
const Stringtype () const
 get monomer type
void set_type (const String &s)
 set monomer type, e.g. LYS, VAL, G
int seqnum () const
 get monomer seq number
void set_seqnum (const int s, const String inscode="")
 set full id
Atom_list atom_list () const
 return list of contained atoms
void transform (const RTop_orth rt)
 apply transformation to object
int size () const
 number of atoms in monomer
const MAtomoperator[] (const int &i) const
 get atom
MAtomoperator[] (const int &i)
 set atom
const MAtomfind (const String &n, const MM::MODE mode=MM::UNIQUE) const
 get atom by id
MAtomfind (const String &n, const MM::MODE mode=MM::UNIQUE)
 set atom by id
MMonomer select (const String &sel, const MM::MODE mode=MM::UNIQUE) const
 create selection
int lookup (const String &str, const MM::MODE &mode) const
 lookup atom by id
void insert (const MAtom &add, int pos=-1)
 add atom
MMonomercopy (const MMonomer &other, const MM::COPY &mode)
 configureable copy function
void protein_mainchain_build_carbonyl_oxygen (const MMonomer &next)
 UTILITY: Build carbonyl oxygen, give next residue in chain.
int protein_sidechain_number_of_rotamers (TYPE t=default_type_) const
 UTILITY: get number of rotamers for protein sidechain.
int protein_sidechain_number_of_rotomers () const
ftype protein_sidechain_build_rotamer (const int &n, TYPE t=default_type_)
 UTILITY: build numbered rotamer for protein sidechain.
ftype protein_sidechain_build_rotomer (const int &n)

Static Public Member Functions

static String id_tidy (const String &id)
 convert ID to std format
static bool id_match (const String &id1, const String &id2, const MM::MODE &mode)
 convert ID to std format
static bool protein_peptide_bond (const MMonomer &m1, const MMonomer &m2, ftype r=1.5)
 UTILITY: test if two peptide are adjacent.
static double protein_ramachandran_phi (const MMonomer &m1, const MMonomer &m2)
 UTILITY: return Ramachandran phi, or NaN if atoms missing.
static double protein_ramachandran_psi (const MMonomer &m1, const MMonomer &m2)
 UTILITY: return Ramachandran psi, or NaN if atoms missing.
static TYPEdefault_type ()

Friends

MMonomer operator& (const MMonomer &m1, const MMonomer &m2)
 and operator
MMonomer operator| (const MMonomer &m1, const MMonomer &m2)
 or operator

Detailed Description

MiniMol monomer (e.g. residue) object.

The MiniMol monomer object contains a list of clipper::MAtom.

It has two properties: a sequence number and a type. The sequence number need not reflect the order in which the monomers are stored in a polymer. MResidue is an alias for MMonomer.

In addition, it is a clipper::PropertyManager, which means you can add labelled properties of any type to the object. These may be simple strings, or complex objects such as maps, function objects, or whatever.

The most commonly used properties are:

The id() is the unique key which identifies a monomer.


Member Function Documentation

const MAtom & clipper::MMonomer::find ( const String n,
const MM::MODE  mode = MM::UNIQUE 
) const

get atom by id

Lookup atom by ID. If mode=UNIQUE, the alternate conformation code must match, otherwise the first atom with the same name is returned.

Parameters:
n The atom ID.
mode The search mode.
Returns:
The atom.

References lookup(), and clipper::message.

MAtom & clipper::MMonomer::find ( const String n,
const MM::MODE  mode = MM::UNIQUE 
)

set atom by id

See MMonomer::find()

References lookup(), and clipper::message.

MMonomer clipper::MMonomer::select ( const String sel,
const MM::MODE  mode = MM::UNIQUE 
) const

create selection

Creates a copy of this monomer containing only the atoms described by the selection string. '*' copies all atoms.

The atom selection must contain an atom ID or a comma separated list of atom IDs, or '*' to select all atom. Atom IDs are described in s_mm_atom_id.

The selection string must contain an atom ID or a comma separated list of atom IDs. Atom IDs are described in s_mm_atom_id.

Parameters:
sel The selection string.
mode MM::UNIQUE forces an exact match, including alternate conformation code. MM::ANY matches every atom with the right name, ignoring alternate conformation codes.
Returns:
The selection as a new monomer.

References copy(), clipper::MAtom::id_match(), clipper::MAtom::id_tidy(), insert(), and clipper::String::split().

MMonomer & clipper::MMonomer::copy ( const MMonomer other,
const MM::COPY &  mode 
)

configureable copy function

copy from other atom. mode can be MM::COPY_M, COPY_P, COPY_MP, COPY_C, COPY_MC, COPY_PC, COPY_MPC, where M means copy members, P means copy PropertyMananger properties, and C means copy children. Children are copied with the same option. The values 'MEMBERS', 'PROPERTIES', 'CHILDREN' can also be used.

References size().

Referenced by select().

void clipper::MMonomer::protein_mainchain_build_carbonyl_oxygen ( const MMonomer next  ) 

UTILITY: Build carbonyl oxygen, give next residue in chain.

A carbonyl oxygen is added to this residue if the supplied residue contains an appriate N atom bonded to the C. Otherwise, nothing happens.

Parameters:
next The next monomer in the chain.

References insert(), clipper::Coord_orth::lengthsq(), lookup(), clipper::Atom::null(), clipper::MAtom::set_coord_orth(), clipper::MAtom::set_element(), clipper::MAtom::set_id(), clipper::MAtom::set_occupancy(), clipper::MAtom::set_u_iso(), and clipper::Vec3< T >::unit().

int clipper::MMonomer::protein_sidechain_number_of_rotamers ( TYPE  t = default_type_  )  const

UTILITY: get number of rotamers for protein sidechain.

Returns:
The number of stored rotamers for this residue type. 0 if unknown.

References type().

ftype clipper::MMonomer::protein_sidechain_build_rotamer ( const int &  n,
TYPE  t = default_type_ 
)

UTILITY: build numbered rotamer for protein sidechain.

Parameters:
n The number of the rotamer required.
Returns:
The frequency of the given rotamer.

References insert(), lookup(), clipper::Atom::null(), clipper::MAtom::set_coord_orth(), clipper::MAtom::set_element(), clipper::MAtom::set_id(), clipper::MAtom::set_occupancy(), clipper::MAtom::set_u_iso(), clipper::String::trim(), type(), and clipper::Vec3< T >::unit().

bool clipper::MMonomer::protein_peptide_bond ( const MMonomer m1,
const MMonomer m2,
ftype  r = 1.5 
) [static]

UTILITY: test if two peptide are adjacent.

Test if the C of residue 1 is bonded to the N of residue 2, within the distance r.

Parameters:
r1 The first residue.
r2 The second residue.
r The maximum allowed bond length.
Returns:
true if N and C are present and bonded.

References lookup().

double clipper::MMonomer::protein_ramachandran_phi ( const MMonomer m1,
const MMonomer m2 
) [static]

UTILITY: return Ramachandran phi, or NaN if atoms missing.

Return the Ramachadran angle in radians on -pi...pi. To check the result, see clipper::Util::is_nan()

Parameters:
r1 The first residue.
r2 The second residue.
Returns:
The torsion angle in radians, or NaN if atoms are missing.

References lookup(), clipper::Util::nan(), and clipper::Coord_orth::torsion().

double clipper::MMonomer::protein_ramachandran_psi ( const MMonomer m1,
const MMonomer m2 
) [static]

UTILITY: return Ramachandran psi, or NaN if atoms missing.

Return the Ramachadran angle in radians on -pi...pi. To check the result, see clipper::Util::is_nan()

Parameters:
r1 The first residue.
r2 The second residue.
Returns:
The torsion angle in radians, or NaN if atoms are missing.

References lookup(), clipper::Util::nan(), and clipper::Coord_orth::torsion().


The documentation for this class was generated from the following files:

Generated on 4 Jan 2010 for Clipper_minimol by  doxygen 1.6.1