MiniMol monomer (e.g. residue) object. More...
#include <minimol.h>
Public Types | |
enum | TYPE { Default, Dunbrack, Richardson } |
Rotamer library type. | |
Public Member Functions | |
const String & | id () const |
get monomer ID | |
void | set_id (const String &s) |
set monomer ID | |
const String & | type () 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 MAtom & | operator[] (const int &i) const |
get atom | |
MAtom & | operator[] (const int &i) |
set atom | |
const MAtom & | find (const String &n, const MM::MODE mode=MM::UNIQUE) const |
get atom by id | |
MAtom & | find (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 | |
MMonomer & | copy (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 TYPE & | default_type () |
Friends | |
MMonomer | operator& (const MMonomer &m1, const MMonomer &m2) |
and operator | |
MMonomer | operator| (const MMonomer &m1, const MMonomer &m2) |
or operator |
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.
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.
n | The atom ID. | |
mode | The search mode. |
References lookup(), and clipper::message.
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.
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. |
References copy(), clipper::MAtom::id_match(), clipper::MAtom::id_tidy(), insert(), and clipper::String::split().
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.
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.
References type().
UTILITY: build numbered rotamer for protein sidechain.
n | The number of the rotamer required. |
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.
r1 | The first residue. | |
r2 | The second residue. | |
r | The maximum allowed bond length. |
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()
r1 | The first residue. | |
r2 | The second residue. |
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()
r1 | The first residue. | |
r2 | The second residue. |
References lookup(), clipper::Util::nan(), and clipper::Coord_orth::torsion().