Loading...
Searching...
No Matches
chain.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_KERNEL_CHAIN_H
#define BALL_KERNEL_CHAIN_H
#ifndef BALL_KERNEL_RESIDUE_H
# include <BALL/KERNEL/residue.h>
#endif
#ifndef BALL_KERNEL_SECONDARYSTRUCTUREITERATOR_H
# include <BALL/KERNEL/secondaryStructureIterator.h>
#endif
#define BALL_CHAIN_DEFAULT_NAME ' '
namespace BALL
{
class Protein;
class BALL_EXPORT Chain
: public AtomContainer
{
public:
BALL_CREATE_DEEP(Chain)
enum Property
{
NUMBER_OF_PROPERTIES = AtomContainer::NUMBER_OF_PROPERTIES
};
Chain();
Chain(const Chain& chain, bool deep = true);
Chain(const String& name);
virtual ~Chain();
void persistentWrite(PersistenceManager& pm, const char* name = 0) const;
void persistentRead(PersistenceManager& pm);
void set(const Chain& chain, bool deep = true);
Chain& operator = (const Chain& chain);
void get(Chain& chain, bool deep = true) const;
void swap(Chain& chain);
bool operator == (const Chain& chain) const;
bool operator != (const Chain& chain) const;
Protein* getProtein();
const Protein* getProtein() const;
SecondaryStructure* getSecondaryStructure(Position position);
const SecondaryStructure* getSecondaryStructure(Position position) 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 countSecondaryStructures() const;
Size countResidues() const;
Size countPDBAtoms() const;
void prepend(SecondaryStructure& secondary_structure);
void append(SecondaryStructure& secondary_structure);
void insert(SecondaryStructure& secondary_structure);
void insertBefore(SecondaryStructure& secondary_structure, Composite& before);
void insertAfter(SecondaryStructure& secondary_structure, Composite& after);
bool remove(SecondaryStructure& secondary_structure);
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(Chain& chain);
void spliceAfter(Chain &chain);
void splice(Chain &chain);
virtual bool isChain() const { return true; }
virtual void dump(std::ostream& s = std::cout, Size depth = 0) const
;
// --- EXTERNAL ITERATORS
BALL_KERNEL_DEFINE_ITERATOR_CREATORS(SecondaryStructure)
BALL_KERNEL_DEFINE_ITERATOR_CREATORS(Residue)
BALL_KERNEL_DEFINE_ITERATOR_CREATORS(PDBAtom)
BALL_DECLARE_STD_ITERATOR_WRAPPER(Chain, SecondaryStructure, secondaryStructures)
BALL_DECLARE_STD_ITERATOR_WRAPPER(Chain, Residue , residues)
BALL_DECLARE_STD_ITERATOR_WRAPPER(Chain, PDBAtom , pdbAtoms)
protected:
private:
AtomContainer* getAtomContainer(Position position);
const AtomContainer* getAtomContainer(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(Chain, AtomContainer, atomContainers)
};
} // namespace BALL
#endif // BALL_KERNEL_CHAIN_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::AtomContainer::AtomContainer
AtomContainer()
BALL::AtomContainer::NUMBER_OF_PROPERTIES
@ NUMBER_OF_PROPERTIES
Definition atomContainer.h:45
BALL::Atom
Definition atom.h:90
BALL::Chain::insert
void insert(SecondaryStructure &secondary_structure)
BALL::Chain::remove
bool remove(SecondaryStructure &secondary_structure)
BALL::Chain::insertAfter
void insertAfter(SecondaryStructure &secondary_structure, Composite &after)
BALL::Chain::insertBefore
void insertBefore(SecondaryStructure &secondary_structure, Composite &before)
BALL::Chain::set
void set(const Chain &chain, bool deep=true)
BALL::Chain::isChain
virtual bool isChain() const
Definition chain.h:313
BALL::Chain::Property
Property
Definition chain.h:44
BALL::Chain::NUMBER_OF_PROPERTIES
@ NUMBER_OF_PROPERTIES
Definition chain.h:45
BALL::Chain::Chain
Chain(const Chain &chain, bool deep=true)
Copy constructor.
BALL::Chain::spliceAfter
void spliceAfter(Chain &chain)
BALL::Chain::countPDBAtoms
Size countPDBAtoms() const
BALL::Chain::getCTerminal
Residue * getCTerminal()
BALL::Chain::getPDBAtom
PDBAtom * getPDBAtom(Position position)
BALL::Chain::splice
void splice(Chain &chain)
BALL::Chain::persistentRead
void persistentRead(PersistenceManager &pm)
BALL::Chain::append
void append(SecondaryStructure &secondary_structure)
BALL::Chain::insertBefore
void insertBefore(Residue &residue, Composite &before)
BALL::Chain::getProtein
const Protein * getProtein() const
BALL::Chain::append
void append(Residue &residue)
BALL::Chain::remove
bool remove(Residue &residue)
BALL::Chain::insert
void insert(Residue &residue)
BALL::Chain::dump
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
BALL::Chain::getSecondaryStructure
SecondaryStructure * getSecondaryStructure(Position position)
BALL::Chain::countResidues
Size countResidues() const
BALL::Chain::~Chain
virtual ~Chain()
Destructor.
BALL::Chain::prepend
void prepend(Residue &residue)
BALL::Chain::swap
void swap(Chain &chain)
BALL::Chain::spliceBefore
void spliceBefore(Chain &chain)
BALL::Chain::getNTerminal
Residue * getNTerminal()
BALL::Chain::get
void get(Chain &chain, bool deep=true) const
BALL::Chain::persistentWrite
void persistentWrite(PersistenceManager &pm, const char *name=0) const
BALL::Chain::getSecondaryStructure
const SecondaryStructure * getSecondaryStructure(Position position) const
BALL::Chain::getPDBAtom
const PDBAtom * getPDBAtom(Position position) const
BALL::Chain::insertAfter
void insertAfter(Residue &residue, Composite &after)
BALL::Chain::prepend
void prepend(SecondaryStructure &secondary_structure)
BALL::Chain::getResidue
const Residue * getResidue(Position position) const
BALL::Chain::getCTerminal
const Residue * getCTerminal() const
BALL::Chain::Chain
Chain(const String &name)
Detailled constructor.
BALL::Chain::getNTerminal
const Residue * getNTerminal() const
BALL::Chain::Chain
Chain()
Default constrcutor.
BALL::Chain::getProtein
Protein * getProtein()
BALL::Chain::countSecondaryStructures
Size countSecondaryStructures() const
BALL::Chain::getResidue
Residue * getResidue(Position position)
BALL::Composite
Definition composite.h:74
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
Definition secondaryStructure.h:31
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::secondaryStructures
BALL_EXPORT SecondaryStructureList secondaryStructures(const AtomContainer &fragment, bool selected_only=false)
BALL::residues
BALL_EXPORT ResidueList residues(const AtomContainer &fragment, bool selected_only=false)
residue.h
secondaryStructureIterator.h
BALL_DECLARE_STD_ITERATOR_WRAPPER
#define BALL_DECLARE_STD_ITERATOR_WRAPPER(container, type, method_name)
Definition stdIteratorWrapper.h:30