OpenStructure
builder.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2011 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_CONOP_BUILDER_HH
20 #define OST_CONOP_BUILDER_HH
21 
22 /*
23  Author: Marco Biasini
24  */
25 #include <ost/mol/mol.hh>
26 
28 #include <ost/conop/builder_fw.hh>
29 
30 namespace ost { namespace conop {
31 
32 typedef enum {
35 } Dialect;
55 public:
56 
57  Builder(): dialect_(PDB_DIALECT), strict_(false) { }
58  virtual ~Builder();
59 
62  virtual void CompleteAtoms(mol::ResidueHandle rh);
63 
64  virtual void SetDialect(Dialect dialect) { dialect_=dialect; }
65 
66  virtual void SetStrictHydrogenMode(bool strict) { strict_=strict; }
67  bool GetStrictHydrogenMode() const { return strict_; }
68 
69  Dialect GetDialect() const { return dialect_; }
72  virtual void CheckResidueCompleteness(const mol::ResidueHandle& rh);
73 
76  virtual bool IsResidueComplete(const mol::ResidueHandle& rh);
77 
80  virtual mol::ResidueKey IdentifyResidue(const mol::ResidueHandle& rh);
81 
85  virtual void FillResidueProps(mol::ResidueHandle residue);
86 
87  virtual void FillAtomProps(mol::AtomHandle atom);
93  virtual void ConnectAtomsOfResidue(mol::ResidueHandle rh);
100  virtual void ConnectResidueToPrev(mol::ResidueHandle rh,
101  mol::ResidueHandle prev);
103  virtual void ConnectResidueToNext(mol::ResidueHandle rh,
104  mol::ResidueHandle next);
105 
107  virtual void AssignTorsions(mol::ChainHandle ch);
108 
110  virtual void AssignTorsionsToResidue(mol::ResidueHandle residue);
111 
113  void AssignBackBoneTorsionsToResidue(mol::ResidueHandle res);
114 
123  virtual bool DoesPeptideBondExist(const mol::AtomHandle& n,
124  const mol::AtomHandle& c);
125 
131  virtual bool IsBondFeasible(const mol::AtomHandle& atom_a,
132  const mol::AtomHandle& atom_b);
133 
135  static String GuessAtomElement(const String& atom_name, bool hetatm);
136 
138  static bool AreResiduesConsecutive(const mol::ResidueHandle& r1,
139  const mol::ResidueHandle& r2);
142  void GuessChemClass(mol::ResidueHandle res);
145  void DistanceBasedConnect(mol::AtomHandle atom);
146 private:
147  Dialect dialect_;
148  bool strict_;
149 };
150 
151 
152 }} // ns
153 
154 #endif