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

peptide_heavy_atom.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_HEAVY_ATOM_H
00023 #define BTK_PEPTIDE_HEAVY_ATOM_H
00024 
00025 #include "peptide_bb.h"
00026 #include "peptide_heavy_atom_family_pattern.h"
00027 
00028 
00029 namespace BTK{
00030 
00031   // forward decl
00032   template <typename AtomType> class PeptideHeavyAtom;
00033 
00034   // user typedefs
00035   typedef PeptideHeavyAtom<BuildableAtom> basic_peptide;
00036 
00037 
00038   template <class AtomType>
00039   class PeptideHeavyAtom : public PeptideBB<AtomType>{
00040     typedef PeptideBB<AtomType> base_type;
00041     typedef PeptideHeavyAtom<AtomType> self_type;
00042 
00043   public:
00044     typedef typename base_type::buildable_monomer_types buildable_monomer_types;
00045 
00047 
00048     typedef typename base_type::value_type value_type;
00049     typedef typename base_type::reference reference;
00050     typedef typename base_type::const_reference const_reference;
00051     typedef typename base_type::pointer pointer;
00052     typedef typename base_type::const_pointer const_pointer;
00053     typedef typename base_type::size_type size_type;
00054     typedef typename base_type::iterator iterator;
00055     typedef typename base_type::const_iterator const_iterator;
00057 
00059 
00060     typedef value_type atom_type;
00061     typedef iterator atom_iterator;
00062     typedef const_iterator const_atom_iterator;
00064 
00066     PeptideHeavyAtom(const PeptideHeavyAtomFamilyPattern& family_pattern = PeptideHeavyAtomFamilyPattern::instance()) 
00067       : base_type(family_pattern) {}
00068     
00069     template <typename AtomIterator>
00070     PeptideHeavyAtom(AtomIterator first,
00071                      AtomIterator last, 
00072                      self_type* prev_monomer = 0,
00073                      self_type* next_monomer = 0,
00074                      AtomGroupConcept::group_variant_container_t modifiers = AtomGroupConcept::group_variant_container_t(),
00075                      const PeptideHeavyAtomFamilyPattern& family_pattern = PeptideHeavyAtomFamilyPattern::instance()) 
00076       : base_type(first,last,prev_monomer,next_monomer,modifiers,family_pattern) {}
00077 
00079     double chi1() const { return torsion_angle(TORSION::CHI1);}
00080     double chi2() const { return torsion_angle(TORSION::CHI2);}
00081     double chi3() const { return torsion_angle(TORSION::CHI3);}
00082     double chi4() const { return torsion_angle(TORSION::CHI4);}
00083 
00084     void set_chi1(double angle) { set_torsion_angle(TORSION::CHI1,angle); }
00085     void set_chi2(double angle) { set_torsion_angle(TORSION::CHI2,angle); }
00086     void set_chi3(double angle) { set_torsion_angle(TORSION::CHI3,angle); }
00087     void set_chi4(double angle) { set_torsion_angle(TORSION::CHI4,angle); }
00088 
00089   };
00090 
00091 } // namespace BTK
00092 
00093 #endif

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