Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
Line_format< Mandatory_fields > Class Template Reference

#include <PDB.h>

Public Member Functions

 Line_format (const std::string &line)
 
bool is_hetatm () const
 
std::string get_charge_str (const std::string &line) const
 
int get_charge (const std::string &line) const
 

Detailed Description

template<class Mandatory_fields = Mandatory_fields_default>
class ESBTL::PDB::Line_format< Mandatory_fields >

Helper class handle to extract fields from line of a PDB file.

Template Parameters
Mandatory_fieldsis a class indicating which fields are mandatory (see ESBTL::PDB::Mandatory_fields_default for requirements).

Constructor & Destructor Documentation

◆ Line_format()

Line_format ( const std::string &  line)
inline

Constructor.

Parameters
lineis a line of a PDB file.

Member Function Documentation

◆ get_charge()

int get_charge ( const std::string &  line) const
inline

extract the field charge as an integer.

◆ get_charge_str()

std::string get_charge_str ( const std::string &  line) const
inline

extract the field charge as a string.

◆ is_hetatm()

bool is_hetatm ( ) const
inline

Indicates whether the line read is a coordinate line of an hetero-atom.