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

Track creation of a system fragment from a PDB file. More...

#include <IMP/core/provenance.h>

Inheritance diagram for IMP::core::StructureProvenance:

Detailed Description

Track creation of a system fragment from a PDB file.

This tracks the filename of the PDB file, and the chain ID, that was used to populate an IMP Model (if multiple chains are read, IMP::atom::read_pdb() assigns a StructureProvenance to each chain). The offset between the residue indexes in the PDB file and the Model is also recorded. Normally this is zero, but can be used to indicate that residues were renumbered, e.g. to match canonical numbering. The convention is PDB residue # - offset = Model residue #.

Definition at line 86 of file provenance.h.

Public Member Functions

 StructureProvenance (::IMP::Model *m, ::IMP::ParticleIndex id)
 StructureProvenance (const IMP::ParticleAdaptor &d)
std::string get_chain_id () const
std::string get_filename () const
int get_residue_offset () const
void set_chain_id (std::string chain_id) const
 Set the chain ID.
void set_filename (std::string filename) const
 Set the filename.
void set_residue_offset (int residue_offset) const
 Set the offset between PDB and internal numbering (defaults to 0).
void show (std::ostream &out=std::cout) const
Public Member Functions inherited from IMP::core::Provenance
 Provenance (::IMP::Model *m, ::IMP::ParticleIndex id)
 Provenance (const IMP::ParticleAdaptor &d)
Provenance get_previous () const
void set_previous (Provenance p)
 Set the previous provenance.
void show (std::ostream &out=std::cout) const
Public Member Functions inherited from IMP::Decorator
bool get_is_valid () const
 Returns true if constructed with a non-default constructor.
Model * get_model () const
 Returns the Model containing the particle.
Particle * get_particle () const
 Returns the particle decorated by this decorator.
ParticleIndex get_particle_index () const
 Returns the particle index decorated by this decorator.
 operator Particle * () const
 operator ParticleIndex () const
Particle * operator-> () const

Static Public Member Functions

static bool get_is_setup (const IMP::ParticleAdaptor &p)
static bool get_is_setup (Model *m, ParticleIndex pi)
static StructureProvenance setup_particle (IMP::ParticleAdaptor pa, std::string filename, std::string chain_id)
static StructureProvenance setup_particle (IMP::ParticleAdaptor pa, std::string filename, std::string chain_id, int residue_offset)
static StructureProvenance setup_particle (IMP::ParticleAdaptor pa, StructureProvenance o)
static StructureProvenance setup_particle (Model *m, ParticleIndex pi, std::string filename, std::string chain_id)
static StructureProvenance setup_particle (Model *m, ParticleIndex pi, std::string filename, std::string chain_id, int residue_offset)
static StructureProvenance setup_particle (Model *m, ParticleIndex pi, StructureProvenance o)
Static Public Member Functions inherited from IMP::core::Provenance
static bool get_is_setup (const IMP::ParticleAdaptor &p)
static bool get_is_setup (Model *m, ParticleIndex pi)
static Provenance setup_particle (IMP::ParticleAdaptor pa)
static Provenance setup_particle (Model *m, ParticleIndex pi)

Additional Inherited Members

Protected Member Functions inherited from IMP::Decorator
 Decorator (Model *m, ParticleIndex pi)
 Decorator (ParticleAdaptor p)

Constructor & Destructor Documentation

◆ StructureProvenance() [1/3]

IMP::core::StructureProvenance::StructureProvenance ( )

Definition at line 155 of file provenance.h.

◆ StructureProvenance() [2/3]

IMP::core::StructureProvenance::StructureProvenance ( ::IMP::Model * m,
::IMP::ParticleIndex id )

Definition at line 155 of file provenance.h.

◆ StructureProvenance() [3/3]

IMP::core::StructureProvenance::StructureProvenance ( const IMP::ParticleAdaptor & d)
explicit

Definition at line 155 of file provenance.h.

Member Function Documentation

◆ get_chain_id()

std::string IMP::core::StructureProvenance::get_chain_id ( ) const
Returns
the chain ID

Definition at line 138 of file provenance.h.

Here is the call graph for this function:

◆ get_filename()

std::string IMP::core::StructureProvenance::get_filename ( ) const
Returns
the filename, as an absolute path

Definition at line 127 of file provenance.h.

Here is the call graph for this function:

◆ get_is_setup() [1/2]

bool IMP::core::StructureProvenance::get_is_setup ( const IMP::ParticleAdaptor & p)
static

Definition at line 155 of file provenance.h.

◆ get_is_setup() [2/2]

bool IMP::core::StructureProvenance::get_is_setup ( Model * m,
ParticleIndex pi )
static

Definition at line 109 of file provenance.h.

◆ get_residue_offset()

int IMP::core::StructureProvenance::get_residue_offset ( ) const
Returns
the offset between PDB and internal numbering (defaults to 0)

Definition at line 150 of file provenance.h.

Here is the call graph for this function:

◆ set_chain_id()

void IMP::core::StructureProvenance::set_chain_id ( std::string chain_id) const

Set the chain ID.

Definition at line 132 of file provenance.h.

Here is the call graph for this function:

◆ set_filename()

void IMP::core::StructureProvenance::set_filename ( std::string filename) const

Set the filename.

The path can be relative or absolute. Internally, an absolute path will be stored (although generally it will be converted to a relative path when storing in a file, such as RMF).

Definition at line 120 of file provenance.h.

Here is the call graph for this function:

◆ set_residue_offset()

void IMP::core::StructureProvenance::set_residue_offset ( int residue_offset) const

Set the offset between PDB and internal numbering (defaults to 0).

Definition at line 143 of file provenance.h.

Here is the call graph for this function:

◆ setup_particle() [1/6]

StructureProvenance IMP::core::StructureProvenance::setup_particle ( IMP::ParticleAdaptor pa,
std::string filename,
std::string chain_id )
static
Returns
a StructureProvenance object that decorates the particle specified by pa
See also
setup_particle(m, p, filename, chain_id)

Definition at line 159 of file provenance.h.

◆ setup_particle() [2/6]

StructureProvenance IMP::core::StructureProvenance::setup_particle ( IMP::ParticleAdaptor pa,
std::string filename,
std::string chain_id,
int residue_offset )
static
Returns
a StructureProvenance object that decorates the particle specified by pa
See also
setup_particle(m, pi, filename, chain_id, residue_offset)

Definition at line 157 of file provenance.h.

◆ setup_particle() [3/6]

StructureProvenance IMP::core::StructureProvenance::setup_particle ( IMP::ParticleAdaptor pa,
StructureProvenance o )
static
Returns
a StructureProvenance object that decorates the particle specified by pa
See also
setup_particle(m, pi, o)

Definition at line 160 of file provenance.h.

◆ setup_particle() [4/6]

StructureProvenance IMP::core::StructureProvenance::setup_particle ( Model * m,
ParticleIndex pi,
std::string filename,
std::string chain_id )
static
Returns
a StructureProvenance object that decorates particle pi

Definition at line 159 of file provenance.h.

◆ setup_particle() [5/6]

StructureProvenance IMP::core::StructureProvenance::setup_particle ( Model * m,
ParticleIndex pi,
std::string filename,
std::string chain_id,
int residue_offset )
static
Returns
a StructureProvenance object that decorates particle pi

Definition at line 157 of file provenance.h.

◆ setup_particle() [6/6]

StructureProvenance IMP::core::StructureProvenance::setup_particle ( Model * m,
ParticleIndex pi,
StructureProvenance o )
static
Returns
a StructureProvenance object that decorates particle pi

Definition at line 160 of file provenance.h.


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