clipper::MPolymer Class Reference

MiniMol polymer (e.g. chain) object. More...

#include <minimol.h>

Inheritance diagram for clipper::MPolymer:
clipper::PropertyManager

List of all members.

Public Member Functions

const Stringid () 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 MMonomeroperator[] (const int &i) const
 get monomer
MMonomeroperator[] (const int &i)
 set monomer
const MMonomerfind (const String &n, const MM::MODE mode=MM::UNIQUE) const
 get monomer by id
MMonomerfind (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
MPolymercopy (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

Detailed Description

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.


Member Function Documentation

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.

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

References lookup(), and clipper::message.

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

set monomer by id

See MPolymer::find()

References lookup(), and clipper::message.

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

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.

Parameters:
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.
Returns:
The selection as a new polymer.

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

MPolymer & clipper::MPolymer::copy ( const MPolymer 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().


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

Generated on 4 Jan 2010 for Clipper_minimol by  doxygen 1.6.1