Chemical Data Processing Library C++ API - Version 1.1.1
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 
143 
144  CDPL_BIOMOL_API std::size_t getModelNumber(const Chem::Atom& atom);
145 
146  CDPL_BIOMOL_API void setModelNumber(Chem::Atom& atom, std::size_t model_no);
147 
149 
151 
152 
154 
155  CDPL_BIOMOL_API void setSerialNumber(Chem::Atom& atom, long serial_no);
156 
158 
160 
161 
163 
164  CDPL_BIOMOL_API void setOccupancy(Chem::Atom& atom, double occupancy);
165 
167 
169 
170 
171  CDPL_BIOMOL_API double getBFactor(const Chem::Atom& atom);
172 
173  CDPL_BIOMOL_API void setBFactor(Chem::Atom& atom, double factor);
174 
176 
178 
179 
181 
182  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,
183  char ins_code = 0, std::size_t model_no = 0, const char* atom_name = 0, long serial_no = IGNORE_SERIAL_NO);
184 
185  CDPL_BIOMOL_API bool areInSameResidue(const Chem::Atom& atom1, const Chem::Atom& atom2, unsigned int flags = AtomPropertyFlag::DEFAULT);
186 
188  bool cnctd_only = false, unsigned int flags = AtomPropertyFlag::DEFAULT, bool append = false);
189  } // namespace Biomol
190 } // namespace CDPL
191 
192 #endif // CDPL_BIOMOL_ATOMFUNCTIONS_HPP
CDPL::Biomol::setResidueCode
CDPL_BIOMOL_API void setResidueCode(Chem::Atom &atom, const std::string &code)
CDPL::Biomol::clearResidueSequenceNumber
CDPL_BIOMOL_API void clearResidueSequenceNumber(Chem::Atom &atom)
CDPL::Biomol::AtomPropertyFlag::DEFAULT
const unsigned int DEFAULT
Represents the default set of atom properties.
Definition: Biomol/AtomPropertyFlag.hpp:53
CDPL::Biomol::clearResidueLinkingAtomFlag
CDPL_BIOMOL_API void clearResidueLinkingAtomFlag(Chem::Atom &atom)
CDPL::Biomol::matchesResidueInfo
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::clearResidueAtomName
CDPL_BIOMOL_API void clearResidueAtomName(Chem::Atom &atom)
CDPL::Biomol::clearChainID
CDPL_BIOMOL_API void clearChainID(Chem::Atom &atom)
CDPL::Biomol::getResidueSequenceNumber
CDPL_BIOMOL_API long getResidueSequenceNumber(const Chem::Atom &atom)
CDPL::Biomol::clearAltLocationID
CDPL_BIOMOL_API void clearAltLocationID(Chem::Atom &atom)
CDPL::Biomol::hasOccupancy
CDPL_BIOMOL_API bool hasOccupancy(const Chem::Atom &atom)
CDPL::Biomol::getOccupancy
CDPL_BIOMOL_API double getOccupancy(const Chem::Atom &atom)
CDPL::Biomol::clearModelNumber
CDPL_BIOMOL_API void clearModelNumber(Chem::Atom &atom)
CDPL::Biomol::setOccupancy
CDPL_BIOMOL_API void setOccupancy(Chem::Atom &atom, double occupancy)
CDPL::Biomol::setResidueLinkingAtomFlag
CDPL_BIOMOL_API void setResidueLinkingAtomFlag(Chem::Atom &atom, bool linking)
CDPL::Biomol::getBFactor
CDPL_BIOMOL_API double getBFactor(const Chem::Atom &atom)
CDPL::Biomol::clearResidueInsertionCode
CDPL_BIOMOL_API void clearResidueInsertionCode(Chem::Atom &atom)
CDPL::Biomol::clearBFactor
CDPL_BIOMOL_API void clearBFactor(Chem::Atom &atom)
CDPL::Biomol::areInSameResidue
CDPL_BIOMOL_API bool areInSameResidue(const Chem::Atom &atom1, const Chem::Atom &atom2, unsigned int flags=AtomPropertyFlag::DEFAULT)
CDPL::Biomol::setResidueSequenceNumber
CDPL_BIOMOL_API void setResidueSequenceNumber(Chem::Atom &atom, long seq_no)
CDPL::Biomol::clearResidueAltAtomName
CDPL_BIOMOL_API void clearResidueAltAtomName(Chem::Atom &atom)
CDPL::Biomol::setResidueLeavingAtomFlag
CDPL_BIOMOL_API void setResidueLeavingAtomFlag(Chem::Atom &atom, bool leaving)
CDPL::Biomol::getResidueAtomName
CDPL_BIOMOL_API const std::string & getResidueAtomName(const Chem::Atom &atom)
CDPL::Chem::Atom
Atom.
Definition: Atom.hpp:52
CDPL::Biomol::hasChainID
CDPL_BIOMOL_API bool hasChainID(const Chem::Atom &atom)
CDPL::Chem::Fragment
Fragment.
Definition: Fragment.hpp:52
CDPL::Biomol::getHeteroAtomFlag
CDPL_BIOMOL_API bool getHeteroAtomFlag(const Chem::Atom &atom)
CDPL::Biomol::hasResidueCode
CDPL_BIOMOL_API bool hasResidueCode(const Chem::Atom &atom)
CDPL::Biomol::hasSerialNumber
CDPL_BIOMOL_API bool hasSerialNumber(const Chem::Atom &atom)
CDPL::Biomol::hasModelNumber
CDPL_BIOMOL_API bool hasModelNumber(const Chem::Atom &atom)
CDPL::Biomol::setResidueAtomName
CDPL_BIOMOL_API void setResidueAtomName(Chem::Atom &atom, const std::string &name)
CDPL::Biomol::hasResidueLinkingAtomFlag
CDPL_BIOMOL_API bool hasResidueLinkingAtomFlag(const Chem::Atom &atom)
ProcessingFlags.hpp
Definition of flags for serial and residue sequence number processing.
AtomPropertyFlag.hpp
Definition of constants in namespace CDPL::Biomol::AtomPropertyFlag.
CDPL::Biomol::setModelNumber
CDPL_BIOMOL_API void setModelNumber(Chem::Atom &atom, std::size_t model_no)
CDPL::Biomol::hasResidueInsertionCode
CDPL_BIOMOL_API bool hasResidueInsertionCode(const Chem::Atom &atom)
CDPL::Biomol::getResidueLeavingAtomFlag
CDPL_BIOMOL_API bool getResidueLeavingAtomFlag(const Chem::Atom &atom)
CDPL::Biomol::hasResidueSequenceNumber
CDPL_BIOMOL_API bool hasResidueSequenceNumber(const Chem::Atom &atom)
CDPL::Biomol::clearSerialNumber
CDPL_BIOMOL_API void clearSerialNumber(Chem::Atom &atom)
CDPL::Biomol::hasResidueAtomName
CDPL_BIOMOL_API bool hasResidueAtomName(const Chem::Atom &atom)
CDPL::Chem::MolecularGraph
MolecularGraph.
Definition: MolecularGraph.hpp:52
CDPL::Biomol::IGNORE_SEQUENCE_NO
const long IGNORE_SEQUENCE_NO
Definition: ProcessingFlags.hpp:41
CDPL::Biomol::getResidueCode
CDPL_BIOMOL_API const std::string & getResidueCode(const Chem::Atom &atom)
CDPL::Biomol::hasResidueAltAtomName
CDPL_BIOMOL_API bool hasResidueAltAtomName(const Chem::Atom &atom)
CDPL::Biomol::setSerialNumber
CDPL_BIOMOL_API void setSerialNumber(Chem::Atom &atom, long serial_no)
CDPL::Biomol::getSerialNumber
CDPL_BIOMOL_API long getSerialNumber(const Chem::Atom &atom)
CDPL::Biomol::getResidueAltAtomName
CDPL_BIOMOL_API const std::string & getResidueAltAtomName(const Chem::Atom &atom)
CDPL::Biomol::getResidueInsertionCode
CDPL_BIOMOL_API char getResidueInsertionCode(const Chem::Atom &atom)
CDPL::Biomol::getChainID
CDPL_BIOMOL_API const std::string & getChainID(const Chem::Atom &atom)
CDPL::Biomol::getModelNumber
CDPL_BIOMOL_API std::size_t getModelNumber(const Chem::Atom &atom)
CDPL::Biomol::hasHeteroAtomFlag
CDPL_BIOMOL_API bool hasHeteroAtomFlag(const Chem::Atom &atom)
CDPL::Biomol::hasBFactor
CDPL_BIOMOL_API bool hasBFactor(const Chem::Atom &atom)
CDPL::Biomol::isPDBBackboneAtom
CDPL_BIOMOL_API bool isPDBBackboneAtom(const Chem::Atom &atom)
CDPL::Biomol::setResidueAltAtomName
CDPL_BIOMOL_API void setResidueAltAtomName(Chem::Atom &atom, const std::string &name)
CDPL::Biomol::extractResidueSubstructure
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::clearResidueLeavingAtomFlag
CDPL_BIOMOL_API void clearResidueLeavingAtomFlag(Chem::Atom &atom)
CDPL::Biomol::getResidueLinkingAtomFlag
CDPL_BIOMOL_API bool getResidueLinkingAtomFlag(const Chem::Atom &atom)
APIPrefix.hpp
Definition of the preprocessor macro CDPL_BIOMOL_API.
CDPL::Biomol::hasAltLocationID
CDPL_BIOMOL_API bool hasAltLocationID(const Chem::Atom &atom)
CDPL::Biomol::IGNORE_SERIAL_NO
const long IGNORE_SERIAL_NO
Definition: ProcessingFlags.hpp:42
CDPL::Biomol::setBFactor
CDPL_BIOMOL_API void setBFactor(Chem::Atom &atom, double factor)
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::Biomol::setHeteroAtomFlag
CDPL_BIOMOL_API void setHeteroAtomFlag(Chem::Atom &atom, bool is_het)
CDPL::Biomol::hasResidueLeavingAtomFlag
CDPL_BIOMOL_API bool hasResidueLeavingAtomFlag(const Chem::Atom &atom)
CDPL::Biomol::getAltLocationID
CDPL_BIOMOL_API char getAltLocationID(const Chem::Atom &atom)
CDPL::Biomol::clearHeteroAtomFlag
CDPL_BIOMOL_API void clearHeteroAtomFlag(Chem::Atom &atom)
CDPL::Biomol::setAltLocationID
CDPL_BIOMOL_API void setAltLocationID(Chem::Atom &atom, char id)
CDPL::Biomol::setChainID
CDPL_BIOMOL_API void setChainID(Chem::Atom &atom, const std::string &id)
CDPL::Biomol::clearOccupancy
CDPL_BIOMOL_API void clearOccupancy(Chem::Atom &atom)
CDPL::Biomol::setResidueInsertionCode
CDPL_BIOMOL_API void setResidueInsertionCode(Chem::Atom &atom, char code)
CDPL_BIOMOL_API
#define CDPL_BIOMOL_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::Biomol::clearResidueCode
CDPL_BIOMOL_API void clearResidueCode(Chem::Atom &atom)