BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
nucleicAcid.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_KERNEL_NUCLEICACID_H
6 #define BALL_KERNEL_NUCLEICACID_H
7 
8 #ifndef BALL_KERNEL_MOLECULE_H
9 # include <BALL/KERNEL/molecule.h>
10 #endif
11 
12 #ifndef BALL_KERNEL_NUCLEOTIDE_H
13 # include <BALL/KERNEL/nucleotide.h>
14 #endif
15 
16 #define BALL_NUCLEICACID_DEFAULT_ID ""
17 
18 namespace BALL
19 {
28  : public Molecule
29  {
30  public:
31 
33 
34 
37 
38 
40  enum Property
41  {
42  NUMBER_OF_PROPERTIES = Molecule::NUMBER_OF_PROPERTIES
43  };
44 
46 
49 
52  NucleicAcid();
53 
56  NucleicAcid(const NucleicAcid& nucleic_acid, bool deep = true);
57 
60  NucleicAcid(const String& name,
62 
65  virtual ~NucleicAcid();
66 
69  virtual void clear();
70 
74  virtual void destroy();
75 
77 
80 
84  void persistentWrite(PersistenceManager& pm, const char* name = 0) const;
85 
89  void persistentRead(PersistenceManager& pm);
90 
92 
95 
101  void set(const NucleicAcid& nucleic_acid, bool deep = true);
102 
105  NucleicAcid& operator = (const NucleicAcid& nucleic_acid);
106 
109  void get(NucleicAcid& nucleic_acid, bool deep = true) const;
110 
113  void swap(NucleicAcid& nucleic_acid);
114 
116 
121  bool operator == (const NucleicAcid& nucleic_acid) const;
122 
126  bool operator != (const NucleicAcid& nucleic_acid) const;
127 
130 
138  Nucleotide* getNucleotide(Position position);
139 
147  const Nucleotide* getNucleotide(Position position) const;
148 
154 
159  const Nucleotide* get3Prime() const;
160 
166 
171  const Nucleotide* get5Prime() const;
172 
176  void setID(const String& id);
177 
181  const String& getID() const;
182 
186  Size countNucleotides() const;
187 
189 
190  using Molecule::prepend;
191  using Molecule::append;
192  using Molecule::insert;
194  using Molecule::insertAfter;
195  using Molecule::remove;
196  using Molecule::splice;
198  using Molecule::spliceAfter;
199 
203 
209  virtual bool isValid() const;
210 
218  virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
219 
221 
222  // --- EXTERNAL ITERATORS
223 
226 
227  private:
228 
229  // --- ATTRIBUTES
230 
231  String id_;
232  };
233 } // namespace BALL
234 
235 #endif // BALL_KERNEL_NUCLEICACID_H
BALL_EXPORT NucleotideList nucleotides(const AtomContainer &fragment, bool selected_only=false)
#define BALL_KERNEL_DEFINE_ITERATOR_CREATORS(Type)
Definition: iterator.h:25
const Nucleotide * get5Prime(const NucleotideContainerType &nucleotide_container)
Definition: nucleotide.h:313
void spliceBefore(AtomContainer &atom_container)
void spliceAfter(AtomContainer &atom_container)
void splice(AtomContainer &atom_container)
void insertBefore(Atom &atom, Composite &before)
void insertAfter(Atom &atom, Composite &after)
const Nucleotide * get3Prime(const NucleotideContainerType &nucleotide_container)
Definition: nucleotide.h:325
void insert(Atom &atom)
Property
The number of predefined properties for AtomContainer.
Definition: atomContainer.h:42
void append(Atom &atom)
BALL_EXPORT bool operator!=(const String &s1, const String &s2)
#define BALL_CREATE_DEEP(name)
Definition: create.h:26
#define BALL_DECLARE_STD_ITERATOR_WRAPPER(container, type, method_name)
void prepend(Atom &atom)
#define BALL_NUCLEICACID_DEFAULT_ID
Definition: nucleicAcid.h:16
BALL_EXPORT bool operator==(const String &s1, const String &s2)
#define BALL_EXPORT
Definition: COMMON/global.h:50
bool remove(Atom &atom)