Loading...
Searching...
No Matches
secondaryStructure.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_KERNEL_SECONDARYSTRUCTURE_H
#define BALL_KERNEL_SECONDARYSTRUCTURE_H
#ifndef BALL_KERNEL_RESIDUE_H
# include <BALL/KERNEL/residue.h>
#endif
#ifndef BALL_KERNEL_RESIDUEITERATOR_H
# include <BALL/KERNEL/residueIterator.h>
#endif
#ifndef BALL_KERNEL_ATOMCONTAINER_H
# include <BALL/KERNEL/atomContainer.h>
#endif
namespace BALL
{
class BALL_EXPORT SecondaryStructure
: public AtomContainer
{
public:
BALL_CREATE_DEEP(SecondaryStructure)
enum Type
{
HELIX,
COIL,
STRAND,
TURN,
UNKNOWN,
NUMBER_OF_TYPES
};
SecondaryStructure();
SecondaryStructure(const SecondaryStructure& secondary_structure, bool deep = true);
SecondaryStructure(const String& name);
virtual ~SecondaryStructure();
virtual void clear();
virtual void destroy();
bool operator == (const SecondaryStructure& secondary_structure) const;
bool operator != (const SecondaryStructure& secondary_structure) const;
void persistentWrite(PersistenceManager& pm, const char* name = 0) const;
void persistentRead(PersistenceManager& pm);
void set(const SecondaryStructure& secondary_structure, bool deep = true);
SecondaryStructure& operator = (const SecondaryStructure& secondary_structure);
void get(SecondaryStructure& secondary_structure, bool deep = true) const;
void swap(SecondaryStructure& secondary_structure);
Type getType() const { return type_; }
void setType(Type type) { type_ = type; }
Protein* getProtein();
const Protein* getProtein() const;
Chain* getChain();
const Chain* getChain() const;
Residue* getResidue(Position position);
const Residue* getResidue(Position position) const;
Residue* getNTerminal();
const Residue* getNTerminal() const;
Residue* getCTerminal();
const Residue* getCTerminal() const;
PDBAtom* getPDBAtom(Position position);
const PDBAtom* getPDBAtom(Position position) const;
Size countResidues() const;
Size countPDBAtoms() const;
void prepend(Residue& residue);
void append(Residue& residue);
void insert(Residue& residue);
void insertBefore(Residue& residue, Composite& before);
void insertAfter(Residue& residue, Composite& after);
bool remove(Residue& residue);
void spliceBefore(SecondaryStructure& secondary_structure);
void spliceAfter(SecondaryStructure& secondary_structure);
void splice(SecondaryStructure& secondary_structure);
virtual bool isValid() const;
virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
// --- EXTERNAL ITERATORS
BALL_KERNEL_DEFINE_ITERATOR_CREATORS(Residue)
BALL_KERNEL_DEFINE_ITERATOR_CREATORS(PDBAtom)
BALL_DECLARE_STD_ITERATOR_WRAPPER(SecondaryStructure, Residue, residues)
BALL_DECLARE_STD_ITERATOR_WRAPPER(SecondaryStructure, PDBAtom, pdbAtoms)
protected:
Type type_;
private:
Fragment* getFragment(Position position);
const Fragment* getFragment(Position position) const;
Atom* getAtom(Position position);
const Atom* getAtom(Position position) const;
void prepend(Atom& atom);
void append(Atom& atom);
void insert(Atom& atom);
void insertBefore(Atom& atom, Composite& before);
void insertAfter(Atom& atom, Composite& after);
bool remove(Atom& atom);
void prepend(AtomContainer& atom_container);
void append(AtomContainer& atom_container);
void insert(AtomContainer& atom_container);
void insertBefore(AtomContainer& atom_container, Composite& before);
void insertAfter(AtomContainer& atom_container, Composite& after);
void spliceBefore(AtomContainer& atom_container);
void spliceAfter(AtomContainer& atom_container);
void splice(AtomContainer& atom_container);
bool remove(AtomContainer& atom_container);
BALL_KERNEL_DEFINE_ITERATOR_CREATORS(AtomContainer)
BALL_DECLARE_STD_ITERATOR_WRAPPER(SecondaryStructure, AtomContainer, atomContainers)
};
} // namespace BALL
#endif // BALL_KERNEL_SECONDARYSTRUCTURE_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
atomContainer.h
BALL::AtomContainer::AtomContainer
AtomContainer()
BALL::Atom
Definition atom.h:90
BALL::Chain
Definition chain.h:32
BALL::Composite
Definition composite.h:74
BALL::Fragment
Definition fragment.h:22
BALL::PDBAtom
Definition PDBAtom.h:40
BALL::PersistenceManager
Definition persistenceManager.h:73
BALL::Protein
Definition protein.h:30
BALL::Residue
Definition residue.h:38
BALL::SecondaryStructure::SecondaryStructure
SecondaryStructure(const SecondaryStructure &secondary_structure, bool deep=true)
Copy constructor.
BALL::SecondaryStructure::spliceAfter
void spliceAfter(SecondaryStructure &secondary_structure)
BALL::SecondaryStructure::getChain
const Chain * getChain() const
BALL::SecondaryStructure::append
void append(Residue &residue)
BALL::SecondaryStructure::type_
Type type_
The secondary structure type (helix, strand, coil, turn).
Definition secondaryStructure.h:326
BALL::SecondaryStructure::getCTerminal
Residue * getCTerminal()
BALL::SecondaryStructure::getProtein
Protein * getProtein()
BALL::SecondaryStructure::~SecondaryStructure
virtual ~SecondaryStructure()
Destructor.
BALL::SecondaryStructure::getType
Type getType() const
Return the type of secondary structure.
Definition secondaryStructure.h:150
BALL::SecondaryStructure::splice
void splice(SecondaryStructure &secondary_structure)
BALL::SecondaryStructure::destroy
virtual void destroy()
Clear the contents of the secondary structure and remove it from all composite structures.
BALL::SecondaryStructure::countPDBAtoms
Size countPDBAtoms() const
BALL::SecondaryStructure::persistentRead
void persistentRead(PersistenceManager &pm)
BALL::SecondaryStructure::remove
bool remove(Residue &residue)
BALL::SecondaryStructure::getPDBAtom
PDBAtom * getPDBAtom(Position position)
BALL::SecondaryStructure::insertAfter
void insertAfter(Residue &residue, Composite &after)
BALL::SecondaryStructure::dump
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
BALL::SecondaryStructure::getPDBAtom
const PDBAtom * getPDBAtom(Position position) const
BALL::SecondaryStructure::SecondaryStructure
SecondaryStructure(const String &name)
BALL::SecondaryStructure::getNTerminal
const Residue * getNTerminal() const
BALL::SecondaryStructure::getResidue
Residue * getResidue(Position position)
BALL::SecondaryStructure::Type
Type
Definition secondaryStructure.h:43
BALL::SecondaryStructure::NUMBER_OF_TYPES
@ NUMBER_OF_TYPES
Definition secondaryStructure.h:55
BALL::SecondaryStructure::STRAND
@ STRAND
Definition secondaryStructure.h:49
BALL::SecondaryStructure::COIL
@ COIL
Definition secondaryStructure.h:47
BALL::SecondaryStructure::TURN
@ TURN
Definition secondaryStructure.h:51
BALL::SecondaryStructure::UNKNOWN
@ UNKNOWN
Definition secondaryStructure.h:53
BALL::SecondaryStructure::HELIX
@ HELIX
Definition secondaryStructure.h:45
BALL::SecondaryStructure::swap
void swap(SecondaryStructure &secondary_structure)
BALL::SecondaryStructure::spliceBefore
void spliceBefore(SecondaryStructure &secondary_structure)
BALL::SecondaryStructure::set
void set(const SecondaryStructure &secondary_structure, bool deep=true)
BALL::SecondaryStructure::getCTerminal
const Residue * getCTerminal() const
BALL::SecondaryStructure::clear
virtual void clear()
Clear the contents of the secondary structure.
BALL::SecondaryStructure::prepend
void prepend(Residue &residue)
BALL::SecondaryStructure::countResidues
Size countResidues() const
BALL::SecondaryStructure::insertBefore
void insertBefore(Residue &residue, Composite &before)
BALL::SecondaryStructure::getProtein
const Protein * getProtein() const
BALL::SecondaryStructure::getResidue
const Residue * getResidue(Position position) const
BALL::SecondaryStructure::persistentWrite
void persistentWrite(PersistenceManager &pm, const char *name=0) const
BALL::SecondaryStructure::insert
void insert(Residue &residue)
BALL::SecondaryStructure::getChain
Chain * getChain()
BALL::SecondaryStructure::SecondaryStructure
SecondaryStructure()
Default constructor.
BALL::SecondaryStructure::getNTerminal
Residue * getNTerminal()
BALL::SecondaryStructure::setType
void setType(Type type)
Set the type of secondary structure.
Definition secondaryStructure.h:153
BALL::SecondaryStructure::isValid
virtual bool isValid() const
BALL::SecondaryStructure::get
void get(SecondaryStructure &secondary_structure, bool deep=true) const
BALL::String
Definition string.h:57
BALL_CREATE_DEEP
#define BALL_CREATE_DEEP(name)
Definition create.h:26
BALL_KERNEL_DEFINE_ITERATOR_CREATORS
#define BALL_KERNEL_DEFINE_ITERATOR_CREATORS(Type)
Definition iterator.h:25
BALL
Definition constants.h:13
BALL::atomContainers
BALL_EXPORT AtomContainerList atomContainers(const AtomContainer &fragment, bool selected_only=false)
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::Position
BALL_SIZE_TYPE Position
Definition COMMON/global.h:140
BALL::residues
BALL_EXPORT ResidueList residues(const AtomContainer &fragment, bool selected_only=false)
residueIterator.h
residue.h
BALL_DECLARE_STD_ITERATOR_WRAPPER
#define BALL_DECLARE_STD_ITERATOR_WRAPPER(container, type, method_name)
Definition stdIteratorWrapper.h:30