BALL::DNAMutator Class Reference

#include <BALL/STRUCTURE/DNAMutator.h>

List of all members.

Public Types

enum  Base {
  ADENINE = 0, THYMINE = 1, GUANINE = 2, CYTOSINE = 3,
  URACILE = 4
}

Public Member Functions

 DNAMutator (EnergyMinimizer *mini=NULL, ForceField *ff=NULL, FragmentDB *frag=NULL)
 ~DNAMutator ()
void setup ()
void mutate (Fragment *res, Base base) throw (Exception::InvalidOption)
void setMinimizer (EnergyMinimizer *mini)
void setFragmentDB (FragmentDB *frag)
void setForceField (ForceField *ff)
void setMaxOptimizationSteps (Size steps)
void setUsedProperty (Property p)

Private Member Functions

void freeDB_ ()
void freeFF_ ()
void mark_ (AtomContainer *atoms)
void unmark_ (AtomContainer *atoms)
void tryFlip_ (Fragment *res, const Vector3 &connect_atom, const Vector3 &axis) const
bool optimize_ (Fragment *frag)
AtomgetAttachmentAtom (AtomContainer *res)
AtommarkBaseAtoms (AtomContainer *res)
void rotateBases (AtomContainer *from, const Atom *from_at, const Atom *to_at, const Vector3 &from_connection, const Vector3 &to_connection)
void rotateSameBases (AtomContainer *from, AtomContainer *to)
const AtomgetSecondNitro (const std::vector< const Atom * > &ring_atoms, const Atom *base)
Vector3 getNormalVector (const Atom *at)
AtomgetConnectionAtom (Atom *at)
Vector3 getOrthogonalVector (const Vector3 &n, const Atom *base, const Atom *at)
bool isPurine (const Atom &baseNitrogen) const
bool isPyrimidine (const Atom &baseNitrogen) const

Private Attributes

bool keep_db_
bool keep_ff_
FragmentDBdb_
ForceFieldff_
EnergyMinimizerminimizer_
Size num_steps_
Property prop_

Static Private Attributes

static const char * bases_ []
static const Size default_num_steps_

Detailed Description

Definition at line 23 of file DNAMutator.h.


Member Enumeration Documentation

Entries of this enum are used for the selection of bases in the mutate function

Enumerator:
ADENINE 
THYMINE 
GUANINE 
CYTOSINE 
URACILE 

Definition at line 29 of file DNAMutator.h.


Constructor & Destructor Documentation

BALL::DNAMutator::DNAMutator ( EnergyMinimizer mini = NULL,
ForceField ff = NULL,
FragmentDB frag = NULL 
)

Constructs a DNAMutator

Parameters:
frag A FragmentDB instance that shall be used to obtain structure of the new bases. If nothing or NULL is passed a default FragmentDB is used. The FragmentDB is initialized as needed causing a short delay when mutating the first base. If you do not want this either pass a valid FragmentDB instance or call DNAMutator::setup() prior to using. You can set a new FragmentDB using DNAMutator::setFragmentDB()
mini The minimizer that shall be used for optimization of the mutated base. If nothing or NULL is passed optimization is disabled. You can pass a new minimizer anytime using DNAMutator::setMinimizer().
ff The forcefield that should be used in conjunction with the minimizer You can set a new forcefield anytime using DNAMutator::setForceField().
See also:
DNAMutator::setup(), DNAMutator::setFragmentDB(), DNAMutator::setMinimizer() DNAMutator::setForceField()
BALL::DNAMutator::~DNAMutator (  ) 

The destructor of the the DNAMutator must delete the FragmentDB instance iff it has been auto generated


Member Function Documentation

void BALL::DNAMutator::freeDB_ (  )  [private]
void BALL::DNAMutator::freeFF_ (  )  [private]
Atom* BALL::DNAMutator::getAttachmentAtom ( AtomContainer res  )  [private]

This function returns a pointer to the nitrogen atom that attaches a base to the sugar backbone

Atom* BALL::DNAMutator::getConnectionAtom ( Atom at  )  [private]
Vector3 BALL::DNAMutator::getNormalVector ( const Atom at  )  [private]
Vector3 BALL::DNAMutator::getOrthogonalVector ( const Vector3 n,
const Atom base,
const Atom at 
) [private]
const Atom* BALL::DNAMutator::getSecondNitro ( const std::vector< const Atom * > &  ring_atoms,
const Atom base 
) [private]
bool BALL::DNAMutator::isPurine ( const Atom baseNitrogen  )  const [private]

The methods below decide whether a base is a Purine or a Pyrimidine. In an ideal distant future this should be stored in the fragment and thus be not necessary.

bool BALL::DNAMutator::isPyrimidine ( const Atom baseNitrogen  )  const [private]
void BALL::DNAMutator::mark_ ( AtomContainer atoms  )  [private]
Atom* BALL::DNAMutator::markBaseAtoms ( AtomContainer res  )  [private]

Selects the atoms in a base. If succesfull it returns the pointer to the attachment nitrogen.

void BALL::DNAMutator::mutate ( Fragment res,
Base  base 
) throw (Exception::InvalidOption)

This method changes a given base to another one. Changing the base on the opposite strand is
not handled. Most likely you will need to localy reoptimize the structure after the insertion.

Parameters:
res A pointer to the Fragment that will be changed
base A string specifiying the base which will be used to replace the current one. Can be one of "A", "T", "G", "C" and "U".
bool BALL::DNAMutator::optimize_ ( Fragment frag  )  [private]

Reoptimize the given fragment using the minimizer stored in minimizer_.

Returns:
false on error.
void BALL::DNAMutator::rotateBases ( AtomContainer from,
const Atom from_at,
const Atom to_at,
const Vector3 from_connection,
const Vector3 to_connection 
) [private]
void BALL::DNAMutator::rotateSameBases ( AtomContainer from,
AtomContainer to 
) [private]
void BALL::DNAMutator::setForceField ( ForceField ff  ) 
void BALL::DNAMutator::setFragmentDB ( FragmentDB frag  ) 
void BALL::DNAMutator::setMaxOptimizationSteps ( Size  steps  ) 
void BALL::DNAMutator::setMinimizer ( EnergyMinimizer mini  ) 
void BALL::DNAMutator::setup (  ) 

Calling this method explicitly circumvents lazy loading of the FragmentDB. This method has no effect if mutate has already been called or if valid instances of the fragmentDB has been passed via the constructor.

Warning:
If you called setup() and then set the FragmentDB to NULL via setFragmentDB() you will need to call setup() again in order to prevent lazy loading.
void BALL::DNAMutator::setUsedProperty ( Property  p  ) 
void BALL::DNAMutator::tryFlip_ ( Fragment res,
const Vector3 connect_atom,
const Vector3 axis 
) const [private]
void BALL::DNAMutator::unmark_ ( AtomContainer atoms  )  [private]

Member Data Documentation

const char* BALL::DNAMutator::bases_[] [static, private]

Definition at line 173 of file DNAMutator.h.

Definition at line 121 of file DNAMutator.h.

const Size BALL::DNAMutator::default_num_steps_ [static, private]

Definition at line 174 of file DNAMutator.h.

Definition at line 122 of file DNAMutator.h.

Definition at line 118 of file DNAMutator.h.

Definition at line 119 of file DNAMutator.h.

Definition at line 123 of file DNAMutator.h.

Definition at line 125 of file DNAMutator.h.

Definition at line 126 of file DNAMutator.h.

Generated by  doxygen 1.6.3