IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
IMP::atom::CHARMMPatch Class Reference

A CHARMM patch residue. More...

#include <IMP/atom/charmm_topology.h>

Inheritance diagram for IMP::atom::CHARMMPatch:

Detailed Description

A CHARMM patch residue.

Patch residues are similar to regular residues, except that they are used to modify an existing residue. Any atoms they contain replace or add to those in the residue; they can also remove atoms. Atom names are as for regular residues, except for patches that affect two residues (e.g. DISU, LINK) in which each atom contains a 1 or 2 prefix (plus an optional colon) to identify the residue which will be patched; for example, both 1:CA and 1CA identify the CA atom in the first residue.

Definition at line 388 of file charmm_topology.h.

Public Member Functions

 CHARMMPatch (std::string type)
 Construct a new, empty patch residue.
void add_removed_atom (std::string name)
void apply (CHARMMResidueTopology *res) const
 Apply the patch to the residue, modifying its topology accordingly.
void apply (CHARMMResidueTopology *res1, CHARMMResidueTopology *res2) const
 Apply the patch to the given pair of residues.
Element get_atom_element (std::string name) const
 Get the element of the named atom in the patch.
unsigned int get_number_of_removed_atoms () const
std::string get_removed_atom (unsigned int i) const
virtual std::string get_type_name () const override
virtual ::IMP::VersionInfo get_version_info () const override
 Get information about the module and version of the object.
void set_atom_element (std::string name, Element e)
 Set the element of the named atom in the patch.
Public Member Functions inherited from IMP::atom::CHARMMResidueTopologyBase
void add_angle (const CHARMMAngle &bond)
void add_atom (const CHARMMAtomTopology &atom)
void add_bond (const CHARMMBond &bond)
void add_dihedral (const CHARMMDihedral &bond)
void add_improper (const CHARMMDihedral &bond)
void add_internal_coordinate (const CHARMMInternalCoordinate &ic)
const CHARMMAngle & get_angle (unsigned int index) const
const CHARMMAtomTopology & get_atom (AtomType type) const
const CHARMMAtomTopology & get_atom (std::string name) const
const CHARMMAtomTopology & get_atom (unsigned int i) const
const CHARMMBond & get_bond (unsigned int index) const
const CHARMMDihedral & get_dihedral (unsigned int index) const
const CHARMMDihedral & get_improper (unsigned int index) const
const CHARMMInternalCoordinate & get_internal_coordinate (unsigned int index) const
unsigned int get_number_of_angles () const
unsigned int get_number_of_atoms () const
unsigned int get_number_of_bonds () const
unsigned int get_number_of_dihedrals () const
unsigned int get_number_of_impropers () const
unsigned int get_number_of_internal_coordinates () const
std::string get_type () const
Public Member Functions inherited from IMP::Object
CheckLevel get_check_level () const
 get_derived_object (self)
 Return this object cast to the most derived subclass.
LogLevel get_log_level () const
void set_check_level (CheckLevel l)
void set_log_level (LogLevel l)
 Set the logging level used in this object.
const std::string & get_name () const
 Get the (not necessarily unique) name of this object.
void set_name (std::string name)
void set_was_used (bool tf) const
void show (std::ostream &out=std::cout) const
virtual void clear_caches ()

Additional Inherited Members

Protected Member Functions inherited from IMP::atom::CHARMMResidueTopologyBase
 CHARMMResidueTopologyBase (std::string type)
Protected Member Functions inherited from IMP::Object
 Object (std::string name)
 Construct an object with the given name.
virtual void do_destroy ()
Protected Attributes inherited from IMP::atom::CHARMMResidueTopologyBase
CHARMMAngles angles_
Vector< CHARMMAtomTopology > atoms_
CHARMMBonds bonds_
CHARMMDihedrals dihedrals_
CHARMMDihedrals impropers_
CHARMMInternalCoordinates internal_coordinates_

Constructor & Destructor Documentation

◆ CHARMMPatch()

IMP::atom::CHARMMPatch::CHARMMPatch ( std::string type)

Construct a new, empty patch residue.

To get an existing patch, use CHARMMParameters::get_patch() instead.

Definition at line 396 of file charmm_topology.h.

◆ ~CHARMMPatch()

virtual IMP::atom::CHARMMPatch::~CHARMMPatch ( )
virtual

Definition at line 444 of file charmm_topology.h.

Member Function Documentation

◆ add_removed_atom()

void IMP::atom::CHARMMPatch::add_removed_atom ( std::string name)

Definition at line 400 of file charmm_topology.h.

◆ apply() [1/2]

void IMP::atom::CHARMMPatch::apply ( CHARMMResidueTopology * res) const

Apply the patch to the residue, modifying its topology accordingly.

Note
Most CHARMM patches are designed to be applied in isolation; it is usually an error to try to apply two different patches to the same residue. Thus, by default IMP prohibits this. To allow an already-patched residue to be re-patched, first call CHARMMResidueTopology::set_patched(false).

◆ apply() [2/2]

void IMP::atom::CHARMMPatch::apply ( CHARMMResidueTopology * res1,
CHARMMResidueTopology * res2 ) const

Apply the patch to the given pair of residues.

This can only be used for special two-residue patches, such as DISU or LINK. In a two-residue patch, each atom has a 1: or 2: prefix to identify the residue it refers to.

Exceptions
ValueExceptionif the patch is not a two-residue patch.

◆ get_atom_element()

Element IMP::atom::CHARMMPatch::get_atom_element ( std::string name) const

Get the element of the named atom in the patch.

Returns
UNKNOWN_ELEMENT if no element was set for this atom.

Definition at line 421 of file charmm_topology.h.

◆ get_number_of_removed_atoms()

unsigned int IMP::atom::CHARMMPatch::get_number_of_removed_atoms ( ) const

Definition at line 402 of file charmm_topology.h.

◆ get_removed_atom()

std::string IMP::atom::CHARMMPatch::get_removed_atom ( unsigned int i) const

Definition at line 406 of file charmm_topology.h.

◆ get_type_name()

virtual std::string IMP::atom::CHARMMPatch::get_type_name ( ) const
overridevirtual

Reimplemented from IMP::atom::CHARMMResidueTopologyBase.

Definition at line 444 of file charmm_topology.h.

◆ get_version_info()

virtual ::IMP::VersionInfo IMP::atom::CHARMMPatch::get_version_info ( ) const
overridevirtual

Get information about the module and version of the object.

Reimplemented from IMP::atom::CHARMMResidueTopologyBase.

Definition at line 444 of file charmm_topology.h.

Here is the call graph for this function:

◆ set_atom_element()

void IMP::atom::CHARMMPatch::set_atom_element ( std::string name,
Element e )

Set the element of the named atom in the patch.

When the patch is applied, an AtomType is created (if needed) for each atom added to a residue, using this element.

Definition at line 414 of file charmm_topology.h.


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