Gemmi C++ API
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | List of all members
gemmi::Selection Struct Reference

#include <select.hpp>

Classes

struct  AtomInequality
 
struct  FlagList
 
struct  List
 
struct  SequenceId
 

Public Member Functions

 Selection ()=default
 
 Selection (const std::string &cid)
 
std::string str () const
 
bool matches (const Structure &) const
 
bool matches (const Model &model) const
 
bool matches (const Chain &chain) const
 
bool matches (const Residue &res) const
 
bool matches (const Atom &a) const
 
bool matches (const CRA &cra) const
 
FilterProxy< Selection, Modelmodels (Structure &st) const
 
FilterProxy< Selection, Chainchains (Model &model) const
 
FilterProxy< Selection, Residueresidues (Chain &chain) const
 
FilterProxy< Selection, Atomatoms (Residue &residue) const
 
CRA first_in_model (Model &model) const
 
std::pair< Model *, CRAfirst (Structure &st) const
 
template<typename T >
void add_matching_children (const T &orig, T &target) const
 
void add_matching_children (const Atom &, Atom &) const
 
Selectionset_residue_flags (const std::string &pattern)
 
Selectionset_atom_flags (const std::string &pattern)
 
template<typename T >
T copy_selection (const T &orig) const
 
template<typename T >
void remove_selected (T &t) const
 
void remove_selected (Residue &res) const
 
template<typename T >
void remove_not_selected (T &t) const
 
void remove_not_selected (Atom &) const
 

Public Attributes

int mdl = 0
 
List chain_ids
 
SequenceId from_seqid = {INT_MIN, '*'}
 
SequenceId to_seqid = {INT_MAX, '*'}
 
List residue_names
 
List entity_types
 
std::array< char, 6 > et_flags
 
List atom_names
 
std::vector< charelements
 
List altlocs
 
FlagList residue_flags
 
FlagList atom_flags
 
std::vector< AtomInequalityatom_inequalities
 

Detailed Description

Definition at line 21 of file select.hpp.

Constructor & Destructor Documentation

◆ Selection() [1/2]

gemmi::Selection::Selection ( )
default

◆ Selection() [2/2]

gemmi::Selection::Selection ( const std::string &  cid)

Member Function Documentation

◆ str()

std::string gemmi::Selection::str ( ) const

◆ matches() [1/6]

bool gemmi::Selection::matches ( const Structure ) const
inline

Definition at line 112 of file select.hpp.

◆ matches() [2/6]

bool gemmi::Selection::matches ( const Model model) const
inline

Definition at line 113 of file select.hpp.

◆ matches() [3/6]

bool gemmi::Selection::matches ( const Chain chain) const
inline

Definition at line 116 of file select.hpp.

◆ matches() [4/6]

bool gemmi::Selection::matches ( const Residue res) const
inline

Definition at line 119 of file select.hpp.

◆ matches() [5/6]

bool gemmi::Selection::matches ( const Atom a) const
inline

Definition at line 126 of file select.hpp.

◆ matches() [6/6]

bool gemmi::Selection::matches ( const CRA cra) const
inline

Definition at line 134 of file select.hpp.

◆ models()

FilterProxy< Selection, Model > gemmi::Selection::models ( Structure st) const
inline

Definition at line 140 of file select.hpp.

◆ chains()

FilterProxy< Selection, Chain > gemmi::Selection::chains ( Model model) const
inline

Definition at line 143 of file select.hpp.

◆ residues()

FilterProxy< Selection, Residue > gemmi::Selection::residues ( Chain chain) const
inline

Definition at line 146 of file select.hpp.

◆ atoms()

FilterProxy< Selection, Atom > gemmi::Selection::atoms ( Residue residue) const
inline

Definition at line 149 of file select.hpp.

◆ first_in_model()

CRA gemmi::Selection::first_in_model ( Model model) const
inline

Definition at line 153 of file select.hpp.

◆ first()

std::pair< Model *, CRA > gemmi::Selection::first ( Structure st) const
inline

Definition at line 168 of file select.hpp.

◆ add_matching_children() [1/2]

template<typename T >
void gemmi::Selection::add_matching_children ( const T orig,
T target 
) const
inline

Definition at line 178 of file select.hpp.

◆ add_matching_children() [2/2]

void gemmi::Selection::add_matching_children ( const Atom ,
Atom  
) const
inline

Definition at line 185 of file select.hpp.

◆ set_residue_flags()

Selection & gemmi::Selection::set_residue_flags ( const std::string &  pattern)
inline

Definition at line 187 of file select.hpp.

◆ set_atom_flags()

Selection & gemmi::Selection::set_atom_flags ( const std::string &  pattern)
inline

Definition at line 191 of file select.hpp.

◆ copy_selection()

template<typename T >
T gemmi::Selection::copy_selection ( const T orig) const
inline

Definition at line 197 of file select.hpp.

◆ remove_selected() [1/2]

template<typename T >
void gemmi::Selection::remove_selected ( T t) const
inline

Definition at line 204 of file select.hpp.

◆ remove_selected() [2/2]

void gemmi::Selection::remove_selected ( Residue res) const
inline

Definition at line 211 of file select.hpp.

◆ remove_not_selected() [1/2]

template<typename T >
void gemmi::Selection::remove_not_selected ( T t) const
inline

Definition at line 220 of file select.hpp.

◆ remove_not_selected() [2/2]

void gemmi::Selection::remove_not_selected ( Atom ) const
inline

Definition at line 225 of file select.hpp.

Member Data Documentation

◆ mdl

int gemmi::Selection::mdl = 0

Definition at line 92 of file select.hpp.

◆ chain_ids

List gemmi::Selection::chain_ids

Definition at line 93 of file select.hpp.

◆ from_seqid

SequenceId gemmi::Selection::from_seqid = {INT_MIN, '*'}

Definition at line 94 of file select.hpp.

◆ to_seqid

SequenceId gemmi::Selection::to_seqid = {INT_MAX, '*'}

Definition at line 95 of file select.hpp.

◆ residue_names

List gemmi::Selection::residue_names

Definition at line 96 of file select.hpp.

◆ entity_types

List gemmi::Selection::entity_types

Definition at line 97 of file select.hpp.

◆ et_flags

std::array<char, 6> gemmi::Selection::et_flags

Definition at line 99 of file select.hpp.

◆ atom_names

List gemmi::Selection::atom_names

Definition at line 100 of file select.hpp.

◆ elements

std::vector<char> gemmi::Selection::elements

Definition at line 101 of file select.hpp.

◆ altlocs

List gemmi::Selection::altlocs

Definition at line 102 of file select.hpp.

◆ residue_flags

FlagList gemmi::Selection::residue_flags

Definition at line 103 of file select.hpp.

◆ atom_flags

FlagList gemmi::Selection::atom_flags

Definition at line 104 of file select.hpp.

◆ atom_inequalities

std::vector<AtomInequality> gemmi::Selection::atom_inequalities

Definition at line 105 of file select.hpp.


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