8 #ifndef IMPATOM_RESIDUE_H
9 #define IMPATOM_RESIDUE_H
11 #include "atom_config.h"
13 #include "Hierarchy.h"
21 IMPATOM_BEGIN_NAMESPACE
139 int index=-1,
int insertion_code = 32) {
140 p->add_attribute(get_residue_type_key(), t.get_index());
141 p->add_attribute(get_index_key(), index);
142 p->add_attribute(get_insertion_code_key(), insertion_code);
144 if (!Hierarchy::particle_is_instance(p)) {
145 Hierarchy::setup_particle(p);
156 o.get_insertion_code());
160 return p->has_attribute(get_residue_type_key())
161 && p->has_attribute(get_index_key())
162 && p->has_attribute(get_insertion_code_key())
163 && Hierarchy::particle_is_instance(p);
173 bool get_is_protein()
const {
177 bool get_is_dna()
const {
182 bool get_is_rna()
const {
191 char get_insertion_code()
const {
192 return char(
get_particle()->get_value(get_insertion_code_key()));
195 void set_insertion_code(
char insertion_code) {
196 return get_particle()->set_value(get_insertion_code_key(), insertion_code);
199 static IntKey get_index_key();
201 static IntKey get_residue_type_key();
203 static IntKey get_insertion_code_key();
248 IMPATOM_END_NAMESPACE