29 #ifndef CDPL_BIOMOL_UTILITYFUNCTIONS_HPP
30 #define CDPL_BIOMOL_UTILITYFUNCTIONS_HPP
67 template <
typename Iter>
69 char ins_code = 0, std::size_t model_no = 0,
const char* atom_name = 0,
long serial_no =
IGNORE_SERIAL_NO)
71 return std::find_if(it, end,
72 std::bind(
static_cast<bool (*)(
const Chem::Atom&,
const char*,
const char*,
long,
char, std::size_t,
const char*,
long)
>(&
matchesResidueInfo), std::placeholders::_1, res_code, chain_id, res_seq_no,
73 ins_code, model_no, atom_name, serial_no));
96 template <
typename Iter>
98 char ins_code = 0, std::size_t model_no = 0,
const char* atom_name = 0,
long serial_no =
IGNORE_SERIAL_NO)
100 for (; it != end; ++it) {
110 std::bind(
static_cast<bool (*)(
const Chem::Atom&,
const char*,
const char*,
long,
char, std::size_t,
const char*,
long)
>(&
matchesResidueInfo), std::placeholders::_1, res_code, chain_id, res_seq_no,
111 ins_code, model_no, atom_name, serial_no)) != res.
getAtomsEnd())
Definition of class CDPL::Chem::Atom.
Declaration of functions that operate on Chem::Atom instances.
Declaration of functions that operate on Chem::MolecularGraph instances.
Definition of class CDPL::Chem::MolecularGraph.
Definition of flags for serial and residue sequence number processing.
ConstAtomIterator getAtomsBegin() const
Returns a constant iterator pointing to the beginning of the stored const Chem::Atom objects.
ConstAtomIterator getAtomsEnd() const
Returns a constant iterator pointing to the end of the stored const Chem::Atom objects.
Abstract base class representing a chemical atom and its bonded neighborhood.
Definition: Atom.hpp:57
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
const long IGNORE_SEQUENCE_NO
Sentinel value indicating that the residue sequence number should be ignored when matching residues.
Definition: ProcessingFlags.hpp:44
Iter findResidueAtom(Iter it, Iter end, const char *res_code=0, const char *chain_id=0, long res_seq_no=IGNORE_SEQUENCE_NO, char ins_code=0, std::size_t model_no=0, const char *atom_name=0, long serial_no=IGNORE_SERIAL_NO)
Searches the iterator range [it, end) for the first atom whose PDB-style residue identity attributes ...
Definition: Biomol/UtilityFunctions.hpp:68
Iter findResidue(Iter it, Iter end, const char *res_code=0, const char *chain_id=0, long res_seq_no=IGNORE_SEQUENCE_NO, char ins_code=0, std::size_t model_no=0, const char *atom_name=0, long serial_no=IGNORE_SERIAL_NO)
Searches the iterator range [it, end) for the first residue (molecular graph) whose PDB-style identit...
Definition: Biomol/UtilityFunctions.hpp:97
CDPL_BIOMOL_API bool matchesResidueInfo(const Chem::Atom &atom, const char *res_code=0, const char *chain_id=0, long res_seq_no=IGNORE_SEQUENCE_NO, char ins_code=0, std::size_t model_no=0, const char *atom_name=0, long serial_no=IGNORE_SERIAL_NO)
Tells whether the residue-identity attributes of atom match the given filter values.
const long IGNORE_SERIAL_NO
Sentinel value indicating that the atom serial number should be ignored when matching atoms.
Definition: ProcessingFlags.hpp:49
The namespace of the Chemical Data Processing Library.