Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

peptide_bb.h

Go to the documentation of this file.
00001 // -*- mode: c++; -*-
00002 //
00003 //The Biomolecule Toolkit (BTK) is a C++ library for use in the
00004 //modeling, analysis, and design of biological macromolecules.
00005 //Copyright (C) 2004, Christopher Saunders <ctsa@users.sourceforge.net>
00006 //
00007 //This program is free software; you can redistribute it and/or modify
00008 //it under the terms of the GNU Lesser General Public License as published
00009 //by the Free Software Foundation; either version 2.1 of the License, or (at
00010 //your option) any later version.
00011 //
00012 //This program is distributed in the hope that it will be useful,  but
00013 //WITHOUT ANY WARRANTY; without even the implied warranty of
00014 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 //Lesser General Public License for more details. 
00016 //
00017 //You should have received a copy of the GNU Lesser General Public License 
00018 //along with this program; if not, write to the Free Software Foundation, 
00019 //Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00020 //
00021 
00022 #ifndef BTK_PEPTIDE_BB_H
00023 #define BTK_PEPTIDE_BB_H
00024 
00025 #include "buildable_monomer.h"
00026 #include "peptide_bb_family_pattern.h"
00027 
00028 
00029 namespace BTK{
00030 
00031   // forward decl
00032   template <typename AtomType> class PeptideBB;
00033 
00034   // user typedef
00035   typedef PeptideBB<BuildableAtom> basic_peptide_bb;
00036 
00037 
00038   template <typename AtomType>
00039   class PeptideBB : public BuildableMonomer<AtomType> {
00040 
00041     typedef BuildableMonomer<AtomType> base_type;
00042     typedef PeptideBB<AtomType> self_type;
00043 
00044   public:
00045     typedef typename base_type::buildable_monomer_types buildable_monomer_types;
00046 
00047 
00049 
00050     typedef typename base_type::value_type value_type;
00051     typedef typename base_type::reference reference;
00052     typedef typename base_type::const_reference const_reference;
00053     typedef typename base_type::pointer pointer;
00054     typedef typename base_type::const_pointer const_pointer;
00055     typedef typename base_type::size_type size_type;
00056     typedef typename base_type::iterator iterator;
00057     typedef typename base_type::const_iterator const_iterator;
00059 
00061 
00062     typedef value_type atom_type;
00063     typedef iterator atom_iterator;
00064     typedef const_iterator const_atom_iterator;
00066 
00067 
00069     PeptideBB(const PeptideBBFamilyPattern& family_pattern = PeptideBBFamilyPattern::instance()) 
00070       : base_type(family_pattern) {}
00071 
00072     template <typename AtomIterator>
00073     PeptideBB(AtomIterator first,
00074               AtomIterator last, 
00075               self_type* prev_monomer = 0,
00076               self_type* next_monomer = 0,
00077               AtomGroupConcept::group_variant_container_t modifiers = AtomGroupConcept::group_variant_container_t(),
00078               const PeptideBBFamilyPattern& family_pattern = PeptideBBFamilyPattern::instance()) 
00079       : base_type(first,last,prev_monomer,next_monomer,modifiers,family_pattern) {}
00080 
00082     double phi() const   { return torsion_angle(TORSION::PHI); }
00083     double psi() const   { return torsion_angle(TORSION::PSI); }
00084     double omega() const { return torsion_angle(TORSION::OMEGA); }
00085     
00086     void set_phi(double angle)   { set_torsion_angle(TORSION::PHI,angle); }
00087     void set_psi(double angle)   { set_torsion_angle(TORSION::PSI,angle); }
00088     void set_omega(double angle) { set_torsion_angle(TORSION::OMEGA,angle); }
00089 
00090   };
00091 
00092 } // namespace BTK
00093 
00094 #endif

Generated on Wed Apr 14 00:43:17 2004 for BTK by doxygen 1.3.6