MiniMol polymer (e.g. chain) object. More...
#include <minimol.h>
Public Member Functions | |
const String & | id () const |
get polymer ID | |
void | set_id (const String &s) |
set polymer 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 monomers in polymer | |
const MMonomer & | operator[] (const int &i) const |
get monomer | |
MMonomer & | operator[] (const int &i) |
set monomer | |
const MMonomer & | find (const String &n, const MM::MODE mode=MM::UNIQUE) const |
get monomer by id | |
MMonomer & | find (const String &n, const MM::MODE mode=MM::UNIQUE) |
set monomer by id | |
MPolymer | select (const String &sel, const MM::MODE mode=MM::UNIQUE) const |
create selection | |
int | lookup (const String &str, const MM::MODE &mode) const |
lookup monomer by id | |
void | insert (const MMonomer &add, int pos=-1) |
add monomer | |
MPolymer & | copy (const MPolymer &other, const MM::COPY &mode) |
configureable copy function | |
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 | |
Friends | |
MPolymer | operator& (const MPolymer &m1, const MPolymer &m2) |
and operator | |
MPolymer | operator| (const MPolymer &m1, const MPolymer &m2) |
or operator |
MiniMol polymer (e.g. chain) object.
The MiniMol polymer object has one property: an identifying name.
It contains a list of clipper::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 polymer.
const MMonomer & clipper::MPolymer::find | ( | const String & | n, | |
const MM::MODE | mode = MM::UNIQUE | |||
) | const |
get monomer by id
Lookup monomer by ID. If mode=UNIQUE, the insertion code must match, otherwise the first monomer with the same sequence number is returned.
n | The monomer ID. | |
mode | The search mode. |
References lookup(), and clipper::message.
create selection
Creates a copy of this polymer containing only the monomers and atoms described by the selection string.
The selection string must be of the form 'X/Y' where X is a monomer selection and Y is an atom selection, described under MAtom::select(). The monomer selection must contain a monomer ID or a comma separated list of monomer IDs, or '*' to select all monomers. Monomer IDs are described in s_mm_monomer_id.
sel | The selection string. | |
mode | MM::UNIQUE forces an exact match, including insertion code. MM::ANY matches any monomer with the right sequence number, ignoring insertion code. |
References copy(), clipper::MMonomer::id_match(), clipper::MMonomer::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().