Loading...
Searching...
No Matches
DNAMutator.h
Go to the documentation of this file.
/*
* File: BALL/STRUCTURE/DNAMutator.h
* Created: 23.10.2008
*
* Author: Daniel Stoeckel
*/
#ifndef DNAMUTATOR_H
#define DNAMUTATOR_H
#include <BALL/COMMON/exception.h>
#include <BALL/MATHS/vector3.h>
#include <BALL/STRUCTURE/mutator.h>
#include <BALL/STRUCTURE/nucleotideMapping.h>
#include <deque>
#include <map>
namespace BALL
{
class Chain;
class Residue;
class FragmentDB;
class EnergyMinimizer;
class ForceField;
class Fragment;
class AtomContainer;
class Atom;
class BALL_EXPORT DNAMutator
: public Mutator
{
public:
enum MatchingMode
{
MINIMUM_ANGLE,
MATCH_TORSION
};
DNAMutator(EnergyMinimizer* mini = NULL, ForceField* ff = NULL, FragmentDB* frag = NULL);
~DNAMutator();
virtual void setup();
void setMinimizer(EnergyMinimizer* mini);
void setForceField(ForceField* ff);
void setMaxOptimizationSteps(Size steps);
void setUsedProperty(Property p);
bool optimize();
void setStrands(Chain* s1, Chain* s2);
void setFirstStrand(Chain* s1);
void setSecondStrand(Chain* s2);
void setNucleotideMapping(const NucleotideMapping& bij);
void addMutation(Index i, const String& new_frag_name);
void clearMutations();
void setMatchingMode(MatchingMode mmode);
protected:
virtual void mutate_impl_(MutatorOptions opt);
private:
typedef std::map<Residue*, String> Mutations;
typedef Mutations::iterator MutIterator;
bool keep_ff_;
ForceField* ff_;
EnergyMinimizer* minimizer_;
Size num_steps_;
Property prop_;
Chain* first_strand_;
Chain* second_strand_;
NucleotideMapping mapping_;
MatchingMode matching_mode_;
void mutateSingleBase_(Residue* res, const String& basename) const;
void freeFF_();
void mark_(AtomContainer* atoms) const;
void unmark_(AtomContainer* atoms) const;
bool optimize_(Fragment* frag);
Atom* getAttachmentAtom(AtomContainer* res) const;
Atom* markBaseAtoms_(AtomContainer* res) const;
void alignBases_(AtomContainer* from, const Vector3& from_connection, const Vector3& to_connection, Atom* from_at) const;
Atom* getTorsionDefiningAtom_(Atom* atom) const;
const Atom* getTorsionDefiningAtom_(const Atom* atom) const;
void rotateBasesMatchTorsion_(AtomContainer* from, const Atom* to_connection_at, Atom* from_at, const Atom* to_at) const;
void rotateBasesMinAngle_ (AtomContainer* from, const Vector3& to_connection, Atom* from_at, const Atom* to_at) const;
void rotateSameBases_(AtomContainer* from, AtomContainer* to) const;
Vector3 getNormalVector_(const Atom* at) const;
Atom* getConnectionAtom_(Atom* at) const;
String canonizeName_(const String& frag_name) const;
bool isPurine_(const Atom& baseNitrogen) const;
bool isPyrimidine_(const Atom& baseNitrogen) const;
static const char* bases_[];
static const Size default_num_steps_;
String getComplement_(const String& s) const;
std::map<Residue*, String> mutations_;
std::deque<Atom*> to_optimize_;
};
}
#endif
exception.h
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::AtomContainer
Definition atomContainer.h:32
BALL::Atom
Definition atom.h:90
BALL::Chain
Definition chain.h:32
BALL::DNAMutator::DNAMutator
DNAMutator(EnergyMinimizer *mini=NULL, ForceField *ff=NULL, FragmentDB *frag=NULL)
BALL::DNAMutator::setNucleotideMapping
void setNucleotideMapping(const NucleotideMapping &bij)
BALL::DNAMutator::setup
virtual void setup()
BALL::DNAMutator::setUsedProperty
void setUsedProperty(Property p)
BALL::DNAMutator::setForceField
void setForceField(ForceField *ff)
BALL::DNAMutator::setFirstStrand
void setFirstStrand(Chain *s1)
BALL::DNAMutator::setMaxOptimizationSteps
void setMaxOptimizationSteps(Size steps)
BALL::DNAMutator::MatchingMode
MatchingMode
Definition DNAMutator.h:37
BALL::DNAMutator::MATCH_TORSION
@ MATCH_TORSION
Definition DNAMutator.h:42
BALL::DNAMutator::MINIMUM_ANGLE
@ MINIMUM_ANGLE
Use a minimum angle criterion and try out which conformation fits best.
Definition DNAMutator.h:39
BALL::DNAMutator::mutate_impl_
virtual void mutate_impl_(MutatorOptions opt)
BALL::DNAMutator::~DNAMutator
~DNAMutator()
BALL::DNAMutator::addMutation
void addMutation(Index i, const String &new_frag_name)
BALL::DNAMutator::setMatchingMode
void setMatchingMode(MatchingMode mmode)
BALL::DNAMutator::setSecondStrand
void setSecondStrand(Chain *s2)
BALL::DNAMutator::setStrands
void setStrands(Chain *s1, Chain *s2)
BALL::DNAMutator::clearMutations
void clearMutations()
BALL::DNAMutator::optimize
bool optimize()
BALL::DNAMutator::setMinimizer
void setMinimizer(EnergyMinimizer *mini)
BALL::EnergyMinimizer
Definition energyMinimizer.h:30
BALL::ForceField
Definition forceField.h:86
BALL::FragmentDB
Definition fragmentDB.h:45
BALL::Fragment
Definition fragment.h:22
BALL::Mutator::Mutator
Mutator(FragmentDB *db=0)
BALL::Mutator::MutatorOptions
MutatorOptions
Definition mutator.h:20
BALL::NucleotideMapping
Definition nucleotideMapping.h:22
BALL::Residue
Definition residue.h:38
BALL::String
Definition string.h:57
BALL::atoms
BALL_EXPORT AtomList atoms(const AtomContainer &fragment, const String &expression=String())
mutator.h
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::Property
BALL_SIZE_TYPE Property
Definition COMMON/global.h:165
BALL::Vector3
TVector3< float > Vector3
Definition vector3.h:1084
BALL::Index
BALL_INDEX_TYPE Index
Definition COMMON/global.h:105
nucleotideMapping.h
vector3.h