Chemical Data Processing Library C++ API - Version 1.2.0
Biomol/AtomFunctions.hpp
Go to the documentation of this file.
1 /*
2  * AtomFunctions.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_ATOMFUNCTIONS_HPP
30 #define CDPL_BIOMOL_ATOMFUNCTIONS_HPP
31 
32 #include <cstddef>
33 #include <string>
34 
38 
39 
40 namespace CDPL
41 {
42 
43  namespace Chem
44  {
45 
46  class Atom;
47  class MolecularGraph;
48  class Fragment;
49  } // namespace Chem
50 
51  namespace Biomol
52  {
53 
54  CDPL_BIOMOL_API const std::string& getResidueAtomName(const Chem::Atom& atom);
55 
56  CDPL_BIOMOL_API void setResidueAtomName(Chem::Atom& atom, const std::string& name);
57 
59 
61 
62 
63  CDPL_BIOMOL_API const std::string& getResidueAltAtomName(const Chem::Atom& atom);
64 
65  CDPL_BIOMOL_API void setResidueAltAtomName(Chem::Atom& atom, const std::string& name);
66 
68 
70 
71 
73 
75 
77 
79 
80 
82 
84 
86 
88 
89 
90  CDPL_BIOMOL_API const std::string& getResidueCode(const Chem::Atom& atom);
91 
92  CDPL_BIOMOL_API void setResidueCode(Chem::Atom& atom, const std::string& code);
93 
95 
97 
98 
100 
102 
104 
106 
107 
109 
111 
113 
115 
116 
118 
119  CDPL_BIOMOL_API void setHeteroAtomFlag(Chem::Atom& atom, bool is_het);
120 
122 
124 
125 
126  CDPL_BIOMOL_API const std::string& getChainID(const Chem::Atom& atom);
127 
128  CDPL_BIOMOL_API void setChainID(Chem::Atom& atom, const std::string& id);
129 
131 
133 
134 
136 
138 
140 
142 
146  CDPL_BIOMOL_API const std::string& getEntityID(const Chem::Atom& atom);
147 
148  CDPL_BIOMOL_API void setEntityID(Chem::Atom& atom, const std::string& id);
149 
151 
153 
154 
155  CDPL_BIOMOL_API std::size_t getModelNumber(const Chem::Atom& atom);
156 
157  CDPL_BIOMOL_API void setModelNumber(Chem::Atom& atom, std::size_t model_no);
158 
160 
162 
163 
165 
166  CDPL_BIOMOL_API void setSerialNumber(Chem::Atom& atom, long serial_no);
167 
169 
171 
172 
174 
175  CDPL_BIOMOL_API void setOccupancy(Chem::Atom& atom, double occupancy);
176 
178 
180 
181 
182  CDPL_BIOMOL_API double getBFactor(const Chem::Atom& atom);
183 
184  CDPL_BIOMOL_API void setBFactor(Chem::Atom& atom, double factor);
185 
187 
189 
190 
192 
193  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,
194  char ins_code = 0, std::size_t model_no = 0, const char* atom_name = 0, long serial_no = IGNORE_SERIAL_NO);
195 
196  CDPL_BIOMOL_API bool areInSameResidue(const Chem::Atom& atom1, const Chem::Atom& atom2, unsigned int flags = AtomPropertyFlag::DEFAULT);
197 
199  bool cnctd_only = false, unsigned int flags = AtomPropertyFlag::DEFAULT, bool append = false);
200  } // namespace Biomol
201 } // namespace CDPL
202 
203 #endif // CDPL_BIOMOL_ATOMFUNCTIONS_HPP
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 flags for serial and residue sequence number processing.
Atom.
Definition: Atom.hpp:52
Fragment.
Definition: Fragment.hpp:52
MolecularGraph.
Definition: MolecularGraph.hpp:52
constexpr unsigned int DEFAULT
Represents the default set of atom properties.
Definition: Biomol/AtomPropertyFlag.hpp:53
CDPL_BIOMOL_API void setResidueLeavingAtomFlag(Chem::Atom &atom, bool leaving)
CDPL_BIOMOL_API const std::string & getResidueAtomName(const Chem::Atom &atom)
CDPL_BIOMOL_API bool hasResidueLeavingAtomFlag(const Chem::Atom &atom)
const long IGNORE_SEQUENCE_NO
Definition: ProcessingFlags.hpp:41
CDPL_BIOMOL_API void setModelNumber(Chem::Atom &atom, std::size_t model_no)
CDPL_BIOMOL_API void setSerialNumber(Chem::Atom &atom, long serial_no)
CDPL_BIOMOL_API void clearResidueLinkingAtomFlag(Chem::Atom &atom)
CDPL_BIOMOL_API bool hasHeteroAtomFlag(const Chem::Atom &atom)
CDPL_BIOMOL_API const std::string & getEntityID(const Chem::Atom &atom)
CDPL_BIOMOL_API char getResidueInsertionCode(const Chem::Atom &atom)
CDPL_BIOMOL_API bool getResidueLeavingAtomFlag(const Chem::Atom &atom)
CDPL_BIOMOL_API std::size_t getModelNumber(const Chem::Atom &atom)
CDPL_BIOMOL_API void clearModelNumber(Chem::Atom &atom)
CDPL_BIOMOL_API void setResidueInsertionCode(Chem::Atom &atom, char code)
CDPL_BIOMOL_API void extractResidueSubstructure(const Chem::Atom &atom, const Chem::MolecularGraph &molgraph, Chem::Fragment &res_substruct, bool cnctd_only=false, unsigned int flags=AtomPropertyFlag::DEFAULT, bool append=false)
CDPL_BIOMOL_API bool hasChainID(const Chem::Atom &atom)
CDPL_BIOMOL_API bool hasEntityID(const Chem::Atom &atom)
CDPL_BIOMOL_API bool getHeteroAtomFlag(const Chem::Atom &atom)
CDPL_BIOMOL_API void clearChainID(Chem::Atom &atom)
CDPL_BIOMOL_API void setOccupancy(Chem::Atom &atom, double occupancy)
CDPL_BIOMOL_API char getAltLocationID(const Chem::Atom &atom)
CDPL_BIOMOL_API bool hasResidueAltAtomName(const Chem::Atom &atom)
CDPL_BIOMOL_API bool areInSameResidue(const Chem::Atom &atom1, const Chem::Atom &atom2, unsigned int flags=AtomPropertyFlag::DEFAULT)
CDPL_BIOMOL_API void clearResidueInsertionCode(Chem::Atom &atom)
CDPL_BIOMOL_API void setEntityID(Chem::Atom &atom, const std::string &id)
CDPL_BIOMOL_API void clearResidueSequenceNumber(Chem::Atom &atom)
CDPL_BIOMOL_API long getResidueSequenceNumber(const Chem::Atom &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)
CDPL_BIOMOL_API bool hasResidueCode(const Chem::Atom &atom)
CDPL_BIOMOL_API void clearResidueAtomName(Chem::Atom &atom)
CDPL_BIOMOL_API void clearResidueLeavingAtomFlag(Chem::Atom &atom)
CDPL_BIOMOL_API void setAltLocationID(Chem::Atom &atom, char id)
CDPL_BIOMOL_API void setResidueCode(Chem::Atom &atom, const std::string &code)
CDPL_BIOMOL_API bool hasModelNumber(const Chem::Atom &atom)
CDPL_BIOMOL_API void setResidueAltAtomName(Chem::Atom &atom, const std::string &name)
CDPL_BIOMOL_API bool hasBFactor(const Chem::Atom &atom)
CDPL_BIOMOL_API double getBFactor(const Chem::Atom &atom)
CDPL_BIOMOL_API const std::string & getChainID(const Chem::Atom &atom)
CDPL_BIOMOL_API void setBFactor(Chem::Atom &atom, double factor)
CDPL_BIOMOL_API void clearSerialNumber(Chem::Atom &atom)
CDPL_BIOMOL_API const std::string & getResidueAltAtomName(const Chem::Atom &atom)
CDPL_BIOMOL_API void clearResidueCode(Chem::Atom &atom)
CDPL_BIOMOL_API bool hasSerialNumber(const Chem::Atom &atom)
CDPL_BIOMOL_API bool isPDBBackboneAtom(const Chem::Atom &atom)
CDPL_BIOMOL_API bool hasAltLocationID(const Chem::Atom &atom)
CDPL_BIOMOL_API bool hasResidueInsertionCode(const Chem::Atom &atom)
CDPL_BIOMOL_API void clearEntityID(Chem::Atom &atom)
CDPL_BIOMOL_API void setResidueSequenceNumber(Chem::Atom &atom, long seq_no)
CDPL_BIOMOL_API bool getResidueLinkingAtomFlag(const Chem::Atom &atom)
CDPL_BIOMOL_API void clearHeteroAtomFlag(Chem::Atom &atom)
CDPL_BIOMOL_API bool hasResidueSequenceNumber(const Chem::Atom &atom)
const long IGNORE_SERIAL_NO
Definition: ProcessingFlags.hpp:42
CDPL_BIOMOL_API bool hasResidueAtomName(const Chem::Atom &atom)
CDPL_BIOMOL_API void clearOccupancy(Chem::Atom &atom)
CDPL_BIOMOL_API void setResidueAtomName(Chem::Atom &atom, const std::string &name)
CDPL_BIOMOL_API void setHeteroAtomFlag(Chem::Atom &atom, bool is_het)
CDPL_BIOMOL_API double getOccupancy(const Chem::Atom &atom)
CDPL_BIOMOL_API bool hasResidueLinkingAtomFlag(const Chem::Atom &atom)
CDPL_BIOMOL_API void setResidueLinkingAtomFlag(Chem::Atom &atom, bool linking)
CDPL_BIOMOL_API long getSerialNumber(const Chem::Atom &atom)
CDPL_BIOMOL_API void clearBFactor(Chem::Atom &atom)
CDPL_BIOMOL_API void clearAltLocationID(Chem::Atom &atom)
CDPL_BIOMOL_API void setChainID(Chem::Atom &atom, const std::string &id)
CDPL_BIOMOL_API const std::string & getResidueCode(const Chem::Atom &atom)
CDPL_BIOMOL_API bool hasOccupancy(const Chem::Atom &atom)
CDPL_BIOMOL_API void clearResidueAltAtomName(Chem::Atom &atom)
The namespace of the Chemical Data Processing Library.