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

Represent a single ATOM/HETATM "line" in PDB or mmCIF format. More...

#include <IMP/atom/pdb.h>

Inheritance diagram for IMP::atom::PDBRecord:

Detailed Description

Represent a single ATOM/HETATM "line" in PDB or mmCIF format.

Definition at line 35 of file pdb.h.

Public Member Functions

std::string get_alt_loc_indicator () const
 Returns the alternative location indicator.
std::string get_chain_id () const
 Returns the chain ID.
std::string get_element () const
 Returns the element as a string.
bool get_is_atom () const
 Returns true if the record is an ATOM record.
std::string get_padded_atom_name () const
 Returns the atom type in a PDB-style padded string.
std::string get_residue_name () const
 Returns the residue type.
int get_residue_number () const
 Returns the residue number as an integer.
std::string get_trimmed_atom_name () const
 Returns the atom type as a string with no leading or trailing whitespace.
void set_keywords (internal::StringCifKeyword &group, internal::StringCifKeyword &element, internal::StringCifKeyword &atom_name, internal::StringCifKeyword &alt_loc_id, internal::StringCifKeyword &residue_name, internal::StringCifKeyword &auth_chain, internal::StringCifKeyword &chain, internal::IntCifKeyword &seq_id, internal::StringCifKeyword &auth_seq_id)
 Point the record to a single atom_site loop row from an mmCIF file.
void set_line (const std::string &line)
 Point the record to a line of text from a PDB file.
void show (std::ostream &out=std::cout) const

Constructor & Destructor Documentation

◆ PDBRecord()

IMP::atom::PDBRecord::PDBRecord ( )

Definition at line 42 of file pdb.h.

Member Function Documentation

◆ get_alt_loc_indicator()

std::string IMP::atom::PDBRecord::get_alt_loc_indicator ( ) const

Returns the alternative location indicator.

This is a single character in PDB, but can be longer in mmCIF.

◆ get_chain_id()

std::string IMP::atom::PDBRecord::get_chain_id ( ) const

Returns the chain ID.

This is a single character in PDB format, but can be longer in mmCIF. In mmCIF, the author-provided chain ID is provided if available; otherwise, the mmCIF asym_id is returned.

◆ get_element()

std::string IMP::atom::PDBRecord::get_element ( ) const

Returns the element as a string.

◆ get_is_atom()

bool IMP::atom::PDBRecord::get_is_atom ( ) const

Returns true if the record is an ATOM record.

◆ get_padded_atom_name()

std::string IMP::atom::PDBRecord::get_padded_atom_name ( ) const

Returns the atom type in a PDB-style padded string.

The atom type is at least a 4 character long field. The first character is space in many cases, but not always.

◆ get_residue_name()

std::string IMP::atom::PDBRecord::get_residue_name ( ) const

Returns the residue type.

◆ get_residue_number()

int IMP::atom::PDBRecord::get_residue_number ( ) const

Returns the residue number as an integer.

◆ get_trimmed_atom_name()

std::string IMP::atom::PDBRecord::get_trimmed_atom_name ( ) const

Returns the atom type as a string with no leading or trailing whitespace.

◆ set_keywords()

void IMP::atom::PDBRecord::set_keywords ( internal::StringCifKeyword & group,
internal::StringCifKeyword & element,
internal::StringCifKeyword & atom_name,
internal::StringCifKeyword & alt_loc_id,
internal::StringCifKeyword & residue_name,
internal::StringCifKeyword & auth_chain,
internal::StringCifKeyword & chain,
internal::IntCifKeyword & seq_id,
internal::StringCifKeyword & auth_seq_id )

Point the record to a single atom_site loop row from an mmCIF file.

This uses pointers to the CIF keywords, so should not be used after the keywords are freed.

◆ set_line()

void IMP::atom::PDBRecord::set_line ( const std::string & line)

Point the record to a line of text from a PDB file.

This uses a pointer to line so should not be used after line is freed


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