18 #ifndef _NUCLEOTIDE_H_
19 #define _NUCLEOTIDE_H_
24 #include <IntCoordConverter.h>
26 #include <NucleotideCode.h>
31 namespace Victor {
namespace Biopool {
47 virtual string getClassName()
const {
50 virtual unsigned int getCode()
const;
51 unsigned int size()
const;
53 unsigned int sizeNucleotide()
const;
56 bool isMember(
const AtomCode& ac)
const;
66 void setBonds(
double NToCaLen,
double CaToCLen,
double CToOLen,
double atCaToCAng,
double CaToOAng);
67 bool setBondsFromPdbCode(
bool connect,
Nucleotide* prev,
bool permissive);
70 virtual void setModified();
77 bool operator==(
const Nucleotide& other)
const;
78 bool operator!=(
const Nucleotide& other)
const;
80 Atom& operator[](
unsigned int n);
81 const Atom& operator[](
unsigned int n)
const;
82 Atom& operator[](
const AtomCode& ac);
83 const Atom& operator[](
const AtomCode& ac)
const;
103 Nucleotide::getCode()
const {
104 return nucleotideThreeLetterTranslator(
id);
108 Nucleotide::size()
const {
109 return Group::size();
113 Nucleotide::sizeNucleotide()
const {
114 return Group::size();
118 Nucleotide::isMember(
const AtomCode& ac)
const {
123 Nucleotide::save(Saver& s) {
124 s.saveNucleotide(*
this);
132 type = nucleotideThreeLetterTranslator(_name);
137 Nucleotide::load(
Loader& l) {
138 l.loadNucleotide(*
this);
143 Nucleotide::setModified() {
144 Group::setModified();
153 Nucleotide::operator==(
const Nucleotide& other)
const {
154 return (dynamic_cast<const Identity*> (
this)) ==
155 dynamic_cast<const Identity*
> (&other);
159 Nucleotide::operator!=(
const Nucleotide& other)
const {
160 return (dynamic_cast<const Identity*> (
this)) !=
161 dynamic_cast<const Identity*
> (&other);
166 Nucleotide::operator[](
unsigned int n) {
167 PRECOND(n < this->size(), exception);
168 return Group::getAtom(n);
172 Nucleotide::operator[](
unsigned int n)
const {
173 PRECOND(n < this->size(), exception);
174 return Group::getAtom(n);
178 Nucleotide::operator[](
const AtomCode& ac) {
180 INVARIANT(a != NULL, exception);
185 Nucleotide::operator[](
const AtomCode& ac)
const {
187 INVARIANT(a != NULL, exception);
191 #endif //_NUCLEOTIDE_H_
Base class for saving components (Atoms, Groups, etc.).
Definition: Saver.h:39
Implements a simple nucleotide.
Definition: Nucleotide.h:37
void copy(const Nucleotide &orig)
Definition: Nucleotide.cc:67
void setType(string _name)
Definition: Nucleotide.h:131
This class implements a simple chemical group.
Definition: Group.h:35
void resetBoundaries()
Definition: Group.cc:50
Base class for composite structures.
Definition: Component.h:39
Nucleotide()
Definition: Nucleotide.cc:33
Base class for loading components (Atoms, Groups, etc.).
Definition: Loader.h:39
virtual ~Nucleotide()
Definition: Nucleotide.cc:49
Nucleotide & operator=(const Nucleotide &orig)
Definition: Nucleotide.cc:97
Atom * pGetAtom(const AtomCode &ac) const
Definition: Group.cc:200
Implements a simple atom type.
Definition: Atom.h:39
virtual Component * clone()
Definition: Nucleotide.cc:84
Implements methods to manage translation vector and angles between vectors.
Definition: IntCoordConverter.h:46