Xmipp  v3.23.11-Nereus
Public Member Functions | Public Attributes | List of all members
cif::tls_selection_range_id Struct Reference
Inheritance diagram for cif::tls_selection_range_id:
Inheritance graph
[legend]
Collaboration diagram for cif::tls_selection_range_id:
Collaboration graph
[legend]

Public Member Functions

 tls_selection_range_id (int first, int last, char icodeFirst=0, char icodeLast=0)
 
void collect_residues (cif::datablock &db, std::vector< tls_residue > &residues, size_t indentLevel) const override
 
- Public Member Functions inherited from cif::tls_selection_all
 tls_selection_all ()
 
void collect_residues (cif::datablock &db, std::vector< tls_residue > &residues, size_t indentLevel) const override
 

Public Attributes

int m_first
 
int m_last
 
char m_icode_first
 
char m_icode_last
 

Detailed Description

Definition at line 424 of file tls.cpp.

Constructor & Destructor Documentation

◆ tls_selection_range_id()

cif::tls_selection_range_id::tls_selection_range_id ( int  first,
int  last,
char  icodeFirst = 0,
char  icodeLast = 0 
)
inline

Definition at line 426 of file tls.cpp.

427  : m_first(first)
428  , m_last(last)
429  , m_icode_first(icodeFirst)
430  , m_icode_last(icodeLast)
431  {
432  }
glob_log first

Member Function Documentation

◆ collect_residues()

void cif::tls_selection_range_id::collect_residues ( cif::datablock &  db,
std::vector< tls_residue > &  residues,
size_t  indentLevel 
) const
inlineoverride

Definition at line 434 of file tls.cpp.

435  {
436  // need to do this per chain
437  std::set<std::string> chains;
438  for (auto &r : residues)
439  chains.insert(r.chainID);
440 
441  for (std::string chain : chains)
442  {
443  auto f = find_if(residues.begin(), residues.end(),
444  [this,chain](auto r) -> bool
445  {
446  return r.chainID == chain and r.seqNr == m_first and r.iCode == m_icode_first;
447  });
448 
449  auto l = find_if(residues.begin(), residues.end(),
450  [this,chain](auto r) -> bool
451  {
452  return r.chainID == chain and r.seqNr == m_last and r.iCode == m_icode_last;
453  });
454 
455  if (f != residues.end() and l != residues.end() and f <= l)
456  {
457  ++l;
458 
459  for (; f != l; ++f)
460  f->selected = true;
461  }
462  }
463 
464  if (cif::VERBOSE > 0)
465  {
466  std::cout << std::string(indentLevel * 2, ' ') << "Through " << m_first << ':' << m_last << std::endl;
467  dump_selection(residues, indentLevel);
468  }
469  }
void dump_selection(const std::vector< tls_residue > &selected, size_t indentLevel)
Definition: tls.cpp:69
double * f
int VERBOSE
Definition: utilities.cpp:58

Member Data Documentation

◆ m_first

int cif::tls_selection_range_id::m_first

Definition at line 471 of file tls.cpp.

◆ m_icode_first

char cif::tls_selection_range_id::m_icode_first

Definition at line 472 of file tls.cpp.

◆ m_icode_last

char cif::tls_selection_range_id::m_icode_last

Definition at line 472 of file tls.cpp.

◆ m_last

int cif::tls_selection_range_id::m_last

Definition at line 471 of file tls.cpp.


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