Avogadro  1.1.0
/home/kitware/dashboards/avogadro/libavogadro/src/residue.h
00001 /**********************************************************************
00002   Residue - Residue class derived from the base Primitive class
00003 
00004   Copyright (C) 2007 Donald Ephraim Curtis
00005   Copyright (C) 2008 Marcus D. Hanwell
00006 
00007   This file is part of the Avogadro molecular editor project.
00008   For more information, see <http://avogadro.openmolecules.net/>
00009 
00010   Avogadro is free software; you can redistribute it and/or modify
00011   it under the terms of the GNU General Public License as published by
00012   the Free Software Foundation; either version 2 of the License, or
00013   (at your option) any later version.
00014 
00015   Avogadro is distributed in the hope that it will be useful,
00016   but WITHOUT ANY WARRANTY; without even the implied warranty of
00017   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018   GNU General Public License for more details.
00019 
00020   You should have received a copy of the GNU General Public License
00021   along with this program; if not, write to the Free Software
00022   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00023   02110-1301, USA.
00024  **********************************************************************/
00025 
00026 #ifndef RESIDUE_H
00027 #define RESIDUE_H
00028 
00029 #include <avogadro/fragment.h>
00030 
00031 namespace Avogadro {
00032 
00041   class A_EXPORT Residue : public Fragment
00042   {
00043     Q_OBJECT
00044 
00045       public:
00049     Residue(QObject *parent=0);
00050 
00054     ~Residue();
00055 
00059     void addAtom(unsigned long id);
00060 
00064     void removeAtom(unsigned long id);
00065 
00069     void setNumber(const QString& number);
00070 
00074     QString number();
00075 
00079     void setChainNumber(unsigned int number);
00080 
00084     unsigned int chainNumber();
00085 
00089     void setChainID(char id);
00093     char chainID();
00094 
00095 
00102     bool setAtomId(unsigned long id, QString atomId);
00103 
00109     bool setAtomIds(const QList<QString> &atomIds);
00110 
00116     QString atomId(unsigned long id);
00117 
00121     const QList<QString> & atomIds() const;
00122 
00123     private Q_SLOTS:
00127     void updateAtom();
00128 
00129   protected:
00130     QString m_number; 
00131     QList<QString> m_atomId; 
00132     unsigned int m_chainNumber; 
00133     char m_chainID;
00134 
00135   };
00136 
00137 } // End namespace Avoagdro
00138 
00139 #endif