Rosetta
Static Public Member Functions | List of all members
protocols::constel::PresenceCommon Class Reference

A class to hold data structures and functions shared by filters that check whether the amino acids and atoms they require in the constellation are indeed present. More...

#include <Primitives.hh>

Static Public Member Functions

static bool are_aa_pres (core::pose::Pose const &ps, utility::vector1< core::Size > const &cnl, utility::vector1< core::chemical::AA > const &aa_typs, utility::vector1< core::Size > &aa_idxs)
 Records the presence of given amino acid types in a given constellation. More...
 
static bool are_atoms_pres (core::conformation::Residue const &res, utility::vector1< std::string > const &anams, utility::vector1< core::Size > &aidxs)
 Records the presence of given atoms in a given residue. More...
 

Detailed Description

A class to hold data structures and functions shared by filters that check whether the amino acids and atoms they require in the constellation are indeed present.

Member Function Documentation

◆ are_aa_pres()

bool protocols::constel::PresenceCommon::are_aa_pres ( core::pose::Pose const &  ps,
utility::vector1< core::Size > const &  cnl,
utility::vector1< core::chemical::AA > const &  aa_typs,
utility::vector1< core::Size > &  aa_idxs 
)
static

Records the presence of given amino acid types in a given constellation.

Parameters
[in]psa pose containing a target constellation.
[in]cnlindexes in 'ps' of the residues contributing to the constellation.
[in]aa_typsdesired amino acid types for the residues contributing to the constellation.
[out]aa_idxsvector that will map the desired amino acid types to the residue indexes in 'cnl'.
Returns
false if at least one amino acid type in 'aa_typs' is absent from the constellation. Returns true otherwise; in this case, the ith value of 'aa_idxs' is the least index in 'cnl' of a residue having the ith amino acid type in 'aa_typs' (i=1,...,aa_typs.size()).
Remarks
It is assumed that:
  1. 'cnl', 'aa_typs', and 'aa_idxs' have the same size.
    1. different elements in 'aa_typs' have different values.

References core::pose::Pose::aa(), and core::chemical::element::N.

Referenced by protocols::constel::FilterByIndoleCOO::is_satisfied(), protocols::constel::FilterByTryptamine::is_satisfied(), protocols::constel::FilterByAmphetamine::is_satisfied(), and protocols::constel::FilterByHistamine::is_satisfied().

◆ are_atoms_pres()

bool protocols::constel::PresenceCommon::are_atoms_pres ( core::conformation::Residue const &  res,
utility::vector1< std::string > const &  anams,
utility::vector1< core::Size > &  aidxs 
)
static

Records the presence of given atoms in a given residue.

Parameters
[in]resa residue.
[in]anamsvector of atom names to be found in the residue.
[out]aidxsvector that will map the desired atom names to their indexes in the residue.
Returns
false if at least one atom with a desired name is absent from the residue. Returns true otherwise; in this case, the ith element of 'aidxs' will hold the index in 'res' of the atom having the ith name in 'anams' (i=1,...,anams.size()).

References core::conformation::Residue::atom_index(), core::conformation::Residue::has(), and core::chemical::element::N.

Referenced by protocols::constel::FilterByIndoleCOO::is_satisfied(), protocols::constel::FilterByTryptamine::is_satisfied(), and protocols::constel::FilterByAmphetamine::is_satisfied().


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