Loading...
Searching...
No Matches
residueChecker.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_STRUCTURE_RESIDUECHECKER_H
#define BALL_STRUCTURE_RESIDUECHECKER_H
#ifndef BALL_MATHS_COMMON_H
# include <BALL/MATHS/common.h>
#endif
#ifndef BALL_COMMON_H
# include <BALL/common.h>
#endif
#ifndef BALL_CONCEPT_PROCESSOR_H
# include <BALL/CONCEPT/processor.h>
#endif
#ifndef BALL_DATATYPE_BITVECTOR_H
# include <BALL/DATATYPE/bitVector.h>
#endif
namespace BALL
{
class FragmentDB;
class Residue;
class BALL_EXPORT ResidueChecker
: public UnaryProcessor<Residue>
{
public:
BALL_CREATE(ResidueChecker)
enum TestType
{
MISSING_ATOMS = 0,
EXTRA_ATOMS,
ELEMENTS,
SUSPECT_BOND_LENGTHS,
NON_INTEGRAL_NET_CHARGE,
LARGE_CHARGES,
LARGE_NET_CHARGE,
NAN_POSITIONS,
OVERLAPPING_ATOMS,
STRONGLY_OVERLAPPING_ATOMS,
DUPLICATE_ATOM_NAMES,
UNKNOWN_RESIDUES,
NUMBER_OF_TESTS
};
ResidueChecker();
ResidueChecker(FragmentDB& fragment_db);
ResidueChecker(const ResidueChecker& residue_checker);
virtual ~ResidueChecker();
void enable(TestType t, bool enable = true) ;
void disable(TestType t) ;
void enableSelection() { selection_ = true; }
void disableSelection() { selection_ = false; }
bool isSelectionEnabled() { return selection_; }
bool getStatus() const;
bool isEnabled(TestType t) const ;
Processor::Result operator () (Residue& residue);
bool start();
bool finish();
bool checkAtomPositions(const Residue& res, const String& res_name)
;
bool checkCharge(const Residue& res, const String& res_name)
;
bool checkCompleteness(const Residue& res, const Residue& reference, const String& res_name)
;
bool checkTemplate(const Residue& res, const Residue& reference, const String& res_name)
;
protected:
// The fragment database
FragmentDB* fragment_db_;
// Bool flag indicating whether any of the tests failed
bool status_;
// A bitvector containing the flags for the tests
BitVector tests_;
// If this flag is set, all atoms/residues having problems will be selected
bool selection_;
};
} // namespace BALL
#endif // BALL_STRUCTURE_RESIDUE_CHECKER
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
common.h
bitVector.h
BALL::BitVector
Definition bitVector.h:177
BALL::FragmentDB
Definition fragmentDB.h:45
BALL::Processor::Result
int Result
Definition processor.h:36
BALL::ResidueChecker::disableSelection
void disableSelection()
Definition residueChecker.h:211
BALL::ResidueChecker::finish
bool finish()
BALL::ResidueChecker::ResidueChecker
ResidueChecker()
BALL::ResidueChecker::~ResidueChecker
virtual ~ResidueChecker()
BALL::ResidueChecker::fragment_db_
FragmentDB * fragment_db_
Definition residueChecker.h:277
BALL::ResidueChecker::ResidueChecker
ResidueChecker(const ResidueChecker &residue_checker)
BALL::ResidueChecker::tests_
BitVector tests_
Definition residueChecker.h:283
BALL::ResidueChecker::disable
void disable(TestType t)
BALL::ResidueChecker::checkCharge
bool checkCharge(const Residue &res, const String &res_name)
BALL::ResidueChecker::isEnabled
bool isEnabled(TestType t) const
BALL::ResidueChecker::isSelectionEnabled
bool isSelectionEnabled()
Definition residueChecker.h:215
BALL::ResidueChecker::ResidueChecker
ResidueChecker(FragmentDB &fragment_db)
BALL::ResidueChecker::selection_
bool selection_
Definition residueChecker.h:286
BALL::ResidueChecker::start
bool start()
BALL::ResidueChecker::status_
bool status_
Definition residueChecker.h:280
BALL::ResidueChecker::getStatus
bool getStatus() const
BALL::ResidueChecker::TestType
TestType
Definition residueChecker.h:142
BALL::ResidueChecker::LARGE_NET_CHARGE
@ LARGE_NET_CHARGE
Definition residueChecker.h:156
BALL::ResidueChecker::DUPLICATE_ATOM_NAMES
@ DUPLICATE_ATOM_NAMES
Definition residueChecker.h:164
BALL::ResidueChecker::LARGE_CHARGES
@ LARGE_CHARGES
Definition residueChecker.h:154
BALL::ResidueChecker::STRONGLY_OVERLAPPING_ATOMS
@ STRONGLY_OVERLAPPING_ATOMS
Definition residueChecker.h:162
BALL::ResidueChecker::ELEMENTS
@ ELEMENTS
Definition residueChecker.h:148
BALL::ResidueChecker::NUMBER_OF_TESTS
@ NUMBER_OF_TESTS
Definition residueChecker.h:168
BALL::ResidueChecker::EXTRA_ATOMS
@ EXTRA_ATOMS
Definition residueChecker.h:146
BALL::ResidueChecker::MISSING_ATOMS
@ MISSING_ATOMS
Definition residueChecker.h:144
BALL::ResidueChecker::SUSPECT_BOND_LENGTHS
@ SUSPECT_BOND_LENGTHS
Definition residueChecker.h:150
BALL::ResidueChecker::NON_INTEGRAL_NET_CHARGE
@ NON_INTEGRAL_NET_CHARGE
Definition residueChecker.h:152
BALL::ResidueChecker::UNKNOWN_RESIDUES
@ UNKNOWN_RESIDUES
Definition residueChecker.h:166
BALL::ResidueChecker::OVERLAPPING_ATOMS
@ OVERLAPPING_ATOMS
Definition residueChecker.h:160
BALL::ResidueChecker::NAN_POSITIONS
@ NAN_POSITIONS
Definition residueChecker.h:158
BALL::ResidueChecker::enableSelection
void enableSelection()
Definition residueChecker.h:207
BALL::ResidueChecker::checkAtomPositions
bool checkAtomPositions(const Residue &res, const String &res_name)
BALL::ResidueChecker::enable
void enable(TestType t, bool enable=true)
BALL::ResidueChecker::checkCompleteness
bool checkCompleteness(const Residue &res, const Residue &reference, const String &res_name)
BALL::ResidueChecker::checkTemplate
bool checkTemplate(const Residue &res, const Residue &reference, const String &res_name)
BALL::Residue
Definition residue.h:38
BALL::String
Definition string.h:57
BALL::UnaryProcessor< Residue >::UnaryProcessor
UnaryProcessor()
Definition processor.h:69
common.h
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
BALL
Definition constants.h:13
processor.h