Victor
 All Data Structures Functions Variables Friends Pages
IntLoader.h
1 /* This file is part of Victor.
2 
3  Victor is free software: you can redistribute it and/or modify
4  it under the terms of the GNU General Public License as published by
5  the Free Software Foundation, either version 3 of the License, or
6  (at your option) any later version.
7 
8  Victor is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with Victor. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef _INT_LOADER_H_
18 #define _INT_LOADER_H_
19 
20 // Includes:
21 #include <Spacer.h>
22 #include <LigandSet.h>
23 #include <Loader.h>
24 #include <Debug.h>
25 #include <string>
26 #include <iostream>
27 
28 // Global constants, typedefs, etc. (to avoid):
29 
30 namespace Victor { namespace Biopool {
31 
42  class IntLoader : public Loader {
43  public:
44 
45  // CONSTRUCTORS/DESTRUCTOR:
46 
47  IntLoader(istream& _input = cin) : input(_input), atomIndex() {
48  }
49  // this class uses the implicit copy operator.
50 
51  virtual ~IntLoader() {
52  PRINT_NAME;
53  }
54 
55  // MODIFIERS:
56  virtual void loadGroup(Group& group);
57  virtual void loadSideChain(SideChain& sc, AminoAcid* aaRef);
58  virtual void loadAminoAcid(AminoAcid& aa);
59  virtual void loadSpacer(Spacer& sp);
60  virtual void loadLigand(Ligand& l);
61 
62  protected:
63  void setBonds(Spacer& sp);
64 
65  private:
66  void zAtomToCartesian(Atom& atbLP, double bondLength, Atom& atbAP,
67  double bondAngle, Atom& attAP, double torsionAngle,
68  int chiral, Atom& at);
69  bool inSideChain(const AminoAcid& aa, const Atom& at);
70  Atom& addToAminoAcid(AminoAcid* aa, Atom* at);
71  void keepPlacingAlongZAxis(int bLP, double bondLength, int bAP,
72  double bondAngle, Atom* at);
73  istream& input; // input stream
74  vector<Atom> atomIndex;
75  bool connect; // are segments to be connected to each other?
76  };
77 
78 }} //namespace
79 #endif //_INT_LOADER_H_
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
void setBonds(Spacer &sp)
Definition: IntLoader.cc:34
This class implements a side chain.
Definition: SideChain.h:32
virtual void loadGroup(Group &group)
Definition: IntLoader.cc:158
This class implements a simple chemical group.
Definition: Group.h:35
Base class for loading components (Atoms, Groups, etc.).
Definition: Loader.h:39
virtual void loadSideChain(SideChain &sc, AminoAcid *aaRef)
Definition: IntLoader.cc:267
Implements a simple atom type.
Definition: Atom.h:39
virtual void loadAminoAcid(AminoAcid &aa)
Definition: IntLoader.cc:297
Implements methods to verify the ligand properties.
Definition: Ligand.h:38
virtual void loadLigand(Ligand &l)
Definition: IntLoader.cc:478
Loads components (Atoms, Groups, etc.) in internal format.
Definition: IntLoader.h:42
It mplements a simple amino acid.
Definition: AminoAcid.h:43
Implements a "Spacer" for a protein chain. Includes methods to obtain values from the atoms and its p...
Definition: Spacer.h:42
virtual void loadSpacer(Spacer &sp)
Definition: IntLoader.cc:363