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 29 of file select.hpp.

Constructor & Destructor Documentation

◆ Selection() [1/2]

gemmi::Selection::Selection ( )
default

◆ Selection() [2/2]

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

Definition at line 538 of file select.hpp.

Member Function Documentation

◆ str()

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

Definition at line 135 of file select.hpp.

◆ matches() [1/6]

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

Definition at line 181 of file select.hpp.

◆ matches() [2/6]

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

Definition at line 182 of file select.hpp.

◆ matches() [3/6]

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

Definition at line 185 of file select.hpp.

◆ matches() [4/6]

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

Definition at line 188 of file select.hpp.

◆ matches() [5/6]

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

Definition at line 195 of file select.hpp.

◆ matches() [6/6]

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

Definition at line 203 of file select.hpp.

◆ models()

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

Definition at line 209 of file select.hpp.

◆ chains()

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

Definition at line 212 of file select.hpp.

◆ residues()

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

Definition at line 215 of file select.hpp.

◆ atoms()

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

Definition at line 218 of file select.hpp.

◆ first_in_model()

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

Definition at line 222 of file select.hpp.

◆ first()

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

Definition at line 237 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 247 of file select.hpp.

◆ add_matching_children() [2/2]

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

Definition at line 254 of file select.hpp.

◆ set_residue_flags()

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

Definition at line 256 of file select.hpp.

◆ set_atom_flags()

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

Definition at line 260 of file select.hpp.

◆ copy_selection()

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

Definition at line 266 of file select.hpp.

◆ remove_selected() [1/2]

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

Definition at line 273 of file select.hpp.

◆ remove_selected() [2/2]

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

Definition at line 280 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 289 of file select.hpp.

◆ remove_not_selected() [2/2]

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

Definition at line 294 of file select.hpp.

Member Data Documentation

◆ mdl

int gemmi::Selection::mdl = 0

Definition at line 117 of file select.hpp.

◆ chain_ids

List gemmi::Selection::chain_ids

Definition at line 118 of file select.hpp.

◆ from_seqid

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

Definition at line 119 of file select.hpp.

◆ to_seqid

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

Definition at line 120 of file select.hpp.

◆ residue_names

List gemmi::Selection::residue_names

Definition at line 121 of file select.hpp.

◆ entity_types

List gemmi::Selection::entity_types

Definition at line 122 of file select.hpp.

◆ et_flags

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

Definition at line 124 of file select.hpp.

◆ atom_names

List gemmi::Selection::atom_names

Definition at line 125 of file select.hpp.

◆ elements

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

Definition at line 126 of file select.hpp.

◆ altlocs

List gemmi::Selection::altlocs

Definition at line 127 of file select.hpp.

◆ residue_flags

FlagList gemmi::Selection::residue_flags

Definition at line 128 of file select.hpp.

◆ atom_flags

FlagList gemmi::Selection::atom_flags

Definition at line 129 of file select.hpp.

◆ atom_inequalities

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

Definition at line 130 of file select.hpp.


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