Chemical Data Processing Library C++ API - Version 1.4.0
Biomol/MolecularGraphFunctions.hpp
Go to the documentation of this file.
1 /*
2  * MolecularGraphFunctions.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_BIOMOL_MOLECULARGRAPHFUNCTIONS_HPP
30 #define CDPL_BIOMOL_MOLECULARGRAPHFUNCTIONS_HPP
31 
32 #include <string>
33 #include <cstddef>
34 
36 #include "CDPL/Biomol/PDBData.hpp"
41 
42 
43 namespace CDPL
44 {
45 
46  namespace Chem
47  {
48 
49  class MolecularGraph;
50  class Fragment;
51  } // namespace Chem
52 
53  namespace Biomol
54  {
55 
61  CDPL_BIOMOL_API const std::string& getResidueCode(const Chem::MolecularGraph& molgraph);
62 
68  CDPL_BIOMOL_API void setResidueCode(Chem::MolecularGraph& molgraph, const std::string& code);
69 
75 
82 
83 
90 
97 
103 
110 
111 
118 
125 
131 
138 
139 
145  CDPL_BIOMOL_API const std::string& getChainID(const Chem::MolecularGraph& molgraph);
146 
152  CDPL_BIOMOL_API void setChainID(Chem::MolecularGraph& molgraph, const std::string& id);
153 
159 
166 
167 
174 
180  CDPL_BIOMOL_API void setModelNumber(Chem::MolecularGraph& molgraph, std::size_t model_no);
181 
187 
194 
195 
202 
209 
215 
222 
230 
237 
243 
250 
251 
261  CDPL_BIOMOL_API void extractResidueSubstructures(const Chem::MolecularGraph& molgraph, const Chem::MolecularGraph& parent_molgraph, Chem::Fragment& res_substructs,
262  bool cnctd_only = false, unsigned int flags = AtomPropertyFlag::DEFAULT, bool append = false);
263 
274  double max_dist, bool inc_core_atoms = false, bool append = false);
275 
287  const Chem::Atom3DCoordinatesFunction& coords_func, double max_dist, bool inc_core_atoms = false, bool append = false);
288 
298  double max_dist, bool append = false);
299 
310  const Chem::Atom3DCoordinatesFunction& coords_func, double max_dist, bool append = false);
311 
319 
334  CDPL_BIOMOL_API bool matchesResidueInfo(const Chem::MolecularGraph& molgraph, const char* res_code = 0, const char* chain_id = 0, long res_seq_no = IGNORE_SEQUENCE_NO,
335  char ins_code = 0, std::size_t model_no = 0);
336  } // namespace Biomol
337 } // namespace CDPL
338 
339 #endif // CDPL_BIOMOL_MOLECULARGRAPHFUNCTIONS_HPP
Type declaration of a generic wrapper class for storing user-defined Chem::Atom 3D-coordinates functi...
Definition of the preprocessor macro CDPL_BIOMOL_API.
#define CDPL_BIOMOL_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of constants in namespace CDPL::Biomol::AtomPropertyFlag.
Definition of class CDPL::Biomol::MMCIFData.
Definition of class CDPL::Biomol::PDBData.
Definition of flags for serial and residue sequence number processing.
std::shared_ptr< MMCIFData > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MMCIFData instances.
Definition: MMCIFData.hpp:58
std::shared_ptr< PDBData > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated PDBData instances.
Definition: PDBData.hpp:57
Concrete Chem::MolecularGraph implementation that stores references to a selectable subset of atoms a...
Definition: Fragment.hpp:57
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
constexpr unsigned int DEFAULT
Represents the default set of atom properties.
Definition: Biomol/AtomPropertyFlag.hpp:53
const long IGNORE_SEQUENCE_NO
Sentinel value indicating that the residue sequence number should be ignored when matching residues.
Definition: ProcessingFlags.hpp:44
CDPL_BIOMOL_API void setModelNumber(Chem::Atom &atom, std::size_t model_no)
Sets the value of the Biomol::AtomProperty::MODEL_NUMBER property of atom to model_no.
CDPL_BIOMOL_API char getResidueInsertionCode(const Chem::Atom &atom)
Returns the value of the Biomol::AtomProperty::RESIDUE_INSERTION_CODE property of atom.
CDPL_BIOMOL_API std::size_t getModelNumber(const Chem::Atom &atom)
Returns the value of the Biomol::AtomProperty::MODEL_NUMBER property of atom.
CDPL_BIOMOL_API void clearModelNumber(Chem::Atom &atom)
Removes the Biomol::AtomProperty::MODEL_NUMBER property from atom.
CDPL_BIOMOL_API void setResidueInsertionCode(Chem::Atom &atom, char code)
Sets the value of the Biomol::AtomProperty::RESIDUE_INSERTION_CODE property of atom to code.
CDPL_BIOMOL_API bool hasMMCIFData(const Chem::MolecularGraph &molgraph)
Tells whether molgraph carries an explicit Biomol::MolecularGraphProperty::MMCIF_DATA property.
CDPL_BIOMOL_API bool hasChainID(const Chem::Atom &atom)
Tells whether atom carries an explicit Biomol::AtomProperty::CHAIN_ID property.
CDPL_BIOMOL_API void clearChainID(Chem::Atom &atom)
Removes the Biomol::AtomProperty::CHAIN_ID property from atom.
CDPL_BIOMOL_API void clearPDBData(Chem::MolecularGraph &molgraph)
Removes the Biomol::MolecularGraphProperty::PDB_DATA property from molgraph.
CDPL_BIOMOL_API void clearResidueInsertionCode(Chem::Atom &atom)
Removes the Biomol::AtomProperty::RESIDUE_INSERTION_CODE property from atom.
CDPL_BIOMOL_API void clearResidueSequenceNumber(Chem::Atom &atom)
Removes the Biomol::AtomProperty::RESIDUE_SEQUENCE_NUMBER property from atom.
CDPL_BIOMOL_API long getResidueSequenceNumber(const Chem::Atom &atom)
Returns the value of the Biomol::AtomProperty::RESIDUE_SEQUENCE_NUMBER property of atom.
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.
CDPL_BIOMOL_API bool hasResidueCode(const Chem::Atom &atom)
Tells whether atom carries an explicit Biomol::AtomProperty::RESIDUE_CODE property.
CDPL_BIOMOL_API void extractResidueSubstructures(const Chem::MolecularGraph &molgraph, const Chem::MolecularGraph &parent_molgraph, Chem::Fragment &res_substructs, bool cnctd_only=false, unsigned int flags=AtomPropertyFlag::DEFAULT, bool append=false)
Extracts the substructures of all residues represented in molgraph from the parent macromolecular gra...
CDPL_BIOMOL_API void setResidueCode(Chem::Atom &atom, const std::string &code)
Sets the value of the Biomol::AtomProperty::RESIDUE_CODE property of atom to code.
CDPL_BIOMOL_API void extractProximalAtoms(const Chem::MolecularGraph &core, const Chem::MolecularGraph &macromol, Chem::Fragment &env_atoms, double max_dist, bool inc_core_atoms=false, bool append=false)
Extracts the atoms of macromol that lie within max_dist of any atom of core.
CDPL_BIOMOL_API bool hasModelNumber(const Chem::Atom &atom)
Tells whether atom carries an explicit Biomol::AtomProperty::MODEL_NUMBER property.
CDPL_BIOMOL_API const std::string & getChainID(const Chem::Atom &atom)
Returns the value of the Biomol::AtomProperty::CHAIN_ID property of atom.
CDPL_BIOMOL_API void clearResidueCode(Chem::Atom &atom)
Removes the Biomol::AtomProperty::RESIDUE_CODE property from atom.
CDPL_BIOMOL_API void setHydrogenResidueSequenceInfo(Chem::MolecularGraph &molgraph, bool overwrite, unsigned int flags=AtomPropertyFlag::DEFAULT)
Copies residue-identifying properties from heavy atoms to their attached hydrogen atoms in molgraph.
CDPL_BIOMOL_API bool hasResidueInsertionCode(const Chem::Atom &atom)
Tells whether atom carries an explicit Biomol::AtomProperty::RESIDUE_INSERTION_CODE property.
CDPL_BIOMOL_API void setMMCIFData(Chem::MolecularGraph &molgraph, const MMCIFData::SharedPointer &data)
Sets the value of the Biomol::MolecularGraphProperty::MMCIF_DATA property of molgraph to data.
CDPL_BIOMOL_API void setResidueSequenceNumber(Chem::Atom &atom, long seq_no)
Sets the value of the Biomol::AtomProperty::RESIDUE_SEQUENCE_NUMBER property of atom to seq_no.
CDPL_BIOMOL_API void extractEnvironmentResidues(const Chem::MolecularGraph &core, const Chem::MolecularGraph &macromol, Chem::Fragment &env_residues, double max_dist, bool append=false)
Extracts the residues of macromol that contain at least one atom within max_dist of any atom of core.
CDPL_BIOMOL_API const MMCIFData::SharedPointer & getMMCIFData(const Chem::MolecularGraph &molgraph)
Returns the value of the Biomol::MolecularGraphProperty::MMCIF_DATA property of molgraph.
CDPL_BIOMOL_API bool hasResidueSequenceNumber(const Chem::Atom &atom)
Tells whether atom carries an explicit Biomol::AtomProperty::RESIDUE_SEQUENCE_NUMBER property.
CDPL_BIOMOL_API bool hasPDBData(const Chem::MolecularGraph &molgraph)
Tells whether molgraph carries an explicit Biomol::MolecularGraphProperty::PDB_DATA property.
CDPL_BIOMOL_API void clearMMCIFData(Chem::MolecularGraph &molgraph)
Removes the Biomol::MolecularGraphProperty::MMCIF_DATA property from molgraph.
CDPL_BIOMOL_API void setPDBData(Chem::MolecularGraph &molgraph, const PDBData::SharedPointer &data)
Sets the value of the Biomol::MolecularGraphProperty::PDB_DATA property of molgraph to data.
CDPL_BIOMOL_API const PDBData::SharedPointer & getPDBData(const Chem::MolecularGraph &molgraph)
Returns the value of the Biomol::MolecularGraphProperty::PDB_DATA property of molgraph.
CDPL_BIOMOL_API void setChainID(Chem::Atom &atom, const std::string &id)
Sets the value of the Biomol::AtomProperty::CHAIN_ID property of atom to id.
CDPL_BIOMOL_API const std::string & getResidueCode(const Chem::Atom &atom)
Returns the value of the Biomol::AtomProperty::RESIDUE_CODE property of atom.
std::function< const Math::Vector3D &(const Chem::Atom &)> Atom3DCoordinatesFunction
Generic wrapper class used to store a user-defined Chem::Atom 3D-coordinates function.
Definition: Atom3DCoordinatesFunction.hpp:43
The namespace of the Chemical Data Processing Library.